var cov_fw2uvrcla = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\updates\\system-updates.js',
        hash = 'ef4ef22e0d9a23d4d2e1bfbdf6bdbfc50797818f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\updates\\system-updates.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/updates/system-updates',['exports', 'aurelia-framework', '../../services/updates-service'], function (exports, _aureliaFramework, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemUpdates = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SystemUpdates = exports.SystemUpdates = (_dec = (0, _aureliaFramework.inject)(_updatesService.UpdatesService), _dec(_class = function () {
        function SystemUpdates(updatesService) {
            _classCallCheck(this, SystemUpdates);

            this.updatesService = updatesService;
        }

        SystemUpdates.prototype.attached = function attached() {
            var _this = this;

            this.updatesService.getCurrentVersion().then(function (version) {
                _this.currentVersion = version;
            });
            this.updatesService.getAllPackages().then(function (packages) {
                _this.allPackages = packages;
                _this.newestVersion = _this.allPackages[0].version;
            });
        };

        return SystemUpdates;
    }()) || _class);
});
define('text!views/updates/system-updates.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"components/updates/update-package\"></require>\r\n    <h4><i class=\"px-nav-icon ion-android-cloud-outline\"></i>${\"Updates\" | t}</h4>\r\n    <div repeat.for=\"update of allPackages\">\r\n        <update-package current-version.bind=\"currentVersion\" newest-version.bind=\"newestVersion\" update-package.bind=\"update\"></update-package>\r\n    </div>\r\n</template>\r\n"; });
var cov_261ix37onu = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\sign-in\\sign-in.js',
        hash = 'e07e8a63d81100331813a9be4a65acd925b2d398',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\sign-in\\sign-in.js',
        statementMap: {
            '0': {
                start: {
                    line: 17,
                    column: 8
                },
                end: {
                    line: 17,
                    column: 25
                }
            },
            '1': {
                start: {
                    line: 18,
                    column: 8
                },
                end: {
                    line: 18,
                    column: 39
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 16,
                        column: 4
                    },
                    end: {
                        line: 16,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 16,
                        column: 35
                    },
                    end: {
                        line: 19,
                        column: 5
                    }
                },
                line: 16
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0
        },
        f: {
            '0': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/sign-in/sign-in',['exports', 'aurelia-framework', 'aurelia-auth', '../../resources/managers/root-manager'], function (exports, _aureliaFramework, _aureliaAuth, _rootManager) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SignIn = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SignIn = exports.SignIn = (_dec = (0, _aureliaFramework.inject)(_aureliaAuth.AuthService, _rootManager.RootManager), _dec(_class = function () {
        function SignIn(auth, rootManager) {
            _classCallCheck(this, SignIn);

            cov_261ix37onu.f[0]++;
            cov_261ix37onu.s[0]++;

            this.auth = auth;
            cov_261ix37onu.s[1]++;
            this.rootManager = rootManager;
        }

        SignIn.prototype.login = function login() {
            var _this = this;

            return this.auth.login($.param({ username: this.username, password: this.password, grant_type: 'password' })).then(function () {
                _this.rootManager.setRoot('app');
            });
        };

        return SignIn;
    }()) || _class);
});
define('text!views/sign-in/sign-in.html', ['module'], function(module) { module.exports = "<template>\r\n    <div>\r\n        <form submit.delegate=\"login()\">\r\n            <section>\r\n                <label>${\"Username\" | t}</label>\r\n                <label>\r\n                    <input type=\"text\" value.bind=\"username\" required>\r\n                </label>\r\n            </section>\r\n            <section>\r\n                <label>${\"Password\" | t}</label>\r\n                <label>\r\n                    <input type=\"text\" value.bind=\"password\" required>\r\n                </label>\r\n            </section>\r\n            <button type=\"submit\">${\"Sign In\" | t}</button>\r\n        </form>\r\n        <a route-href=\"route: forgot-password\"><span>${\"Forgot Password?\" | t}</span></a>\r\n    </div>\r\n</template>\r\n"; });
var cov_q1549p8y6 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\settings.js',
        hash = '10fb534466cf779f7f6941f89986b0cf35055a9a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\settings.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/settings',['exports', 'aurelia-framework', '../gateway-state-base', './operator', './boom-nozzle', './pressure-setup', './flow-setup', './navigation-setup', './nh3-setup', './initial-setup'], function (exports, _aureliaFramework, _gatewayStateBase, _operator, _boomNozzle, _pressureSetup, _flowSetup, _navigationSetup, _nh3Setup, _initialSetup) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Settings = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var Settings = exports.Settings = (_dec = (0, _aureliaFramework.inject)(_operator.Operator, _boomNozzle.BoomNozzle, _pressureSetup.PressureSetup, _flowSetup.FlowSetup, _navigationSetup.NavigationSetup, _nh3Setup.Nh3Setup, _initialSetup.InitialSetup), _dec(_class = function (_ref) {
        _inherits(Settings, _ref);

        function Settings(operator, boomNozzle, pressureSetup, flowSetup, navigationSetup, nh3Setup, initialSetup) {
            _classCallCheck(this, Settings);

            for (var _len = arguments.length, rest = Array(_len > 7 ? _len - 7 : 0), _key = 7; _key < _len; _key++) {
                rest[_key - 7] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.widgets = [operator, boomNozzle, pressureSetup, flowSetup, navigationSetup, nh3Setup, initialSetup];
            return _this;
        }

        Settings.prototype.attached = function attached() {
            $('.tree-toggle').each(function () {
                $(this).addClass('ion-chevron-down');
            });

            $('.tree-toggle').click(function () {
                if (!$(this).hasClass('active-tree-toggle')) {
                    var siblingActiveTreeToggle = $(this).closest('.tree').find('.active-tree-toggle');
                    siblingActiveTreeToggle.toggleClass('active-tree-toggle');
                    siblingActiveTreeToggle.toggleClass('ion-chevron-down');
                    siblingActiveTreeToggle.toggleClass('ion-chevron-up');
                    siblingActiveTreeToggle.siblings('ul.tree').toggle(200);
                }

                $(this).toggleClass('ion-chevron-down');
                $(this).toggleClass('ion-chevron-up');
                $(this).parent().children('ul.tree').toggle(200);

                $(this).toggleClass('active-tree-toggle');
            });
            $(function () {
                $('.tree-toggle').parent().children('ul.tree').toggle(200);
            });
        };

        Settings.prototype.taskModeChanged = function taskModeChanged(val) {
            this.editDelta.taskMode = val;
            this.send();
        };

        return Settings;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/settings.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <div class=\"container\">\r\n        <div class=\"row\">\r\n            <h1>System Settings</h1>\r\n        </div>\r\n    </div>\r\n    <div class=\"container-fluid system-settings\">\r\n        <div class=\"well no-padding\">\r\n            <div>\r\n                <ul class=\"nav-list nav-list nav-menu-list-style system-settings tree\">\r\n                    <li repeat.for=\"widget of widgets\" class=\"au-animate root\">\r\n                        <compose\r\n                            model.bind=\"widget.model\"\r\n                            view-model=\"views/settings/${widget.type}\"></compose>\r\n                    </li>\r\n                </ul>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_1afh40bbt3 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\settings-item.js',
        hash = 'f08156fedc88abee97694851d30b32892ccf4448',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\settings-item.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/settings-item',['exports', 'aurelia-framework', '../../resources/value-converters/number-format'], function (exports, _aureliaFramework, _numberFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SettingsItem = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;

    var SettingsItem = exports.SettingsItem = (_dec = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), (_class = function () {
        function SettingsItem() {
            _classCallCheck(this, SettingsItem);

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'units', _descriptor2, this);

            _initDefineProp(this, 'label', _descriptor3, this);

            _initDefineProp(this, 'min', _descriptor4, this);

            _initDefineProp(this, 'max', _descriptor5, this);

            _initDefineProp(this, 'step', _descriptor6, this);

            _initDefineProp(this, 'valueConverter', _descriptor7, this);

            _initDefineProp(this, 'disabled', _descriptor8, this);

            _initDefineProp(this, 'readonly', _descriptor9, this);

            _initDefineProp(this, 'prop', _descriptor10, this);
        }

        SettingsItem.prototype.bind = function bind(bindingContext, overrideContext) {
            this.parent = bindingContext;
        };

        SettingsItem.prototype.sendChange = function sendChange() {
            this.parent.sendChange(this.state[this.prop]);
        };

        SettingsItem.prototype.sendDelta = function sendDelta() {
            this.parent.sendChange(this.parent.state[this.prop], this.prop);
        };

        return SettingsItem;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'val', [_dec], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'units', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'label', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'min', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'max', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, 'step', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return '0.1';
        }
    }), _descriptor7 = _applyDecoratedDescriptor(_class.prototype, 'valueConverter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return _numberFormat.NumberFormatValueConverter;
        }
    }), _descriptor8 = _applyDecoratedDescriptor(_class.prototype, 'disabled', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor9 = _applyDecoratedDescriptor(_class.prototype, 'readonly', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor10 = _applyDecoratedDescriptor(_class.prototype, 'prop', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class));
});
define('text!views/settings/settings-item.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <div class=\"form-group form-group-lg\">\r\n        <label for=\"p-sensor\" class=\"col-xs-4 control-label\" i18n=\"${label}\">\r\n            ${label}\r\n        </label>\r\n        <div class=\"col-xs-6\">\r\n            <input inputmode=\"decimal\" pattern=\"[0-9]*\" type=\"text\" readonly.bind=\"readonly\" id=\"p-sensor\" class=\"form-control\" step=\"${step}\"\r\n                   value.two-way=\"val & updateTrigger:'blur' & autoSync\">\r\n            </input>\r\n        </div>\r\n        <label style=\"text-align: left\" for=\"p-sensor\" class=\"col-xs-2 control-label\" i18n=\"${units}\">\r\n            ${units}\r\n        </label>\r\n    </div>\r\n</template>\r\n"; });
var cov_2ikqtaq87a = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\settings-dropdown.js',
        hash = 'c464119f1cc86bf5fe2764145a1fc5a3e306108a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\settings-dropdown.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/settings-dropdown',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SettingsDropdown = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var SettingsDropdown = exports.SettingsDropdown = (_dec = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), (_class = function () {
        function SettingsDropdown() {
            _classCallCheck(this, SettingsDropdown);

            _initDefineProp(this, 'selected', _descriptor, this);

            _initDefineProp(this, 'disabled', _descriptor2, this);

            _initDefineProp(this, 'options', _descriptor3, this);

            _initDefineProp(this, 'label', _descriptor4, this);

            _initDefineProp(this, 'prop', _descriptor5, this);
        }

        SettingsDropdown.prototype.bind = function bind(bindingContext, overrideContext) {
            this.parent = bindingContext;
        };

        SettingsDropdown.prototype.sendChange = function sendChange(selected) {
            this.parent.sendChange(selected, this.prop);
        };

        return SettingsDropdown;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'selected', [_dec], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'disabled', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'options', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'label', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'prop', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class));
});
define('text!views/settings/settings-dropdown.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\r\n    <div class=\"form-group form-group-lg\">\r\n        <label i18n=\"${label}\" class=\"col-xs-4 control-label\">\r\n            Rate-Sync\r\n        </label>\r\n        <div class=\"col-xs-6\">\r\n            <select disabled.bind=\"disabled\" class=\"form-control\" value.bind=\"selected & autoSync\"\r\n                    change.delegate=\"sendChange(selected)\">\r\n                <option repeat.for=\"option of options\"\r\n                        model.bind=\"option.index\">\r\n                    ${option.label}\r\n                </option>\r\n            </select>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_4wtyb9t6r = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure\\sensor-setup.js',
        hash = '2592563dbb0c3df440ebab48c28f6c8ad171d230',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure\\sensor-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure/sensor-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi', '../../../resources/value-converters/mVoltToVolt'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi, _mVoltToVolt) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SensorSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var SensorSetup = exports.SensorSetup = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter, _mVoltToVolt.MVoltToVoltValueConverter), _dec(_class = function (_ref) {
        _inherits(SensorSetup, _ref);

        function SensorSetup(kpaToPsiValueConverter, mVoltToVoltValueConverter) {
            _classCallCheck(this, SensorSetup);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'sensor-setup';
            _this.voltString = 'Volts';
            _this.pressureString = 'PSI';
            _this.autoSyncProperties = ['PSensor1MinVolt', 'PSensor1MaxVolt', 'PSensor1MinPressure', 'PSensor1MaxPressure', 'PSensor1Offset', 'PSensor2MinVolt', 'PSensor2MaxVolt', 'PSensor2MinPressure', 'PSensor2MaxPressure', 'PSensor2Offset'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            _this.mVoltToVoltValueConverter = mVoltToVoltValueConverter;
            return _this;
        }

        SensorSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('pSensor1MinVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor1MaxVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor1MinPressure').satisfiesRule('numberRange', 0, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor1MaxPressure').satisfiesRule('numberRange', 0, 1723.69, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor1Offset').satisfiesRule('numberRange', -344.738, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor2MinVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor2MaxVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor2MinPressure').satisfiesRule('numberRange', 0, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor2MaxPressure').satisfiesRule('numberRange', 0, 1723.69, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor2Offset').satisfiesRule('numberRange', -344.738, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').rules;
            this.controller.addObject(this.state, rules);
        };

        return SensorSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/pressure/sensor-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mVoltToVolt\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor1MinVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 1 Minimum\"\r\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor1MinVolt\"></div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor1MaxVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 1 Maximum\"\r\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor1MaxVolt\"></div>\r\n\r\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor1MinPressure | kpaToPsi:'0.00' & validate\" label=\"Sensor 1 Minimum\"\r\n                    min=\"0\" max=\"3.44\" units=\"${pressureString}\" prop=\"pSensor1MinPressure\"></div>\r\n\r\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor1MaxPressure | kpaToPsi:'0.00' & validate\" label=\"Sensor 1 Maximum\"\r\n                    min=\"0\" max=\"17.2\" units=\"${pressureString}\" prop=\"pSensor1MaxPressure\"></div>\r\n\r\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor1Offset | kpaToPsi:'0.00' & validate\" label=\"Sensor 1 Offset\"\r\n                    units=\"${pressureString}\" prop=\"pSensor1Offset\"></div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MinVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 2 Minimum\"\r\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor2MinVolt\"></div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MaxVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 2 Maximum\"\r\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor2MaxVolt\"></div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MinPressure | kpaToPsi:'0.00' & validate\" label=\"Sensor 2 Minimum\"\r\n                    min=\"0\" max=\"3.44\" step=\".01\" units=\"${pressureString}\" prop=\"pSensor2MinPressure\"></div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MaxPressure | kpaToPsi:'0.00' & validate\" label=\"Sensor 2 Maximum\"\r\n                    min=\"0\" max=\"17.24\" step=\".01\" units=\"${pressureString}\" prop=\"pSensor2MaxPressure\"></div>\r\n\r\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor2Offset | kpaToPsi:'0.00' & validate\" label=\"Sensor 2 Offset\"\r\n                    min=\"-3.34\" max=\"3.44\" step=\".01\" units=\"${pressureString}\" prop=\"pSensor2Offset\"></div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_j9mla5ysl = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure\\pump-setup.js',
        hash = '0a04606af9b9f43ebcf0e56af57719ba10b5f73d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure\\pump-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure/pump-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PumpSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var PumpSetup = exports.PumpSetup = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter), _dec(_class = function (_ref) {
        _inherits(PumpSetup, _ref);

        function PumpSetup(kpaToPsiValueConverter) {
            _classCallCheck(this, PumpSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'pump-setup';
            _this.servoTypes = [];
            _this.rxMethods = [];
            _this.autoSyncProperties = ['ServoType', 'ServoMinimumPercentage', 'ServoMaximumPercentage', 'ServoManualSpeed', 'PumpShutoffLimit', 'PumpPulsesPerRev', 'PumpMaxSpeed', 'PressureRxMethod'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;

            var keyBase = 'systemSettings.pressure.pumpSetup.';
            _this.servoTypes = _this.getTypes(keyBase + 'servoType');
            _this.rxMethods = _this.getTypes(keyBase + 'rxTypes');
            return _this;
        }

        PumpSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('servoMinimumPercentage').satisfiesRule('numberRange', 0, 100).ensure('servoMaximumPercentage').satisfiesRule('numberRange', 0, 100).ensure('servoManualSpeed').satisfiesRule('numberRange', 10, 100).ensure('pumpShutoffLimit').satisfiesRule('numberRange', 0, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pumpPulsesPerRev').satisfiesRule('numberRange', 1, 100).ensure('pumpMaxSpeed').satisfiesRule('numberRange', 0, 5000).rules;
            this.controller.addObject(this.state, rules);
        };

        return PumpSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/pressure/pump-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <settings-dropdown selected.bind=\"state.servoType\"\r\n                                label=\"systemSettings.pressure.pumpSetup.labels.servoType\"\r\n                                options.bind=\"servoTypes\" prop=\"servoType\"></settings-dropdown>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.servoMinimumPercentage | numberFormat & validate\" step=\"1\"\r\n                    label=\"systemSettings.pressure.pumpSetup.labels.servoMinimumPercentage\"\r\n                    units=\"%\" prop=\"servoMinimumPercentage\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.servoMaximumPercentage | numberFormat & validate\" step=\"1\"\r\n                    label=\"systemSettings.pressure.pumpSetup.labels.servoMaximumPercentage\"\r\n                    units=\"%\" prop=\"servoMaximumPercentage\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.servoManualSpeed | numberFormat & validate\" step=\"1\"\r\n                    label=\"systemSettings.pressure.pumpSetup.labels.servoManualSpeed\"\r\n                    units=\"%\" prop=\"servoManualSpeed\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pumpShutoffLimit | kpaToPsi:'0.00' & validate\" step=\".01\"\r\n                    label=\"systemSettings.pressure.pumpSetup.labels.pumpShutoffLimit\"\r\n                    units=\"units.psi\" prop=\"pumpShutoffLimit\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pumpPulsesPerRev | numberFormat & validate\" step=\"1\"\r\n                    label=\"systemSettings.pressure.pumpSetup.labels.pumpPulsesPerRev\" prop=\"pumpPulsesPerRev\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pumpMaxSpeed | numberFormat & validate\" step=\"1\"\r\n                    label=\"systemSettings.pressure.pumpSetup.labels.pumpMaxSpeed\"\r\n                    units=\"units.rpm\" prop=\"pumpMaxSpeed\">\r\n            </div>\r\n\r\n            <settings-dropdown selected.bind=\"state.pressureRxMethod\"\r\n                                label=\"systemSettings.pressure.pumpSetup.labels.pressureRxMethod\"\r\n                                options.bind=\"rxMethods\" prop=\"pressureRxMethod\"></settings-dropdown>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_txhlothx0 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure\\control-tuning.js',
        hash = '7283db266dea8d4df968b8fd97dbe8cced415d52',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure\\control-tuning.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure/control-tuning',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi', '../../../resources/value-converters/multiplier-format'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi, _multiplierFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ControlTuning = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ControlTuning = exports.ControlTuning = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(ControlTuning, _ref);

        function ControlTuning(kpaToPsiValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, ControlTuning);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'control-tuning';
            _this.mlPerMin = 'ml/min';
            _this.milliseconds = 'milliseconds';
            _this.rateSyncStates = [];
            _this.autoSyncProperties = ['PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK', 'PressureDeadBand', 'PressureServoKick', 'PressureRunHoldDelay', 'RateSyncEnabled'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;
            _this.rateSyncStates = _this.getTypes('common.enabledOptions');
            return _this;
        }

        ControlTuning.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);

            var curriedSecondsToMillisecondsFormat = function curriedSecondsToMillisecondsFormat(n) {
                return function (m) {
                    return _this2.multiplierFormatValueConverter.forValidate(m, n);
                };
            };
            var validateCalc = curriedSecondsToMillisecondsFormat(1000);

            var validatePsiToKpa = function validatePsiToKpa(n) {
                return function (m) {
                    return _this2.kpaToPsiValueConverter.forValidate(m, n);
                };
            };
            var psiKpaConvert = validatePsiToKpa(4);

            var rules = _aureliaValidation.ValidationRules.ensure('pressureGainK').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureGainP').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureGainI').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureGainD').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureDeadBand').satisfiesRule('numberRange', 0, 20.69, psiKpaConvert, '0.00').ensure('pressureServoKick').satisfiesRule('numberRange', 0, 100).ensure('pressureRunHoldDelay').satisfiesRule('numberRange', 0, 10000, validateCalc).rules;
            this.controller.addObject(this.state, rules);
        };

        return ControlTuning;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/pressure/control-tuning.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/multiplier-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainK | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainK\"\r\n                    min=\"0\" max=\"100\" prop=\"pressureGainK\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainP | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainP\"\r\n                    min=\"0\" max=\"100\" prop=\"pressureGainP\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainI | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainI\"\r\n                    min=\"0\" max=\"100\" prop=\"pressureGainI\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainD | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainD\"\r\n                    min=\"0\" max=\"100\" prop=\"pressureGainD\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.pressureDeadBand | kpaToPsi:'0.00' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureDeadBand\"\r\n                    units=\"units.psi\" min=\"0\" max=\"100\" step=\".01\" prop=\"pressureDeadBand\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.pressureServoKick | numberFormat & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureServoKick\"\r\n                    units=\"%\" min=\"0\" max=\"100\" step=\"1\" prop=\"pressureServoKick\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.pressureRunHoldDelay | multiplierFormat:1000:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureRunHoldDelay\"\r\n                    units=\"units.sec\" min=\"0\" max=\"10\" step=\".1\" prop=\"pressureRunHoldDelay\">\r\n            </div>\r\n            <settings-dropdown selected.bind=\"state.rateSyncEnabled\" label=\"systemSettings.pressure.controlTuning.labels.rateSyncType\"\r\n                                options.bind=\"rateSyncStates\" prop=\"rateSyncEnabled\"></settings-dropdown>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_2jh0z2icvo = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure-setup.js',
        hash = '9fd8545cc79a40cb835cc558a3478ef08b7f08cf',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\pressure-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var PressureSetup = exports.PressureSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function PressureSetup() {
            _classCallCheck(this, PressureSetup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'pressure-setup';

            this.widgets = [{ 'name': 'pump-setup', 'title': ' Pump Setup' }, { 'name': 'sensor-setup', 'title': ' Sensor Setup' }, { 'name': 'control-tuning', 'title': ' Control Tuning' }];
        }

        PressureSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(PressureSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return PressureSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/pressure-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel panel-default\">\r\n        <label class=\"panel-heading tree-toggle nav-header\"> Pressure</label>\r\n        <ul class=\"panel-body nav nav-list tree\">\r\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\r\n                <div class=\"panel panel-default\">\r\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\r\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\r\n                        <compose view-model=\"views/settings/pressure/${widget.name}\" class=\"col-md-11\"></compose>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</template>\r\n"; });
var cov_av5murm5q = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator\\language-units.js',
        hash = '7cd32a2e1dbcd455bcff460296d5c9fbd4dd3ba4',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator\\language-units.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator/language-units',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LanguageUnits = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var LanguageUnits = exports.LanguageUnits = function (_ref) {
        _inherits(LanguageUnits, _ref);

        function LanguageUnits() {
            _classCallCheck(this, LanguageUnits);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'language-units';
            _this.languageTypes = [];
            _this.unitTypes = [];
            _this.autoSyncProperties = ['Language', 'Units'];


            var keyBase = 'systemSettings.operator.languageUnits.';

            _this.languageTypes = _this.getTypes(keyBase + 'languageTypes');
            _this.unitTypes = _this.getTypes(keyBase + 'unitTypes');
            return _this;
        }

        LanguageUnits.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return LanguageUnits;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/operator/language-units.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <settings-dropdown selected.bind=\"state.language\" label=\"systemSettings.operator.languageUnits.labels.language\"\r\n                                options.bind=\"languageTypes\" prop=\"language\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.units\" label=\"systemSettings.operator.languageUnits.labels.units\"\r\n                                options.bind=\"unitTypes\" prop=\"contourEnabled\"></settings-dropdown>\r\n        </form>\r\n    </li>\r\n\r\n\r\n</template>\r\n"; });
var cov_d3yi5ke22 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator\\diagnostics.js',
        hash = '9f9aa659f86571dffb2b961d78372a25f6b0d9bb',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator\\diagnostics.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator/diagnostics',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Diagnostics = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var Diagnostics = exports.Diagnostics = function (_ref) {
        _inherits(Diagnostics, _ref);

        function Diagnostics() {
            _classCallCheck(this, Diagnostics);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'diagnostics';
            _this.name = 'diagnostics';
            _this.autoSyncProperties = ['SystemVoltage', 'ServoCurrent', 'GpsBaudRate'];
            return _this;
        }

        Diagnostics.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return Diagnostics;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/operator/diagnostics.html', ['module'], function(module) { module.exports = "<template>\r\n     <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n\r\n    <li class=\"container-fluid\">\r\n        <form class=\"form-horizontal\">\r\n            <div readonly=\"true\" as-element=\"settings-item\" val=\"0\"\r\n                    label=\"systemSettings.operator.diagnostics.labels.revisionInformation\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.systemVoltage | numberFormat:'0.0'\"\r\n                    label=\"systemSettings.operator.diagnostics.labels.systemVoltage\"\r\n                    units=\"units.volt\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.servoCurrent | numberFormat:'0.0'\"\r\n                    label=\"systemSettings.operator.diagnostics.labels.servoCurrent\"\r\n                    units=\"units.amp\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.gpsBaudRate | numberFormat\"\r\n                    label=\"systemSettings.operator.diagnostics.labels.gpsBaudRate\">\r\n            </div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_2333m157sq = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator\\counters.js',
        hash = '8498190cb560c4d1e664d0fd0ba245c87d10ce9b',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator\\counters.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator/counters',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Counters = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var Counters = exports.Counters = function (_ref) {
        _inherits(Counters, _ref);

        function Counters() {
            _classCallCheck(this, Counters);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'counters';
            _this.autoSyncProperties = ['HourMeter', 'ControllerAreaCounter', 'Area1Counter', 'Tank1Counter', 'ControllerVolumeCounter', 'Tank1Rate'];
            return _this;
        }

        Counters.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return Counters;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/operator/counters.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/mlToGal\"></require>\r\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form  class=\"form-horizontal\">\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.hourMeter | numberFormat:'0.0'\"\r\n                    label=\"systemSettings.operator.counters.labels.hourMeter\"\r\n                    units=\"units.hour\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.controllerAreaCounter | hectaresToAcres:'0.0'\"\r\n                    label=\"systemSettings.operator.counters.labels.controllerAreaCounter\"\r\n                    units=\"units.acre\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.area1Counter | hectaresToAcres:'0.0'\"\r\n                    label=\"systemSettings.operator.counters.labels.area1Counter\"\r\n                    units=\"units.acre\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.controllerVolumeCounter | mlToGal:'0.0'\"\r\n                    label=\"systemSettings.operator.counters.labels.controllerVolumeCounter\"\r\n                    units=\"units.gal\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.tank1Counter | mlToGal:'0.0'\"\r\n                    label=\"systemSettings.operator.counters.labels.actualVolumeCounter\"\r\n                    units=\"units.gal\">\r\n            </div>\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.tank1Rate | mlToGal:'0.0'\"\r\n                    label=\"systemSettings.operator.counters.labels.tank1Rate\"\r\n                    units=\"units.galMin\">\r\n            </div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_1ftjidxncj = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator.js',
        hash = '4bfbb78ee648982684ae0b4241f88665d16b8b42',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\operator.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator',['exports', 'aurelia-framework', '../gateway-state-base'], function (exports, _aureliaFramework, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Operator = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var Operator = exports.Operator = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function (_ref) {
        _inherits(Operator, _ref);

        function Operator() {
            _classCallCheck(this, Operator);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _initDefineProp(_this, 'active', _descriptor, _this);

            _this.type = 'operator';
            _this.name = 'operator';

            _this.widgets = [{ 'name': 'counters', 'title': ' Counters' }, { 'name': 'diagnostics', 'title': ' Diagnostics' }, { 'name': 'language-units', 'title': ' Language/Units' }];
            return _this;
        }

        Operator.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(Operator, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return Operator;
    }((_gatewayStateBase.GatewayStateBase)), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/operator.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel panel-default\">\r\n        <label class=\"tree-toggle nav-header ion-chevron-down panel-heading\"> Operator</label>\r\n        <ul class=\"panel-body nav nav-list tree\">\r\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\r\n                <div class=\"panel panel-default\">\r\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\r\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\r\n                        <compose view-model=\"views/settings/operator/${widget.name}\" class=\"col-md-11\"></compose>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n\r\n</template>\r\n"; });
var cov_wgcoq3q6e = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\nh3-setup.js',
        hash = 'b2a8898d92f01f3a3e6bb4be6c862eb6e7e33903',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\nh3-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/nh3-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Nh3Setup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var Nh3Setup = exports.Nh3Setup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function Nh3Setup() {
            _classCallCheck(this, Nh3Setup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'nh3-setup';

            this.widgets = [{ 'name': 'nh-three', 'title': ' NH3' }];
        }

        Nh3Setup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(Nh3Setup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return Nh3Setup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/nh3-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel panel-default\">\r\n        <label class=\"panel-heading tree-toggle nav-header\"> NH3</label>\r\n        <ul class=\"panel-body nav nav-list tree\">\r\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\r\n                <div class=\"panel panel-default\">\r\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\r\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\r\n                        <compose view-model=\"views/settings/nh-three/${widget.name}\" class=\"col-md-11\"></compose>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</template>\r\n"; });
var cov_2bx9edgag8 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\nh-three\\nh-three.js',
        hash = '84d73ed45ab378cfa09a586f31f07637cdf40370',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\nh-three\\nh-three.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/nh-three/nh-three',['exports', '../../gateway-state-base', 'aurelia-validation'], function (exports, _gatewayStateBase, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NhThree = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var NhThree = exports.NhThree = function (_ref) {
        _inherits(NhThree, _ref);

        function NhThree() {
            _classCallCheck(this, NhThree);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'nh-three';
            _this.autoSyncProperties = ['Nh3StrainerPressureMax', 'nh3MinimumOutletPressure'];
            return _this;
        }

        NhThree.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('nh3StrainerPressureMax').satisfiesRule('numberRange', 0, 50).ensure('nh3MinimumOutletPressure').satisfiesRule('numberRange', 0, 50).rules;
            this.controller.addObject(this.state, rules);
        };

        return NhThree;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/nh-three/nh-three.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n            <div as-element=\"settings-item\" val.bind=\"state.nh3StrainerPressureMax | numberFormat:'0.000000' & validate\" step=\"1\" \r\n                    label=\"systemSettings.nh3.labels.nh3StrainerPressureMax\" prop=\"nh3StrainerPressureMax\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.nh3MinimumOutletPressure | numberFormat:'0.000000' & validate\" step=\"1\" \r\n                    label=\"systemSettings.nh3.labels.nh3MinimumOutletPressure\" prop=\"nh3MinimumOutletPressure\">\r\n            </div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_hfuu8r4sw = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\vehicle-setup.js',
        hash = '537012b238fb439b36b151a25b84a220e676c245',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\vehicle-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/vehicle-setup',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mmToInches', 'aurelia-validation'], function (exports, _aureliaFramework, _gatewayStateBase, _mmToInches, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.VehicleSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var VehicleSetup = exports.VehicleSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(VehicleSetup, _ref);

        function VehicleSetup(mmToInchesValueConverter) {
            _classCallCheck(this, VehicleSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'vehicle-setup';
            _this.autoSyncProperties = ['MachineType', 'BoomType', 'CenterX', 'DrawbarX'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;

            var keyBase = 'systemSettings.navigation.vehicle.';
            _this.machineTypes = _this.getTypes(keyBase + 'machineTypes');
            _this.boomTypes = _this.getTypes(keyBase + 'boomTypes');
            return _this;
        }

        VehicleSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = -32767;
            var topLimit = 32767;
            var rules = _aureliaValidation.ValidationRules.ensure('centerX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('drawbarX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return VehicleSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/vehicle-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <settings-dropdown selected.bind=\"state.machineType\" label=\"systemSettings.navigation.vehicle.labels.machineType\"\r\n                                options.bind=\"machineTypes\" prop=\"machineType\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.boomType\" label=\"systemSettings.navigation.vehicle.labels.boomType\"\r\n                                options.bind=\"boomTypes\" prop=\"boomType\"></settings-dropdown>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.centerX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.vehicle.labels.centerX\"\r\n                    units=\"units.in\" prop=\"centerX\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.drawbarX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.vehicle.labels.drawbarX\"\r\n                    units=\"units.in\" prop=\"drawbarX\">\r\n            </div>\r\n\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n\r\n"; });
var cov_x47plf3h5 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\overlap-setup.js',
        hash = '4922e0e969fcd44e0620ef7c2bca5a88d22629fd',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\overlap-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/overlap-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', 'services/spray-session-service', '../../../resources/value-converters/mmToInches', '../../../resources/value-converters/multiplier-format'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _spraySessionService, _mmToInches, _multiplierFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.OverlapSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var OverlapSetup = exports.OverlapSetup = (_dec = (0, _aureliaFramework.inject)(_spraySessionService.SpraySessionService, _mmToInches.MmToInchesValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(OverlapSetup, _ref);

        function OverlapSetup(spraySessionService, mmToInchesValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, OverlapSetup);

            for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
                rest[_key - 3] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'overlap-setup';
            _this.autoSyncProperties = ['OverlapDistance', 'ForwardOverlapDistance', 'BackwardOverlapDistance', 'SidewardOverlapDistance', 'BoundaryDistance', 'OverlapRate', 'LookAheadTime'];

            _this.separableOverlapDistances = spraySessionService.useSeparableOverlapDistances();
            if (_this.separableOverlapDistances) {
                _this.gatewayService.getProperties(['ForwardOverlapDistance', 'BackwardOverlapDistance', 'SidewardOverlapDistance']).then(function (results) {
                    _this.state.forwardOverlapDistance = results[0];
                    _this.state.backwardOverlapDistance = results[1];
                    _this.state.sidewardOverlapDistance = results[2];
                });
            }
            _this.mmToInConverter = mmToInchesValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;
            return _this;
        }

        OverlapSetup.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var curriedSecondsToMillisecondsFormat = function curriedSecondsToMillisecondsFormat(n) {
                return function (m) {
                    return _this2.multiplierFormatValueConverter.forValidate(m, n);
                };
            };
            var validateCalc = curriedSecondsToMillisecondsFormat(1000);

            var rules = _aureliaValidation.ValidationRules.ensure('overlapDistance').satisfiesRule('numberRange', -6350, 6350, this.mmToInConverter.forValidate).ensure('boundaryDistance').satisfiesRule('numberRange', -6350, 6350, this.mmToInConverter.forValidate).ensure('overlapRate').satisfiesRule('numberRange', 0, 100).ensure('lookAheadTime').satisfiesRule('numberRange', 0, 2000, validateCalc).rules;
            this.controller.addObject(this.state, rules);
        };

        return OverlapSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/overlap-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    <require from=\"resources/value-converters/multiplier-format\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <div if.bind=\"!separableOverlapDistances\">\r\n                <div as-element=\"settings-item\" val.bind=\"state.overlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.overlapDistance\"\r\n                     units=\"units.in\" prop=\"overlapDistance\">\r\n                </div>\r\n            </div>\r\n            <div if.bind=\"separableOverlapDistances\">\r\n                <div as-element=\"settings-item\" val.bind=\"state.forwardOverlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.forwardOverlapDistance\"\r\n                     units=\"units.in\" prop=\"forwardOverlapDistance\">\r\n                </div>\r\n                <div as-element=\"settings-item\" val.bind=\"state.backwardOverlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.backwardOverlapDistance\"\r\n                     units=\"units.in\" prop=\"backwardOverlapDistance\">\r\n                </div>\r\n                <div as-element=\"settings-item\" val.bind=\"state.sidewardOverlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.sidewardOverlapDistance\"\r\n                     units=\"units.in\" prop=\"sidewardOverlapDistance\">\r\n                </div>\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.boundaryDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.boundaryDistance\"\r\n                    units=\"units.in\" prop=\"boundaryDistance\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.overlapRate | numberFormat & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.overlapRate\"\r\n                    units=\"%\" prop=\"overlapRate\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.lookAheadTime | numberFormat:'0' & validate\" step=\"0.1\" label=\"systemSettings.navigation.overlap.lookAheadTime\"\r\n                    units=\"units.ms\" prop=\"lookAheadTime\">\r\n            </div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_1rr82gs7ah = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\implement-setup.js',
        hash = 'baba5c40aa3852b677ea59ba2844264d222ef814',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\implement-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/implement-setup',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mmToInches', 'aurelia-validation'], function (exports, _aureliaFramework, _gatewayStateBase, _mmToInches, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ImplementSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ImplementSetup = exports.ImplementSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(ImplementSetup, _ref);

        function ImplementSetup(mmToInchesValueConverter) {
            _classCallCheck(this, ImplementSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'implement-setup';
            _this.autoSyncProperties = ['BoomX', 'TrailerX', 'TrailerDbx', 'Trailer2X'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;
            return _this;
        }

        ImplementSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = -32767;
            var topLimit = 32767;
            var rules = _aureliaValidation.ValidationRules.ensure('boomX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('trailerX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('trailerDbx').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('trailer2X').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return ImplementSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/implement-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.boomX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.boomX\"\r\n                    units=\"units.in\" prop=\"boomX\">\r\n            </div>\r\n                    \r\n            <div as-element=\"settings-item\" val.bind=\"state.trailerX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.trailerX\"\r\n                    units=\"units.in\" prop=\"trailerX\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.trailerDbx | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.trailerDbx\"\r\n                    units=\"units.in\" prop=\"trailerDbx\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.trailer2X | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.trailer2X\"\r\n                    units=\"units.in\" prop=\"trailer2X\">\r\n            </div>\r\n\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_wdo8rc1pw = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\gyro-setup.js',
        hash = 'f1140a51a6fb633693b743501b0cb2553aba32b6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\gyro-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/gyro-setup',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GyroSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var GyroSetup = exports.GyroSetup = function (_ref) {
        _inherits(GyroSetup, _ref);

        function GyroSetup() {
            _classCallCheck(this, GyroSetup);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'gyro-setup';
            _this.enabledTypes = [];
            _this.autoSyncProperties = ['GyroEnabled', 'ContourEnabled'];

            _this.enabledTypes = _this.getTypes('common.enabledOptions');
            return _this;
        }

        GyroSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return GyroSetup;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/navigation/gyro-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <settings-dropdown selected.bind=\"state.gyroEnabled\" label=\"systemSettings.navigation.gyro.labels.gyroEnabled\"\r\n                                options.bind=\"enabledTypes\" prop=\"gyroEnabled\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.contourEnabled\" label=\"systemSettings.navigation.gyro.labels.contourEnabled\"\r\n                                options.bind=\"enabledTypes\" prop=\"contourEnabled\"></settings-dropdown>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_1m37nmzbhv = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\gps-setup.js',
        hash = '707557b862bc135d277a86a2bcedd858509f8eef',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\gps-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/gps-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/mmToInches'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _mmToInches) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GpsSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var GpsSetup = exports.GpsSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(GpsSetup, _ref);

        function GpsSetup(mmToInchesValueConverter) {
            _classCallCheck(this, GpsSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'gps-setup';
            _this.autoSyncProperties = ['GpsX', 'GpsY', 'GpsHeight', 'CenterX', 'BoomX'];

            _this.mmToInConverter = mmToInchesValueConverter;
            return _this;
        }

        GpsSetup.prototype.attached = function attached() {
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = -32767;
            var topLimit = 32767;
            var rules = _aureliaValidation.ValidationRules.ensure('gpsX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('gpsY').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('gpsHeight').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('centerX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('boomX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return GpsSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/gps-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n\r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n            \r\n            <div as-element=\"settings-item\" val.bind=\"state.gpsX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.gps.gpsX\"\r\n                    units=\"units.in\" prop=\"gpsX\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.gpsY | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.gps.gpsY\"\r\n                    units=\"units.in\" prop=\"gpsY\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.gpsHeight| mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.gps.gpsHeight\"\r\n                    units=\"units.in\" prop=\"gpsHeight\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.centerX | mmToInches & validate\" step=\"1\"\r\n                    label=\"systemSettings.navigation.gps.centerX\"\r\n                    units=\"units.in\" prop=\"centerX\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.boomX | mmToInches & validate\" step=\"1\"\r\n                    label=\"systemSettings.navigation.gps.boomX\"\r\n                    units=\"units.in\" prop=\"boomX\">\r\n            </div>\r\n                    \r\n            <div class=\"graphic gps-setup-img\">\r\n            </div>\r\n\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_2c44yia309 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\compass-setup.js',
        hash = '8ce6087d9ec071e2d3448bbb3b9ee666a83f1169',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation\\compass-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/compass-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/radiansToDegrees'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _radiansToDegrees) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.CompassSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var CompassSetup = exports.CompassSetup = (_dec = (0, _aureliaFramework.inject)(_radiansToDegrees.RadiansToDegreesValueConverter), _dec(_class = function (_ref) {
        _inherits(CompassSetup, _ref);

        function CompassSetup(radiansToDegreesValueConverter) {
            _classCallCheck(this, CompassSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'compass-setup';
            _this.compassEnabledTypes = [];
            _this.compassCalTypes = [];
            _this.autoSyncProperties = ['CompassEnabled', 'CompassCalibration', 'CompassCog', 'CompassOffset'];

            _this.radiansToDegreesValueConverter = radiansToDegreesValueConverter;
            _this.compassCalTypes = _this.getTypes('systemSettings.navigation.compass.compassCalTypes');
            _this.compassEnabledTypes = _this.getTypes('common.enabledOptions');
            return _this;
        }

        CompassSetup.prototype.attached = function attached() {
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('compassCog').satisfiesRule('numberRange', 0, 6.28, this.radiansToDegreesValueConverter.forValidate).ensure('compassOffset').satisfiesRule('numberRange', 0, 6.28, this.radiansToDegreesValueConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return CompassSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/compass-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/radiansToDegrees\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <settings-dropdown selected.bind=\"state.compassEnabled\" label=\"systemSettings.navigation.compass.labels.compassEnabled\"\r\n                                options.bind=\"compassEnabledTypes\" prop=\"compassEnabled\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.compassCalibration\" label=\"systemSettings.navigation.compass.labels.compassCalibration\"\r\n                                options.bind=\"compassCalTypes\" prop=\"compassCalibration\"></settings-dropdown>\r\n\r\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.compassCog | radiansToDegrees:'0'\" label=\"systemSettings.navigation.compass.labels.compassCog\"\r\n                    units=\"units.deg\" disabled=\"true\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.compassOffset | radiansToDegrees:'0' & validate\" step=\"1\" label=\"systemSettings.navigation.compass.labels.compassOffset\"\r\n                    units=\"units.deg\" prop=\"compassOffset\">\r\n            </div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_27oxey1h8x = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation-setup.js',
        hash = '200664ecb50431932c5308405a602035647c64ea',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\navigation-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NavigationSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var NavigationSetup = exports.NavigationSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function NavigationSetup() {
            _classCallCheck(this, NavigationSetup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'navigation-setup';

            this.widgets = [{ 'name': 'vehicle-setup', 'title': ' Vehicle' }, { 'name': 'implement-setup', 'title': ' Implement' }, { 'name': 'overlap-setup', 'title': ' Overlap' }, { 'name': 'gps-setup', 'title': ' GPS' }, { 'name': 'compass-setup', 'title': ' Compass' }, { 'name': 'gyro-setup', 'title': ' Gyro' }];
        }

        NavigationSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(NavigationSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return NavigationSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/navigation-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel panel-default\">\r\n        <label class=\"panel-heading tree-toggle nav-header\"> Navigation</label>\r\n        <ul class=\"panel-body nav nav-list tree\">\r\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\r\n                <div class=\"panel panel-default\">\r\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\r\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\r\n                        <compose view-model=\"views/settings/navigation/${widget.name}\" class=\"col-md-11\"></compose>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</template>\r\n"; });
var cov_124t35pl1d = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\vcm-setup.js',
        hash = '3bc701bb3c4904b4e7cd8a7af208ddc39ed55139',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\vcm-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/vcm-setup',['exports', 'aurelia-templating-resources', 'aurelia-framework', '../../../services/gateway-service', 'px-owl-carousel'], function (exports, _aureliaTemplatingResources, _aureliaFramework, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.VcmSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2;

    var VcmSetup = exports.VcmSetup = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaTemplatingResources.BindingSignaler), _dec2 = (0, _aureliaFramework.computedFrom)('state.vcm0Valves'), _dec3 = (0, _aureliaFramework.computedFrom)('state.vcm1Valves'), _dec4 = (0, _aureliaFramework.computedFrom)('state.vcm0Orientation', 'state.vcm1Orientation', 'selectedVcm0', 'selectedVcm1'), _dec(_class = (_class2 = function () {
        function VcmSetup(gatewayService, signaler) {
            _classCallCheck(this, VcmSetup);

            this.type = 'vcm-setup';
            this.editDelta = {
                vcm0SerialNumber: []
            };
            this.selectedVcm0 = 0;
            this.selectedVcm1 = null;
            this.subscribedProperties = ['Vcm0SerialNumber', 'Vcm1SerialNumber', 'VcmCapstanSn', 'Vcm0ModuleNum', 'Vcm0Orientation', 'Vcm1Orientation', 'Vcm0Valves', 'Vcm1Valves'];

            this.signaler = signaler;
            this.gatewayService = gatewayService;
            this.state = this.gatewayService.getState();
        }

        VcmSetup.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties);
            var vcmCarousel = $('#vcm-selectors');
            vcmCarousel.owlCarousel({
                items: 2,
                dots: false,
                nav: true,
                mouseDrag: false,
                touchDrag: false,
                loop: false,
                navText: ['', ''],
                navClass: ['btn btn-lg bg-dark ion-ios-rewind', 'btn btn-lg bg-dark ion-ios-fastforward'],
                responsive: {
                    0: {
                        items: 1
                    },
                    600: {
                        items: 3
                    },
                    1000: {
                        items: 4
                    }
                }
            });
        };

        VcmSetup.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties);
        };

        VcmSetup.prototype.getOffset0 = function getOffset0(index) {
            var offset = 0;
            if (this.selectedVcm0 === 0) {
                return index + 1;
            }
            for (var i = 0; i < this.selectedVcm0; i++) {
                offset += this.state.vcm0Valves[i];
                offset += this.state.vcm1Valves[i];
            }
            return offset + index + 1;
        };

        VcmSetup.prototype.getOffset1 = function getOffset1(index) {
            var offset = 0;
            if (this.selectedVcm1 === 0) {
                return index + this.state.vcm0Valves[0];
            }
            for (var i = 0; i <= this.selectedVcm1; i++) {
                offset += this.state.vcm0Valves[i];
                if (i !== this.selectedVcm1) {
                    offset += this.state.vcm1Valves[i];
                }
            }
            return offset + index;
        };

        VcmSetup.prototype.selectVcmFromSubnet0 = function selectVcmFromSubnet0(index) {
            this.selectedVcm1 = null;
            this.selectedVcm0 = index;
            this.signaler.signal('selected-vcm');
        };

        VcmSetup.prototype.selectVcmFromSubnet1 = function selectVcmFromSubnet1(index) {
            this.selectedVcm0 = null;
            this.selectedVcm1 = index;
            this.signaler.signal('selected-vcm');
        };

        VcmSetup.prototype.toggle = function toggle(index) {
            this.editDelta.vcm0Orientation = this.state.vcm0Orientation.slice();
            this.editDelta.vcm0Orientation.splice(index, 1, this.toggleByte(this.editDelta.vcm0Orientation[index]));
            this.send();
        };

        VcmSetup.prototype.toggleVcm1 = function toggleVcm1(index) {
            this.editDelta.vcm1Orientation = this.state.vcm1Orientation.slice();
            this.editDelta.vcm1Orientation.splice(index, 1, this.toggleByte(this.editDelta.vcm1Orientation[index]));
            this.send();
        };

        VcmSetup.prototype.swapEnds = function swapEnds() {
            if (this.selectedVcm0 !== null) {
                this.toggle(this.selectedVcm0);
            } else {
                this.toggleVcm1(this.selectedVcm1);
            }
        };

        VcmSetup.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);
        };

        VcmSetup.prototype.toggleByte = function toggleByte(value) {
            return value === 1 ? 0 : 1;
        };

        _createClass(VcmSetup, [{
            key: 'vcm0Valves',
            get: function get() {
                return this.state.vcm0Valves;
            }
        }, {
            key: 'vcm1Valves',
            get: function get() {
                return this.state.vcm1Valves;
            }
        }, {
            key: 'selectedVcmOrientation',
            get: function get() {
                if (this.selectedVcm0 !== null) {
                    return this.state.vcm0Orientation[this.selectedVcm0];
                }
                return this.state.vcm1Orientation[this.selectedVcm1];
            }
        }]);

        return VcmSetup;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'vcm0Valves', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'vcm0Valves'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'vcm1Valves', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'vcm1Valves'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'selectedVcmOrientation', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'selectedVcmOrientation'), _class2.prototype)), _class2)) || _class);
});
define('text!views/settings/initial-setup/vcm-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"components/graphtab/nozzle-info\"></require>\r\n    <require from=\"views/settings/initial-setup/vcm-btn\"></require>\r\n\r\n    <div id=\"vcm-selectors\" style=\"margin-top: 5rem;\" class=\"owl-carousel\">\r\n        <div class=\"owl-stage-outer\" repeat.for=\"serialNum of state.vcm0Orientation.length\">\r\n            <div class=\"owl-stage\">\r\n                <div style=\"border-width: 5px; margin-left: 30px; margin-right: 30px; display: block\" type=\"button\" class=\"btn item ${selectedVcm0 === $index ? 'btn-primary' : 'btn-secondary'} boom-btn\" click.delegate=\"selectVcmFromSubnet0($index)\">\r\n                    <vcm-btn orientation.bind=\"state.vcm0Orientation[$index]\"></vcm-btn>\r\n                </div>\r\n                <div style=\"border-width: 5px; margin-top: 10px; margin-left: 30px; margin-right: 30px; display: block\" type=\"button\" class=\"btn item ${selectedVcm1 === $index ? 'btn-primary' : 'btn-secondary'} boom-btn\" click.delegate=\"selectVcmFromSubnet1($index)\">\r\n                    <vcm-btn orientation.bind=\"state.vcm1Orientation[$index]\"></vcm-btn>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div class=\"tractor-img\">\r\n    </div>\r\n    <div style=\"background-color: inherit\" class=\"panel\">\r\n        <div class=\"panel-body\" style=\"text-align: center\">\r\n            <div class=\"form-group\">\r\n                <h1 i18n=\"systemSettings.initial.vcm.labels.selectedVcm\"></h1>\r\n                <label class=\"label-lg\" for=\"serial-num\" i18n=\"systemSettings.initial.vcm.labels.serialNum\"></label>\r\n                <span class=\"label-lg\" id=\"serial-num\">\r\n                    ${selectedVcm0 === null ? state.vcm1SerialNumber[selectedVcm1] : state.vcm0SerialNumber[selectedVcm0] }\r\n                </span>\r\n            </div>\r\n            <button i18n=\"systemSettings.initial.vcm.labels.swapEnds\" class=\"btn btn-info\" click.delegate=\"swapEnds()\"></button>\r\n        </div>\r\n    </div>\r\n    <div if.bind=\"vcm0Valves && vcm1Valves\" id=\"valve-bar\" style=\"margin-left: 30px; margin-right: 30px\">\r\n        <div style=\"position: relative\" class=\"${selectedVcmOrientation === 0 ? 'left-vertical-bar' : 'right-vertical-bar'  & signal:'selected-vcm'}\">\r\n            <div class=\"dot ${selectedVcmOrientation === 0 ? 'left-dot' : 'right-dot' & signal:'selected-vcm'}\"></div>\r\n        </div>\r\n        <hr style=\"margin: auto; background-color: black; width: 100%; height: 6px;\"/>\r\n        <div>\r\n            <div style=\"margin-top: -5px; margin-bottom: 50px\" class=\"flex-container space-evenly\">\r\n                <div repeat.for=\"valve of state.vcm0Valves[selectedVcm0]\"\r\n                     style=\"border-width: 5px\" ref=\"item\" class=\"flex-item subnet-nozzle\">\r\n                    <div class=\"font-responsive noz-num\">${getOffset0($index) & signal:'selected-vcm'}</div>\r\n                </div>\r\n\r\n                <div repeat.for=\"valve of state.vcm1Valves[selectedVcm1]\"\r\n                     style=\"border-width: 5px\" ref=\"item\" class=\"flex-item subnet-nozzle\">\r\n                    <div class=\"font-responsive noz-num\">${getOffset1($index) +1 & signal:'selected-vcm'}</div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n    <div id=\"graph-tab\" style=\"display: inline-block; height: 325px;\" class=\"owl-carousel\">\r\n        <nozzle-info state.bind=\"state\" chart-option.bind=\"'duty'\"></nozzle-info>\r\n    </div>\r\n\r\n</template>\r\n"; });
var cov_1048zbri48 = function () {
  var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\vcm-menu-item.js',
      hash = 'e4f1fca0b24eaeb4306dbe612deccf93db2e5a4d',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\vcm-menu-item.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/vcm-menu-item',['exports'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var VcmMenuItem = exports.VcmMenuItem = function VcmMenuItem() {
    _classCallCheck(this, VcmMenuItem);

    this.type = 'vcm-menu-item';
  };
});
define('text!views/settings/initial-setup/vcm-menu-item.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel\">\r\n        <a route-href=\"route: vcm-setup\" class=\" panel-heading btn-link panel-heading nav-header\">VCM-Setup</a>\r\n    </div>\r\n</template>\r\n"; });
var cov_umjw3pzdq = function () {
  var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\vcm-btn.js',
      hash = 'cb0576b446729dcae99caf369fa43d7e2cee6c97',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\vcm-btn.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/vcm-btn',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.VcmBtn = undefined;

  function _initDefineProp(target, property, descriptor, context) {
    if (!descriptor) return;
    Object.defineProperty(target, property, {
      enumerable: descriptor.enumerable,
      configurable: descriptor.configurable,
      writable: descriptor.writable,
      value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
    });
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
    var desc = {};
    Object['ke' + 'ys'](descriptor).forEach(function (key) {
      desc[key] = descriptor[key];
    });
    desc.enumerable = !!desc.enumerable;
    desc.configurable = !!desc.configurable;

    if ('value' in desc || desc.initializer) {
      desc.writable = true;
    }

    desc = decorators.slice().reverse().reduce(function (desc, decorator) {
      return decorator(target, property, desc) || desc;
    }, desc);

    if (context && desc.initializer !== void 0) {
      desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
      desc.initializer = undefined;
    }

    if (desc.initializer === void 0) {
      Object['define' + 'Property'](target, property, desc);
      desc = null;
    }

    return desc;
  }

  function _initializerWarningHelper(descriptor, context) {
    throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
  }

  var _desc, _value, _class, _descriptor;

  var VcmBtn = exports.VcmBtn = (_class = function VcmBtn() {
    _classCallCheck(this, VcmBtn);

    _initDefineProp(this, 'orientation', _descriptor, this);
  }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'orientation', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  })), _class);
});
define('text!views/settings/initial-setup/vcm-btn.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"${orientation === 0 ? 'left-vertical-bar-3' : 'right-vertical-bar-3'}\"></div>\r\n\r\n    <hr class=\"vcm-hr\"/>\r\n</template>\r\n"; });
var cov_2a4c6lrp39 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\configuration-setup.js',
        hash = 'a005f817e6d728f3b1de39087a5555013c98ab72',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup\\configuration-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/configuration-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/mmToInches', '../../../resources/value-converters/multiplier-format'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _mmToInches, _multiplierFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ConfigurationSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ConfigurationSetup = exports.ConfigurationSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(ConfigurationSetup, _ref);

        function ConfigurationSetup(mmToInchesValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, ConfigurationSetup);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'configuration-setup';
            _this.taskModeTypes = [];
            _this.fluidModeTypes = [];
            _this.productModeTypes = [];
            _this.switchTypes = [];
            _this.auxInputTypes = [];
            _this.displaySmoothingTypes = [];
            _this.autoSyncProperties = ['TaskMode', 'FluidMode', 'ProductMode', 'MasterSwitchSource', 'BoomSwitchSource', 'AuxInputPolarity', 'VtUpdateRate', 'DisplaySmooth', 'DefaultNozzleSpacing', 'FactoryReset'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;

            var keyBase = 'systemSettings.initial.configuration.';
            _this.taskModeTypes = _this.getTypes(keyBase + 'taskMode');
            _this.fluidModeTypes = _this.getTypes(keyBase + 'fluidMode');
            _this.productModeTypes = _this.getTypes(keyBase + 'productMode');
            _this.switchTypes = _this.getTypes(keyBase + 'switchSource');
            _this.auxInputTypes = _this.getTypes(keyBase + 'auxInputPolarity');
            _this.displaySmoothingTypes = _this.getTypes('common.enabledOptions');
            return _this;
        }

        ConfigurationSetup.prototype.attached = function attached() {
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('vtUpdateRate').satisfiesRule('numberRange', 100, 1000).ensure('defaultNozzleSpacing').satisfiesRule('numberRange', 0, 65535, this.mmToInchesValueConverter.forValidate, '0.0').rules;
            this.controller.addObject(this.state, rules);
        };

        ConfigurationSetup.prototype.factoryReset = function factoryReset() {
            this.editDelta.factoryReset = 1;
            this.send();
        };

        return ConfigurationSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/initial-setup/configuration-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    <require from=\"resources/value-converters/multiplier-format\"></require>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    \r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n            <settings-dropdown selected.bind=\"state.taskMode\" label=\"systemSettings.initial.configuration.label.taskMode\"\r\n                                options.bind=\"taskModeTypes\" prop=\"taskMode\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.fluidMode\" label=\"systemSettings.initial.configuration.label.fluidMode\"\r\n                                options.bind=\"fluidModeTypes\" prop=\"fluidMode\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.productMode\" label=\"systemSettings.initial.configuration.label.productMode\"\r\n                                options.bind=\"productModeTypes\" prop=\"productMode\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.masterSwitchSource\" label=\"systemSettings.initial.configuration.label.masterSwitchSource\"\r\n                                options.bind=\"switchTypes\" prop=\"masterSwitchSource\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.boomSwitchSource\" label=\"systemSettings.initial.configuration.label.boomSwitchSource\"\r\n                                options.bind=\"switchTypes\" prop=\"boomSwitchSource\"></settings-dropdown>\r\n\r\n            <settings-dropdown selected.bind=\"state.auxInputPolarity\" label=\"systemSettings.initial.configuration.label.auxInputPolarity\"\r\n                                options.bind=\"auxInputTypes\" prop=\"auxInputPolarity\"></settings-dropdown>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.vtUpdateRate | numberFormat & validate\" label=\"systemSettings.initial.configuration.label.vtUpdateRate\"\r\n                    units=\"units.ms\" step=\"1\" prop=\"vtUpdateRate\">\r\n            </div>\r\n\r\n            <settings-dropdown selected.bind=\"state.displaySmooth\" label=\"systemSettings.initial.configuration.label.displaySmooth\"\r\n                                options.bind=\"displaySmoothingTypes\" prop=\"displaySmooth\"></settings-dropdown>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.defaultNozzleSpacing | mmToInches:'0.0' & validate\" label=\"systemSettings.initial.configuration.label.defaultNozzleSpacing\"\r\n                    units=\"units.in\" prop=\"defaultNozzleSpacing\">\r\n            </div>\r\n            <div class=\"form-group form-group-lg\">\r\n                <label for=\"factory-reset\" class=\"col-xs-4 control-label\" i18n=\"${label}\">\r\n                    ${label}\r\n                </label>\r\n                <div class=\" col-xs-6\">\r\n                    <button i18n=\"systemSettings.initial.configuration.label.factoryReset\"  id=\"factory-reset\" \r\n                            class=\" btn btn-danger form-control\" click.delegate=\"factoryReset()\"></button>\r\n                </div>\r\n            </div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_19m0mw9dwa = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup.js',
        hash = 'ea284e9dbec3ed46600f5f0ab1ad5c60fb91c347',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\initial-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/initial-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.InitialSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var InitialSetup = exports.InitialSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function InitialSetup() {
            _classCallCheck(this, InitialSetup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'initial-setup';

            this.widgets = [{ 'name': 'configuration-setup', 'title': ' Configuration' }, { 'name': 'vcm-menu-item', 'title': ' VCM Setup' }];
        }

        InitialSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(InitialSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return InitialSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/initial-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel panel-default\">\r\n        <label class=\"panel-heading tree-toggle nav-header\"> Initial Setup</label>\r\n        <ul class=\"panel-body nav nav-list tree\">\r\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\r\n                <div class=\"panel panel-default\">\r\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\r\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\r\n                        <compose view-model=\"views/settings/initial-setup/${widget.name}\" class=\"col-md-11\"></compose>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</template>\r\n"; });
var cov_df5kp0i80 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\flow\\flow-meter-setup.js',
        hash = '2f83b1ee7028e816b69919d4ef5e4aa63e3e49c0',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\flow\\flow-meter-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/flow/flow-meter-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/mlToGal', '../../../resources/value-converters/literToGal', '../../../resources/value-converters/flowmeterCalibration'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _mlToGal, _literToGal, _flowmeterCalibration) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowMeterSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var FlowMeterSetup = exports.FlowMeterSetup = (_dec = (0, _aureliaFramework.inject)(_mlToGal.MlToGalValueConverter, _literToGal.LiterToGalValueConverter, _flowmeterCalibration.FlowmeterCalibrationValueConverter), _dec(_class = function (_ref) {
        _inherits(FlowMeterSetup, _ref);

        function FlowMeterSetup(mlPerMinToGalPerMin, literToGalValueConverter, flowmeterCalibrationValueConverter) {
            _classCallCheck(this, FlowMeterSetup);

            for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
                rest[_key - 3] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'flow-meter-setup';
            _this.meterTypes = [];
            _this.presetRateTypes = [];
            _this.autoSyncProperties = ['FlowMeter1Type', 'FlowMeter1Minimum', 'FlowMeter1Calibration', 'FlowMeter1ErrLimit', 'SpecificGravity1', 'FlowMeter2Type', 'FlowMeter2Minimum', 'FlowMeter2Calibration', 'FlowMeter2ErrLimit', 'SpecificGravity2', 'FlowMeterLowRate', 'PresetRateAvg'];

            _this.mlPerMinToGalPerMin = mlPerMinToGalPerMin;
            _this.flowmeterCalibrationValueConverter = flowmeterCalibrationValueConverter;
            _this.meterTypes = _this.getTypes('systemSettings.flow.flowMeterSetup.meterTypes');
            _this.presetRateTypes = _this.getTypes('systemSettings.flow.flowMeterSetup.presetRateAvgTypes');
            return _this;
        }

        FlowMeterSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('flowMeter1Minimum').satisfiesRule('numberRange', 0, 65535, this.mlPerMinToGalPerMin.forValidation).ensure('flowMeter1Calibration').satisfiesRule('numberRange', 0, 26417.1, this.flowmeterCalibrationValueConverter.forValidate).ensure('flowMeter1ErrLimit').satisfiesRule('numberRange', 0, 100).ensure('specificGravity1').satisfiesRule('numberRange', 0.5, 2).ensure('flowMeter2Minimum').satisfiesRule('numberRange', 0, 65535, this.mlPerMinToGalPerMin.forValidate).ensure('flowMeter2Calibration').satisfiesRule('numberRange', 0, 26417.1, this.flowmeterCalibrationValueConverter.forValidate).ensure('flowMeter2ErrLimit').satisfiesRule('numberRange', 0, 100).ensure('specificGravity2').satisfiesRule('numberRange', 0.5, 2).ensure('flowMeterLowRate').satisfiesRule('numberRange', 0, 65535, this.mlPerMinToGalPerMin.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return FlowMeterSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/flow/flow-meter-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/mlToGal\"></require>\r\n    <require from=\"resources/value-converters/flowmeterCalibration\"></require>\r\n    <require from=\"resources/value-converters/literToGal\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n\r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n            <settings-dropdown selected.bind=\"state.flowMeter1Type\" label=\"systemSettings.flow.flowMeterSetup.meter1Type\"\r\n                               options.bind=\"meterTypes\" prop=\"flowMeter1Type\"></settings-dropdown>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter1Minimum | mlToGal:'0.0' & validate\" label=\"systemSettings.flow.flowMeterSetup.meter1Min\"\r\n                 min=\"0\" max=\"100\" units=\"units.galMin\" prop=\"flowMeter1Minimum\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter1Calibration | flowmeterCalibration & validate\" label=\"systemSettings.flow.flowMeterSetup.meter1Cal\"\r\n                 min=\"0\" max=\"100000\" step=\"1\" units=\"units.pulse10PerGal\" prop=\"flowMeter1Calibration\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter1ErrLimit | numberFormat & validate\" step=\"1\" label=\"systemSettings.flow.flowMeterSetup.meter1ErrLim\"\r\n                 min=\"0\" max=\"100\" units=\"%\" prop=\"flowMeter1ErrLimit\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.specificGravity1 | numberFormat:'0.00' & validate\" label=\"systemSettings.flow.flowMeterSetup.specificGravity1\"\r\n                 min=\".5\" max=\"2\" step=\"0.01\" prop=\"specificGravity1\">\r\n            </div>\r\n            <settings-dropdown selected.bind=\"state.flowMeter2Type\" label=\"systemSettings.flow.flowMeterSetup.meter2Type\"\r\n                               options.bind=\"meterTypes\" prop=\"flowMeter2Type\"></settings-dropdown>\r\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter2Minimum | mlToGal:'0.0'  & validate\" label=\"systemSettings.flow.flowMeterSetup.meter2Min\"\r\n                 min=\"0\" max=\"10\" units=\"units.galMin\" prop=\"flowMeter2Minimum\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter2Calibration | flowmeterCalibration & validate\" label=\"systemSettings.flow.flowMeterSetup.meter2Cal\"\r\n                 min=\"0\" max=\"100000\" step=\"1\" units=\"units.pulse10PerGal\" prop=\"flowMeter2Calibration\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter2ErrLimit | numberFormat  & validate\" label=\"systemSettings.flow.flowMeterSetup.meter2ErrLim\"\r\n                 min=\"0\" max=\"10\" step=\"1\" units=\"%\" prop=\"flowMeter2ErrLimit\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.specificGravity2 | numberFormat:'0.00' & validate\" label=\"systemSettings.flow.flowMeterSetup.specificGravity2\"\r\n                 min=\".5\" max=\"2\" step=\"0.01\" prop=\"specificGravity2\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeterLowRate | mlToGal  & validate\" label=\"systemSettings.flow.flowMeterSetup.flowMeterLowRate\"\r\n                 min=\"0\" max=\"10\" units=\"units.galMin\" prop=\"flowMeterLowRate\">\r\n            </div>\r\n            <settings-dropdown selected.bind=\"state.presetRateAvg\" label=\"systemSettings.flow.flowMeterSetup.presetRateAvg\"\r\n                               options.bind=\"presetRateTypes\" prop=\"presetRateAvg\"></settings-dropdown>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_1fgoo0kk23 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\flow\\flow-control-tuning.js',
        hash = 'c5ba94a5b15a2453892ddd021e7670d9ac691c5d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\flow\\flow-control-tuning.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/flow/flow-control-tuning',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mlToGal', 'aurelia-validation', '../../../resources/value-converters/multiplier-format'], function (exports, _aureliaFramework, _gatewayStateBase, _mlToGal, _aureliaValidation, _multiplierFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowControlTuning = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var FlowControlTuning = exports.FlowControlTuning = (_dec = (0, _aureliaFramework.inject)(_mlToGal.MlToGalValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(FlowControlTuning, _ref);

        function FlowControlTuning(mlToGalValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, FlowControlTuning);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'flow-control-tuning';
            _this.autoSyncProperties = ['NvRate1GainK', 'NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1DeadBand', 'NozzlePwmCycleTime'];

            _this.mlPerMinToGalPerMin = mlToGalValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;
            return _this;
        }

        FlowControlTuning.prototype.attached = function attached() {
            var _this2 = this;

            var curriedSecondsToDecaSecondsFormat = function curriedSecondsToDecaSecondsFormat(n) {
                return function (m) {
                    return _this2.multiplierFormatValueConverter.forValidate(m, n);
                };
            };
            var validateCalc = curriedSecondsToDecaSecondsFormat(10);
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('nvRate1GainK').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1GainP').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1GainI').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1GainD').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1DeadBand').satisfiesRule('numberRange', 0, 18927, this.mlPerMinToGalPerMin.forValidate, '0,0').ensure('nozzlePwmCycleTime').satisfiesRule('numberRange', 1, 100, validateCalc).rules;
            this.controller.addObject(this.state, rules);
        };

        return FlowControlTuning;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/flow/flow-control-tuning.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/multiplier-format\"></require>\r\n    <require from=\"resources/value-converters/mlToGal\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n\r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainK | numberFormat:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainK\"\r\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainK\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainP | numberFormat:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainP\"\r\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainP\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainI | numberFormat:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainI\"\r\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainI\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainD | numberFormat:'0.0'  & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainD\"\r\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainD\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1DeadBand | mlToGal:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1DeadBand\"\r\n                    min=\"0\" max=\"100\" step=\".01\" units=\"units.mlMin\" prop=\"nvRate1DeadBand\">\r\n            </div>\r\n            <div as-element=\"settings-item\" val.bind=\"state.nozzlePwmCycleTime | multiplierFormat:10:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nozzlePwmCycleTime\"\r\n                    min=\"0\" max=\"100\" units=\"units.sec\" prop=\"nozzlePwmCycleTime\">\r\n            </div>\r\n        </form>\r\n    </li>\r\n\r\n</template>\r\n"; });
var cov_qswe0kk9b = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\flow-setup.js',
        hash = '4085e5f47732bf3f57c40255cf7807a4b8c2c247',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\flow-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/flow-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var FlowSetup = exports.FlowSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function FlowSetup() {
            _classCallCheck(this, FlowSetup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'flow-setup';

            this.widgets = [{ 'name': 'flow-meter-setup', 'title': ' Flowmeter Setup' }, { 'name': 'flow-control-tuning', 'title': ' Control Tuning' }];
        }

        FlowSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(FlowSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return FlowSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/flow-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel panel-default\">\r\n        <label class=\"panel panel-heading tree-toggle nav-header\"> Flow</label>\r\n        <ul class=\"panel-body nav nav-list tree\">\r\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\r\n                <div class=\"panel panel-default\">\r\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\r\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\r\n                        <compose view-model=\"views/settings/flow/${widget.name}\" class=\"col-md-11\"></compose>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</template>\r\n"; });
var cov_scqfvtlrz = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom\\nozzle-setup.js',
        hash = '5c96f8649c28e9ae7ed6eb7c5f9bf4b0f05233db',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom\\nozzle-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom/nozzle-setup',['exports', '../../../services/gateway-service', 'aurelia-framework'], function (exports, _gatewayService, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NozzleSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor;

    var NozzleSetup = exports.NozzleSetup = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaFramework.BindingEngine), _dec(_class = (_class2 = function () {
        function NozzleSetup(gatewayService, bindingEngine) {
            _classCallCheck(this, NozzleSetup);

            _initDefineProp(this, 'nozzleNumber', _descriptor, this);

            this.widget = 'nozzle-setup';
            this.subscriptions = [];
            this.presetProperties = [];
            this.rank = [];
            this.flowGain = [];
            this.nozzleSize = [];
            this.presetName = 'test';
            this.presetSubscribed = false;
            this.type = 'nozzle-setup';
            this.subscribeProperties = ['NozzleBoomCh', 'NozzleValveSize', 'NozzleAuxCh', 'NozzleVcmCh', 'NozzleVcmIdx', 'NozzleVcmPos', 'VcmSerial', 'VcmSerialNumber', 'Preset1NumIndex', 'BoomPreset1Number1Name', 'BoomPreset1Number2Name', 'BoomPreset1Number3Name', 'BoomPreset1Number4Name', 'BoomPreset1Number5Name', 'NozzleForceOn'];

            this.gatewayService = gatewayService;
            this.bindingEngine = bindingEngine;
            this.state = this.gatewayService.getState();

            this.rankOptions = [{ 'idx': 0, 'val': 'Even' }, { 'idx': 1, 'val': 'Odd' }, { 'idx': 2, 'val': 'Open' }, { 'idx': 3, 'val': 'Closed' }, { 'idx': 4, 'val': 'Boosted' }, { 'idx': 5, 'val': 'Boosted Even' }, { 'idx': 6, 'val': 'Boosted Odd' }];
            this.nozzleSizeOptions = [{ 'idx': 1, 'val': '3.0' }, { 'idx': 2, 'val': '4.0' }, { 'idx': 3, 'val': '5.0' }, { 'idx': 4, 'val': '6.0' }, { 'idx': 5, 'val': '8.0' }, { 'idx': 6, 'val': '10.0' }, { 'idx': 7, 'val': '12.5' }, { 'idx': 8, 'val': '15.0' }, { 'idx': 9, 'val': '20.0' }, { 'idx': 10, 'val': '15.0' }];
        }

        NozzleSetup.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribeProperties);
            this.nozzleNumber = 0;

            var c = document.getElementById('nozzleCanvas');
            c.addEventListener('mousemove', function (e) {
                var cvs = document.getElementById('nozzleCanvas');
                var rect = cvs.getBoundingClientRect();
                var x = e.clientX - rect.left;
                _this.nozzleNumber = Math.min(Math.max(Math.round((x - 40) / 4.6), 0), _this.state.nozzleMax - 1);
                _this.redraw();
            });

            this.setup();
            this.redraw();
        };

        NozzleSetup.prototype.detached = function detached() {
            if (this.rankSubscription) {
                this.rankSubscription.dispose();
            }

            if (this.flowGainSubscription) {
                this.flowGainSubscription.dispose();
            }

            if (this.nozzleSizeSubscription) {
                this.nozzleSizeSubscription.dispose();
            }

            if (this.presetNameSubscription) {
                this.presetNameSubscription.dispose();
            }

            this.subscriptions.forEach(function (sub) {
                sub.dispose();
            });

            this.gatewayService.unsubscribe(this.presetProperties);
            this.gatewayService.unsubscribe(this.subscribeProperties);
        };

        NozzleSetup.prototype.setup = function setup() {
            var _this2 = this;

            this.setPresetCollections(this.state.preset1NumIndex);
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'preset1NumIndex').subscribe(function (newValue, oldValue) {
                _this2.setPresetCollections(newValue);
            }));
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleForceOn').subscribe(function (newValue, oldValue) {
                _this2.nozzleTest = Array.from(_this2.state.nozzleForceOn, function (x) {
                    return x > 0;
                });
                _this2.redraw();
            }));

            this.nozzleTest = Array.from(this.state.nozzleForceOn, function (x) {
                return x > 0;
            });
        };

        NozzleSetup.prototype.setPresetCollections = function setPresetCollections(presetNum) {
            var _this3 = this;

            this.gatewayService.unsubscribe(this.presetProperties);
            this.presetProperties = ['NozzlePreset' + presetNum + 'Rank', 'NozzlePreset' + presetNum + 'FlowGain', 'NozzlePreset' + presetNum + 'NozzleSize'];
            this.gatewayService.subscribe(this.presetProperties);

            this.rank = this.state['nozzlePreset' + presetNum + 'Rank'];
            this.flowGain = this.state['nozzlePreset' + presetNum + 'FlowGain'];
            this.nozzleSize = this.state['nozzlePreset' + presetNum + 'NozzleSize'];
            this.presetName = this.state['boomPreset1Number' + (presetNum + 1) + 'Name'];

            if (this.rankSubscription) {
                this.rankSubscription.dispose();
            }
            this.rankSubscription = this.bindingEngine.propertyObserver(this.state, 'nozzlePreset' + presetNum + 'Rank').subscribe(function (newValue, oldValue) {
                _this3.rank = newValue;
            });

            if (this.flowGainSubscription) {
                this.flowGainSubscription.dispose();
            }
            this.flowGainSubscription = this.bindingEngine.propertyObserver(this.state, 'nozzlePreset' + presetNum + 'FlowGain').subscribe(function (newValue, oldValue) {
                _this3.flowGain = newValue;
                _this3.redraw();
            });

            if (this.nozzleSizeSubscription) {
                this.nozzleSizeSubscription.dispose();
            }
            this.nozzleSizeSubscription = this.bindingEngine.propertyObserver(this.state, 'nozzlePreset' + presetNum + 'NozzleSize').subscribe(function (newValue, oldValue) {
                _this3.nozzleSize = newValue;
            });

            if (this.presetNameSubscription) {
                this.presetNameSubscription.dispose();
            }
            this.presetNameSubscription = this.bindingEngine.propertyObserver(this.state, 'boomPreset1Number' + (presetNum + 1) + 'Name').subscribe(function (newValue, oldValue) {
                _this3.presetName = newValue;
            });

            this.redraw();
        };

        NozzleSetup.prototype.sendChange = function sendChange(val, prop) {
            var editDelta = {};
            editDelta[prop] = val;
            this.gatewayService.send(editDelta);
        };

        NozzleSetup.prototype.toggleNozzleTest = function toggleNozzleTest() {
            this.state.nozzleForceOn.splice(this.nozzleNumber, 1, this.nozzleTest[this.nozzleNumber] ? 1 : 0);
            this.redraw();
            this.sendChange(this.state.nozzleForceOn, 'NozzleForceOn');
        };

        NozzleSetup.prototype.rankChanged = function rankChanged() {
            this.sendChange(this.rank, 'NozzlePreset' + this.state.preset1NumIndex + 'Rank');
        };

        NozzleSetup.prototype.nozzleSizeChanged = function nozzleSizeChanged() {
            this.sendChange(this.nozzleSize, 'NozzlePreset' + this.state.preset1NumIndex + 'NozzleSize');
        };

        NozzleSetup.prototype.flowGainChanged = function flowGainChanged() {
            this.sendChange(this.flowGain, 'NozzlePreset' + this.state.preset1NumIndex + 'FlowGain');
            this.redraw();
        };

        NozzleSetup.prototype.presetNameKeyup = function presetNameKeyup(newName) {
            switch (this.state.preset1NumIndex) {
                case 0:
                    this.state.boomPreset1Number1Name = newName;
                    break;
                case 1:
                    this.state.boomPreset1Number2Name = newName;
                    break;
                case 2:
                    this.state.boomPreset1Number3Name = newName;
                    break;
                case 3:
                    this.state.boomPreset1Number4Name = newName;
                    break;
                case 4:
                    this.state.boomPreset1Number5Name = newName;
                    break;
                default:
                    break;
            }
        };

        NozzleSetup.prototype.presetNameChanged = function presetNameChanged(newName) {
            this.sendChange(newName, 'BoomPreset1Number' + (this.state.preset1NumIndex + 1) + 'Name');
        };

        NozzleSetup.prototype.changeNozzle = function changeNozzle(val) {
            this.nozzleNumber += val;
        };

        NozzleSetup.prototype.redraw = function redraw() {
            var c = document.getElementById('nozzleCanvas');
            if (!c) {
                return;
            }
            c.width = this.state.nozzleMax * 7 + 80;
            var ctx = c.getContext('2d');
            ctx.beginPath();
            ctx.moveTo(50, 20);
            ctx.lineTo(30, 20);
            ctx.moveTo(40, 20);
            ctx.lineTo(40, c.height - 20);
            ctx.moveTo(30, c.height - 20);
            ctx.lineTo(50, c.height - 20);
            ctx.stroke();
            ctx.fillText('ON', 10, 13);
            ctx.fillText('2.0', 10, 25);
            ctx.fillText('1.0', 10, c.height / 2 + 3);
            ctx.fillText('0.0', 10, c.height - 19);
            ctx.fillText('OFF', 10, c.height - 7);

            for (var i = 0; i < this.state.nozzleMax; i++) {
                ctx.beginPath();
                ctx.rect(60 + i * 7, c.height - 30 - this.flowGain[i] * 100 / 128, 5, 10);

                if (this.state.nozzleForceOn[i] > 0) {
                    ctx.fillStyle = 'orange';
                } else {
                    ctx.fillStyle = i === this.nozzleNumber ? 'yellow' : 'green';
                }

                ctx.fill();
            }
        };

        NozzleSetup.prototype.nozzleNumberChanged = function nozzleNumberChanged(newValue, oldValue) {
            if (newValue <= 0) {
                this.nozzleNumber = 0;
            }

            if (newValue >= this.state.nozzleMax) {
                this.nozzleNumber = this.state.nozzleMax - 1;
            }

            this.redraw();
        };

        return NozzleSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'nozzleNumber', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: function initializer() {
            return 0;
        }
    })), _class2)) || _class);
});
define('text!views/settings/boom/nozzle-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    <require from=\"views/dashboard/boom-nozzle-presets\"></require>\r\n    <require from=\"resources/value-converters/multiplier-format\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/plusone-format\"></require>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n\r\n    <div class=\"container-fluid\">\r\n        <div class=\"row\" style=\"text-align: center; margin: auto;\">\r\n            <div class=\"col-xs-4\">\r\n                <label class=\"control-label\">\r\n                    Channel ${state.nozzleVcmCh[nozzleNumber] | plusoneFormat}\r\n                </label>\r\n            </div>\r\n            <div class=\"col-xs-4\">\r\n                <label class=\"control-label\">\r\n                    VCM ${state.nozzleVcmIdx[nozzleNumber] | plusoneFormat}\r\n                </label>\r\n            </div>\r\n            <div class=\"col-xs-4\">\r\n                <label class=\"control-label\">\r\n                    Drop ${state.nozzleVcmPos[nozzleNumber] | plusoneFormat}\r\n                </label>\r\n            </div>\r\n        </div>\r\n        <div class=\"row\" style=\"text-align: center; margin: auto;\">\r\n            <div class=\"col-sm-12\" style=\"overflow: auto; overflow-y: hidden;\">\r\n                <canvas id=\"nozzleCanvas\" style=\"height: 100px; border: 1px solid black;\"></canvas>\r\n            </div>\r\n        </div>\r\n        <div class=\"row\">\r\n            <div class=\"col-sm-6\">\r\n                <div style=\"margin: auto; text-align: center;\"><h2>${\"Boom Profile\" | t}</h2></div>\r\n                <div style=\"padding: 15px;\">\r\n                    <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"nozzleNum\" class=\"col-xs-4 control-label\">\r\n                                ${\"Nozzle Number\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"number\" id=\"nozzleNum\" class=\"form-control\" step=\"1\" value.bind=\"nozzleNumber | plusoneFormat\" />\r\n                            </div>\r\n\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <div class=\"col-xs-4\"></div>\r\n                            <div class=\"col-xs-3\">\r\n                                <input type=\"button\" class=\"btn btn-gray form-control\" value=\"<\" click.delegate=\"changeNozzle(-1)\" />\r\n                            </div>\r\n                            <div class=\"col-xs-3\">\r\n                                <input type=\"button\" class=\"btn btn-gray form-control\" value=\">\" click.delegate=\"changeNozzle(1)\" />\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"locY\" class=\"col-xs-4 control-label\">\r\n                                ${\"L/R Location\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"number\" id=\"locY\" class=\"form-control\" value.bind=\"state.nozzleLocY[nozzleNumber] | mmToInches\" change.delegate=\"sendChange(state.nozzleLocY, 'NozzleLocY')\" />\r\n                            </div>\r\n                            <label style=\"text-align: left\" for=\"locY\" class=\"col-xs-2 control-label\">\r\n                                ${\"inches\" | t}\r\n                            </label>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"locX\" class=\"col-xs-4 control-label\">\r\n                                ${\"For/Aft Location\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"number\" id=\"locX\" class=\"form-control\" value.bind=\"state.nozzleLocX[nozzleNumber] | mmToInches\" change.delegate=\"sendChange(state.nozzleLocX, 'NozzleLocX')\" />\r\n                            </div>\r\n                            <label style=\"text-align: left\" for=\"locX\" class=\"col-xs-2 control-label\">\r\n                                ${\"inches\" | t}\r\n                            </label>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"vcmSerial\" class=\"col-xs-4 control-label\">\r\n                                ${\"VCM Serial Num.\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"text\" readonly=\"readonly\" id=\"vcmSerial\" class=\"form-control\" value.bind=\"state.vcmSerialNumber[state.nozzleVcmIdx[nozzleNumber]]\" />\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"boomSection\" class=\"col-xs-4 control-label\">\r\n                                ${\"Boom Section\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"number\" id=\"boomSection\" class=\"form-control\" value.bind=\"state.nozzleBoomCh[nozzleNumber] | plusoneFormat\" change.delegate=\"sendChange(state.nozzleBoomCh, 'NozzleBoomCh')\" />\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"auxSection\" class=\"col-xs-4 control-label\">\r\n                                ${\"Auxiliary Section\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"number\" id=\"auxSection\" class=\"form-control\" value.bind=\"state.nozzleAuxCh[nozzleNumber] | plusoneFormat\" change.delegate=\"sendChange(state.nozzleAuxCh, 'NozzleAuxCh')\" />\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"valveSize\" class=\"col-xs-4 control-label\">\r\n                                ${\"Valve Size\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"text\" id=\"valveSize\" class=\"form-control\" value.bind=\"state.nozzleValveSize[nozzleNumber] | multiplierFormat:10:'0.0'\" change.delegate=\"sendChange(state.nozzleValveSize, 'NozzleValveSize')\" />\r\n                            </div>\r\n                        </div>\r\n                    </form>\r\n                </div>\r\n            </div>\r\n            <div class=\"col-sm-6\">\r\n                <div style=\"margin: auto; text-align: center;\"><h2>Preset: ${presetName | t}</h2></div>\r\n                <div style=\"padding: 15px;\">\r\n                    <form style=\"background-color: white\" class=\"form-horizontal\">\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label class=\"col-xs-4 control-label\">\r\n                                ${\"Rank\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <select disabled.bind=\"rankDisabled\" class=\"form-control\" value.bind=\"rank[nozzleNumber]\"\r\n                                        change.delegate=\"rankChanged()\">\r\n                                    <option repeat.for=\"option of rankOptions\"\r\n                                            model.bind=\"option.idx\">\r\n                                        ${option.val}\r\n                                    </option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"flow\" class=\"col-xs-4 control-label\">\r\n                                ${\"Flow Value\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"number\" id=\"flow\" class=\"form-control\" value.bind=\"flowGain[nozzleNumber] | multiplierFormat:64:'0.00'\" \r\n                                       change.delegate=\"flowGainChanged()\" />\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label class=\"col-xs-4 control-label\">\r\n                                ${\"Tip Size\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <select disabled.bind=\"tipSizeDisabled\" class=\"form-control\" value.bind=\"nozzleSize[nozzleNumber]\"\r\n                                        change.delegate=\"nozzleSizeChanged()\">\r\n                                    <option repeat.for=\"option of nozzleSizeOptions\"\r\n                                            model.bind=\"option.idx\">\r\n                                        ${option.val}\r\n                                    </option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"name\" class=\"col-xs-4 control-label\">\r\n                                ${\"Preset Name\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"text\" id=\"name\" class=\"form-control\" value.bind=\"presetName\" keyup.delegate=\"presetNameKeyup(presetName)\" change.delegate=\"presetNameChanged(presetName)\" />\r\n                            </div>\r\n                        </div>\r\n                        <br /><br />\r\n\r\n                        <div class=\"form-group form-group-lg\">\r\n                            <label for=\"pressure\" class=\"col-xs-4 control-label\">\r\n                                ${\"Test Nozzle\" | t}\r\n                            </label>\r\n                            <div class=\"col-xs-6\">\r\n                                <input type=\"checkbox\" class=\"form-control\" checked.bind=\"nozzleTest[nozzleNumber]\" change.delegate=\"toggleNozzleTest()\" />\r\n                            </div>\r\n                        </div>\r\n                    </form>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <div class=\"row\">\r\n            <div id=\"presets\" as-element=\"boom-nozzle-presets\" class=\"container-fluid\" style=\"width: 100%;\"></div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_1cz1ehbzv0 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom\\nozzle-bounds.js',
        hash = '7ee0c7d8c192ee9e38cd4e174dae1805c4658972',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom\\nozzle-bounds.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom/nozzle-bounds',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi', '../../../resources/value-converters/multiplier-format', 'ramda'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi, _multiplierFormat, _ramda) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NozzleBounds = undefined;

    var _ramda2 = _interopRequireDefault(_ramda);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var NozzleBounds = exports.NozzleBounds = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(NozzleBounds, _ref);

        function NozzleBounds(kpaToPsiValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, NozzleBounds);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'nozzle-bounds';
            _this.nozzlePulseTypes = [];
            _this.autoSyncProperties = ['PwmMinimumPercentage', 'PwmMaximumPercentage', 'NozzlePulseFrequencyIndex', 'NozzleShutoffLimit', 'ValveType'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;

            var keyBase = 'systemSettings.boomNozzle.nozzleBounds.';

            _this.valveTypes = _this.getTypes(keyBase + 'valveTypes');
            _this.nozzlePulseTypes = _this.getTypes(keyBase + 'nozzlePulseTypes');
            return _this;
        }

        NozzleBounds.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var curryMultiplier = _ramda2.default.partialRight(this.multiplierFormatValueConverter.forValidate, [2]);

            var rules = _aureliaValidation.ValidationRules.ensure('pwmMinimumPercentage').satisfiesRule('numberRange', 0, 200, curryMultiplier).ensure('pwmMaximumPercentage').satisfiesRule('numberRange', 0, 200, curryMultiplier).ensure('nozzleShutoffLimit').satisfiesRule('numberRange', 0, 34.4738, this.kpaToPsiValueConverter.forValidate, '0.0').rules;
            this.controller.addObject(this.state, rules);
        };

        return NozzleBounds;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/boom/nozzle-bounds.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/value-converters/multiplier-format\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pwmMinimumPercentage | multiplierFormat:2 & validate\" step=\"1\"\r\n                    label=\"systemSettings.boomNozzle.nozzleBounds.labels.pwmMinimumPercentage\"\r\n                    units=\"%\" prop=\"pwmMinimumPercentage\">\r\n            </div>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.pwmMaximumPercentage | multiplierFormat:2 & validate\" step=\"1\"\r\n                    label=\"systemSettings.boomNozzle.nozzleBounds.labels.pwmMaximumPercentage\"\r\n                    units=\"%\" prop=\"pwmMaximumPercentage\">\r\n            </div>\r\n                \r\n            <settings-dropdown selected.bind=\"state.nozzlePulseFrequencyIndex\" label=\"systemSettings.boomNozzle.nozzleBounds.labels.nozzlePulseFrequencyIndex\"\r\n                                options.bind=\"nozzlePulseTypes\" prop=\"nozzlePulseFrequencyIndex\"></settings-dropdown>\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.nozzleShutoffLimit | kpaToPsi:'0.00' & validate\" step=\".01\"\r\n                    label=\"systemSettings.boomNozzle.nozzleBounds.labels.nozzleShutoffLimit\"\r\n                    units=\"units.psi\", prop=\"nozzleShutoffLimit\">\r\n            </div>\r\n                \r\n            <settings-dropdown selected.bind=\"state.valveType\" label=\"systemSettings.boomNozzle.nozzleBounds.labels.valveType\"\r\n                                options.bind=\"valveTypes\" prop=\"valveType\"></settings-dropdown>\r\n        </form>\r\n    </li>\r\n</template>\r\n"; });
var cov_28kc6mozm4 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom\\boom-sway-setup.js',
        hash = 'cec535d19db6455a4d4b754b4d70dc38861bdc58',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom\\boom-sway-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom/boom-sway-setup',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mmToInches', 'aurelia-validation'], function (exports, _aureliaFramework, _gatewayStateBase, _mmToInches, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomSwaySetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var BoomSwaySetup = exports.BoomSwaySetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(BoomSwaySetup, _ref);

        function BoomSwaySetup(mmToInchesValueConverter) {
            _classCallCheck(this, BoomSwaySetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'boom-sway-setup';
            _this.autoSyncProperties = ['SwayNeutralX', 'SwayForwardX', 'SwayBackwardX', 'SwayHingeY', 'SwayDxGain', 'SwayDdxGain'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;
            return _this;
        }

        BoomSwaySetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = 0;
            var topLimit = 2540;
            var rules = _aureliaValidation.ValidationRules.ensure('swayNeutralX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayForwardX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayBackwardX').satisfiesRule('numberRange', 0, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayHingeY').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayDxGain').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('swayDdxGain').satisfiesRule('numberRange', 0, 100, null, '0.0').rules;
            this.controller.addObject(this.state, rules);
        };

        return BoomSwaySetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/boom/boom-sway-setup.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    <require from=\"views/settings/settings-item\"></require>\r\n    <require from=\"views/settings/settings-dropdown\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <li class=\"container-fluid\">\r\n        <form style=\"background-color: white\" class=\"form-horizontal\">\r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.swayNeutralX | mmToInches & validate\" step=\"1\" \r\n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayNeutralX\"\r\n                    units=\"units.in\" prop=\"swayNeutralX\">\r\n            </div>\r\n                    \r\n            <div as-element=\"settings-item\" val.bind=\"state.swayForwardX | mmToInches & validate\" step=\"1\" \r\n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayForwardX\"\r\n                    units=\"units.in\" prop=\"swayForwardX\">\r\n            </div>\r\n    \r\n\r\n            <div as-element=\"settings-item\" val.bind=\"state.swayBackwardX | mmToInches & validate\" step=\"1\" \r\n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayBackwardX\"\r\n                    units=\"units.in\" prop=\"swayBackwardX\">\r\n            </div>\r\n                    \r\n            <div as-element=\"settings-item\" val.bind=\"state.swayHingeY | mmToInches & validate\" step=\"1\" \r\n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayHingeY\"\r\n                    units=\"units.in\" prop=\"swayHingeY\">\r\n            </div>\r\n                    \r\n            <div as-element=\"settings-item\" val.bind=\"state.swayDxGain | numberFormat:'0.0' & validate\" step=\".1\" \r\n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayDxGain\" prop=\"swayDxGain\">\r\n            </div>\r\n                    \r\n            <div as-element=\"settings-item\" val.bind=\"state.swayDdxGain | numberFormat:'0.0' & validate\" step=\".1\" \r\n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayDdxGain\" prop=\"swayDdxGain\">\r\n            </div>\r\n                    \r\n            <div class=\"graphic boom-sway-img\">\r\n            </div>\r\n\r\n        </form>\r\n    </li>\r\n</template>\r\n"; });
var cov_2hva3oaldl = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom-nozzle.js',
        hash = 'f457a7be4a13f582b8d539154fb4def359b9d899',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\settings\\boom-nozzle.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom-nozzle',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomNozzle = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var BoomNozzle = exports.BoomNozzle = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function BoomNozzle() {
            _classCallCheck(this, BoomNozzle);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'boom-nozzle';
            this.name = 'boom-nozzle';

            this.widgets = [{ 'name': 'nozzle-bounds', 'title': ' Nozzle Bounds' }, { 'name': 'nozzle-setup', 'title': ' Nozzle Setup' }, { 'name': 'boom-sway-setup', 'title': ' Boom Sway' }];
        }

        BoomNozzle.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(BoomNozzle, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return BoomNozzle;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/boom-nozzle.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"panel panel-default\">\r\n        <label class=\"panel-heading tree-toggle nav-header\"> Boom/Nozzle</label>\r\n        <ul class=\"panel-body nav nav-list tree\">\r\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\r\n                <div class=\"panel panel-default\">\r\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\r\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\r\n                        <compose view-model=\"views/settings/boom/${widget.name}\" class=\"col-md-11\"></compose>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</template>\r\n"; });
var cov_22a575o78p = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\rate-tuning-controls.js',
        hash = 'b835b918a25b3dfeb07dcbb416a8e4d782bd03af',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\rate-tuning-controls.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/rate-tuning-controls',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', '../../components/shared/dialogs/rate-input-dialog', '../../components/shared/dialogs/psi-input-dialog', '../../resources/value-converters/mlPerHectareToGpa', '../../resources/value-converters/kpaToPsi', '../../components/shared/dialogs/number-input-dialog', '../../components/shared/dialogs/input-dialog'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _rateInputDialog, _psiInputDialog, _mlPerHectareToGpa, _kpaToPsi, _numberInputDialog, _inputDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateTuningControls = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var RateTuningControls = exports.RateTuningControls = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogService, _mlPerHectareToGpa.MlPerHectareToGpaValueConverter, _kpaToPsi.KpaToPsiValueConverter, _inputDialog.InputDialog), _dec(_class = function () {
        function RateTuningControls(gatewayService, dialogService, mlPerHectareToGpaValueConverter, kpaToPsiValueConverter) {
            _classCallCheck(this, RateTuningControls);

            this.subscribedProperties = ['NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1GainK', 'NvRate1DeadBand', 'SystemRate1Auto', 'SystemRate1Index', 'SystemRate1Target0', 'SystemRate1Target1', 'SystemRate1Target2'];
            this.editDelta = {};

            this.gatewayService = gatewayService;
            this.mlPerHectareToGpaValueConverter = mlPerHectareToGpaValueConverter;
            this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            this.dialogService = dialogService;
            this.state = this.gatewayService.getState();
        }

        RateTuningControls.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties, 'rate-tuning-control');
        };

        RateTuningControls.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'rate-tuning-control');
        };

        RateTuningControls.prototype.toggleAuto = function toggleAuto() {
            this.editDelta.systemRate1Auto = this.toggleByte(this.state.systemRate1Auto);
            this.gatewayService.send(this.editDelta);
        };

        RateTuningControls.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        RateTuningControls.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemRate1IncDec = bmpDir;
            this.gatewayService.send(this.editDelta);
        };

        RateTuningControls.prototype.openRateDialog = function openRateDialog(propertyName, displayName) {
            var _this = this;

            var validateMlPerHectareToGpa = function validateMlPerHectareToGpa(n) {
                return function (m) {
                    return _this.mlPerHectareToGpaValueConverter.forValidate(m, n);
                };
            };
            var mlPerHectareGpaConvert = validateMlPerHectareToGpa(4).bind(this);

            this.dialogService.open({
                viewModel: _rateInputDialog.RateInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 467696.8699,
                    converter: mlPerHectareGpaConvert,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        RateTuningControls.prototype.openMlToGalDialog = function openMlToGalDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _inputDialog.InputDialog,
                view: 'components/shared/dialogs/mm-gal-input-dialog.html',
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 18927,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        RateTuningControls.prototype.openPressureDialog = function openPressureDialog(propertyName, displayName) {
            var _this2 = this;

            var validatePsiToKpa = function validatePsiToKpa(n) {
                return function (m) {
                    return _this2.kpaToPsiValueConverter.forValidate(m, n);
                };
            };
            var psiKpaConvert = validatePsiToKpa(4).bind(this);

            this.dialogService.open({
                viewModel: _psiInputDialog.PsiInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 18927000,
                    converter: psiKpaConvert,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        RateTuningControls.prototype.openNumberDialog = function openNumberDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _numberInputDialog.NumberInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 100,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName
                },
                lock: false
            }).whenClosed(function (response) {});
        };

        _createClass(RateTuningControls, [{
            key: 'auto',
            get: function get() {
                return this.state.systemRate1Auto === 1 ? true : false;
            }
        }]);

        return RateTuningControls;
    }()) || _class);
});
define('text!views/pid-control-tuning/rate-tuning-controls.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n    <require from=\"resources/value-converters/mlToGal\"></require>\r\n\r\n    <div class=\"container-fluid panel panel-primary\">\r\n        <div class=\"text-center panel-heading\">Flow Tuning</div>\r\n        <div class=\"panel-body\">\r\n            <div class=\"row row-eq-height\">\r\n                <div class=\"col-xs-2\">\r\n                    <label for=\"rate-toggle\" class=\" ${auto ? 'switcher-success' : ''} switcher switcher-rounded\">\r\n                        <input style=\"text-align: center\" type=\"checkbox\" id=\"rate-toggle\" checked.bind=\"auto\" change.delegate=\"toggleAuto()\" name=\"systemRate1Auto\">\r\n                        <div class=\"switcher-indicator\">\r\n                            <div class=\"switcher-yes\">A</div>\r\n                            <div class=\"switcher-no\">M</div>\r\n                        </div>\r\n                        Rate\r\n                    </label>\r\n                </div>\r\n\r\n                <div class=\"col-xs-3 col-lg-offset-1\">\r\n                    <span class=\"input-group\">\r\n                        <span class=\"input-group-btn\">\r\n                            <button class=\"btn ion-minus\" click.delegate=\"bump(-1)\"></button>\r\n                        </span>\r\n                        <span if.bind=\"state.systemRate1Index === 0\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openRateDialog('systemRate1Target0', 'Target Rate 1')\">\r\n                            ${state.systemRate1Target0 | mlPerHectareToGpa:'0.0'}\r\n                        </span>\r\n                        <span if.bind=\"state.systemRate1Index === 1\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openRateDialog('systemRate1Target1', 'Target Rate 2')\">\r\n                            ${state.systemRate1Target1 | mlPerHectareToGpa:'0.0'}\r\n                        </span>\r\n                        <span if.bind=\"state.systemRate1Index === 2\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openRateDialog('systemRate1Target1', 'Prescription Target Rate')\">\r\n                            ${state.systemRate1Target2 | mlPerHectareToGpa:'0.0'}\r\n                        </span>\r\n                        <span class=\"input-group-btn\">\r\n                            <button class=\"btn ion-plus\" click.delegate=\"bump(1)\"></button>\r\n                        </span>\r\n                    </span>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-xs-2\">\r\n                    <label class=\"label-top\" for=\"rK\">S-Gain</label>\r\n                    <span id=\"rK\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainK', 'S-Gain')\">\r\n                        ${state.nvRate1GainK | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n                <div class=\"col-xs-2\">\r\n                    <label class=\"label-top\" for=\"db\">DeadBand</label>\r\n                    <span id=\"db\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openMlToGalDialog('nvRate1DeadBand', 'DeadBand')\">\r\n                        ${state.nvRate1DeadBand | mlToGal:'0.0'}\r\n                    </span>\r\n                </div>\r\n                <div class=\" col-xs-2\">\r\n                    <label class=\"label-top\" for=\"p\">P-Gain</label>\r\n                    <span id=\"p\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainP', 'P-Gain')\">\r\n                        ${state.nvRate1GainP | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n                <div class=\" col-xs-2\">\r\n                    <label class=\"label-top\" for=\"i\">I-Gain</label>\r\n                    <span id=\"i\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainI', 'I-Gain')\">\r\n                        ${state.nvRate1GainI | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n                <div class=\"col-xs-2\">\r\n                    <label class=\"label-top\" for=\"d\">D-Gain</label>\r\n                    <span id=\"d\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainD', 'D-Gain')\">\r\n                        ${state.nvRate1GainD | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n</template>\r\n"; });
var cov_z1t9xupxu = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\rate-graph.js',
        hash = 'c9359d145e68293cec0bf8b269f088c21361eb8f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\rate-graph.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/rate-graph',['exports', 'aurelia-framework', 'd3'], function (exports, _aureliaFramework, _d) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateGraph = undefined;

    var d3 = _interopRequireWildcard(_d);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var RateGraph = exports.RateGraph = (_class = function () {
        function RateGraph() {
            _classCallCheck(this, RateGraph);

            _initDefineProp(this, 'id', _descriptor, this);

            _initDefineProp(this, 'dataSource', _descriptor2, this);

            this.numOfYTicks = 8;

            _initDefineProp(this, 'refresh', _descriptor3, this);

            _initDefineProp(this, 'scalePercentage', _descriptor4, this);

            _initDefineProp(this, 'minY', _descriptor5, this);
        }

        RateGraph.prototype.attached = function attached() {
            var _this = this;

            this.rectWidth = 50;

            this.limit = 120 * 1;
            this.duration = 500;

            this.currentSampleIndex = this.dataSource.currentSampleIndex();

            this.now = new Date(this.dataSource.actualValues[this.currentSampleIndex].timeStamp - this.duration);

            this.width = 500;
            this.height = 150;
            this.padding = 100;

            this.groups = {
                target: {
                    value: function value() {
                        var next = _this.dataSource.getLiveTargetRate();

                        if (_this.lastTargetRate && _this.lastTargetRate.value !== next.value) {
                            _this.refreshYAxis(next.value);
                        }
                        _this.lastTargetRate = next;
                        return next;
                    },
                    color: 'blue',
                    data: d3.range(this.limit).map(function () {
                        return { value: 0, timeStamp: new Date() };
                    })

                },
                current: {
                    value: function value() {
                        return _this.dataSource.getLiveRate();
                    },
                    color: 'yellow',
                    data: d3.range(this.limit).map(function () {
                        return { value: 0, timeStamp: new Date() };
                    })

                }
            };

            this.x = d3.scaleTime().domain([this.now - this.limit, this.now - this.duration]).range([0, this.width]);

            this.setYScale(this.dataSource.getLiveTargetRate().value);

            this.line = d3.line().curve(d3.curveLinear).x(function (d, i) {
                var x = _this.x(d.timeStamp);
                if (Number.isNaN(x)) {
                    throw new Error('must be number');
                }
                return x;
            }).y(function (d) {
                var y = _this.yScale(d.value);
                if (Number.isNaN(y)) {
                    throw new Error('must be number');
                }
                return y;
            });

            this.svg = d3.select('#' + this.id).append('svg').attr('width', this.width + 50).attr('height', this.height + 50).attr('class', 'chart graph').append('g').attr('transform', 'translate(50,20)');

            this.yGrid = this.svg.append('g').attr('class', 'grid y').call(this.makeYGridlines().tickSize(-this.width).tickFormat(''));

            this.xGrid = this.svg.append('g').attr('class', 'grid').call(this.xGridAxis = this.makeXGridlines());

            this.axis = this.svg.append('g').attr('class', 'x axis').attr('transform', 'translate(0,' + this.height + ')').call(this.x.axis = d3.axisBottom(this.x));

            this.paths = this.svg.append('g');

            this.recordingOverlay = this.svg.append('rect').attr('fill', 'darkred').attr('fill-opacity', 0.5).attr('x', this.x(this.now)).attr('y', 0).attr('width', 0).attr('height', this.height + 2);

            this.svg.append('rect').attr('fill', '#f6f6f6').attr('x', -50).attr('y', 0).attr('width', 50).attr('height', this.height + 2);

            this.yAxis = d3.axisLeft(this.yScale).ticks(this.numOfYTicks);

            this.svg.append('g').attr('class', 'yaxis').style('background-color', 'blue').call(this.yAxis);

            for (var name in this.groups) {
                var group = this.groups[name];
                var strokeWidth = 2;

                if (name === 'target') {
                    strokeWidth = 3;
                }
                group.path = this.paths.append('path').data([group.data]).style('stroke-width', strokeWidth + 'px').attr('class', 'line ' + name + ' group').style('stroke', group.color);
            }

            this.tick();
        };

        RateGraph.prototype.makeYGridlines = function makeYGridlines() {
            return d3.axisLeft(this.yScale).ticks(this.numOfYTicks).tickSize(-this.width).tickFormat('');
        };

        RateGraph.prototype.makeXGridlines = function makeXGridlines() {
            return d3.axisBottom(this.x).tickSize(this.height).tickFormat('');
        };

        RateGraph.prototype.refreshYAxis = function refreshYAxis(target) {
            if (this.svg) {
                this.setYScale(target);

                var t = d3.transition().duration(750).ease(d3.easeLinear);

                this.svg.select('.yaxis').transition(t).call(this.yAxis.bind(this));
            }
        };

        RateGraph.prototype.setYScale = function setYScale(target) {
            var doubleTargetRate = target + target * this.scalePercentage / 100;
            var minY = 0;
            if (this.minY === null) {
                minY = target - target * (this.scalePercentage / 100);
            }
            var maxY = Math.max(this.dataSource.getLiveRate().value, doubleTargetRate);

            if (this.yScale) {
                this.yScale.domain([minY, maxY]);
                this.yAxis.scale(this.yScale);
                this.yGrid.call(this.makeYGridlines().tickSize(-this.width).tickFormat(''));
            } else {
                this.yScale = d3.scaleLinear().clamp(true).nice(true).domain([minY, maxY]).range([this.height, 0]);
            }
        };

        RateGraph.prototype.setupPaths = function setupPaths() {
            for (var name in this.groups) {
                this.svg.select('.line,.' + name + ',.group').remove();
                var group = this.groups[name];

                if (this.dataSource.isLive()) {
                    this.backFillPath(group, name);
                } else {
                    group.data = [];
                }

                var strokeWidth = 2;

                if (name === 'target') {
                    strokeWidth = 4;
                }

                group.path = this.paths.append('path').data([group.data]).style('stroke-width', strokeWidth + 'px').attr('class', 'line ' + name + ' group').style('stroke', group.color);
            }
        };

        RateGraph.prototype.backFillPath = function backFillPath(group, name) {
            var data = [];
            if (name === 'target') {
                var liveDataStart = this.dataSource.targets.length - this.limit;
                data = this.dataSource.targets.slice(Math.max(liveDataStart, 0), this.dataSource.targets.length - 1);
            } else {
                var _liveDataStart = this.dataSource.actualValues.length - this.limit;
                data = this.dataSource.actualValues.slice(Math.max(_liveDataStart, 0), this.dataSource.actualValues.length - 1);
            }
            group.data = data;
        };

        RateGraph.prototype.tick = function tick() {
            this.currentSampleIndex = this.dataSource.currentSampleIndex();
            this.now = this.dataSource.getCurrentCycleTime();
            if (this.dataSource.needsRefresh()) {
                this.setupPaths();
                if (!this.dataSource.hasRecording()) {
                    this.recordingOverlay.attr('width', 0);
                } else if (!this.dataSource.isLive()) {
                    this.recordingOverlay.attr('fill', 'darkgreen');
                } else if (this.dataSource.isLive()) {
                    this.recordingOverlay.attr('fill', 'darkred');
                }
            }

            for (var name in this.groups) {
                var group = this.groups[name];

                group.data.push(group.value());
                group.path.attr('d', this.line);
            }

            if (this.dataSource.isRecording || this.dataSource.hasRecording()) {
                var x1 = this.x(this.dataSource.getRecordingStartTime());
                var x2 = this.x(this.dataSource.getRecordingEndTime());
                var width = Math.min(x2 - x1, this.width);

                if (this.x.range()[0] <= x1 || this.x.range()[1] >= x2) {
                    this.recordingOverlay.attr('transform', null).transition().duration(this.duration).ease(d3.easeLinear).attr('width', width).attr('x', x1);
                }
            }

            this.x.domain([this.now - (this.limit - 2) * this.duration, this.now - this.duration]);

            this.axis.transition().duration(this.duration).ease(d3.easeLinear).call(this.x.axis);

            this.xGrid.transition().duration(this.duration).ease(d3.easeLinear).call(this.xGridAxis);

            this.paths.attr('transform', null).transition().duration(this.duration).ease(d3.easeLinear).attr('transform', 'translate(' + this.x(this.now - (this.limit - 1) * this.duration) + ')').on('end', this.tick.bind(this));

            for (var _name in this.groups) {
                var _group = this.groups[_name];
                if (_group.data.length > this.limit) {
                    _group.data.shift();
                }
            }

            this.dataSource.nextCycle();
        };

        return RateGraph;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'id', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'dataSource', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'refresh', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'scalePercentage', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 100;
        }
    }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'minY', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return null;
        }
    })), _class);
});
define('text!views/pid-control-tuning/rate-graph.html', ['module'], function(module) { module.exports = "<template>\r\n</template>\r\n"; });
var cov_189yxxyhu5 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\pressure-tuning-controls.js',
        hash = '157b4c3cab32a89992ecc0536c930836c951fa05',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\pressure-tuning-controls.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/pressure-tuning-controls',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', '../../components/shared/dialogs/psi-input-dialog', '../../components/shared/dialogs/number-input-dialog', '../../resources/value-converters/kpaToPsi'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _psiInputDialog, _numberInputDialog, _kpaToPsi) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureTuningControls = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var PressureTuningControls = exports.PressureTuningControls = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogService, _kpaToPsi.KpaToPsiValueConverter), _dec(_class = function () {
        function PressureTuningControls(gatewayService, dialogService, kpaToPsiValueConverter) {
            _classCallCheck(this, PressureTuningControls);

            this.subscribedProperties = ['SystemPressure1Auto', 'SystemPressure1IncDec', 'SystemPressure1Target0', 'SystemPressure1Target1', 'SystemPressure1Target2', 'SystemPressure1Index', 'PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK', 'PressureDeadBand', 'RateSyncEnabled'];
            this.editDelta = {};

            this.gatewayService = gatewayService;
            this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            this.dialogService = dialogService;
            this.state = this.gatewayService.getState();
        }

        PressureTuningControls.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties, 'pressure-tuning-control');
        };

        PressureTuningControls.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'pressure-tuning-control');
        };

        PressureTuningControls.prototype.toggleAuto = function toggleAuto() {
            this.editDelta.systemPressure1Auto = this.toggleByte(this.state.systemPressure1Auto);
            this.gatewayService.send(this.editDelta);
        };

        PressureTuningControls.prototype.toggleRateSync = function toggleRateSync() {
            this.editDelta.rateSyncEnabled = this.toggleByte(this.state.rateSyncEnabled);
            this.gatewayService.send(this.editDelta);
        };

        PressureTuningControls.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        PressureTuningControls.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemPressure1IncDec = bmpDir;
            this.gatewayService.send(this.editDelta);
        };

        PressureTuningControls.prototype.openTargetPressureDialog = function openTargetPressureDialog(propertyName, displayName, format, max) {
            var _this = this;

            var validatePsiToKpa = function validatePsiToKpa(n) {
                return function (m) {
                    return _this.kpaToPsiValueConverter.forValidate(m, n);
                };
            };
            var psiKpaConvert = validatePsiToKpa(4).bind(this);

            this.dialogService.open({
                viewModel: _psiInputDialog.PsiInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: max || 6894.76,
                    converter: psiKpaConvert,
                    format: format || '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        PressureTuningControls.prototype.openNumberDialog = function openNumberDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _numberInputDialog.NumberInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 100,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName
                },
                lock: false
            }).whenClosed(function (response) {});
        };

        _createClass(PressureTuningControls, [{
            key: 'auto',
            get: function get() {
                return this.state.systemPressure1Auto === 0 ? false : true;
            }
        }, {
            key: 'rateSyncEnabled',
            get: function get() {
                return this.state.rateSyncEnabled === 0 ? false : true;
            }
        }]);

        return PressureTuningControls;
    }()) || _class);
});
define('text!views/pid-control-tuning/pressure-tuning-controls.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <div class=\"container-fluid panel panel-primary\">\r\n        <div class=\"text-center panel-heading\">Pressure Tuning</div>\r\n        <div class=\"panel-body\">\r\n            <div class=\"row row-eq-height\">\r\n                <div class=\"col-xs-2\">\r\n                    <label for=\"a\" class=\" ${auto ? 'switcher-success' : ''} switcher switcher-rounded\">\r\n                        <input style=\"text-align: center\" type=\"checkbox\" id=\"a\" checked.bind=\"auto\" change.delegate=\"toggleAuto()\" name=\"systemPressure1Auto\" >\r\n                        <div class=\"switcher-indicator\">\r\n                            <div class=\"switcher-yes\">A</div>\r\n                            <div class=\"switcher-no\">M</div>\r\n                        </div>\r\n                        Rate\r\n                    </label>\r\n                </div>\r\n\r\n                <div class=\"col-xs-3 col-lg-offset-1\">\r\n                    <span class=\"input-group\">\r\n                        <span class=\"input-group-btn\">\r\n                            <button class=\"btn ion-minus\" click.delegate=\"bump(-1)\"></button>\r\n                        </span>\r\n                        <span if.bind=\"state.systemPressure1Index === 0\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('systemPressure1Target0', 'Target Pressure 1')\">\r\n                            ${state.systemPressure1Target0 | kpaToPsi:'0.0'}\r\n                        </span>\r\n                        <span if.bind=\"state.systemPressure1Index === 1\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('systemPressure1Target1', 'Target Pressure 2')\">\r\n                            ${state.systemPressure1Target1 | kpaToPsi:'0.0'}\r\n                        </span>\r\n                        <span if.bind=\"state.systemPressure1Index === 2\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('systemPressure1Target2', 'Target Pressure 3')\">\r\n                            ${state.systemPressure1Target2 | kpaToPsi:'0.0'}\r\n                        </span>\r\n                        <span class=\"input-group-btn\">\r\n                            <button class=\"btn ion-plus\" click.delegate=\"bump(1)\"></button>\r\n                        </span>\r\n                    </span>\r\n                </div>\r\n                <div class=\"col-xs-2\">\r\n                    <label for=\"rate-sync\" class=\" ${rateSyncEnabled ? 'switcher-success' : ''} switcher switcher-rounded\">\r\n                        <input style=\"text-align: center\" type=\"checkbox\" id=\"rate-sync\" checked.bind=\"rateSyncEnabled\" change.delegate=\"toggleRateSync()\" name=\"rateSyncEnabled\" >\r\n                        <div class=\"switcher-indicator\">\r\n                            <div class=\"switcher-yes\">E</div>\r\n                            <div class=\"switcher-no\">D</div>\r\n                        </div>\r\n                        Rate-Sync\r\n                    </label>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n      \r\n                <div class=\"col-xs-2\">\r\n                    <label class=\"label-top\" for=\"rK\">S-Gain</label>\r\n                    <span id=\"rK\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainK', 'S-Gain')\">\r\n                        ${state.pressureGainK | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n                <div class=\"col-xs-2\">\r\n                    <label class=\"label-top\" for=\"db\">DeadBand</label>\r\n                    <span id=\"db\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('pressureDeadBand', 'DeadBand', '0.00', 0.2069)\">\r\n                        ${state.pressureDeadBand | kpaToPsi:'0.00'}\r\n                    </span>\r\n                </div>\r\n                <div class=\" col-xs-2\">\r\n                    <label class=\"label-top\" for=\"p\">P-Gain</label>\r\n                    <span style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainP', 'P-Gain')\">\r\n                        ${state.pressureGainP | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n                <div class=\" col-xs-2\">\r\n                    <label class=\"label-top\" for=\"i\">I-Gain</label>\r\n                    <span style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainI', 'I-Gain')\">\r\n                        ${state.pressureGainI | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n                <div class=\"col-xs-2\">\r\n                    <label class=\"label-top\" for=\"d\">D-Gain</label>\r\n                    <span style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainD', 'D-Gain')\">\r\n                        ${state.pressureGainD | numberFormat:'0.0'}\r\n                    </span>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_khl47j336 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\pid-graph-data-source.js',
        hash = '80fd32ba90881baceefbec3633e9a9f18073fc98',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\pid-graph-data-source.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/pid-graph-data-source',['exports', 'file-saver'], function (exports, _fileSaver) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PidGraphDataSource = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var PidGraphDataSource = exports.PidGraphDataSource = function () {
        function PidGraphDataSource() {
            _classCallCheck(this, PidGraphDataSource);

            this.maxSize = 1000;
            this.isRecording = false;
            this.isPlaying = false;
            this.targets = [{ value: 0, timeStamp: new Date(Date.now() - 750) }, { value: 0, timeStamp: new Date(Date.now() - 750) }];
            this.actualValues = [{ value: 0, timeStamp: new Date(Date.now() - 750) }, { value: 0, timeStamp: new Date(Date.now() - 750) }];
            this._recordingStartIndex = 0;
            this._recordingEndIndex = 0;
            this.playbackPositionIndex = 0;
            this.recording = {
                sGain: null,
                pGain: null,
                iGain: null,
                dGain: null,
                actualValues: [],
                targets: []
            };
        }

        PidGraphDataSource.prototype.sampleTarget = function sampleTarget(value) {
            this.targets.push({ value: value, timeStamp: new Date() });
        };

        PidGraphDataSource.prototype.sampleActualValue = function sampleActualValue(value) {
            this.actualValues.push({ value: value, timeStamp: new Date() });
        };

        PidGraphDataSource.prototype.getLiveRate = function getLiveRate() {
            if (this.isPlaying) {
                return this.recording.actualValues[this.playbackPositionIndex];
            }
            var v = this.actualValues[this.actualValues.length - 1];
            if (isNaN(v.value)) {
                throw new Error('must be number');
            }
            return v;
        };

        PidGraphDataSource.prototype.getLiveTargetRate = function getLiveTargetRate() {
            if (this.isPlaying) {
                return this.recording.targets[this.playbackPositionIndex];
            }
            var v = this.targets[this.targets.length - 1];
            if (isNaN(v.value)) {
                throw new Error('must be number');
            }
            return v;
        };

        PidGraphDataSource.prototype.record = function record() {
            this._recordingStartIndex = this.actualValues.length - 1;
            this._recordingEndIndex = this._recordingStartIndex;
            this.isRecording = true;
        };

        PidGraphDataSource.prototype.setPidInfo = function setPidInfo(s, p, i, d, lat, long) {
            this.recording.sGain = s;
            this.recording.pGain = p;
            this.recording.iGain = i;
            this.recording.dGain = d;
            this.recording.latitude = lat;
            this.recording.longitude = long;
            this.recording.startTime = new Date();
        };

        PidGraphDataSource.prototype.play = function play() {
            if (this.isRecording) {
                this._recordingEndIndex = this.actualValues.length - 1;
                this.recording.actualValues = this.actualValues.slice(this._recordingStartIndex, this._recordingEndIndex);
                this.recording.targets = this.targets.slice(this._recordingStartIndex, this._recordingEndIndex);
            }
            if (this.recording.actualValues.length > 0) {
                this.isRecording = false;
                this.isPlaying = true;
                this.needsRedraw = true;
                this.playbackPositionIndex = 0;
            }
        };

        PidGraphDataSource.prototype.stop = function stop() {
            if (!this.isLive()) {
                this.needsRedraw = true;
                if (this.isRecording) {
                    this._recordingEndIndex = this.actualValues.length - 1;
                    this.recording.actualValues = this.actualValues.slice(this._recordingStartIndex, this._recordingEndIndex);
                    this.recording.targets = this.targets.slice(this._recordingStartIndex, this._recordingEndIndex);
                }
                this.isRecording = false;
                this.isPlaying = false;
            }
        };

        PidGraphDataSource.prototype.getPlaybackIndex = function getPlaybackIndex() {
            return this.playbackPositionIndex;
        };

        PidGraphDataSource.prototype.getRecordingStartTime = function getRecordingStartTime() {
            if (this.isRecording) {
                return this.actualValues[this._recordingStartIndex].timeStamp;
            }
            if (!this.recording.actualValues[0]) {
                throw new Error('Cant get Start time of empty recording');
            }
            return this.recording.actualValues[0].timeStamp;
        };

        PidGraphDataSource.prototype.hasRecording = function hasRecording() {
            return this.recording.actualValues.length > 0 && this.recording.targets.length > 0;
        };

        PidGraphDataSource.prototype.getRecordingEndTime = function getRecordingEndTime() {
            if (this.isRecording) {
                return this.actualValues[this._recordingEndIndex].timeStamp;
            }
            return this.recording.actualValues[this.recording.actualValues.length - 1].timeStamp;
        };

        PidGraphDataSource.prototype.currentSampleIndex = function currentSampleIndex() {
            return this.actualValues.length - 1;
        };

        PidGraphDataSource.prototype.nextCycle = function nextCycle() {
            while (this.actualValues.length - 1 >= this.maxSize) {
                this.actualValues.shift();
                if (this.isRecording) {
                    this._recordingStartIndex--;
                    if (this._recordingStartIndex < 0) {
                        throw new Error('recording start index cannot be negative');
                    }
                }
            }

            while (this.targets.length - 1 >= this.maxSize) {
                this.targets.shift();
            }
            this.playbackPositionIndex++;
            if (this.playbackPositionIndex >= this.recording.actualValues.length && this.isPlaying) {
                this.isRecording = false;
                this.isPlaying = false;
                this.needsRedraw = true;
            }

            if (this.isRecording) {
                this._recordingEndIndex = this.actualValues.length - 1;

                var recordingLength = this.getRecordingEndTime() - this.getRecordingStartTime();
                var milliSecondsInMinute = 60000;
                if (recordingLength > milliSecondsInMinute) {
                    this.stop();
                }
            }
        };

        PidGraphDataSource.prototype.getCurrentCycleTime = function getCurrentCycleTime() {
            if (!this.isPlaying) {
                return this.actualValues[this.actualValues.length - 1].timeStamp;
            }
            return this.recording.actualValues[this.playbackPositionIndex].timeStamp;
        };

        PidGraphDataSource.prototype.needsRefresh = function needsRefresh() {
            var needsRedraw = this.needsRedraw;

            if (needsRedraw) {
                this.needsRedraw = false;
            }
            return needsRedraw;
        };

        PidGraphDataSource.prototype.isLive = function isLive() {
            return !this.isPlaying && !this.isRecording;
        };

        PidGraphDataSource.prototype.exportRecordingToCsv = function exportRecordingToCsv(fileName) {
            var _this = this;

            var rowDelimiter = '\r\n';
            var colDelimiter = '"," ';

            if (this.recording) {
                this.stop();
            }
            var csv = '';

            csv += 'Pid-Tuning' + rowDelimiter;
            csv += ['S-Gain', 'P-Gain', 'I-Gain', 'D-Gain', 'Recording-Start'].join() + rowDelimiter;
            csv += [this.recording.sGain, this.recording.pGain, this.recording.iGain, this.recording.dGain, this.recording.actualValues[0].timeStamp].join() + rowDelimiter;
            csv += rowDelimiter;

            csv += ['TimeStamp', 'Target', 'Actual Value'].join() + rowDelimiter;

            this.recording.actualValues.forEach(function (sample, index) {
                csv += [sample.timeStamp, String(parseFloat(_this.recording.targets[index].value.toFixed(2))), String(parseFloat(sample.value.toFixed(2)))].join() + rowDelimiter;
            });
            var blob = new Blob([csv], { type: 'text/csv;charset=utf-8' });
            window.saveAs(blob, fileName + '.csv');
        };

        return PidGraphDataSource;
    }();
});
var cov_1qc0ggdwv8 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\pid-control-tuning.js',
        hash = '05259e463f10de986d2d6de4f89dbe80aa641c7a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\pid-control-tuning\\pid-control-tuning.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/pid-control-tuning',['exports', 'aurelia-framework', '../../components/shared/dialogs/mph-input-dialog', '../../resources/value-converters/mmPerSecondToMph', '../../services/gateway-service', 'aurelia-dialog', './pid-graph-data-source'], function (exports, _aureliaFramework, _mphInputDialog, _mmPerSecondToMph, _gatewayService, _aureliaDialog, _pidGraphDataSource) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PidControlTuning = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var PidControlTuning = exports.PidControlTuning = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogService, _aureliaFramework.BindingEngine, _mmPerSecondToMph.MmPerSecondToMphValueConverter), _dec(_class = function () {
        function PidControlTuning(gatewayService, dialogService, bindingEngine, mmPerSecondToMphValueConverter) {
            _classCallCheck(this, PidControlTuning);

            this.subscribedProperties = ['SystemRate', 'SystemRate1Index', 'SystemRate1Target0', 'SystemRate1Target1', 'SystemRate1Target2', 'SystemPressure1', 'SystemPressure1Index', 'SystemPressure1Target0', 'SystemPressure1Target1', 'SystemPressure1Target2', 'TestSpeed', 'GroundSpeed', 'NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1GainK', 'PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK', 'GpsLat', 'GpsLong'];
            this.subscriptions = [];

            this.dialogService = dialogService;
            this.bindingEngine = bindingEngine;
            this.rateGraphDataSource = new _pidGraphDataSource.PidGraphDataSource();
            this.pressureGraphDataSource = new _pidGraphDataSource.PidGraphDataSource();
            this.mmPerSecondToMphValueConverter = mmPerSecondToMphValueConverter;
            this.gatewayService = gatewayService;
            this.state = this.gatewayService.getState();
        }

        PidControlTuning.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribedProperties, 'pid-control-tuning');
            var recordStoppers = ['NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1GainK', 'PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK'];

            recordStoppers.forEach(function (prop) {
                var subscription = _this.bindingEngine.propertyObserver(_this.state, _this.lowerCaseFirstLetter(prop)).subscribe(function () {
                    _this.stop();
                });

                _this.subscriptions.push(subscription);
            });
            setInterval(this.sample.bind(this), 500);
        };

        PidControlTuning.prototype.detached = function detached() {
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
        };

        PidControlTuning.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'pid-control-tuning');
        };

        PidControlTuning.prototype.lowerCaseFirstLetter = function lowerCaseFirstLetter(string) {
            return string.charAt(0).toLowerCase() + string.slice(1);
        };

        PidControlTuning.prototype.sampleRateTarget = function sampleRateTarget() {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var rateTarget = this.getActiveTarget() / mLPerGallon / acrePerHectare;

            this.rateGraphDataSource.sampleTarget(rateTarget);

            return rateTarget;
        };

        PidControlTuning.prototype.sampleCurrentRate = function sampleCurrentRate() {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var flowRate = this.state.systemRate / mLPerGallon / acrePerHectare;
            this.rateGraphDataSource.sampleActualValue(flowRate);
            return flowRate;
        };

        PidControlTuning.prototype.samplePressureTarget = function samplePressureTarget() {
            var psiPerKpa = 6.89475729;
            var targetPressure = this.getActivePressureTarget() / psiPerKpa;
            this.pressureGraphDataSource.sampleTarget(targetPressure);
            return targetPressure;
        };

        PidControlTuning.prototype.sampleCurrentPressure = function sampleCurrentPressure() {
            var psiPerKpa = 6.89475729;
            var currentPressure = this.state.systemPressure1 / psiPerKpa;
            this.pressureGraphDataSource.sampleActualValue(currentPressure);
            return currentPressure;
        };

        PidControlTuning.prototype.sample = function sample() {
            this.sampleRateTarget();
            this.samplePressureTarget();
            this.sampleCurrentRate();
            this.sampleCurrentPressure();
        };

        PidControlTuning.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemRate1Target' + this.state.systemRate1Index];
        };

        PidControlTuning.prototype.getActivePressureTarget = function getActivePressureTarget() {
            return this.state['systemPressure1Target' + this.state.systemPressure1Index];
        };

        PidControlTuning.prototype.record = function record() {
            this.recording = true;
            var lat = this.state.gpsLat;
            var long = this.state.gpsLong;
            this.rateGraphDataSource.setPidInfo(this.state.nvRate1GainK, this.state.nvRate1GainP, this.state.nvRate1GainI, this.state.nvRate1GainD, lat, long);
            this.pressureGraphDataSource.setPidInfo(this.state.pressureGainK, this.state.pressureGainP, this.state.pressureGainI, this.state.pressureGainD, lat, long);
            this.rateGraphDataSource.record();
            this.pressureGraphDataSource.record();
        };

        PidControlTuning.prototype.stop = function stop() {
            this.recording = false;
            this.rateGraphDataSource.stop();
            this.pressureGraphDataSource.stop();
        };

        PidControlTuning.prototype.play = function play() {
            this.recording = false;
            this.rateGraphDataSource.play();
            this.pressureGraphDataSource.play();
        };

        PidControlTuning.prototype.exportToCsv = function exportToCsv() {
            if (this.recording || this.pressureGraphDataSource.hasRecording() && this.rateGraphDataSource.hasRecording()) {
                this.pressureGraphDataSource.exportRecordingToCsv('pressure-tuning');
                this.rateGraphDataSource.exportRecordingToCsv('rate-tuning');
            }
        };

        PidControlTuning.prototype.openMphDialog = function openMphDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _mphInputDialog.MphInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,

                    max: 44704,
                    converter: this.mmPerSecondToMphValueConverter.forValidate,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName
                },
                lock: false
            }).whenClosed(function (response) {});
        };

        _createClass(PidControlTuning, [{
            key: 'isPlaying',
            get: function get() {
                return this.pressureGraphDataSource.isPlaying && this.rateGraphDataSource.isPlaying;
            }
        }, {
            key: 'activeTarget',
            get: function get() {
                return this.getActiveTarget();
            }
        }, {
            key: 'currentTime',
            get: function get() {
                return new Date();
            }
        }]);

        return PidControlTuning;
    }()) || _class);
});
define('text!views/pid-control-tuning/pid-control-tuning.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/pid-control-tuning/rate-graph\"></require>\r\n    <require from=\"views/pid-control-tuning/rate-tuning-controls\"></require>\r\n    <require from=\"views/pid-control-tuning/pressure-tuning-controls\"></require>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n    <require from=\"resources/value-converters/datetime-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\r\n    <div class=\"container-fluid\">\r\n        <div class=\"row\" style=\"margin-bottom: 20px; margin-top: 20px\">\r\n            <div class=\"col-xs-2\">\r\n                <label>Speed</label>\r\n                <span class=\"form-control\" style=\"text-align: center\" click.trigger=\"openMphDialog('testSpeed', 'Test Speed')\">\r\n                    ${state.groundSpeed | mmPerSecondToMph:'0.0'}\r\n                </span>\r\n            </div>\r\n        </div>\r\n\r\n        <pressure-tuning-controls>\r\n        </pressure-tuning-controls>\r\n        <rate-tuning-controls >\r\n        </rate-tuning-controls>\r\n\r\n        <div style=\"margin-bottom: 100px\"class=\"container-fluid\">\r\n            <div style=\"display: block\">\r\n                <div style=\"display: block; position: relative\">\r\n                    <rate-graph id=\"flow-graph\" style=\"display: inline\" view-model.ref=\"rateGraph\" data-source.bind=\"rateGraphDataSource\" scale-percentage=\"50\"></rate-graph>\r\n                    <div class=\"pid-display-box \">\r\n                        <label class=\"label-top\">Flow Rate</label>\r\n                        <span>${state.systemRate | mlPerHectareToGpa:'0.0' }</span>\r\n                    </div>\r\n                </div>\r\n\r\n                <div style=\"display: block; position: relative\">\r\n                    <rate-graph id=\"pressure-graph\" style=\"display: inline\" view-model.ref=\"pressureGraph\" data-source.bind=\"pressureGraphDataSource\" scale-percentage=\"50\"></rate-graph>\r\n                    <div class=\"pid-display-box \">\r\n                        <label class=\"label-top\">Pressure Rate</label>\r\n                        <span>${state.systemPressure1 | kpaToPsi:'0.0' }</span>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n\r\n            <div style=\"margin-left: 200px\" class=\"btn-group center-block\" role=\"group\">\r\n                <button class=\"btn ion-ios-recording\" disabled.bind=\"isPlaying\" style=\"color: red\" click.trigger=\"record()\"> Record</button>\r\n                <button class=\"btn btn-secondary ion-ios-\" click.delegate=\"stop()\">Stop</button>\r\n                <button class=\"btn btn-primary ion-ios-play\" click.trigger=\"play()\">Play</button>\r\n                <button class=\"btn btn-default\" click.delegate=\"exportToCsv()\">Export To Csv</button>\r\n            </div>\r\n\r\n\r\n            <div style=\"display: inline\" if.bind=\"recording\" class=\"ion-ios-recording\"></div>\r\n            <label>${currentTime | dateTimeFormat:'mm'} Minutes</label>\r\n            <label>${currentTime | dateTimeFormat:'ss'} Seconds</label>\r\n        </div>\r\n    </div>\r\n\r\n</template>\r\n"; });
var cov_b8ke008ex = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\three-web-gl-renderer.js',
        hash = '0c121a160c3664e7ba1729914b20dd5a6cad4da8',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\three-web-gl-renderer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/three-web-gl-renderer',['exports', 'aurelia-framework', 'three', 'aurelia-configuration'], function (exports, _aureliaFramework, _three, _aureliaConfiguration) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ThreeWebGlRenderer = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ThreeWebGlRenderer = exports.ThreeWebGlRenderer = (_dec = (0, _aureliaFramework.inject)(_aureliaConfiguration.AureliaConfiguration), _dec(_class = function (_ref) {
        _inherits(ThreeWebGlRenderer, _ref);

        function ThreeWebGlRenderer(config) {
            _classCallCheck(this, ThreeWebGlRenderer);

            var isCloud = config.get('Web').IsCloud;
            return _possibleConstructorReturn(this, _ref.call(this, {
                alpha: 1,
                antialias: true,
                clearColor: 0xbfd7ef,
                logarithmicDepthBuffer: isCloud
            }));
        }

        return ThreeWebGlRenderer;
    }((_three.WebGLRenderer))) || _class);
});
var cov_2diibytsow = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\region.js',
        hash = '492cc74f47778eaa0638f19600bf2ca46aaf0ef8',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\region.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/region',['exports', 'three', './color-picker'], function (exports, _three, _colorPicker) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Region = undefined;

    var THREE = _interopRequireWildcard(_three);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var bytesPerCell = 4;

    var Region = exports.Region = function () {
        function Region(container, x, y, size, resolution, mappingService, debug) {
            _classCallCheck(this, Region);

            this.showErrorLayer = true;

            this.colorPicker = new _colorPicker.ColorPicker();
            this.mappingService = mappingService;
            this.regionX = x;
            this.regionY = y;
            this.resolution = resolution;

            this.divisions = size / resolution;
            this.size = size;
            this.container = container;
            this.debug = debug;
            this.textureData = new Uint8Array(bytesPerCell * this.divisions * this.divisions);
            this.errorTextureData = new Uint8Array(bytesPerCell * this.divisions * this.divisions);
            this.setupGeometry(debug);
            this.loadCoverage();
        }

        Region.prototype.setupGeometry = function setupGeometry() {
            var geometry = new THREE.PlaneBufferGeometry(this.size, this.size, 1, 1);
            this.texture = new THREE.DataTexture(this.textureData, this.divisions, this.divisions, THREE.RGBAFormat, THREE.UnsignedByteType);
            var material = new THREE.MeshBasicMaterial({ transparent: true, map: this.texture, depthWrite: true });
            this.texture.needsUpdate = true;

            this.mesh = new THREE.Mesh(geometry, material);
            this.mesh.lookAt(0, 0, 1);
            this.mesh.position.set(this.size / 2, this.size / 2, 0);
            this.mesh.translateX(this.regionX * this.size);
            this.mesh.translateY(this.regionY * this.size);

            this.errorTexture = new THREE.DataTexture(this.errorTextureData, this.divisions, this.divisions, THREE.RGBAFormat, THREE.UnsignedByteType);

            var errorMaterial = new THREE.MeshBasicMaterial({ transparent: true, map: this.errorTexture, depthWrite: true });
            this.errorTexture.needsUpdate = true;

            this.errorMesh = new THREE.Mesh(geometry, errorMaterial);
            this.errorMesh.lookAt(0, 0, 1);
            this.errorMesh.position.set(this.size / 2, this.size / 2, 1);
            this.errorMesh.translateX(this.regionX * this.size);
            this.errorMesh.translateY(this.regionY * this.size);
            this.errorMesh.translateZ(10);

            this.container.add(this.mesh);
            this.container.add(this.errorMesh);

            if (this.debug) {
                this.loadFont();
                var square = new THREE.Geometry();
                square.vertices.push(new THREE.Vector3(0, 0, 0));
                square.vertices.push(new THREE.Vector3(0, this.size, 0));
                square.vertices.push(new THREE.Vector3(this.size, this.size, 0));
                square.vertices.push(new THREE.Vector3(this.size, 0, 0));
                square.vertices.push(new THREE.Vector3(0, 0, 0));
                this.lineMaterial = new THREE.LineBasicMaterial({ color: 0x00ff00, opacity: 0.5 });
                this.line = new THREE.Line(square, this.lineMaterial);
                this.line.translateX(this.regionX * this.size);
                this.line.translateY(this.regionY * this.size);
                this.line.translateZ(0.5);

                this.container.add(this.line);
            }
        };

        Region.prototype.loadFont = function loadFont() {
            var _this = this;

            var loader = new THREE.FontLoader();
            loader.load('helvetiker_regular.typeface.js', function (res) {
                _this.font = res;
                _this.createText();
            });
        };

        Region.prototype.createText = function createText() {
            var cubeMat = new THREE.MeshLambertMaterial({ color: 0xff3300 });
            this.textGeo = new THREE.TextGeometry('X: ' + this.regionX * this.size + ' Y:' + this.regionY * this.size, {
                font: this.font,
                size: 10000,
                height: 5,
                weight: 'normal'
            });
            this.textGeo.computeBoundingBox();
            this.textGeo.computeVertexNormals();
            this.text = new THREE.Mesh(this.textGeo, cubeMat);
            this.text.translateX(this.regionX * this.size + this.size / 4);
            this.text.translateY(this.regionY * this.size + this.size / 2);
            this.text.translateZ(1000);
            this.container.add(this.text);
        };

        Region.prototype.loadCoverage = function loadCoverage() {
            this.getCoverage(this.regionX * this.size, this.regionY * this.size, this.size);
        };

        Region.prototype.getCoverage = function getCoverage(minX, minY, size) {
            var _this2 = this;

            if (this.mappingService === null) {
                return;
            }
            this.mappingService.getRegionCoverageBytes(minX, minY, minX + size, minY + size, this.resolution).then(function (base64) {
                var tData = base64 === null ? new Uint8Array(bytesPerCell * _this2.divisions * _this2.divisions) : Uint8Array.from(atob(base64), function (c) {
                    return c.charCodeAt(0);
                });

                _this2.textureData.set(tData);

                if (_this2.texture) {
                    _this2.texture.needsUpdate = true;
                }
            });

            this.mappingService.getSystemErrors(minX, minY, minX + size, minY + size, this.resolution).then(function (errors) {
                errors.forEach(function (error) {
                    var pos = error.position;
                    var localX = Math.floor(_this2.worldToLocal(pos.x));
                    var localY = Math.floor(_this2.worldToLocal(pos.y));

                    _this2.setErrorColor(localX, localY, _this2.colorPicker.getColorFromErrorType(error.errorType));
                });
            });
        };

        Region.prototype.worldToLocal = function worldToLocal(value) {
            value = value % this.size;
            if (value < 0) {
                value += this.size;
            }

            return value / this.resolution;
        };

        Region.prototype.toggleErrorLayer = function toggleErrorLayer() {
            this.errorMesh.material.visible = !this.showErrorLayer;
            this.showErrorLayer = !this.showErrorLayer;
        };

        Region.prototype.setColor = function setColor(x, y, color) {
            var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;

            var index = bytesPerCell * (x + this.divisions * y);

            this.textureData[index++] = Math.floor(0xFF * color.r);
            this.textureData[index++] = Math.floor(0xFF * color.g);
            this.textureData[index++] = Math.floor(0xFF * color.b);
            this.textureData[index] = Math.min(0xFF, 0xFF * alpha);

            if (this.texture) {
                this.texture.needsUpdate = true;
            }
        };

        Region.prototype.setErrorColor = function setErrorColor(x, y, color) {
            var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;

            var index = bytesPerCell * (x + this.divisions * y);

            this.errorTextureData[index++] = Math.floor(0xFF * color.r);
            this.errorTextureData[index++] = Math.floor(0xFF * color.g);
            this.errorTextureData[index++] = Math.floor(0xFF * color.b);
            this.errorTextureData[index++] = Math.floor(0xFF * alpha);

            if (this.errorTexture) {
                this.errorTexture.needsUpdate = true;
            }
        };

        Region.prototype.addLiveData = function addLiveData(c) {
            if (this.resolution > 1) {
                if (c.x % this.resolution !== 0 || c.y % this.resolution !== 0) {
                    return;
                }
            }
            if (c.data.errorCode !== 15) {
                this.addNozzleErrorData({
                    position: {
                        x: c.x,
                        y: c.y
                    },
                    errorCode: c.data.errorCode
                });
            }

            var localX = this.worldToLocal(c.x);
            var localY = this.worldToLocal(c.y);
            this.setColor(localX, localY, this.colorPicker.getColorFromState(c.data.state), Math.min(1, c.data.value / c.data.targetRate));
        };

        Region.prototype.addNozzleErrorData = function addNozzleErrorData(error) {
            var localX = Math.floor(this.worldToLocal(error.position.x));
            var localY = Math.floor(this.worldToLocal(error.position.y));
            this.setErrorColor(localX, localY, this.colorPicker.getColorFromNozzleErrorCode(error.errorCode));
        };

        Region.prototype.addSystemErrorData = function addSystemErrorData(error) {
            var localX = Math.floor(this.worldToLocal(error.position.x));
            var localY = Math.floor(this.worldToLocal(error.position.y));
            this.setErrorColor(localX, localY, this.colorPicker.getColorFromErrorType(error.errorType));
        };

        return Region;
    }();
});
var cov_1g9p4n7jna = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\marker.js',
        hash = 'b22c93bad61da1bce19c40636892ecfe68660be0',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\marker.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/marker',['exports', 'three'], function (exports, _three) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Marker = undefined;

    var THREE = _interopRequireWildcard(_three);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var Marker = exports.Marker = function Marker(container, pinHeadColor) {
        _classCallCheck(this, Marker);

        this.object = new THREE.Object3D();

        container.add(this.object);
        var radius = 500;
        var sphereRadius = 1000;
        var height = 3000;
        var sphereMaterial = new THREE.MeshBasicMaterial({ color: pinHeadColor });
        var coneMaterial = new THREE.MeshBasicMaterial({ color: 0x000000 });

        var cone = new THREE.Mesh(new THREE.ConeBufferGeometry(radius, height, 8, 1, true), coneMaterial);
        cone.position.y = height * 0.5;
        cone.rotation.x = Math.PI;
        var sphere = new THREE.Mesh(new THREE.SphereBufferGeometry(sphereRadius, 16, 8), sphereMaterial);
        sphere.position.y = height * 0.95 + sphereRadius;
        this.object.rotation.x = Math.PI / 2;
        this.object.position.y = 10;
        this.object.add(cone, sphere);
    };
});
var cov_23lwsibk03 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\map.js',
        hash = '9843e294a6ba33ecf25c2ebc8d7afb6f5d7fbeca',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\map.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/map',['exports', 'aurelia-framework', 'three', 'tween', '../../services/mapping-service', '../../services/log-event-service', '../../services/spray-session-service', '../../services/boundary-map-service', '../../services/prescription-map-service', 'three-orbitcontrols', './grid', './marker', 'toastr', 'aurelia-i18n', 'aurelia-configuration', './map-view-state', './three-web-gl-renderer'], function (exports, _aureliaFramework, _three, _tween, _mappingService, _logEventService, _spraySessionService, _boundaryMapService, _prescriptionMapService, _threeOrbitcontrols, _grid, _marker, _toastr, _aureliaI18n, _aureliaConfiguration, _mapViewState, _threeWebGlRenderer) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Map = undefined;

    var THREE = _interopRequireWildcard(_three);

    var _tween2 = _interopRequireDefault(_tween);

    var _threeOrbitcontrols2 = _interopRequireDefault(_threeOrbitcontrols);

    var toastr = _interopRequireWildcard(_toastr);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var Map = exports.Map = (_dec = (0, _aureliaFramework.inject)(_mappingService.MappingService, _logEventService.LogEventService, _spraySessionService.SpraySessionService, _boundaryMapService.BoundaryMapService, _prescriptionMapService.PrescriptionMapService, _aureliaI18n.I18N, _aureliaConfiguration.AureliaConfiguration, _mapViewState.MapViewState, _aureliaFramework.BindingEngine, _threeWebGlRenderer.ThreeWebGlRenderer), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
        function Map(mappingService, logEventService, spraySessionService, boundaryMapService, prescriptionMapService, i18n, config, mapViewState, bindingEngine, threeWebGlRenderer) {
            var _this = this;

            _classCallCheck(this, Map);

            _initDefineProp(this, 'state', _descriptor, this);

            this.freeViewMode = false;
            this.isCloud = false;
            this.spraySessionId = null;
            this.fieldSize = 800000;
            this.gridDivisions = 40;
            this.viewportHeight = 300;
            this.boundary = [];
            this.prescription = [];
            this.hideRx = false;
            this.ignoreBoundary = false;
            this.internalPoints = [];
            this.boundaryVertices = [];
            this.errorMarker = {};
            this.groundHeight = -500;
            this.gridHeight = -400;
            this.coverageHeight = 0;
            this.boundaryHeight = 1000;
            this.prescriptionHeight = -200;
            this.gpsConnected = true;

            this.renderer = threeWebGlRenderer;
            this.bindingEngine = bindingEngine;
            this.mapViewState = mapViewState;
            this.observerDisposer = this.bindingEngine.propertyObserver(this.mapViewState, 'viewMode').subscribe(function (newValue, oldValue) {
                _this.mapViewModeChanged(newValue, oldValue);
            });
            this.mapViewMode = mapViewState.getViewMode();
            this.bindingEngine = bindingEngine;
            this.mappingService = mappingService;
            this.logEventService = logEventService;
            this.spraySessionService = spraySessionService;
            this.boundaryMapService = boundaryMapService;
            this.prescriptionMapService = prescriptionMapService;
            this.tweenDelay = 500;
            this.i18n = i18n;
            this.config = config;
            this.isCloud = this.config.get('Web').IsCloud;

            this.boundaryMapService.connect(this.receiveBoundaryMap.bind(this), this.addBoundaryPoint.bind(this), this.pruneBoundaryPoint.bind(this), this.clearBoundaryPoints.bind(this)).then(function (status) {
                _this.boundaryPoints = status.boundaryPoints;
                _this.internals = status.internals;
                _this.internalPoints = status.internalPoints;
                _this.drawBoundary();
            });

            this.prescriptionMapService.connect(this.receivePrescriptionMap.bind(this));

            this.clearBoundaryPoints();
        }

        Map.prototype.bind = function bind(bindingContext, overrideContext) {
            this.parent = bindingContext;
        };

        Map.prototype.attached = function attached() {
            var _this2 = this;

            this._isDetached = false;
            this.viewportHeight = document.getElementById('map').parentElement.parentElement.parentElement.clientHeight;

            this.camera = new THREE.PerspectiveCamera(50, this.aspectRatio, 1000, 100000000);
            this.camera.position.set(0, 100000, 0);
            this.camera.lookAt(0, 0, 0);

            this.chaseView();
            this.updateViewport();

            this.scene = new THREE.Scene();
            this.scene.fog = new THREE.Fog(0xbfd7ef, 200000, 400000);

            this.boundaryMapService.getBoundaryMap().then(function (bmap) {
                _this2.receiveBoundaryMap(bmap);
            });

            this.prescriptionMapService.getCurrentPrescriptionMap().then(function (pMap) {
                _this2.receivePrescriptionMap(pMap);
            });

            this.setupControls();

            this.map.appendChild(this.renderer.domElement);

            this.logEventService.connect(this.processError.bind(this));

            this.raycaster = new THREE.Raycaster();

            this.initilizeLandscape();

            if (this.isCloud) {
                this.configureCloudMap();
            } else {
                this.configureMap();
            }

            this.mouse = new THREE.Vector2();

            this.renderer.domElement.addEventListener('mousedown', this.onMapClick.bind(this), false);
        };

        Map.prototype.restartMap = function restartMap() {
            this.scene = new THREE.Scene();
            this.scene.fog = new THREE.Fog(0xbfd7ef, 200000, 400000);

            this.initilizeLandscape();

            if (this.isCloud) {
                this.configureCloudMap();
            } else {
                this.configureMap();
            }
        };

        Map.prototype.deactivate = function deactivate() {
            this.observerDisposer.dispose();
        };

        Map.prototype.detached = function detached() {
            this._isDetached = true;
            this.renderer.dispose();
            this.cancelAnimate();
        };

        Map.prototype.mapViewModeChanged = function mapViewModeChanged(newValue, oldValue) {
            if (newValue === 'chase') {
                this.chaseView();
            } else if (newValue === 'overhead') {
                this.overheadView();
            } else {
                this.fieldView();
            }
        };

        Map.prototype.setupControls = function setupControls() {
            this.controls = new _threeOrbitcontrols2.default(this.camera, this.renderer.domElement);

            var centerPosition = this.controls.target.clone();
            centerPosition.y = 0;
            var groundPosition = this.camera.position.clone();
            groundPosition.y = 0;
            var d = centerPosition.distanceTo(groundPosition);

            var origin = new THREE.Vector2(this.controls.target.y, 0);
            var remote = new THREE.Vector2(0, d);
            var angleRadians = Math.atan2(remote.y - origin.y, remote.x - origin.x);
            this.controls.maxPolarAngle = angleRadians;
        };

        Map.prototype.configureMap = function configureMap() {
            var _this3 = this;

            this.spraySessionService.getCurrentSpraySession().then(function (spraySession) {
                _this3.minimumResolution = spraySession.minimumResolution;
                _this3.fieldChunkSize = spraySession.fieldChunkSize;
                _this3.initializeCoverage();
                _this3.mappingService.connect(_this3.processDelta.bind(_this3), _this3.resetCoverage.bind(_this3)).then(function (location) {
                    _this3.initializeTractor(location);
                    _this3.coverage.bufferRegions(location.x / 1000, -location.y / 1000);
                    _this3.livecoverage.bufferRegions(location.x / 1000, -location.y / 1000);
                    _this3.animate();
                });
            });

            this.mappingService.getTweenDelay().then(function (delay) {
                return _this3.tweenDelay = delay;
            });

            this.raycaster = new THREE.Raycaster();
            this.mouse = new THREE.Vector2();

            this.renderer.domElement.addEventListener('mousedown', this.onMapClick.bind(this), false);
        };

        Map.prototype.configureCloudMap = function configureCloudMap() {
            var _this4 = this;

            this.spraySessionService.getCurrentSpraySession().then(function (spraySession) {
                _this4.minimumResolution = spraySession.minimumResolution;
                _this4.fieldChunkSize = spraySession.fieldChunkSize;
                _this4.initializeCoverage();
                _this4.animate();
            });
        };

        Map.prototype.loadSpraySession = function loadSpraySession(spraySession) {
            var _this5 = this;

            this.mappingService.getCoverageBoundingBoxForSpraySessionId(spraySession.spraySessionId).then(function (boundingBox) {
                _this5.minimumResolution = spraySession.minimumResolution;
                _this5.fieldChunkSize = spraySession.fieldChunkSize;
                var xWidth = boundingBox.upperRightCorner.x - boundingBox.lowerLeftCorner.x;
                var yWidth = boundingBox.upperRightCorner.y - boundingBox.lowerLeftCorner.y;

                var centerX = boundingBox.lowerLeftCorner.x + xWidth / 2;
                var centerY = boundingBox.lowerLeftCorner.y + yWidth / 2;
                var lowestRes = 16000;

                var bestAspectAndResolution = {
                    xLayers: 100,
                    yLayers: 100,
                    resolution: 16000,
                    scaleFactor: 1
                };

                for (var res = _this5.minimumResolution; res <= 16000; res *= 2) {
                    var xSide = Math.floor(xWidth / res / (_this5.fieldChunkSize / 1000));
                    var ySide = Math.floor(yWidth / res / (_this5.fieldChunkSize / 1000));

                    if (res < lowestRes & xSide * ySide <= 100) {
                        bestAspectAndResolution.xLayers = xSide;
                        bestAspectAndResolution.yLayers = ySide;
                        bestAspectAndResolution.resolution = res;
                        bestAspectAndResolution.scaleFactor = res / _this5.minimumResolution;
                        break;
                    }
                }

                _this5.landscape.remove(_this5.coverage.object);
                _this5.landscape.remove(_this5.livecoverage.object);

                _this5.coverage = new _grid.Grid(_this5.landscape, _this5.mappingService, bestAspectAndResolution.resolution, _this5.fieldChunkSize * bestAspectAndResolution.scaleFactor, bestAspectAndResolution.xLayers, bestAspectAndResolution.yLayers);
                _this5.livecoverage = new _grid.Grid(_this5.landscape, null, bestAspectAndResolution.resolution, _this5.fieldChunkSize * bestAspectAndResolution.scaleFactor, bestAspectAndResolution.xLayers, bestAspectAndResolution.yLayers);
                _this5.coverage.object.scale.y = -1;
                _this5.livecoverage.object.scale.y = -1;
                _this5.landscape.add(_this5.coverage.object);
                _this5.landscape.add(_this5.livecoverage.object);
                _this5.coverage.loadCoverageFromCenterPoint(centerX, centerY);
                _this5.positionFreeViewCamera({
                    x: centerX,
                    y: centerY
                });
            });
        };

        Map.prototype.positionFreeViewCamera = function positionFreeViewCamera(pos) {
            this.relativeCameraOffset = new THREE.Vector3(0, 1000000, -0.1);

            this.freeViewMode = true;
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 0.1;
                this.scene.fog.far = 0;
            }

            this.camera.position.set(pos.x, 1000000, -pos.y);
            this.camera.lookAt(new THREE.Vector3(0, -0.1, 0));
            this.controls.target.set(pos.x, 0, -pos.y);
            this.controls.update();

            this.render();
            this.animate();
        };

        Map.prototype.processError = function processError(errorState) {
            if (this.coverage) {
                this.coverage.addLiveErrorData(errorState);
            }
        };

        Map.prototype.processDelta = function processDelta(delta) {
            if (delta.location) {
                this.updatePosition(delta.location);
            }

            if (delta.nozzleLookaheads) {
                this.drawBoom(delta.nozzleLookaheads, true);
            }

            if (delta.nozzleLocations) {
                this.drawBoom(delta.nozzleLocations, false);
            }

            if (delta.coordinates) {
                if (this.livecoverage) {
                    this.livecoverage.addLiveData(delta.coordinates);
                }
            }
        };

        Map.prototype.drawBoom = function drawBoom(positions, lookahead) {
            var options = lookahead ? { color: 0x00ffff } : { color: 0x000000 };

            var material = new THREE.LineBasicMaterial(options);
            var geometry = new THREE.Geometry();
            positions.forEach(function (p) {
                geometry.vertices.push(new THREE.Vector3(p.x, 1000, -p.y));
            });

            if (lookahead) {
                if (this.boomLookahead) {
                    this.scene.remove(this.boomLookahead);
                }
                this.boomLookahead = new THREE.Line(geometry, material);
                this.scene.add(this.boomLookahead);
            } else {
                if (this.boom) {
                    this.scene.remove(this.boom);
                }
                this.boom = new THREE.Line(geometry, material);
                this.scene.add(this.boom);
            }
        };

        Map.prototype.clearBoundaryPoints = function clearBoundaryPoints() {
            var _this6 = this;

            this.boundaryPoints = [];
            this.internalPoints = [];
            this.internals = [];
            if (this.recordedBoundaryLine) {
                this.scene.remove(this.recordedBoundaryLine);
            }
            if (this.internalBoundaryLines) {
                this.internalBoundaryLines.forEach(function (ibl) {
                    _this6.scene.remove(ibl);
                });
            }
            if (this.vertices) {
                this.vertices.forEach(function (v) {
                    _this6.scene.remove(v);
                });
            }
        };

        Map.prototype.addBoundaryPoint = function addBoundaryPoint(point, internal) {
            if (internal) {
                this.internalPoints.push(point);
            } else {
                this.boundaryPoints.push(point);
            }

            this.drawBoundary();
        };

        Map.prototype.pruneBoundaryPoint = function pruneBoundaryPoint(point, internal) {
            var collection = internal ? this.internalPoints : this.boundaryPoints;
            var len = collection.length;
            for (var i = 0; i < len; i++) {
                if (collection[i].item1 === point.item1 && collection[i].item2 === point.item2) {
                    collection.splice(i, 1);
                    break;
                }
            }

            this.drawBoundary();
        };

        Map.prototype.drawBoundary = function drawBoundary() {
            var _this7 = this;

            if (this.recordedBoundaryLine) {
                this.scene.remove(this.recordedBoundaryLine);
            }
            if (this.internalBoundaryLines) {
                this.internalBoundaryLines.forEach(function (ibl) {
                    _this7.scene.remove(ibl);
                });
            }
            if (this.vertices) {
                this.vertices.forEach(function (v) {
                    _this7.scene.remove(v);
                });
            }
            this.vertices = [];
            this.internalBoundaryLines = [];
            var recordedBoundaryGeometry = new THREE.Geometry();
            var vertexGeometry = new THREE.SphereGeometry(500, 5);
            var vertexMat = new THREE.MeshBasicMaterial({ color: 0xbbaa33 });
            this.boundaryPoints.forEach(function (p) {
                recordedBoundaryGeometry.vertices.push(new THREE.Vector3(p.item1, 1000, -p.item2));
                var sphere = new THREE.Mesh(vertexGeometry, vertexMat);
                sphere.position.x = p.item1;
                sphere.position.y = 1000;
                sphere.position.z = -p.item2;
                _this7.vertices.push(sphere);
                _this7.scene.add(sphere);
            });
            this.recordedBoundaryLine = new THREE.Line(recordedBoundaryGeometry, new THREE.LineDashedMaterial({ color: 0xff55dd }));
            this.scene.add(this.recordedBoundaryLine);

            this.internals.forEach(function (i) {
                var internalBoundaryGeometry = new THREE.Geometry();
                i.forEach(function (p) {
                    internalBoundaryGeometry.vertices.push(new THREE.Vector3(p.item1, 1000, -p.item2));
                });
                var internalBoundaryLine = new THREE.Line(internalBoundaryGeometry, new THREE.LineDashedMaterial({ color: 0x55ddaa, linewidth: 50 }));
                _this7.scene.add(internalBoundaryLine);
                _this7.internalBoundaryLines.push(internalBoundaryLine);
            });

            var internalBoundaryGeometry = new THREE.Geometry();
            this.internalPoints.forEach(function (p) {
                internalBoundaryGeometry.vertices.push(new THREE.Vector3(p.item1, 1000, -p.item2));
            });
            var internalBoundaryLine = new THREE.Line(internalBoundaryGeometry, new THREE.LineDashedMaterial({ color: 0x55ddaa, linewidth: 50 }));
            this.scene.add(internalBoundaryLine);
            this.internalBoundaryLines.push(internalBoundaryLine);
        };

        Map.prototype.overheadView = function overheadView() {
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 0.1;
                this.scene.fog.far = 0;
            }

            this.relativeCameraOffset = new THREE.Vector3(0, 200000, -0.1);

            if (this.coverage && this.freeViewMode) {
                if (this.scene) {
                    this.scene.add(this.gridHelper);
                }
            }

            this.freeViewMode = false;
        };

        Map.prototype.fieldView = function fieldView() {
            this.relativeCameraOffset = new THREE.Vector3(0, 1000000, -0.1);
            this.tween.stop();

            this.freeViewMode = true;
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 0.1;
                this.scene.fog.far = 0;
            }

            this.tractor.updateMatrixWorld();

            var cameraOffset = this.relativeCameraOffset.clone();
            cameraOffset.applyMatrix4(this.tractor.matrixWorld);

            this.camera.position.set(cameraOffset.x, cameraOffset.y, cameraOffset.z);
            this.camera.lookAt(this.tractor.position);
            this.controls.target.set(this.tractor.position.x, this.tractor.position.y, this.tractor.position.z);
            this.controls.update();

            this.render();
        };

        Map.prototype.toggleErrors = function toggleErrors() {
            this.coverage.toggleErrors();
        };

        Map.prototype.chaseView = function chaseView() {
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 200000;
                this.scene.fog.far = 400000;
            }

            this.relativeCameraOffset = new THREE.Vector3(0, 45000, -90000);

            if (this.coverage && this.freeViewMode) {
                if (this.scene) {
                    this.scene.add(this.gridHelper);
                }
            }

            this.freeViewMode = false;
        };

        Map.prototype.initilizeLandscape = function initilizeLandscape() {
            var geometry = new THREE.CircleGeometry(24000000);
            geometry.rotateX(-Math.PI / 2);
            var material = new THREE.MeshBasicMaterial({ color: 0xdedab4, depthWrite: false });
            var circle = new THREE.Mesh(geometry, material);
            circle.translateY(-400);
            this.scene.add(circle);
        };

        Map.prototype.initializeCoverage = function initializeCoverage() {
            if (this.landscape) {
                this.scene.remove(this.landscape);
            }

            this.landscape = new THREE.Object3D();
            this.landscape.rotateX(-Math.PI / 2);
            this.landscape.rotateZ(Math.PI);
            this.landscape.translateY(-0.2);
            this.landscape.scale.x = -1;
            this.livecoverage = new _grid.Grid(this.landscape, null, this.minimumResolution, this.fieldChunkSize);
            this.coverage = new _grid.Grid(this.landscape, this.mappingService, this.minimumResolution, this.fieldChunkSize);
            this.livecoverage.object.scale.y = -1;
            this.coverage.object.scale.y = -1;
            this.landscape.add(this.coverage.object);
            this.landscape.add(this.livecoverage.object);
            this.scene.add(this.landscape);
        };

        Map.prototype.initializeTractor = function initializeTractor(location) {
            var _this8 = this;

            this.index = 0;
            var loader = new THREE.ObjectLoader();

            this.tractor = new THREE.Object3D();
            this.tractor.position.y = 1;
            this.tractor.position.x = location.x;
            this.tractor.position.z = -location.y;
            this.tractor.rotateY(Math.PI);
            this.tractor.rotation.y = location.heading;
            this.scene.add(this.tractor);

            loader.load('tractor.json', function (object) {
                var materialObj = new THREE.MeshBasicMaterial({
                    color: '#333333',
                    overdraw: 0.5
                });

                object.traverse(function (child) {
                    if (child instanceof THREE.Mesh) {
                        child.material = materialObj;
                    }
                });

                object.scale.set(1000, 1000, 1000);
                _this8.tractor.add(object);
            });
        };

        Map.prototype.initializeGrid = function initializeGrid(position) {
            this.gridHelper = new THREE.GridHelper(this.fieldSize, this.gridDivisions, 0x888888);
            this.gridHelper.position.x = position.x;
            this.gridHelper.position.z = -position.y;

            this.gridHelper.translateY(0.1);
            this.scene.add(this.gridHelper);
        };

        Map.prototype.positionGrid = function positionGrid(position) {
            var gridY = Math.floor(position.y / (this.fieldSize / this.gridDivisions));
            var gridX = Math.floor(position.x / (this.fieldSize / this.gridDivisions));

            if (this.prevGridX !== gridX || this.prevGridY !== gridY) {
                if (gridX < this.prevGridX) {
                    this.gridHelper.position.x -= this.fieldSize / this.gridDivisions;
                } else if (gridX > this.prevGridX) {
                    this.gridHelper.position.x += this.fieldSize / this.gridDivisions;
                }
                if (gridY > this.prevGridY) {
                    this.gridHelper.position.z -= this.fieldSize / this.gridDivisions;
                } else if (gridY < this.prevGridY) {
                    this.gridHelper.position.z += this.fieldSize / this.gridDivisions;
                }
                this.prevGridX = gridX;
                this.prevGridY = gridY;
            }
        };

        Map.prototype.updatePosition = function updatePosition(currentPosition) {
            var _this9 = this;

            if (!this.gpsConnected) {
                if (currentPosition.x !== 0 || currentPosition.y !== 0) {
                    this.gpsConnected = true;
                    this.restartMap();
                }
            } else {
                if (currentPosition.x === 0 && currentPosition.y === 0) {
                    this.gpsConnected = false;
                }
            }

            if (!this.tractor) {
                return;
            }
            if (this.index === 0) {
                this.initializeGrid(currentPosition);
            }
            this.index++;
            this.positionGrid(currentPosition);

            if (this.coverage) {
                this.coverage.bufferRegions(currentPosition.x, currentPosition.y);
                this.livecoverage.bufferRegions(currentPosition.x, currentPosition.y);
            }

            var position = {
                x: this.tractor.position.x,
                y: this.tractor.position.y,
                z: this.tractor.position.z,
                heading: this.tractor.rotation.y
            };
            var finalPosition = {
                x: currentPosition.x,
                y: 1,
                z: -currentPosition.y,
                heading: currentPosition.heading
            };

            if (position.heading - finalPosition.heading > Math.PI) {
                finalPosition.heading += Math.PI * 2;
            }
            if (position.heading - finalPosition.heading < -1 * Math.PI) {
                finalPosition.heading -= Math.PI * 2;
            }

            if (this.tween) {
                this.tween.stop();
            }

            this.tween = new _tween2.default.Tween(position).to(finalPosition, this.tweenDelay).easing(_tween2.default.Easing.Linear.None).onUpdate(function () {
                _this9.tractor.position.set(position.x, position.y, position.z);
                _this9.tractor.rotation.y = position.heading;

                if (_this9.tractor.rotation.y >= Math.PI * 2) {
                    _this9.tractor.rotation.y -= Math.PI * 2;
                    position.heading -= Math.PI * 2;
                }
                if (_this9.tractor.rotation.y < 0) {
                    _this9.tractor.rotation.y += Math.PI * 2;
                    position.heading += Math.PI * 2;
                }

                if (!_this9.freeViewMode) {
                    _this9.tractor.updateMatrixWorld();

                    var cameraOffset = _this9.relativeCameraOffset.clone();
                    cameraOffset.applyMatrix4(_this9.tractor.matrixWorld);

                    _this9.camera.position.set(cameraOffset.x, cameraOffset.y, cameraOffset.z);
                    _this9.camera.lookAt(_this9.tractor.position);
                }
            }).start();
        };

        Map.prototype.onMapClick = function onMapClick(event) {
            var _this10 = this;

            this.mouse.x = event.offsetX / this.renderer.domElement.clientWidth * 2 - 1;
            this.mouse.y = -(event.offsetY / this.renderer.domElement.clientHeight) * 2 + 1;

            this.raycaster.setFromCamera(this.mouse, this.camera);

            var intersects = this.raycaster.intersectObjects(this.landscape.children, true);
            if (intersects.length > 0) {
                var intersect = intersects[0];
                var intersectPosX = Math.floor(intersect.point.x);
                var intersectPosY = Math.floor(-intersect.point.z);

                this.mappingService.getClosestError(intersectPosX, intersectPosY).then(function (error) {
                    if (error) {
                        if (_this10.sprayNozzleErrorMarker) {
                            _this10.landscape.remove(_this10.sprayNozzleErrorMarker.object);
                            toastr.clear();
                        }
                        if (_this10.systemErrorMarker) {
                            _this10.landscape.remove(_this10.systemErrorMarker.object);
                            toastr.clear();
                        }

                        var sprayNozzleError = error.sprayNozzleError;
                        var systemError = error.systemError;

                        if (sprayNozzleError) {
                            var key = 'nozzleErrorCodes.' + sprayNozzleError.errorCode;
                            var sprayNozzleErrorDescription = _this10.i18n.tr(key);
                            toastr.warning('ErrorCode: ' + sprayNozzleError.errorCode + '<br>' + 'Description:' + sprayNozzleErrorDescription + '<br>' + 'Position:' + sprayNozzleError.position.x + ' ' + sprayNozzleError.position.y + '<br>' + 'ErrorType: ' + sprayNozzleError.errorType + '<br>', 'SprayNozzleError', {
                                positionClass: 'toast-top-center',
                                timeOut: 5000,
                                extendedTimeOut: 3000
                            });
                            _this10.sprayNozzleErrorMarker = new _marker.Marker(_this10.landscape, 0xf4ab43);
                            _this10.sprayNozzleErrorMarker.object.translateX(sprayNozzleError.position.x);
                            _this10.sprayNozzleErrorMarker.object.translateZ(sprayNozzleError.position.y);
                        }

                        if (systemError) {
                            var systemErrorDescription = systemError.description;
                            toastr.error('ErrorCode: ' + systemError.errorCode + '<br>' + 'Description:' + systemErrorDescription + '<br>' + 'Position:' + systemError.position.x + ' ' + systemError.position.y + '<br>' + 'ErrorType: ' + systemError.errorType + '<br>', 'SystemError', {
                                positionClass: 'toast-top-right',
                                timeOut: 5000,
                                extendedTimeOut: 3000
                            });
                            _this10.systemErrorMarker = new _marker.Marker(_this10.landscape, 0xe46050);
                            _this10.systemErrorMarker.object.translateX(systemError.position.x);
                            _this10.systemErrorMarker.object.translateZ(systemError.position.y);
                        }
                    }
                });
            }
        };

        Map.prototype.animate = function animate() {
            if (this._isDetached) {
                return;
            }
            if (this.zoomLevel !== this.camera.position.y) {
                this.zoomLevel = this.camera.position.y;
                if (this.freeViewMode && this.coverage) {
                    this.coverage.updateZoomLevel(this.zoomLevel, this.camera.position.x, this.camera.position.z);
                }
            }

            this.animationFrameRequestId = window.requestAnimationFrame(this.animate.bind(this));
            _tween2.default.update();

            if (this.freeViewMode) {
                this.controls.update();
            }

            this.updateViewport();
            this.render();
        };

        Map.prototype.cancelAnimate = function cancelAnimate() {
            if (this.animationFrameRequestId) {
                window.cancelAnimationFrame(this.animationFrameRequestId);
                this.animationFrameRequestId = null;
            }
        };

        Map.prototype.render = function render() {
            this.raycaster.setFromCamera(this.mouse, this.camera);
            this.renderer.render(this.scene, this.camera);
        };

        Map.prototype.updateViewport = function updateViewport() {
            if (this.map === null) {
                throw new Error('map must be defined');
            }
            var viewportWidth = this.map.clientWidth;

            if (viewportWidth !== this.lastViewportWidth) {
                this.renderer.setSize(viewportWidth, this.viewportHeight);
                this.lastViewportWidth = viewportWidth;
                this.camera.aspect = viewportWidth / this.viewportHeight;
                this.camera.updateProjectionMatrix();
            }
        };

        Map.prototype.receiveBoundaryMap = function receiveBoundaryMap(map) {
            this.renderBoundaryMap(map);
        };

        Map.prototype.receivePrescriptionMap = function receivePrescriptionMap(map) {
            this.renderPrescriptionMap(map);
        };

        Map.prototype.renderBoundaryMap = function renderBoundaryMap(boundaryMap) {
            var _this11 = this;

            var regions = boundaryMap.regions;
            this.parent.selectedBoundaryMaps = boundaryMap.paths;
            this.boundary.forEach(function (shape) {
                _this11.scene.remove(shape);
            });
            this.boundary = [];

            if (regions) {
                regions.forEach(function (region) {
                    _this11.renderBoundary(region.boundary, _this11.boundary, 0x000000);

                    region.holes.forEach(function (hole) {
                        _this11.renderBoundary(hole, _this11.boundary, 0x666666);
                    });
                });
            }
        };

        Map.prototype.renderPrescriptionMap = function renderPrescriptionMap(prescription) {
            var _this12 = this;

            this.prescription.forEach(function (shape) {
                _this12.scene.remove(shape);
            });
            this.prescription = [];

            if (prescription) {
                this.parent.selectedPrescriptionMap = prescription.path;
                var max = 0;

                prescription.regions.forEach(function (region) {
                    max = Math.max(max, region.value);
                });
                prescription.regions.forEach(function (region) {
                    _this12.renderBoundary(region.boundary, _this12.prescription, 0x998844);
                    _this12.renderShape(region.boundary, region.holes, _this12.prescription, 0x998844, region.value / (2 * max));
                    region.holes.forEach(function (hole) {
                        _this12.renderBoundary(hole, _this12.prescription, 0xcccccc);
                    });
                });
            }
        };

        Map.prototype.renderBoundary = function renderBoundary(sprayPath, collection, color) {
            var _this13 = this;

            var vectors = [];
            sprayPath.coordinates.forEach(function (p) {
                vectors.push(new THREE.Vector3(p.x, p.y, _this13.boundaryHeight));
            });
            var geometry = new THREE.BufferGeometry().setFromPoints(vectors);
            var material = new THREE.LineBasicMaterial({ color: color });
            var line = new THREE.Line(geometry, material);
            line.rotateX(-Math.PI / 2);
            this.scene.add(line);
            collection.push(line);
        };

        Map.prototype.renderShape = function renderShape(boundary, holes, collection, color, alpha) {
            var vectors = [];
            var coordinates = boundary.coordinates;
            coordinates.forEach(function (p) {
                vectors.push(new THREE.Vector2(p.x, p.y));
            });
            var shape = new THREE.Shape();
            shape.moveTo(coordinates[0].x, coordinates[0].y);
            for (var i = 1; i < coordinates.length; i++) {
                shape.lineTo(coordinates[i].x, coordinates[i].y);
            }

            if (holes) {
                holes.forEach(function (h) {
                    var hole = new THREE.Path();
                    hole.moveTo(h.coordinates[0].x, h.coordinates[0].y);
                    for (var _i = 1; _i < h.coordinates.length; _i++) {
                        hole.lineTo(h.coordinates[_i].x, h.coordinates[_i].y);
                    }
                    shape.holes.push(hole);
                });
            }

            var geometry = new THREE.ShapeGeometry(shape);
            var material = new THREE.MeshBasicMaterial({ color: color, opacity: alpha, transparent: true, depthWrite: false });
            var mesh = new THREE.Mesh(geometry, material);

            mesh.rotateX(-Math.PI / 2);
            mesh.translateZ(this.prescriptionHeight);
            collection.push(mesh);
            this.scene.add(mesh);
        };

        Map.prototype.toggleRx = function toggleRx() {
            var _this14 = this;

            if (this.hideRx) {
                this.prescription.forEach(function (shape) {
                    _this14.scene.remove(shape);
                });
            } else {
                this.prescription.forEach(function (shape) {
                    _this14.scene.add(shape);
                });
            }
        };

        Map.prototype.toggleBoundary = function toggleBoundary() {
            this.mappingService.ignoreBoundary(this.ignoreBoundary);
        };

        Map.prototype.resetCoverage = function resetCoverage() {
            location.reload();
        };

        return Map;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    })), _class2)) || _class);
});
define('text!views/map/map.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n    <require from=\"resources/value-converters/radiansToDegrees\"></require>\r\n    <require from=\"resources/value-converters/dutyCycle\"></require>\r\n    <require from=\"views/dashboard/system-status\"></require>\r\n    <require from=\"views/dashboard/gauge\"></require>\r\n    <require from=\"views/dashboard/gauge-display\"></require>\r\n\r\n\r\n    <div id=\"map\" element.ref=\"map\" style=\"border: 1px solid green\">\r\n        <gauge-display isCloud.bind=\"isCloud\">\r\n\r\n        </gauge-display>\r\n        <div class=\"stats\" element.ref=\"statsElement\"></div>\r\n        <div class=\"leftPanel\">\r\n            <div if.bind=\"prescription.length > 0\">\r\n                <input id=\"hide-rx\" type=\"checkbox\" checked.bind=\"hideRx\" change.delegate=\"toggleRx()\" />\r\n                <label for=\"hide-rx\">${\"Hide Rx\" | t}</label><br />\r\n            </div>\r\n            <div if.bind=\"boundary.length > 0\">\r\n                <input id=\"ignore-boundary\" type=\"checkbox\" checked.bind=\"ignoreBoundary\" change.delegate=\"toggleBoundary()\" />\r\n                <label for=\"ignore-boundary\">${\"Ignore Boundary\" | t}</label><br />\r\n            </div>\r\n        </div>\r\n    </div>\r\n        \r\n</template>\r\n"; });
var cov_c8myxmf9a = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\map-view-state.js',
        hash = 'd64e0bd001dd834d0fb776beafdaff112a4f443f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\map-view-state.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/map-view-state',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MapViewState = exports.MapViewState = function () {
        function MapViewState() {
            _classCallCheck(this, MapViewState);

            this.viewMode = 'chase';
        }

        MapViewState.prototype.setViewMode = function setViewMode(mode) {
            this.viewMode = mode;
        };

        MapViewState.prototype.getViewMode = function getViewMode() {
            return this.viewMode;
        };

        return MapViewState;
    }();
});
var cov_15rkrwvsjm = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\grid.js',
        hash = 'd75c9dbbc21c564c98cfee00761ccb68519b2c59',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\grid.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/grid',['exports', 'three', './region'], function (exports, _three, _region) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Grid = undefined;

    var THREE = _interopRequireWildcard(_three);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var Grid = exports.Grid = function () {
        function Grid(container, mappingService, minimumResolution) {
            var regionDensity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 64000;
            var xLayers = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
            var yLayers = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;

            _classCallCheck(this, Grid);

            this.regions = [];
            this.regionDensity = 64000;
            this.freeViewMode = false;
            this.gridLayers = 3;
            this.object = new THREE.Object3D();
            this.debug = false;
            this.minimumResolution = 500;

            this.xLayers = xLayers;
            this.yLayers = yLayers;

            container.add(this.object);
            this.mappingService = mappingService;
            this.minimumResolution = minimumResolution;
            this.regionDensity = regionDensity;
        }

        Grid.prototype.enableFreeViewMode = function enableFreeViewMode(zoom, x, y) {
            this.freeViewMode = true;
            this.initializeFreeViewRegions(zoom, x, y);
        };

        Grid.prototype.disableFreeViewMode = function disableFreeViewMode() {
            var _this = this;

            this.freeViewMode = false;
            this.regions.forEach(function (r) {
                _this.object.remove(r.mesh);
                if (_this.debug) {
                    _this.object.remove(r.line);
                }
            });
            this.regions = [];
            this.prevX = null;
        };

        Grid.prototype.updateZoomLevel = function updateZoomLevel(zoom, x, y) {
            if (this.freeViewMode) {
                var regionSize = this.getFreeViewRegionSize(zoom);
                if (regionSize !== this.regions[0].size) {
                    this.initializeFreeViewRegions(zoom, x, y);
                }
            }
        };

        Grid.prototype.bufferRegions = function bufferRegions(x, y) {
            var _this2 = this;

            var regionX = Math.floor(x / this.regionDensity);
            var regionY = Math.floor(y / this.regionDensity);

            if (this.prevX !== regionX || this.prevY !== regionY) {
                var currentRegions = [];
                for (var i = 0; i <= this.xLayers; i++) {
                    var di = i > 0 ? -1 : 1;
                    for (var j = 0; j <= this.yLayers; j++) {
                        var dj = j > 0 ? -1 : 1;
                        for (var ii = 1; ii >= di; ii -= 2) {
                            var _loop = function _loop(jj) {
                                var regionLocation = { x: regionX + i * ii, y: regionY + j * jj };
                                currentRegions.push(regionLocation);

                                var existingRegion = _this2.regions.find(function (r) {
                                    return r.regionX === regionLocation.x && r.regionY === regionLocation.y;
                                });
                                if (!existingRegion) {
                                    var region = new _region.Region(_this2.object, regionLocation.x, regionLocation.y, _this2.regionDensity, _this2.minimumResolution, _this2.mappingService, _this2.debug);
                                    _this2.regions.push(region);
                                }
                            };

                            for (var jj = 1; jj >= dj; jj -= 2) {
                                _loop(jj);
                            }
                        }
                    }
                }

                var oldRegions = this.regions.filter(function (r) {
                    return !currentRegions.some(function (c) {
                        return c.x === r.regionX && c.y === r.regionY;
                    });
                });
                oldRegions.forEach(function (r) {
                    _this2.object.remove(r.mesh);
                    _this2.object.remove(r.errorMesh);
                    if (_this2.debug) {
                        _this2.object.remove(r.line);
                        _this2.object.remove(r.text);
                    }
                    var index = _this2.regions.indexOf(r);
                    _this2.regions.splice(index, 1);
                });
            }

            this.prevX = regionX;
            this.prevY = regionY;
            this.prevMode = this.viewMode;
        };

        Grid.prototype.loadCoverageFromCenterPoint = function loadCoverageFromCenterPoint(centerX, centerY) {
            var _this3 = this;

            var xstart = Math.ceil(this.xLayers / 2);
            var ystart = Math.ceil(this.yLayers / 2);

            var regionX = Math.floor(centerX / this.regionDensity);
            var regionY = Math.floor(centerY / this.regionDensity);

            for (var i = -xstart; i <= xstart; i++) {
                var _loop2 = function _loop2(j) {
                    var regionLocation = { x: regionX + i, y: regionY + j };

                    var existingRegion = _this3.regions.find(function (r) {
                        return r.regionX === regionLocation.x && r.regionY === regionLocation.y;
                    });
                    if (!existingRegion) {
                        var region = new _region.Region(_this3.object, regionLocation.x, regionLocation.y, _this3.regionDensity, _this3.minimumResolution, _this3.mappingService, _this3.debug);
                        _this3.regions.push(region);
                    }
                };

                for (var j = -ystart; j <= ystart; j++) {
                    _loop2(j);
                }
            }
        };

        Grid.prototype.loadRegion = function loadRegion(x, y) {
            var regionX = Math.floor(x / this.regionDensity);
            var regionY = Math.floor(y / this.regionDensity);
            var region = new _region.Region(this.object, regionX, regionY, this.regionDensity, this.minimumResolution, this.mappingService, this.debug);
            this.regions.push(region);
        };

        Grid.prototype.toggleErrors = function toggleErrors() {
            this.regions.forEach(function (region) {
                region.toggleErrorLayer();
            });
        };

        Grid.prototype.addLiveData = function addLiveData(coordinates) {
            var _this4 = this;

            coordinates.forEach(function (c) {
                var region = _this4.getRegion(c.x, c.y);

                if (region) {
                    region.addLiveData(c);
                }
            });
        };

        Grid.prototype.addLiveErrorData = function addLiveErrorData(error) {
            var region = this.getRegion(error.position.x, error.position.y);

            if (region) {
                var isSprayNozzleError = !error.errorType || error.errorType === 0;

                if (isSprayNozzleError) {
                    region.addNozzleErrorData(error);
                } else {
                    var r = this.getRegion(error.position.x, error.position.y);
                    r.addSystemErrorData(error);
                }
            }
        };

        Grid.prototype.getRegion = function getRegion(x, y) {
            var regionSize = this.regionDensity;
            if (this.freeViewMode) {
                regionSize = this.regions[0].size;
            }
            var regionX = Math.floor(x / regionSize);
            var regionY = Math.floor(y / regionSize);
            return this.regions.find(function (r) {
                return r.regionX === regionX && r.regionY === regionY;
            });
        };

        return Grid;
    }();
});
var cov_dkg1baexc = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\color-picker.js',
        hash = '19bd388cca04ba2d7dddcdec3a333bd180ed515a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\map\\color-picker.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/color-picker',['exports', 'three'], function (exports, _three) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ColorPicker = undefined;

    var THREE = _interopRequireWildcard(_three);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var ColorPicker = exports.ColorPicker = function () {
        function ColorPicker() {
            _classCallCheck(this, ColorPicker);

            this.Dirt = new THREE.Color(0xdedab4);
            this.RegionDebug = new THREE.Color(0xff3333);
        }

        ColorPicker.prototype.getColorFromState = function getColorFromState(state) {
            switch (state) {
                case 101:
                    return new THREE.Color(0xff7f27);
                case 110:
                    return new THREE.Color(0x7092be);
                case 200:
                    return new THREE.Color(0xff0000);
                default:
                    return new THREE.Color(0x53ae47);
            }
        };

        ColorPicker.prototype.getColorFromNozzleErrorCode = function getColorFromNozzleErrorCode(errorCode) {
            if (errorCode >= 10) {
                return new THREE.Color(0x22ffff);
            } else if (errorCode >= 5) {
                return new THREE.Color(0xaa5566);
            }
            return new THREE.Color(0xff0033);
        };

        ColorPicker.prototype.getColorFromErrorType = function getColorFromErrorType(errorType) {
            switch (errorType) {
                case 1:
                    return new THREE.Color(0x22ffff);
                case 2:
                    return new THREE.Color(0xaa5566);
                case 3:
                    return new THREE.Color(0xac55ee);
                default:
                    return new THREE.Color(0xaa5ddd);
            }
        };

        ColorPicker.prototype.getAlphaFromState = function getAlphaFromState(state) {
            switch (state) {
                case 100:
                case 101:
                    return 0.5;
                case 200:
                    return 1;
                default:
                    return 0;
            }
        };

        return ColorPicker;
    }();
});
var cov_2ihifvhdyc = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\gateway-state-base.js',
        hash = 'ad118496bd6e083e10d202105e29a3222cf81781',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\gateway-state-base.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/gateway-state-base',['exports', 'aurelia-framework', 'numeral', 'aurelia-i18n', '../services/gateway-service', '../components/shared/bootstrap-form-renderer', 'aurelia-validation', 'ramda'], function (exports, _aureliaFramework, _numeral, _aureliaI18n, _gatewayService, _bootstrapFormRenderer, _aureliaValidation, _ramda) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GatewayStateBase = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    var R = _interopRequireWildcard(_ramda);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var GatewayStateBase = exports.GatewayStateBase = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaI18n.I18N, _aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _aureliaFramework.BindingEngine), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
        function GatewayStateBase(gatewayService, i18N, controller, bindingEngine) {
            _classCallCheck(this, GatewayStateBase);

            this.editDelta = {};
            this._needsSync = [];

            _initDefineProp(this, 'state', _descriptor, this);

            this.editDelta = {};
            this.autoSyncProperties = [];
            this.subscribeProperties = [];
            this.subscriptions = [];

            this.i18n = i18N;
            this.gatewayService = gatewayService;
            this.getGatewayServiceState();

            this.bindingEngine = bindingEngine;

            this.controller = controller;
            this.controller.addRenderer(new _bootstrapFormRenderer.BootstrapFormRenderer());
            this.controller.validateTrigger = _aureliaValidation.validateTrigger.changeOrBlur;
            this.customRulesInit();
        }

        GatewayStateBase.prototype.setUpSubscriptions = function setUpSubscriptions(properties) {
            var _this = this;

            this.autoSyncProperties = properties;
            this.gatewayService.subscribe(properties, 'gateway-state-base [auto-sync]');
            properties.forEach(function (prop) {
                var p = _this.lowerCaseFirstLetter(prop);
                var propFunc = R.partialRight(_this.setDelta, [p]).bind(_this);

                var subscription = _this.bindingEngine.propertyObserver(_this.state, p).subscribe(function (newValue, oldValue) {
                    var delta = propFunc(newValue, oldValue);
                    if (delta) {
                        _this.sendDeltaToGateway(delta);
                        _this._needsSync = [];
                    }
                });
                _this.subscriptions.push(subscription);
            });
        };

        GatewayStateBase.prototype.subscribe = function subscribe(properties) {
            this.subscribedProperties = properties;
            this.gatewayService.subscribe(properties, 'gateway-state-base');
        };

        GatewayStateBase.prototype.lowerCaseFirstLetter = function lowerCaseFirstLetter(string) {
            return string.charAt(0).toLowerCase() + string.slice(1);
        };

        GatewayStateBase.prototype.bind = function bind() {};

        GatewayStateBase.prototype.activate = function activate() {
            this.getGatewayServiceState();
        };

        GatewayStateBase.prototype.attached = function attached() {};

        GatewayStateBase.prototype.detached = function detached() {
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
        };

        GatewayStateBase.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.autoSyncProperties, 'gateway-state-base [auto-sync]');
            this.gatewayService.unsubscribe(this.subscribeProperties, 'gateway-state-base');
        };

        GatewayStateBase.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$displayName} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        GatewayStateBase.prototype.send = function send() {
            var _this2 = this;

            this.controller.validate().then(function (result) {
                if (result.valid) {
                    _this2.gatewayService.send(_this2.editDelta);

                    _this2.editDelta = {};
                }
            });
        };

        GatewayStateBase.prototype.sendDeltaToGateway = function sendDeltaToGateway(editDelta) {
            var _this3 = this;

            var propName = Object.keys(editDelta)[0];
            this.controller.validate({ object: this.state, propertyName: propName }).then(function (result) {
                if (isNaN(editDelta[propName])) {
                    throw new Error('Cant Send value that is' + NaN);
                }
                if (result.valid) {
                    _this3.gatewayService.send(editDelta);
                }
            });
        };

        GatewayStateBase.prototype.getGatewayServiceState = function getGatewayServiceState() {
            this.state = this.gatewayService.getState();
        };

        GatewayStateBase.prototype.sendChange = function sendChange(val, prop) {
            this.editDelta[prop] = val;
            this.send();
        };

        GatewayStateBase.prototype.setDelta = function setDelta(newValue, oldValue, prop) {
            if (this._needsSync.includes(prop)) {
                var editDelta = {};
                editDelta[prop] = newValue;
                return editDelta;
            }
            return null;
        };

        GatewayStateBase.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        GatewayStateBase.prototype.getTypes = function getTypes(typeKey) {
            var i = 0;
            var types = [];
            var rateTypesKey = typeKey + '.';
            var rateType = '';
            while (!rateType.includes(rateTypesKey)) {
                rateType = this.i18n.tr(rateTypesKey + i);
                var end = rateType.includes(rateTypesKey);
                if (!end) {
                    types.push({ index: i, label: rateType });
                }
                i++;
            }
            return types;
        };

        return GatewayStateBase;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    })), _class2)) || _class);
});
var cov_xld418yfd = function () {
  var path = "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\forgot-password\\forgot-password.js",
      hash = "d1993b830c00f0a5a0899ca7f99931750e6ada45",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\forgot-password\\forgot-password.js",
    statementMap: {
      "0": {
        start: {
          line: 9,
          column: 8
        },
        end: {
          line: 9,
          column: 110
        }
      }
    },
    fnMap: {
      "0": {
        name: "(anonymous_0)",
        decl: {
          start: {
            line: 8,
            column: 4
          },
          end: {
            line: 8,
            column: 5
          }
        },
        loc: {
          start: {
            line: 8,
            column: 18
          },
          end: {
            line: 10,
            column: 5
          }
        },
        line: 8
      }
    },
    branchMap: {},
    s: {
      "0": 0
    },
    f: {
      "0": 0
    },
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/forgot-password/forgot-password',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var ForgotPassword = exports.ForgotPassword = function ForgotPassword() {
    _classCallCheck(this, ForgotPassword);

    cov_xld418yfd.f[0]++;
    cov_xld418yfd.s[0]++;

    this.message = "Please don't forget your password because this feature has not been implemented yet.";
  };
});
define('text!views/forgot-password/forgot-password.html', ['module'], function(module) { module.exports = "<template>\r\n    <div>\r\n        ${message | t}\r\n    </div>\r\n</template>\r\n"; });
var cov_23x5uoygto = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\filetransfer\\filetransfer.js',
        hash = 'cd541093d4aae917248a487345b531587635e363',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\filetransfer\\filetransfer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/filetransfer/filetransfer',['exports', 'aurelia-framework', '../../services/file-service'], function (exports, _aureliaFramework, _fileService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Filetransfer = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Filetransfer = exports.Filetransfer = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService), _dec(_class = function () {
        function Filetransfer(fileService) {
            _classCallCheck(this, Filetransfer);

            this.fileService = fileService;
            this.getSystemFiles();
            this.checkUsb();
            setInterval(this.checkUsb.bind(this), 5000);
        }

        Filetransfer.prototype.checkUsb = function checkUsb() {
            var _this = this;

            this.fileService.usbAvailable().then(function (response) {
                if (_this.usbAvailable !== response) {
                    if (response) {
                        _this.fileService.getUsbFiles().then(function (result) {
                            _this.usbFiles = result;
                        });
                    } else {
                        _this.usbFiles = [];
                    }
                }
                _this.usbAvailable = response;
            });
        };

        Filetransfer.prototype.getSystemFiles = function getSystemFiles() {
            var _this2 = this;

            this.fileService.getSystemFiles().then(function (response) {
                _this2.systemFiles = response;
            });
        };

        return Filetransfer;
    }()) || _class);
});
define('text!views/filetransfer/filetransfer.html', ['module'], function(module) { module.exports = "<template>\r\n\r\n    <require from=\"../../components/filetransfer/system-folder\"></require>\r\n\r\n    <h4><i class=\"px-nav-icon ion-usb\"></i>${\"File Transfer\" | t}</h4>\r\n    <div class=\"row\">\r\n        <div class=\"col-xs-6 file-transfer-pane\">\r\n            <system-folder folder.bind=\"systemFiles\" collapsed.bind=\"false\" draggable.bind=\"false\" deletable.bind=\"true\"></system-folder>\r\n        </div>\r\n        <div class=\"col-xs-6 file-transfer-pane\">\r\n            <system-folder folder.bind=\"usbFiles\" unavailable.bind=\"!usbAvailable\" collapsed.bind=\"false\" draggable.bind=\"false\" deletable.bind=\"false\"></system-folder>\r\n        </div>\r\n    </div>\r\n    \r\n</template>\r\n"; });
var cov_14xzigdjuo = function () {
  var path = "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\error\\error-404.js",
      hash = "1537c1506439e5ed1ca0280583bd9178bac7cf37",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\error\\error-404.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/error/error-404',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var Error404 = exports.Error404 = function Error404() {
    _classCallCheck(this, Error404);
  };
});
define('text!views/error/error-404.html', ['module'], function(module) { module.exports = "<template>\r\n    <h1>\r\n        <strong>${\"404\" | t}</strong>\r\n    </h1>\r\n    <h3>\r\n        ${\"NOT FOUND\" | t}\r\n    </h3>\r\n</template>\r\n"; });
var cov_130gvapk0x = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\debug\\debug.js',
        hash = 'e64a0ede4a5a3da1522407c6fbf35144ea37243e',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\debug\\debug.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/debug/debug',['exports', 'aurelia-framework', '../../services/gateway-service'], function (exports, _aureliaFramework, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Debug = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Debug = exports.Debug = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService), _dec(_class = function () {
        function Debug(gatewayService) {
            _classCallCheck(this, Debug);

            this.requests = [];

            this.gatewayService = gatewayService;
        }

        Debug.prototype.bind = function bind() {
            var _this = this;

            this.gatewayService.getActiveBroadcastRequests().then(function (requests) {
                _this.requests = requests;
            });

            this.gatewayService.registerDebugCallbacks(this.handleBroadcastMaxExceededEvent.bind(this), this.handleBroadcastRequestSent.bind(this), this.handleBroadcastResponseReceived.bind(this), this.handleBroadcastsCleared.bind(this));

            this.gatewayService.enableDebug(true);
        };

        Debug.prototype.clearRequests = function clearRequests() {
            this.requests = [];
            this.overflow = [];
            this.showOverflow = false;
        };

        Debug.prototype.attached = function attached() {};

        Debug.prototype.unbind = function unbind() {
            this.gatewayService.enableDebug(false);
        };

        Debug.prototype.handleBroadcastMaxExceededEvent = function handleBroadcastMaxExceededEvent(requests) {
            this.showOverflow = true;
            this.overflow = [];
            this.overflow = requests;
        };

        Debug.prototype.handleBroadcastRequestSent = function handleBroadcastRequestSent(request) {
            var found = false;
            for (var i = 0; i < this.requests.length; i++) {
                if (this.requests[i].header.id === request.header.id) {
                    this.requests[i] = request;
                    found = true;
                    break;
                }
            }

            if (!found) {
                this.requests.push(request);
            }

            this.requests = this.requests.slice(0);
        };

        Debug.prototype.handleBroadcastResponseReceived = function handleBroadcastResponseReceived(response) {
            this.requests.forEach(function (request) {
                if (request.header.id === response.header.id) {
                    request.response = response;
                }
            });
        };

        Debug.prototype.handleBroadcastsCleared = function handleBroadcastsCleared() {
            this.clearRequests();
        };

        return Debug;
    }()) || _class);
});
define('text!views/debug/debug.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"./broadcast-request\"></require>\r\n    <h4>Debug.</h4>\r\n    <div repeat.for=\"request of requests\">\r\n        <broadcast-request request.bind=\"request\"></broadcast-request>\r\n    </div>\r\n    <div if.bind=\"showOverflow\">\r\n        <h2>Overflow</h2>\r\n        <div repeat.for=\"over of overflow\">\r\n            <broadcast-request request.bind=\"over\"></broadcast-request>\r\n        </div>\r\n    </div>\r\n    <br/><br/>\r\n</template>\r\n"; });
var cov_1o732lpm8r = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\test-speed.js',
        hash = 'ed6b2a9fb38ca5a64649958eb1800233286a90e3',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\test-speed.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/test-speed',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', '../../resources/value-converters/mmPerSecondToMph', 'aurelia-validation', '../../components/shared/dialog-bootstrap-renderer'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _mmPerSecondToMph, _aureliaValidation, _dialogBootstrapRenderer) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.TestSpeed = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var TestSpeed = exports.TestSpeed = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogController, _aureliaValidation.ValidationController, _aureliaFramework.BindingEngine, _mmPerSecondToMph.MmPerSecondToMphValueConverter), _dec(_class = function () {
        function TestSpeed(gatewayService, dialogController, validationController, bindingEngine, mmPerSecondToMphValueConverter) {
            _classCallCheck(this, TestSpeed);

            this.subscribedProperties = ['TestSpeed'];
            this.editDelta = {};

            this.gatewayService = gatewayService;
            this.dialogController = dialogController;
            this.validationController = validationController;
            this.bootstrapFormRenderer = new _dialogBootstrapRenderer.BootstrapFormRenderer();
            this.validationController.addRenderer(this.bootstrapFormRenderer);
            this.bindingEngine = bindingEngine;
            this.mmPerSecondToMphValueConverter = mmPerSecondToMphValueConverter;

            this.state = this.gatewayService.getState();
        }

        TestSpeed.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribedProperties);
            this.testSpeed = this.state.testSpeed;
            this.subscription = this.bindingEngine.propertyObserver(this.state, 'testSpeed').subscribe(function (newValue, oldValue) {
                _this.testSpeed = newValue;
            });

            _aureliaValidation.ValidationRules.ensure('testSpeed').satisfiesRule('numRange', 0, 44704, this.mmPerSecondToMphValueConverter.forValidate, '0.0').on(this);
        };

        TestSpeed.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties);
        };

        TestSpeed.prototype.detached = function detached() {
            this.subscription.dispose();
        };

        TestSpeed.prototype.ok = function ok() {
            var _this2 = this;

            this.editDelta.testSpeed = this.testSpeed;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this2.gatewayService.send(_this2.editDelta);

                    _this2.editDelta = {};
                    _this2.dialogController.close();
                }
            });
        };

        TestSpeed.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        TestSpeed.prototype.deactivate = function deactivate() {
            this.validationController.reset();
            this.validationController.removeRenderer(this.bootstrapFormRenderer);
        };

        return TestSpeed;
    }()) || _class);
});
define('text!views/dashboard/test-speed.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\r\n    <div class=\"operation-popover\" style=\"width: 30rem;\">\r\n        <div class=\"form-group\">\r\n            <div style=\"text-align: center\">\r\n                <label for=\"t-speed\" class=\"control-label\">Test Speed</label>\r\n            </div>\r\n            <div>\r\n                <input id=\"t-speed\"  step=\".1\" value.bind=\"testSpeed | mmPerSecondToMph:'0.0'& updateTrigger:'blur' & validateOnChange\" \r\n                       class=\"operations-dark form-control form-control-lg input-lg\"/>\r\n            </div>\r\n        </div>\r\n        <div style=\"padding-top: 16px\">\r\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\r\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_1uvr7xgl1r = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\tank-meter.js',
        hash = '89e2098c5a930838c48e2ab7eb3311e3656b1377',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\tank-meter.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/tank-meter',['exports', '../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.TankMeter = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var TankMeter = exports.TankMeter = function (_ref) {
        _inherits(TankMeter, _ref);

        function TankMeter() {
            _classCallCheck(this, TankMeter);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.activeClasses = 'ion-checkmark-circled btn-primary';
            _this.inactiveClasses = 'btn-default';
            _this.subscribedProperties = ['Tank1Current', 'Tank1Counter', 'Tank1Lifetime', 'Tank1Rate', 'Tank1CurrentDisplayed', 'Tank1Full', 'Tank1AlarmDisplayed', 'Tank1AlarmPercent', 'Tank1AlarmVolume'];
            return _this;
        }

        TankMeter.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.subscribe(this.subscribedProperties);
        };

        TankMeter.prototype.resetCounter = function resetCounter() {
            this.editDelta.tank1Counter = 0;
            this.send();
        };

        TankMeter.prototype.refillCurrent = function refillCurrent() {
            this.editDelta.tank1Current = this.state.tank1Full;
            this.send();
        };

        TankMeter.prototype.toggleAlarmUnits = function toggleAlarmUnits() {
            this.editDelta.tank1AlarmDisplayed = this.toggleByte(this.state.tank1AlarmDisplayed);
            this.send();
        };

        TankMeter.prototype.activeClass = function activeClass(isActive) {
            return isActive ? this.activeClasses : this.inactiveClasses;
        };

        _createClass(TankMeter, [{
            key: 'currentClasses',
            get: function get() {
                return this.activeClass(this.state.tank1CurrentDisplayed === 0);
            }
        }, {
            key: 'counterClasses',
            get: function get() {
                return this.activeClass(this.state.tank1CurrentDisplayed === 1);
            }
        }, {
            key: 'lifeTimeClasses',
            get: function get() {
                return this.activeClass(this.state.tank1CurrentDisplayed === 2);
            }
        }]);

        return TankMeter;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/dashboard/tank-meter.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/dashboard/operation-panel-item\"></require>\r\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\r\n    <require from=\"resources/value-converters/mlToGal\"></require>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n    <require from=\"resources/attributes/focus-bind-break\"></require>\r\n    <div class=\"operation-popover container-fluid\">\r\n\r\n        <div style=\"padding: 2rem\" class=\"container-fluid area-meter\">\r\n            <div class=\"text-center\" style=\"font-size: large\">Tank Meter(Gallons)</div>\r\n\r\n            <div class=\"row equal\">\r\n                <label class=\" col-xs-5 m-t-3\"\r\n                       i18n=\"dashboard.areaMeter.capacity\"></label>\r\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.two-way=\"state.tank1Full | mlToGal\"\r\n                       change.delegate=\"sendChange(state.tank1Full, 'tank1Full')\" />\r\n            </div>\r\n\r\n            <div class=\"row equal\">\r\n                <button class=\" col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"currentClasses \"\r\n                        i18n=\"dashboard.areaMeter.current\" click.delegate=\"sendChange(0, 'tank1CurrentDisplayed')\"></button>\r\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.two-way=\"state.tank1Current | mlToGal\"\r\n                       change.delegate=\"sendChange(state.tank1Current, 'tank1Current')\" />\r\n                <div class=\"col-xs-3 m-t-3\">\r\n                    <button click.delegate=\"refillCurrent()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.tankMeter.refill\">Reset</button>\r\n                </div>\r\n            </div>\r\n\r\n            <div class=\"row equal\">\r\n                <button class=\"col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"counterClasses\"\r\n                        i18n=\"dashboard.areaMeter.counter\" click.delegate=\"sendChange(1, 'tank1CurrentDisplayed')\"></button>\r\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1Counter | mlToGal\"\r\n                       change.delegate=\"sendChange(state.tank1Counter, 'tank1Counter')\" />\r\n                <div class=\"col-xs-3 m-t-3\">\r\n                    <button click.delegate=\"resetCounter()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.areaMeter.reset\">Reset</button>\r\n                </div>\r\n            </div>\r\n\r\n            <div class=\"row equal\">\r\n                <button class=\"col-xs-5 m-t-3 btn btn-lg btn-outline \" class.bind=\"lifeTimeClasses\"\r\n                        i18n=\"dashboard.areaMeter.lifetime\" click.delegate=\"sendChange(2, 'tank1CurrentDisplayed')\"></button>\r\n                <input readonly type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1Lifetime | mlToGal\"\r\n                       change.delegate=\"sendChange(state.tank1Lifetime, 'tank1Lifetime')\" />\r\n            </div>\r\n\r\n            <div if.bind=\"state.tank1AlarmDisplayed === 0\" class=\"row equal\">\r\n                <label class=\"col-xs-5 m-t-3\"\r\n                       i18n=\"dashboard.tankMeter.alarm\"></label>\r\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1AlarmPercent\"\r\n                       change.delegate=\"sendChange(state.tank1AlarmPercent, 'tank1AlarmPercent')\" />\r\n                <div class=\"col-xs-3 m-t-3\">\r\n                    <button click.delegate=\"toggleAlarmUnits()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"%\">%</button>\r\n                </div>\r\n            </div>\r\n\r\n            <div if.bind=\"state.tank1AlarmDisplayed === 1\" class=\"row equal\">\r\n                <label class=\"col-xs-5 m-t-3\"\r\n                       i18n=\"dashboard.tankMeter.alarm\"></label>\r\n\r\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1AlarmVolume | mlToGal\"\r\n                       change.delegate=\"sendChange(state.tank1AlarmVolume, 'tank1AlarmVolume')\" />\r\n                <div class=\"col-xs-3 m-t-3\">\r\n                    <button click.delegate=\"toggleAlarmUnits()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.tankMeter.volume\">Reset</button>\r\n                </div>\r\n            </div>\r\n\r\n            <operation-panel-item val.bind=\"state.tank1Rate | mlPerHectareToGpa\" label=\"dashboard.tankMeter.flowRate\">\r\n            </operation-panel-item>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_14xrt9izw6 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\system-status.js',
        hash = '452e06fb9497d4701376557193212a87ee79e88a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\system-status.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/system-status',['exports', 'aurelia-framework', '../gateway-state-base'], function (exports, _aureliaFramework, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemStatus = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _desc, _value, _class;

    var SystemStatus = exports.SystemStatus = (_dec = (0, _aureliaFramework.computedFrom)('state.servoType', 'state.taskMode'), _dec2 = (0, _aureliaFramework.computedFrom)('state.masterSwitchSource'), (_class = function (_ref) {
        _inherits(SystemStatus, _ref);

        function SystemStatus() {
            _classCallCheck(this, SystemStatus);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.subscribedProperties = ['Pump', 'Boom', 'TurnComp', 'OverlapComp', 'KeyFob', 'ServoType', 'TaskMode', 'MasterSwitchSource'];
            return _this;
        }

        SystemStatus.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.subscribe(this.subscribedProperties);
        };

        SystemStatus.prototype.toggleSwitch = function toggleSwitch(val, prop) {
            this.editDelta[prop] = this.toggleByte(val);
            this.send();
        };

        _createClass(SystemStatus, [{
            key: 'pinPointControlsPump',
            get: function get() {
                return (this.state.servoType === 0 || this.state.servoType === 1) && this.state.taskMode > 0;
            }
        }, {
            key: 'masterBoomSwitchOnScreen',
            get: function get() {
                return this.state.masterSwitchSource === 2;
            }
        }]);

        return SystemStatus;
    }((_gatewayStateBase.GatewayStateBase)), (_applyDecoratedDescriptor(_class.prototype, 'pinPointControlsPump', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'pinPointControlsPump'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'masterBoomSwitchOnScreen', [_dec2], Object.getOwnPropertyDescriptor(_class.prototype, 'masterBoomSwitchOnScreen'), _class.prototype)), _class));
});
define('text!views/dashboard/system-status.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/bitToStatus\"></require>\r\n    <div style=\"width: 30rem;\" class=\"operation-popover\">\r\n        <div class=\"container-fluid\" style=\"padding-bottom: 11px\">\r\n            <div>\r\n                <div colspan=\"2\" class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">System Status</div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Pump</div>\r\n                <div class=\"col-xs-6 m-t-3\"  style=\"text-align: center\">\r\n                    <div if.bind=\"!pinPointControlsPump\" class=\"operation-txt\">\r\n                        ${state.pump | bitToStatus }\r\n                    </div>\r\n                    <button if.bind=\"pinPointControlsPump\" class.bind=\"state.pump == 0 ? 'operation-bdr-error' : ''\" \r\n                            class=\"btn btn-lg operations-btn\" click.delegate=\"toggleSwitch(state.pump, 'pump')\">\r\n                        ${state.pump | bitToStatus }\r\n                    </button>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Boom</div>\r\n\r\n                <div class=\"col-xs-6 m-t-3\"  style=\"text-align: center\">\r\n                    <div if.bind=\"!masterBoomSwitchOnScreen\" class=\"operation-txt\">\r\n                        ${state.boom | bitToStatus }\r\n                    </div>\r\n                    <button if.bind=\"masterBoomSwitchOnScreen\" class.bind=\"state.boom == 0 ? 'operation-bdr-error' : ''\"\r\n                            class=\"btn btn-lg operations-btn\" click.delegate=\"toggleSwitch(state.boom, 'boom')\">\r\n                        ${state.boom | bitToStatus }\r\n                    </button>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Overlap</div>\r\n                <div class=\"col-xs-6 m-t-3\"  style=\"text-align: center\">\r\n                    <button class.bind=\"state.overlapComp == 0 ? 'operation-bdr-error' : ''\"\r\n                            class=\"btn btn-lg operations-btn\" click.delegate=\"toggleSwitch(state.overlapComp, 'overlapComp')\">\r\n                        ${state.overlapComp | bitToStatus }\r\n                    </button>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Turn</div>\r\n                <div class=\"col-xs-6 m-t-3\" style=\"text-align: center\">\r\n                    <button class=\"btn btn-lg operations-btn\" class.bind=\"state.turnComp == 0 ? 'operation-bdr-error' : ''\" \r\n                            click.delegate=\"toggleSwitch(state.turnComp, 'turnComp')\">\r\n                        ${state.turnComp | bitToStatus }\r\n                    </button>\r\n                </div>\r\n            </div>\r\n            <div class=\"row\">\r\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Key Fob</div>\r\n                <div class=\"col-xs-6 m-t-3\" style=\"text-align: center\">\r\n                    <button class=\"btn btn-lg operations-btn\" class.bind=\"state.keyFob == 0 ? 'operation-bdr-error' : ''\"\r\n                            click.delegate=\"toggleSwitch(state.keyFob, 'keyFob')\">\r\n                        ${state.keyFob | bitToStatus }\r\n                    </button>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
define('text!views/dashboard/system-status-popover.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/dashboard/system-status\"></require>\r\n    <slot name=\"popoverTarget\">\r\n        <button class=\"btn btn-block btn-default\" \r\n                popover=\"template-selector: #sys-status-template; placement: bottom\">Custom popover (custom attribute)</button>\r\n    </slot>\r\n    <div id=\"sys-status-template\">\r\n        <div class=\"popover\" role=\"tooltip\">\r\n            <div class=\"arrow\"></div>\r\n            <h3 class=\"popover-title\"></h3>\r\n            <div>Some custom html</div>\r\n            <system-status></system-status>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_2m1krld394 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\soft-boom-switches.js',
        hash = 'b2378d10bd6c4c2add41d6d2c7e7a0c3d8ff7c35',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\soft-boom-switches.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/soft-boom-switches',['exports', 'aurelia-framework', '../../services/gateway-service'], function (exports, _aureliaFramework, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SoftBoomSwitches = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _class, _desc, _value, _class2;

    var SoftBoomSwitches = exports.SoftBoomSwitches = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.computedFrom)('state.softBoom1Switch'), _dec(_class = (_class2 = function () {
        function SoftBoomSwitches(gatewayService) {
            _classCallCheck(this, SoftBoomSwitches);

            this.subscribeProperties = ['SoftBoom1Switch'];

            this.gatewayService = gatewayService;
            this.editDelta = {
                boomStatusBits: []
            };
            this.state = this.gatewayService.getState();
        }

        SoftBoomSwitches.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribeProperties, 'soft-boom-switches');
        };

        SoftBoomSwitches.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'soft-boom-switches');
        };

        SoftBoomSwitches.prototype.toggle = function toggle(index) {
            this.editDelta.softBoom1Switch = this.state.softBoom1Switch.slice();
            this.editDelta.softBoom1Switch.splice(index, 1, this.toggleByte(this.editDelta.softBoom1Switch[index]));
            this.send();
        };

        SoftBoomSwitches.prototype.toggleByte = function toggleByte(value) {
            return value === 1 ? 0 : 1;
        };

        SoftBoomSwitches.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);
        };

        _createClass(SoftBoomSwitches, [{
            key: 'boomSwitches',
            get: function get() {
                return this.state.softBoom1Switch;
            }
        }]);

        return SoftBoomSwitches;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'boomSwitches', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'boomSwitches'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/soft-boom-switches.html', ['module'], function(module) { module.exports = "<template>\r\n    <div style=\"font-size: 34px; color: red; text-align: center\" if.bind=\"!boomSwitches\">\r\n        Loading...\r\n    </div>\r\n    <div if.bind=\"boomSwitches\" class=\"btn-toolbar boom-btn-toolbar\" role=\"group\" style=\"width: 100%\">\r\n        <button repeat.for=\"sectionByte of state.softBoom1Switch.length\"\r\n                style=\"border-width: 5px\" type=\"button\" ref=\"item\" class=\"btn ${state.softBoom1Switch[$index] ? 'btn-primary' : 'btn-secondary'} boom-btn\" click.delegate=\"toggle($index)\">\r\n            ${$index + 1}\r\n        </button>\r\n    </div>\r\n</template>\r\n"; });
var cov_lsgejyxn9 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\save-recording.js',
        hash = 'c6e3610a0866916e37d85f69a2f659308455b468',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\save-recording.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/save-recording',['exports', 'aurelia-framework', 'aurelia-dialog'], function (exports, _aureliaFramework, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SaveRecording = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SaveRecording = exports.SaveRecording = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = function () {
        function SaveRecording(dialogController) {
            _classCallCheck(this, SaveRecording);

            this.controller = dialogController;
        }

        SaveRecording.prototype.activate = function activate(name) {
            this.name = name;
        };

        SaveRecording.prototype.unbind = function unbind() {};

        SaveRecording.prototype.save = function save() {
            this.save = true;
        };

        return SaveRecording;
    }()) || _class);
});
define('text!views/dashboard/save-recording.html', ['module'], function(module) { module.exports = "<template>\r\n    <div style=\"width: 50rem;\" class=\"operation-popover\">\r\n        <div class=\"container-fluid\" style=\"padding-bottom: 11px\">\r\n            <div>\r\n                <div class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">Boundary Map Name</div>\r\n            </div>\r\n            <br />\r\n            <div class=\"row form-group\">\r\n                <div class=\"col-xs-12\">\r\n                    <input id=\"left-input\" step=\"1\" value.bind=\"name\"\r\n                           class=\"operations-dark form-control form-control-lg input-lg\" type=\"text\">\r\n                </div>\r\n            </div>\r\n            <ux-dialog-footer>\r\n                <button click.trigger=\"controller.ok(name)\" class=\"btn btn-primary btn-lg\">Save</button>\r\n                <button click.trigger=\"controller.cancel()\" class=\"btn btn-default btn-lg\">Cancel</button>\r\n            </ux-dialog-footer>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_2o3amaovnk = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\recorder-settings.js',
        hash = 'c05e3d02b9b3d720b930192d5bbd077789477d2a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\recorder-settings.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/recorder-settings',['exports', 'aurelia-framework', 'aurelia-dialog'], function (exports, _aureliaFramework, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RecorderSettings = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var RecorderSettings = exports.RecorderSettings = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = function () {
        function RecorderSettings(dialogController) {
            _classCallCheck(this, RecorderSettings);

            this.controller = dialogController;
        }

        RecorderSettings.prototype.activate = function activate(settings) {
            this.settings = settings;
        };

        return RecorderSettings;
    }()) || _class);
});
define('text!views/dashboard/recorder-settings.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mmToInches\"></require>\r\n    <div style=\"width: 50rem;\" class=\"operation-popover\">\r\n        <div class=\"container-fluid\" style=\"padding-bottom: 11px\">\r\n            <div>\r\n                <div colspan=\"2\" class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">Recorder Settings</div>\r\n            </div>\r\n            <br />\r\n            <div class=\"row form-group\">\r\n                <div class=\"col-xs-5\">\r\n                    <label for=\"left-input\">Left Setpoint</label>\r\n                </div>\r\n                <div class=\"col-xs-4\">\r\n                    <input id=\"left-input\" step=\"1\" value.bind=\"settings.leftSetpoint | mmToInches & updateTrigger:'blur'\"\r\n                           class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"leftSetpoint\">\r\n                </div>\r\n                <div class=\"col-xs-3\">\r\n                    <span>Inches</span>\r\n                </div>\r\n            </div>\r\n            <div class=\"row form-group\">\r\n                <div class=\"col-xs-5\">\r\n                    <label for=\"right-input\">Right Setpoint</label>\r\n                </div>\r\n                <div class=\"col-xs-4\">\r\n                    <input id=\"right-input\" min=\"0\" step=\"1\" value.bind=\"settings.rightSetpoint | mmToInches & updateTrigger:'blur'\"\r\n                           class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"rightSetpoint\">\r\n                </div>\r\n                <div class=\"col-xs-3\">\r\n                    <span>Inches</span>\r\n                </div>\r\n            </div>\r\n            <ux-dialog-footer>\r\n                <button click.trigger=\"controller.ok(settings)\" class=\"btn btn-primary btn-lg\">Ok</button>\r\n                <button click.trigger=\"controller.cancel()\" class=\"btn btn-default btn-lg\">Cancel</button>\r\n            </ux-dialog-footer>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_1p0l5qawq6 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\rate-control.js',
        hash = '65d9605925f2852919f306cc49681ceb67ce6700',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\rate-control.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/rate-control',['exports', 'aurelia-framework', '../gateway-state-base'], function (exports, _aureliaFramework, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateControl = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _dec3, _desc, _value, _class;

    var RateControl = exports.RateControl = (_dec = (0, _aureliaFramework.computedFrom)('state.systemRate1Index', 'state.systemRate1Auto'), _dec2 = (0, _aureliaFramework.computedFrom)('state.systemRate1Index', 'state.systemRate1Auto'), _dec3 = (0, _aureliaFramework.computedFrom)('state.systemRate1Index', 'state.systemRate1Auto'), (_class = function (_ref) {
        _inherits(RateControl, _ref);

        function RateControl() {
            _classCallCheck(this, RateControl);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.manualControl = false;
            _this.manualRateActive = true;
            _this.autoSyncProperties = ['SystemRate1Target0', 'SystemRate1Target1', 'SystemRate1Target2', 'SystemRate1MChange', 'SystemRate1TChange', 'SystemRate', 'SystemRate1NozzleDc', 'SystemRate1ErrorFm', 'SystemRate1Index', 'SystemRate1IncDec', 'SystemRate1Auto'];
            return _this;
        }

        RateControl.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        RateControl.prototype.setSelectedRate = function setSelectedRate(index) {
            this.editDelta.systemRate1Index = index;
            this.editDelta.systemRate1Auto = 1;
            this.send();
        };

        RateControl.prototype.toggleManualRate = function toggleManualRate() {
            this.editDelta.systemRate1Auto = 0;
            this.send();
        };

        RateControl.prototype.bumpValueChanged = function bumpValueChanged(bumpValue) {
            this.state.systemRate1TChange = bumpValue;
        };

        RateControl.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemRate1IncDec = bmpDir;
            this.send();
        };

        RateControl.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        RateControl.prototype.setTargetRate = function setTargetRate(bmpDir) {
            if (bmpDir > 0) {
                this.state['systemRate1Target' + this.state.systemRate1Index] = this.getActiveTarget() + this.state.systemRate1TChange;
            } else {
                var newRate = this.getActiveTarget() - this.state.systemRate1TChange;
                this.state['systemRate1Target' + this.state.systemRate1Index] = newRate > 0 ? newRate : 0;
            }
        };

        RateControl.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemRate1Target' + this.state.systemRate1Index];
        };

        _createClass(RateControl, [{
            key: 'rate1Class',
            get: function get() {
                return this.state.systemRate1Index === 0 && this.state.systemRate1Auto ? 'btn-primary' : 'btn-secondary';
            }
        }, {
            key: 'rate2Class',
            get: function get() {
                return this.state.systemRate1Index === 1 && this.state.systemRate1Auto ? 'btn-primary' : 'btn-secondary';
            }
        }, {
            key: 'pxRateClass',
            get: function get() {
                return this.state.systemRate1Index === 2 && this.state.systemRate1Auto ? 'btn-primary' : 'btn-secondary';
            }
        }]);

        return RateControl;
    }((_gatewayStateBase.GatewayStateBase)), (_applyDecoratedDescriptor(_class.prototype, 'rate1Class', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'rate1Class'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'rate2Class', [_dec2], Object.getOwnPropertyDescriptor(_class.prototype, 'rate2Class'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'pxRateClass', [_dec3], Object.getOwnPropertyDescriptor(_class.prototype, 'pxRateClass'), _class.prototype)), _class));
});
define('text!views/dashboard/rate-control.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\r\n    <div class=\"operation-popover\" style=\"height: 100%;\">\r\n        <div class=\"container-fluid\">\r\n            <div class=\"row\">\r\n                <div class=\"col-md-6 container-fluid\">\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"p1\" class=\"form-control-lg btn btn-lg\" class.bind=\"rate1Class\" click.capture=\"setSelectedRate(0)\">R1</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <input id=\"r1-input\" min=\"0\" step=\"0.1\" oninput=\"validity.valid||(value='0.0');\" \r\n                                   value.bind=\"state.systemRate1Target0 | mlPerHectareToGpa:'0.0' & updateTrigger:'blur' & autoSync\" \r\n                                   class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"systemRate1Target0\">\r\n                        </div>\r\n                      \r\n                    </div>\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"p2\" class=\"form-control-lg btn btn-lg\" class.bind=\"rate2Class\" click.capture=\"setSelectedRate(1)\">R2</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <input id=\"r2-input\" min=\"0\" step=\"0.1\" oninput=\"validity.valid||(value='0.0')\"; \r\n                                   value.bind=\"state.systemRate1Target1 | mlPerHectareToGpa:'0.0'  & updateTrigger:'blur' & autoSync\" \r\n                                   class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"systemRate1Target1\">\r\n                        </div>\r\n\r\n                    </div>\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"rx\" class=\"form-control-lg btn btn-lg btn-secondary\" class.bind=\"pxRateClass\" click.capture=\"setSelectedRate(2)\">Rx</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <div id=\"rx-input\" value.bind=\"state.systemRate1Target2 | mlPerHectareToGpa:'0.0'\" \r\n                                 class=\"operations-dark operations-dark-text-xl\">${state.systemRate1Target2 | mlPerHectareToGpa:'0.0'}</div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"w-100 d-none d-md-block\"></div>\r\n                <div class=\"col-md-6\">\r\n                    <div id=\"manual-control\" class=\"container-fluid manual-control-offset\">\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-offset-4 col-xs-6 col-md-6\">\r\n                                <button class=\"btn btn-lg form-control form-control-lg input-lg ${state.systemRate1Auto ?  'btn-secondary': 'btn-primary'}\" click.capture=\"toggleManualRate()\">\r\n                                    M\r\n                                </button>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-6 col-xs-offset-4\">\r\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-up-a\" click.capture=\"bump(1)\"></button>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row ${!state.systemRate1Auto ? 'collapse' : ''}\">\r\n                            <label style=\"margin-right:.4em; font-size: large; text-align: right; padding-top: 5px; margin-bottom: 0;\" class=\"col-xs-1\" for=\"m-input\">Bump</label>\r\n                            <div class=\"col-xs-6\" style=\"margin-left: 1.8em\">\r\n                                <input id=\"m-input\" value.bind=\"state.systemRate1TChange | mlPerHectareToGpa:'0.0' & updateTrigger:'blur' & autoSync\" step=\"0.1\"\r\n                                       class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"systemRate1TChange\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-6 col-xs-offset-4\">\r\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-down-a\" click.capture=\"bump(-1)\"></button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <hr/>\r\n        <div>\r\n            <span style=\"font-size: x-large\"> FlowMeter Error %</span>\r\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemRate1ErrorFm}</span>\r\n        </div>\r\n        <div>\r\n            <span style=\"font-size: x-large\"> Nozzle DC %</span>\r\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemRate1NozzleDc}</span>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
define('text!views/dashboard/pressure-control2.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\r\n    <div class=\"operation-popover\" style=\"height: 100%;\">\r\n        <div class=\"container-fluid\">\r\n            <div class=\"row\">\r\n                <div class=\"col-md-6 container-fluid\">\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"p1\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index === 0 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(0)\">P1</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <input id=\"r1-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target0\" value.bind=\"state.systemPressure1Target0 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\r\n                        </div>\r\n\r\n                    </div>\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"p2\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index  === 1 && state.systemPressure1Auto? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(1)\">P2</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <input id=\"r2-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target1\" value.bind=\"state.systemPressure1Target1 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\"  class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\r\n                        </div>\r\n\r\n                    </div>\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"rx\" class=\"${state.systemPressure1Index === 2 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'} form-control-lg btn btn-lg btn-secondary\" click.delegate=\"setSelectedRate(2)\">Rx</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <div id=\"rx-input\" value.bind=\"state.systemPressure1Target2 | kpaToPsi:'0.0'\" class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Target2 | kpaToPsi:'0.0'}</div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"w-100 d-none d-md-block\"></div>\r\n                <div class=\"col-md-6\">\r\n                    <div id=\"manual-control\" class=\"container-fluid manual-control-offset\">\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-offset-4 col-xs-6 col-md-6\">\r\n                                <button class=\"btn btn-lg form-control form-control-lg input-lg ${state.systemPressure1Auto ?  'btn-secondary': 'btn-primary'}\" click.delegate=\"toggleManualRate()\">\r\n                                    M\r\n                                </button>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-6 col-xs-offset-4\">\r\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-up-a\" click.delegate=\"bump(1)\"></button>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\" >\r\n                            <label style=\"margin-right:.4em; font-size: large; text-align: right; padding-top: 5px; margin-bottom: 0;\" class=\"col-xs-1\" for=\"m-input\">Bump</label>\r\n                            <div class=\"col-xs-6\" style=\"margin-left: 1.8em\">\r\n                                <input id=\"m-input\" name=\"systemPressure1TChange\" value.bind=\"state.systemPressure1TChange | kpaToPsi:'0.0'  & updateTrigger:'blur' & autoSync\" step=\"0.1\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-6 col-xs-offset-4\">\r\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-down-a\" click.delegate=\"bump(-1)\"></button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <hr />\r\n        <div>\r\n            <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1PumpDuty\"></span>\r\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1PumpDuty}</span>\r\n        </div>\r\n        <div>\r\n            <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1Sparge\"></span>\r\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Sparge}</span>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_1ne4j9xrkk = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\pressure-control.js',
        hash = '49af617e99b45a4c6f9e0cd6379859811cfcf7d8',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\pressure-control.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/pressure-control',['exports', '../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureControl = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var PressureControl = exports.PressureControl = function (_ref) {
        _inherits(PressureControl, _ref);

        function PressureControl() {
            _classCallCheck(this, PressureControl);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.autoSyncProperties = ['SystemPressure1Index', 'SystemPressure1TChange', 'SystemPressure1Target0', 'SystemPressure1Target1', 'SystemPressure1Target2', 'SystemPressure1Auto', 'SystemPressure1PumpDuty', 'SystemPressure1IncDec', 'SystemPressure1Sparge'];

            _this.setUpSubscriptions(_this.autoSyncProperties);
            return _this;
        }

        PressureControl.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
        };

        PressureControl.prototype.setSelectedRate = function setSelectedRate(index) {
            this.editDelta.systemPressure1Index = index;
            this.editDelta.systemPressure1Auto = 1;
            this.send();
        };

        PressureControl.prototype.toggleManualRate = function toggleManualRate() {
            this.editDelta.systemPressure1Auto = this.toggleByte(this.state.systemPressure1Auto);
            this.send();
        };

        PressureControl.prototype.bumpValueChanged = function bumpValueChanged(bumpValue) {
            this.editDelta.systemPressure1TChange = bumpValue;
            this.send();
        };

        PressureControl.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemPressure1IncDec = bmpDir;
            this.send();
        };

        PressureControl.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemPressure1Target' + this.state.systemPressure1Index];
        };

        return PressureControl;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/dashboard/pressure-control.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\r\n    <div class=\"operation-popover\" style=\"height: 100%;\">\r\n        <div class=\"container-fluid\">\r\n            <div class=\"row\">\r\n                <div class=\"col-md-6 container-fluid\">\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"p1\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index === 0 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(0)\">P1</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <input id=\"r1-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target0\" value.bind=\"state.systemPressure1Target0 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\r\n                        </div>\r\n\r\n                    </div>\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"p2\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index  === 1 && state.systemPressure1Auto? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(1)\">P2</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <input id=\"r2-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target1\" value.bind=\"state.systemPressure1Target1 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\r\n                        </div>\r\n\r\n                    </div>\r\n                    <div class=\"form-group row\">\r\n                        <div class=\"col-xs-6\">\r\n                            <button type=\"button\" id=\"rx\" class=\"${state.systemPressure1Index === 2 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'} form-control-lg btn btn-lg btn-secondary\" click.delegate=\"setSelectedRate(2)\">Rx</button>\r\n                        </div>\r\n                        <div class=\"col-xs-6\">\r\n                            <div id=\"rx-input\" class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Target2 | kpaToPsi:'0.0'}</div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"w-100 d-none d-md-block\"></div>\r\n                <div class=\"col-md-6\">\r\n                    <div id=\"manual-control\" class=\"container-fluid manual-control-offset\">\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-offset-4 col-xs-6 col-md-6\">\r\n                                <button class=\"btn btn-lg form-control form-control-lg input-lg ${state.systemPressure1Auto ?  'btn-secondary': 'btn-primary'}\" click.delegate=\"toggleManualRate()\">\r\n                                    M\r\n                                </button>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-6 col-xs-offset-4\">\r\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-up-a\" click.delegate=\"bump(1)\"></button>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\">\r\n                            <label style=\"margin-right:.4em; font-size: large; text-align: right; padding-top: 5px; margin-bottom: 0;\" class=\"col-xs-1\" for=\"m-input\">Bump</label>\r\n                            <div class=\"col-xs-6\" style=\"margin-left: 1.8em\">\r\n                                <input id=\"m-input\" name=\"systemPressure1TChange\" value.bind=\"state.systemPressure1TChange | kpaToPsi:'0.0'  & updateTrigger:'blur' & autoSync\" step=\"0.1\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group row\">\r\n                            <div class=\"col-xs-6 col-xs-offset-4\">\r\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-down-a\" click.delegate=\"bump(-1)\"></button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <hr />\r\n        <div>\r\n            <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1PumpDuty\"></span>\r\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1PumpDuty}</span>\r\n        </div>\r\n        <div>\r\n            <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1Sparge\"></span>\r\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Sparge}</span>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_237p2lmfz5 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\popover-element.js',
        hash = '55979d9a20e384fe5de46b4f4d72285bf4bc0865',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\popover-element.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/popover-element',['exports', 'aurelia-framework', 'px-popover'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PopoverElement = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;

    var PopoverElement = exports.PopoverElement = (_dec = (0, _aureliaFramework.customElement)('popover-element'), _dec(_class = (_class2 = function () {
        function PopoverElement() {
            _classCallCheck(this, PopoverElement);

            _initDefineProp(this, 'animation', _descriptor, this);

            _initDefineProp(this, 'container', _descriptor2, this);

            _initDefineProp(this, 'delay', _descriptor3, this);

            _initDefineProp(this, 'html', _descriptor4, this);

            _initDefineProp(this, 'placement', _descriptor5, this);

            _initDefineProp(this, 'selector', _descriptor6, this);

            _initDefineProp(this, 'title', _descriptor7, this);

            _initDefineProp(this, 'trigger', _descriptor8, this);

            _initDefineProp(this, 'viewport', _descriptor9, this);
        }

        PopoverElement.prototype.attached = function attached() {
            if (!this.title) {
                throw new Error('title must be defined');
            }
            $(this.target.firstElementChild).popover({
                animation: this.animation,
                container: this.container,
                delay: this.delay,
                html: this.html,
                placement: this.placement,
                selector: this.selector,
                template: this.template.firstElementChild.outerHTML,
                title: this.title,
                trigger: this.trigger,
                viewport: this.viewport
            });
        };

        return PopoverElement;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'animation', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return true;
        }
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'container', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'delay', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 0;
        }
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'html', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'placement', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'left';
        }
    }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'selector', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'title', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'placeholder title';
        }
    }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, 'trigger', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'click';
        }
    }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, 'viewport', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return { selector: 'body', padding: 0 };
        }
    })), _class2)) || _class);
});
define('text!views/dashboard/popover-element.html', ['module'], function(module) { module.exports = "<template>\r\n    <div ref=\"target\">\r\n        <slot name=\"popoverTarget\">\r\n            <button class=\"btn btn-block btn-default\">Default popover (custom element)</button>\r\n        </slot>\r\n    </div>\r\n    <div ref=\"template\">\r\n        <slot name=\"popoverTemplate\">\r\n            <div class=\"popover\" role=\"tooltip\">\r\n                <div class=\"arrow\"></div>\r\n                <h3 class=\"popover-title\"></h3>\r\n                <div class=\"popover-content\"></div>\r\n            </div>\r\n        </slot>\r\n    </div>\r\n</template>\r\n"; });
var cov_1xi2cc8jhd = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\operation-panel-item.js',
        hash = '0f12c1de931b97d7f076869c813f735a0a11b760',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\operation-panel-item.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/operation-panel-item',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.OperationPanelItem = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3;

    var OperationPanelItem = exports.OperationPanelItem = (_class = function OperationPanelItem() {
        _classCallCheck(this, OperationPanelItem);

        _initDefineProp(this, 'val', _descriptor, this);

        _initDefineProp(this, 'label', _descriptor2, this);

        _initDefineProp(this, 'reset', _descriptor3, this);
    }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'label', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'reset', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class);
});
define('text!views/dashboard/operation-panel-item.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\r\n    <div class=\"row equal\">\r\n        <label class=\"col-xs-5 m-t-3\" style=\"font-size: 1.8rem\" i18n=\"${label}\"></label>\r\n        <div class=\"col-xs-4 m-t-3 operation-txt\">${val | hectaresToAcres:'0.0'}</div>\r\n    </div>\r\n</template>\r\n"; });
var cov_22s63e0b5y = function () {
  var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\gauge.js',
      hash = '6bc441e1858f436747498549e4214c2eec87ff8c',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\gauge.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/dashboard/gauge',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.Gauge = undefined;

  function _initDefineProp(target, property, descriptor, context) {
    if (!descriptor) return;
    Object.defineProperty(target, property, {
      enumerable: descriptor.enumerable,
      configurable: descriptor.configurable,
      writable: descriptor.writable,
      value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
    });
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
    var desc = {};
    Object['ke' + 'ys'](descriptor).forEach(function (key) {
      desc[key] = descriptor[key];
    });
    desc.enumerable = !!desc.enumerable;
    desc.configurable = !!desc.configurable;

    if ('value' in desc || desc.initializer) {
      desc.writable = true;
    }

    desc = decorators.slice().reverse().reduce(function (desc, decorator) {
      return decorator(target, property, desc) || desc;
    }, desc);

    if (context && desc.initializer !== void 0) {
      desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
      desc.initializer = undefined;
    }

    if (desc.initializer === void 0) {
      Object['define' + 'Property'](target, property, desc);
      desc = null;
    }

    return desc;
  }

  function _initializerWarningHelper(descriptor, context) {
    throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
  }

  var _desc, _value, _class, _descriptor;

  var Gauge = exports.Gauge = (_class = function Gauge() {
    _classCallCheck(this, Gauge);

    _initDefineProp(this, 'classes', _descriptor, this);
  }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'classes', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  })), _class);
});
define('text!views/dashboard/gauge.html', ['module'], function(module) { module.exports = "<template>\r\n    <div style=\"position: relative\">\r\n        <label for=\"psi-btn\" class=\"gauge-label-box\">\r\n            <div class=\"gauge-label\">\r\n                <slot name=\"label\">\r\n                </slot>\r\n            </div>\r\n        </label>\r\n        <button id=\"psi-btn\" class=\"bg-dark operations-btn-dark operation-bdr-success ${classes} btn-circle btn-xl\">\r\n            <slot name=\"reading\">\r\n            </slot>\r\n        </button>\r\n    </div>\r\n</template>\r\n"; });
var cov_p0n9u37w5 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\gauge-display.js',
        hash = 'ea20dcee667f066decb4adefa23b99725badb518',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\gauge-display.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/gauge-display',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', './system-status', './rate-control', './pressure-control', './test-speed', './area-meter', './tank-meter'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _systemStatus, _rateControl, _pressureControl, _testSpeed, _areaMeter, _tankMeter) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GaugeDisplay = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2;

    var GaugeDisplay = exports.GaugeDisplay = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogService, _gatewayService.GatewayService, _rateControl.RateControl), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec3 = (0, _aureliaFramework.computedFrom)('state.systemRate1Color', 'state.taskMode'), _dec4 = (0, _aureliaFramework.computedFrom)('state.systemPressure1Color', 'state.taskMode'), _dec5 = (0, _aureliaFramework.computedFrom)('state.systemStatusColor'), _dec(_class = (_class2 = function () {
        function GaugeDisplay(dialogService, gatewayService) {
            _classCallCheck(this, GaugeDisplay);

            _initDefineProp(this, 'state', _descriptor, this);

            this.subscribedProperties = ['GroundSpeed', 'SystemPressure1', 'SystemRate', 'TaskMode', 'FluidMode', 'SystemRateIndex', 'SystemRateAuto', 'SystemRateTarget0', 'SystemRateTarget1', 'SystemRateTarget2', 'SystemPressure1Color', 'SystemRate1Color', 'Area1Current', 'Area1Counter', 'Area1Lifetime', 'Area1CurrentDisplayed', 'Tank1Current', 'Tank1Counter', 'Tank1Lifetime', 'Tank1CurrentDisplayed', 'SystemStatusCurrent', 'SystemStatusColor'];

            _initDefineProp(this, 'isCloud', _descriptor2, this);

            this.gatewayService = gatewayService;
            this.dialogService = dialogService;

            this.getGatewayServiceState();
        }

        GaugeDisplay.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties, 'gauge-display');
        };

        GaugeDisplay.prototype.detached = function detached() {
            this.dialogService.closeAll();
        };

        GaugeDisplay.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'gauge-display');
        };

        GaugeDisplay.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);

            this.editDelta = {};
        };

        GaugeDisplay.prototype.getGatewayServiceState = function getGatewayServiceState() {
            this.state = this.gatewayService.getState();
        };

        GaugeDisplay.prototype.openSystemStatus = function openSystemStatus() {
            this.dialogService.open({ viewModel: _systemStatus.SystemStatus, lock: false }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.openRateControl = function openRateControl() {
            if (this.state.taskMode !== 0) {
                this.dialogService.open({ viewModel: _rateControl.RateControl, lock: false }).whenClosed(function (response) {});
            }
        };

        GaugeDisplay.prototype.openPressureControl = function openPressureControl() {
            if (this.state.taskMode > 0) {
                this.dialogService.open({ viewModel: _pressureControl.PressureControl, lock: false }).whenClosed(function (response) {});
            }
        };

        GaugeDisplay.prototype.openTestSpeed = function openTestSpeed() {
            this.dialogService.open({ viewModel: _testSpeed.TestSpeed, lock: false, overlayDismiss: true }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.openAreaMeter = function openAreaMeter() {
            this.dialogService.open({ viewModel: _areaMeter.AreaMeter, lock: false }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.openTankMeter = function openTankMeter() {
            this.dialogService.open({ viewModel: _tankMeter.TankMeter, lock: false }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemRateTarget' + this.state.systemRateIndex];
        };

        _createClass(GaugeDisplay, [{
            key: 'rateControlClass',
            get: function get() {
                var rateColor = this.state.systemRate1Color;
                if (this.state) {
                    if (this.state.taskMode === 0) {
                        return 'operation-bdr-off';
                    }
                    if (rateColor === 0) {
                        return 'operation-bdr-success';
                    } else if (rateColor === 1) {
                        return 'operation-bdr-error';
                    } else if (rateColor === 2) {
                        return 'operation-bdr-warn';
                    } else if (rateColor === 3) {
                        return 'operation-bdr-disabled';
                    }
                }
                return 'operation-bdr-off';
            }
        }, {
            key: 'currentTankDisplayed',
            get: function get() {
                var displayIndex = this.state.tank1CurrentDisplayed;
                switch (displayIndex) {
                    case 0:
                        return this.state.tank1Current;
                    case 1:
                        return this.state.tank1Counter;
                    case 2:
                        return this.state.tank1Lifetime;
                    default:
                        return this.state.tank1Current;
                }
            }
        }, {
            key: 'currentAreaDisplayed',
            get: function get() {
                var displayIndex = this.state.area1CurrentDisplayed;
                switch (displayIndex) {
                    case 0:
                        return this.state.area1Current;
                    case 1:
                        return this.state.area1Counter;
                    case 2:
                        return this.state.area1Lifetime;
                    default:
                        return this.state.area1Current;
                }
            }
        }, {
            key: 'pressureControlClass',
            get: function get() {
                var pressure1Color = this.state.systemPressure1Color;
                if (this.state) {
                    if (this.state.taskMode === 0) {
                        return 'operation-bdr-off';
                    }
                    switch (pressure1Color) {
                        case 0:
                            return 'operation-bdr-success';
                        case 1:
                            return 'operation-bdr-error';
                        case 2:
                            return 'operation-bdr-warn';
                        case 3:
                            return 'operation-bdr-disabled';
                        default:
                            return 'operation-bdr-off';
                    }
                }
                return 'operation-bdr-off';
            }
        }, {
            key: 'systemStatusClass',
            get: function get() {
                var color = this.state.systemStatusColor;
                if (this.state) {
                    if (color === 0) {
                        return 'operation-bdr-success';
                    } else if (color === 1) {
                        return 'operation-bdr-error';
                    } else if (color === 2) {
                        return 'operation-bdr-warn';
                    } else if (color === 3) {
                        return 'operation-bdr-disabled';
                    }
                }
                return 'operation-bdr-off';
            }
        }]);

        return GaugeDisplay;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'isCloud', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class2.prototype, 'rateControlClass', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'rateControlClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'pressureControlClass', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'pressureControlClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'systemStatusClass', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'systemStatusClass'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/gauge-display.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/dashboard/gauge\"></require>\r\n    <require from=\"resources/value-converters/mlToGal\"></require>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\r\n    <require from=\"resources/value-converters/bitToStatus\"></require>\r\n    <require from=\"views/dashboard/rate-control\"></require>\r\n\r\n    <div if.bind=\"!isCloud\" class=\"interactive-panel-left\">\r\n        <div class=\"row\">\r\n            <div class=\"col-sm-12\">\r\n                <gauge classes.bind=\"rateControlClass\" click.delegate=\"openRateControl()\">\r\n                    <span slot=\"label\">${\"GPA\" | t}</span>\r\n                    <span slot=\"reading\"> ${state.systemRate | mlPerHectareToGpa:'0.0' }</span>\r\n                </gauge>\r\n                <gauge  classes.bind=\"pressureControlClass\" click.delegate=\"openPressureControl()\">\r\n                    <span slot=\"label\">${\"PSI\" | t}</span>\r\n                    <span slot=\"reading\"> ${state.systemPressure1 | kpaToPsi }</span>\r\n                </gauge>\r\n                <gauge click.delegate=\"openTestSpeed()\">\r\n                    <span slot=\"label\">${\"MPH\" | t}</span>\r\n                    <span slot=\"reading\"> ${state.groundSpeed | mmPerSecondToMph }</span>\r\n                </gauge>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n    <div if.bind=\"!isCloud\" class=\"interactive-panel\">\r\n        <div class=\"row\">\r\n            <div class=\"col-sm-12\">\r\n                <gauge classes.bind=\"systemStatusClass\" click.delegate=\"openSystemStatus()\">\r\n                    <span slot=\"label\">${\"System Status\" | t}</span>\r\n                    <span slot=\"reading\">  ${state.systemStatusCurrent | bitToStatus } </span>\r\n                </gauge>\r\n                <gauge click.delegate=\"openAreaMeter()\">\r\n                    <span style=\"word-spacing: 100vw\" slot=\"label\">${\"Area Meter\" | t}</span>\r\n                    <span slot=\"reading\">${currentAreaDisplayed | hectaresToAcres:'0.0'}</span>\r\n                </gauge>\r\n                <gauge click.delegate=\"openTankMeter()\">\r\n                    <span style=\"word-spacing: 100vw\" slot=\"label\">${\"Tank Meter\" | t}</span>\r\n                    <span slot=\"reading\">${currentTankDisplayed | mlToGal:'0.0'}</span>\r\n                </gauge>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_xt6y5k8c = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\dashboard.js',
        hash = '92bba676bc260f1174d237ef98d6b2b13e13f39d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\dashboard.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/dashboard',['exports', 'aurelia-framework', '../../services/file-service', '../../services/gateway-service', '../../services/mapping-service', '../../services/spray-session-service', '../../services/log-event-service', 'px-owl-carousel'], function (exports, _aureliaFramework, _fileService, _gatewayService, _mappingService, _spraySessionService, _logEventService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Dashboard = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor;

    var Dashboard = exports.Dashboard = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _gatewayService.GatewayService, _mappingService.MappingService, _spraySessionService.SpraySessionService, _logEventService.LogEventService, _aureliaFramework.BindingEngine), _dec(_class = (_class2 = function () {
        function Dashboard(fileService, gatewayService, mappingService, spraySessionService, logEventService, bindingEngine) {
            _classCallCheck(this, Dashboard);

            _initDefineProp(this, 'state', _descriptor, this);

            this.editDelta = {};
            this.lastSystemError = {};
            this.showErrors = true;
            this.subscribeProperties = [];

            this.bindingEngine = bindingEngine;
            this.fileService = fileService;
            this.gatewayService = gatewayService;
            this.mappingService = mappingService;
            this.spraySessionService = spraySessionService;
            this.logEventService = logEventService;

            this.getGatewayServiceState();
            this.getLastError();
        }

        Dashboard.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);

            this.editDelta = {};
        };

        Dashboard.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribeProperties, 'dashboard');

            this.subscription = this.bindingEngine.propertyObserver(this.state, 'boomSwitchSource').subscribe(function (newValue, oldValue) {
                _this.boomSwitchSourceChanged(newValue, oldValue);
            });

            this.boomCarousel = $('#boom-carousel').owlCarousel({
                items: 1,
                mouseDrag: false,
                touchDrag: true
            });

            if (this.state.boomSwitchSource !== 2 && typeof this.state.boomSwitchSource !== 'undefined') {
                $('#boom-switch').hide();
                $($('.owl-dots').children()[0]).hide();
                this.boomCarousel.trigger('to.owl.carousel', [1]);
            }
        };

        Dashboard.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'dashboard');
        };

        Dashboard.prototype.detached = function detached() {
            this.subscription.dispose();
            $('#graph-tab').owlCarousel('destroy');
            $('#boom-carousel').owlCarousel('destroy');
        };

        Dashboard.prototype.boomSwitchSourceChanged = function boomSwitchSourceChanged(newValue, oldValue) {
            $('#boom-carousel').owlCarousel('destroy');
            $('#boom-carousel').owlCarousel({
                items: 1,
                mouseDrag: false,
                touchDrag: true
            });

            if (this.state.boomSwitchSource !== 2 && typeof this.state.boomSwitchSource !== 'undefined') {
                $('#boom-switch').hide();
                $($('.owl-dots').children()[0]).hide();
                this.boomCarousel.trigger('to.owl.carousel', [1]);
            }
        };

        Dashboard.prototype.getGatewayServiceState = function getGatewayServiceState() {
            this.state = this.gatewayService.getState();
        };

        Dashboard.prototype.getLastError = function getLastError() {
            this.logEventService.connect();
            this.lastSystemError = this.logEventService.getLastError();
        };

        Dashboard.prototype.toggleErrors = function toggleErrors() {
            this.map.toggleErrors();
        };

        Dashboard.prototype.boundaryDistanceChanged = function boundaryDistanceChanged(dist) {
            this.editDelta.boundaryDistance = dist;
            this.send();
        };

        Dashboard.prototype.overlapDistanceChanged = function overlapDistanceChanged(dist) {
            this.editDelta.overlapDistance = dist;
            this.send();
        };

        Dashboard.prototype.lookaheadChanged = function lookaheadChanged(val) {
            this.editDelta.lookAheadTime = val;
            this.send();
        };

        return Dashboard;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return {
                boomSwitchSource: 2
            };
        }
    })), _class2)) || _class);
});
define('text!views/dashboard/dashboard.html', ['module'], function(module) { module.exports = "<template view-cache=\"*\">\r\n    <require from=\"components/graphtab/nozzle-info\"></require>\r\n    <require from=\"components/graphtab/pressure-chart\"></require>\r\n    <require from=\"components/graphtab/duty-chart\"></require>\r\n    <require from=\"views/dashboard/soft-boom-switches\"></require>\r\n    <require from=\"views/dashboard/boom-nozzle-presets\"></require>\r\n    <require from=\"views/dashboard/boundary-map-recorder\"></require>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <require from=\"../map/map\"></require>\r\n    <require from=\"components/shared/toolbar\"></require>\r\n    <div class=\"collapse\" id=\"toolbar-container\">\r\n        <toolbar id=\"toolbar\"></toolbar>\r\n    </div>\r\n    <div class=\"dashboard-map-container\">\r\n        <div class=\"dashboard-map\">\r\n            <div>\r\n                <map view-model.ref=\"map\" state.bind=\"state\"></map>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div>\r\n        <div id=\"boom-carousel\" class=\"owl-carousel owl-centered dashboard-carousel\">\r\n            <div id=\"boom-switch\" as-element=\"soft-boom-switches\" class=\"container-fluid\" style=\"width: 100%;\" ref=\"boomSwitchEl\"></div>\r\n            <div id=\"presets\" as-element=\"boom-nozzle-presets\" class=\"container-fluid\" style=\"width: 100%;\"></div>\r\n            <div id=\"recorder\" as-element=\"boundary-map-recorder\" class=\"container-fluid\" style=\"width: 100%;\"></div>\r\n        </div>\r\n        <div class=\"row\">\r\n            <nozzle-info state.bind=\"state\"></nozzle-info>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_12xd1kxn50 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\cloud-dashboard.js',
        hash = '9aff6952efa488f91f898ec7ba30e5a478048352',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\cloud-dashboard.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/cloud-dashboard',['exports', 'aurelia-framework', '../../services/spray-session-service', '../../services/file-service', '../../services/mapping-service'], function (exports, _aureliaFramework, _spraySessionService, _fileService, _mappingService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.CloudDashboard = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var CloudDashboard = exports.CloudDashboard = (_dec = (0, _aureliaFramework.inject)(_spraySessionService.SpraySessionService, _fileService.FileService, _mappingService.MappingService), _dec(_class = function () {
        function CloudDashboard(spraySessionService, fileService, mappingService) {
            _classCallCheck(this, CloudDashboard);

            this.selectedSpraySession = null;

            this.fileService = fileService;
            this.spraySessionService = spraySessionService;
            this.mappingService = mappingService;
            this.getSpraySessions();
            this.getBoundaryMaps();
        }

        CloudDashboard.prototype.activate = function activate(params) {
            this.machineCode = params.machineId;
        };

        CloudDashboard.prototype.getBoundaryMaps = function getBoundaryMaps() {
            var _this = this;

            this.fileService.getBoundaryMaps().then(function (response) {
                return _this.boundaryMaps = response;
            });
        };

        CloudDashboard.prototype.boundaryMapChanged = function boundaryMapChanged(changedValue) {
            var _this2 = this;

            this.fileService.getAppliedAsMaps(changedValue).then(function (response) {
                return _this2.appliedAsMaps = response;
            });
            this.mappingService.sendBoundaryMap(this.selectedBoundaryMap);
        };

        CloudDashboard.prototype.getSpraySessions = function getSpraySessions() {
            var _this3 = this;

            this.spraySessionService.getSpraySessions().then(function (response) {
                return _this3.spraySessions = response;
            });
        };

        CloudDashboard.prototype.spraySessionChanged = function spraySessionChanged(spraySession) {
            var _this4 = this;

            if (spraySession) {
                this.spraySessionService.sendSpraySession(spraySession.spraySessionId).then(function () {
                    return _this4.map.loadSpraySession(spraySession);
                });
            }
        };

        return CloudDashboard;
    }()) || _class);
});
define('text!views/dashboard/cloud-dashboard.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"../map/map\"></require>\r\n    <div class=\"row\">\r\n        <div class=\"col-sm-12\">\r\n            <div class=\"pull-left dashboard-dropdown\">\r\n                <label for=\"spray_session\">${\"SpraySession\" | t}</label>\r\n                <select value.bind=\"selectedSpraySession\" change.delegate=\"spraySessionChanged(selectedSpraySession)\" class=\"form-control\" id=\"spray_session\">\r\n                    <option model.bind=\"null\">${\"Choose\" | t}...</option>\r\n                    <option repeat.for=\"session of spraySessions\" model.bind=\"session\">\r\n                        ${session.spraySessionId}\r\n                    </option>\r\n                </select>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div>\r\n        <div class=\"row dashboard-map-cloud\">\r\n            <div class=\"col-sm-12\">\r\n                <map view-model.ref=\"map\" state.bind=\"state\" session.bind=\"selectedSpraySession\" ></map>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_2547d7kont = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\boundary-map-recorder.js',
        hash = '6ea66079aac2eac3f73e4abe5e97a89f8ae6f6c7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\boundary-map-recorder.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/boundary-map-recorder',['exports', 'aurelia-framework', 'moment', '../../services/boundary-map-service', '../../services/gateway-service', './recorder-settings', './save-recording', 'aurelia-dialog'], function (exports, _aureliaFramework, _moment, _boundaryMapService, _gatewayService, _recorderSettings, _saveRecording, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapRecorder = undefined;

    var _moment2 = _interopRequireDefault(_moment);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _class, _desc, _value, _class2;

    var BoundaryMapRecorder = exports.BoundaryMapRecorder = (_dec = (0, _aureliaFramework.inject)(_boundaryMapService.BoundaryMapService, _gatewayService.GatewayService, _aureliaDialog.DialogService), _dec2 = (0, _aureliaFramework.computedFrom)('status'), _dec(_class = (_class2 = function () {
        function BoundaryMapRecorder(boundaryMapService, gatewayService, dialogService) {
            _classCallCheck(this, BoundaryMapRecorder);

            this.status = 'OFF';
            this.side = 1;
            this.settingProps = ['LeftSetpoint', 'RightSetpoint'];

            this.boundaryMapService = boundaryMapService;
            this.gatewayService = gatewayService;
            this.dialogService = dialogService;
        }

        BoundaryMapRecorder.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.getProperties(this.settingProps).then(function (results) {
                _this.settings = { leftSetpoint: results[0], rightSetpoint: results[1] };
            });

            this.boundaryMapService.connect(null, this.addPoint.bind(this), this.prunePoint.bind(this), this.clearBoundary.bind(this)).then(function (status) {
                _this.status = status.status;
                _this.side = status.side;
                _this.recordInternal = status.internal;
                _this.saveEnabled = status.saveEnabled;
                _this.leftSetpoint = state.leftSetpoint;
                _this.rightSetpoint = state.rightSetpoint;
                _this.points = status.boundaryPoints.length;
                status.internals.forEach(function (i) {
                    _this.points += i.length;
                });
                _this.points += status.internalPoints.length;
            });
        };

        BoundaryMapRecorder.prototype.openSettings = function openSettings() {
            var _this2 = this;

            this.dialogService.open({ viewModel: _recorderSettings.RecorderSettings, model: { leftSetpoint: this.settings.leftSetpoint, rightSetpoint: this.settings.rightSetpoint }, lock: false }).whenClosed(function (response) {
                if (!response.wasCancelled) {
                    _this2.settings = response.output;
                    _this2.gatewayService.send(response.output);
                }
            });
        };

        BoundaryMapRecorder.prototype.unbind = function unbind() {};

        BoundaryMapRecorder.prototype.addPoint = function addPoint(point, internal) {
            this.points += 1;
        };

        BoundaryMapRecorder.prototype.prunePoint = function prunePoint(point, internal) {
            this.points -= 1;
        };

        BoundaryMapRecorder.prototype.clearBoundary = function clearBoundary() {
            this.points = 0;
        };

        BoundaryMapRecorder.prototype.record = function record() {
            this.boundaryMapService.recordBoundary();
            this.status = 'ON';
            this.saveEnabled = true;
        };

        BoundaryMapRecorder.prototype.pause = function pause() {
            this.boundaryMapService.pauseBoundary();
            this.status = 'PAUSED';
        };

        BoundaryMapRecorder.prototype.save = function save() {
            var _this3 = this;

            this.dialogService.open({ viewModel: _saveRecording.SaveRecording, model: (0, _moment2.default)().format('MMMM Do YYYY, h:mm:ss a'), lock: false }).whenClosed(function (response) {
                if (!response.wasCancelled) {
                    _this3.boundaryMapService.saveBoundary(response.output);
                    _this3.status = 'OFF';
                }
            });
        };

        BoundaryMapRecorder.prototype.discard = function discard() {
            this.boundaryMapService.discardBoundary();
            this.status = 'OFF';
            this.clearBoundary();
            this.saveEnabled = false;
        };

        BoundaryMapRecorder.prototype.internal = function internal() {
            this.recordInternal = !this.recordInternal;
            this.boundaryMapService.setRecordInternal(this.recordInternal);
        };

        BoundaryMapRecorder.prototype.setSide = function setSide(side) {
            this.side = side;
            this.boundaryMapService.setBoundaryRecorderSide(side);
        };

        _createClass(BoundaryMapRecorder, [{
            key: 'statusCss',
            get: function get() {
                if (this.status === 'ON') {
                    return 'text-success';
                }
                if (this.status === 'PAUSED') {
                    return 'text-warning';
                }
                return 'text-danger';
            }
        }]);

        return BoundaryMapRecorder;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'statusCss', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'statusCss'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/boundary-map-recorder.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"container-fluid\" style=\"max-width: 1000px\">\r\n        <table align=\"center\">\r\n            <tr class=\"text-primary\">\r\n                <td width=\"100px;\" style=\"padding: 10px;\">\r\n                    <img height=\"80em\" src=\"../assets/left${side == 0 ? '' : '_blank'}.png\" alt=\"${'Left Bound' | t}\" click.delegate=\"setSide(0)\" />\r\n                </td>\r\n\r\n                <td style=\"padding: 10px; min-width: 125px;\">\r\n                    <span class=\"operations-btn-dark ${statusCss}\" style=\"padding: 5px;\">${status | t}</span>\r\n                </td>\r\n\r\n                <td style=\"padding: 10px;\">\r\n                    <input type=\"button\" class=\"btn btn-default ${recordInternal ? 'border border-success' : ''} btn-lg\" value=\"${'Internal' | t}\" click.delegate=\"internal()\" />\r\n                </td>\r\n\r\n                <td style=\"padding: 10px;\">\r\n                    <input type=\"button\" if.bind=\"status !== 'ON'\" class=\"btn btn-danger btn-lg\" value=\"${'Record' | t}\" click.delegate=\"record()\" />\r\n                    <input type=\"button\" if.bind=\"status === 'ON'\" class=\"btn btn-warning btn-lg\" value=\"${'Pause' | t}\" click.delegate=\"pause()\" />\r\n                </td>\r\n\r\n                <td style=\"padding: 10px;\">\r\n                    <input type=\"button\" disabled.bind=\"!saveEnabled\" class=\"btn btn-default btn-lg\" value=\"${'Save' | t}\" click.delegate=\"save()\" />\r\n                </td>\r\n\r\n                <td style=\"padding: 10px;\">\r\n                    <input type=\"button\" disabled.bind=\"!saveEnabled\" class=\"btn btn-default btn-lg\" value=\"${'Discard' | t}\" click.delegate=\"discard()\" />\r\n                </td>\r\n\r\n                <td style=\"padding: 10px;\">\r\n                    <span class=\"btn btn-lg ion-android-more-vertical\" click.delegate=\"openSettings()\"></span>\r\n                </td>\r\n\r\n                <td width=\"100px;\" style=\"padding: 10px;\">\r\n                    <img height=\"80em\" src=\"../assets/right${side == 1 ? '' : '_blank'}.png\" alt=\"${'Right Bound' | t}\" click.delegate=\"setSide(1)\" />\r\n                </td>\r\n\r\n            </tr>\r\n        </table>\r\n    </div>\r\n    \r\n</template>\r\n"; });
var cov_18mmd3rm5a = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\boom-nozzle-presets.js',
        hash = '00e4121fb99f1cd10351ac14a6e5a0d517f2adf9',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\boom-nozzle-presets.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/boom-nozzle-presets',['exports', 'aurelia-framework', '../../services/gateway-service', 'aurelia-i18n'], function (exports, _aureliaFramework, _gatewayService, _aureliaI18n) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomNozzlePresets = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _class, _desc, _value, _class2;

    var BoomNozzlePresets = exports.BoomNozzlePresets = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaI18n.I18N), _dec2 = (0, _aureliaFramework.computedFrom)('state.preset1NozzleSizeIndex'), _dec(_class = (_class2 = function () {
        function BoomNozzlePresets(gatewayService, i18N) {
            _classCallCheck(this, BoomNozzlePresets);

            this.subscribeProperties = ['Preset1NozzleSizeIndex', 'Preset1NumIndex', 'BoomPreset1Number1Name', 'BoomPreset1Number2Name', 'BoomPreset1Number3Name', 'BoomPreset1Number4Name', 'BoomPreset1Number5Name'];
            this.editDelta = {};
            this.nozzleSizeLookup = [{
                label: 'Custom',
                index: 0,
                classes: 'btn-silver'
            }, {
                label: '3.0',
                index: 1,
                classes: 'btn-blue'
            }, {
                label: '4.0',
                index: 2,
                classes: 'btn-red'
            }, {
                label: '5.0',
                index: 3,
                classes: 'btn-brown'
            }, {
                label: '6.0',
                index: 4,
                classes: 'btn-gray'
            }, {
                label: '8.0',
                index: 5,
                classes: 'btn-white'
            }, {
                label: '10.0',
                index: 6,
                classes: 'btn-silver'
            }, {
                label: '12.5',
                index: 7,
                classes: 'btn-silver'
            }, {
                label: '15.0',
                index: 8,
                classes: 'btn-silver'
            }];

            this.gatewayService = gatewayService;
            this.i18N = i18N;
            this.state = this.gatewayService.getState();
        }

        BoomNozzlePresets.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribeProperties, 'boom-nozzle-presets');
        };

        BoomNozzlePresets.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'boom-nozzle-presets');
        };

        BoomNozzlePresets.prototype.setBoomPreset = function setBoomPreset(index) {
            this.editDelta.preset1NumIndex = index;
            this.gatewayService.send(this.editDelta);
        };

        BoomNozzlePresets.prototype.setBoomPreset = function setBoomPreset(index) {
            this.editDelta.preset1NumIndex = index;
            this.gatewayService.send(this.editDelta);
        };

        BoomNozzlePresets.prototype.nextNozzleSize = function nextNozzleSize() {
            var _this = this;

            var current = this.nozzleSizeLookup.find(function (element) {
                return element.index === _this.state.preset1NozzleSizeIndex;
            });
            var next = current.index + 1;
            if (next === this.nozzleSizeLookup.length) {
                next = 0;
            }
            var found = this.nozzleSizeLookup.find(function (element) {
                return element.index === next;
            });
            this.editDelta.preset1NozzleSizeIndex = found.index;
            this.gatewayService.send(this.editDelta);
        };

        _createClass(BoomNozzlePresets, [{
            key: 'selectedNozzleSize',
            get: function get() {
                var _this2 = this;

                if (typeof this.state.preset1NozzleSizeIndex !== 'undefined') {
                    var found = this.nozzleSizeLookup.find(function (element) {
                        return _this2.state.preset1NozzleSizeIndex === element.index;
                    });
                    return found.label ? found.label : 'NONE';
                }
                return 'NONE';
            }
        }, {
            key: 'selectedNozzleColor',
            get: function get() {
                var _this3 = this;

                if (typeof this.state.preset1NozzleSizeIndex !== 'undefined') {
                    var found = this.nozzleSizeLookup.find(function (element) {
                        return _this3.state.preset1NozzleSizeIndex === element.index;
                    });
                    return found.classes ? found.classes : '';
                }
                return '';
            }
        }]);

        return BoomNozzlePresets;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'selectedNozzleSize', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'selectedNozzleSize'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/boom-nozzle-presets.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"btn-toolbar boom-btn-toolbar\" role=\"group\" style=\"width: 100%; padding-top: 10px;\">\r\n        <label class=\"bg-dark label label-xl\" i18n=\"dashboard.boomNozzle.nozzleSize\" for=\"nozzle-btn\"></label>\r\n        <button id=\"nozzle-btn\" class.bind=\"selectedNozzleColor\" class=\"btn-lg\" click.delegate=\"nextNozzleSize()\">\r\n            ${selectedNozzleSize}\r\n        </button>\r\n        <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 0 ? 'btn-primary' : 'btn-secondary'\"\r\n                click.delegate=\"setBoomPreset(0)\">\r\n            ${state.boomPreset1Number1Name}\r\n        </button>\r\n        <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 1 ? 'btn-primary' : 'btn-secondary'\"\r\n                click.delegate=\"setBoomPreset(1)\">\r\n            ${state.boomPreset1Number2Name}\r\n        </button>\r\n        <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 2 ? 'btn-primary' : 'btn-secondary'\"\r\n                click.delegate=\"setBoomPreset(2)\">\r\n            ${state.boomPreset1Number3Name}\r\n        </button>\r\n        <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 3 ? 'btn-primary' : 'btn-secondary'\"\r\n                click.delegate=\"setBoomPreset(3)\">\r\n            ${state.boomPreset1Number4Name}\r\n        </button>\r\n        <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 4 ? 'btn-primary' : 'btn-secondary'\"\r\n                click.delegate=\"setBoomPreset(4)\">\r\n            ${state.boomPreset1Number5Name}\r\n        </button>\r\n    </div>\r\n</template>\r\n"; });
var cov_2qfga75b60 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\area-meter.js',
        hash = 'c7cfb10717b387e32c568478d3500d888d385e88',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\views\\dashboard\\area-meter.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/area-meter',['exports', '../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AreaMeter = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var AreaMeter = exports.AreaMeter = function (_ref) {
        _inherits(AreaMeter, _ref);

        function AreaMeter() {
            _classCallCheck(this, AreaMeter);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.activeClasses = 'ion-checkmark-circled btn-primary';
            _this.inactiveClasses = 'btn-default';

            _this.subscribe(['Area1Current', 'Area1Bounded', 'Area1Sprayable', 'Area1Unsprayed', 'Area1Counter', 'Area1Lifetime', 'Area1Counter', 'Area1CurrentDisplayed']);
            return _this;
        }

        AreaMeter.prototype.resetCounter = function resetCounter() {
            this.editDelta.area1Counter = 0;
            this.send();
        };

        AreaMeter.prototype.resetCurrent = function resetCurrent() {
            this.editDelta.area1Current = 0;
            this.send();
        };

        AreaMeter.prototype.activeClass = function activeClass(isActive) {
            return isActive ? this.activeClasses : this.inactiveClasses;
        };

        _createClass(AreaMeter, [{
            key: 'currentClasses',
            get: function get() {
                return this.activeClass(this.state.area1CurrentDisplayed === 0);
            }
        }, {
            key: 'counterClasses',
            get: function get() {
                return this.activeClass(this.state.area1CurrentDisplayed === 1);
            }
        }, {
            key: 'lifeTimeClasses',
            get: function get() {
                return this.activeClass(this.state.area1CurrentDisplayed === 2);
            }
        }]);

        return AreaMeter;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/dashboard/area-meter.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"views/dashboard/operation-panel-item\"></require>\r\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\r\n    <require from=\"resources/value-converters/sqMmToAcres\"></require>\r\n    <require from=\"resources/attributes/focus-bind-break\"></require>\r\n    <div class=\"operation-popover container-fluid\">\r\n\r\n        <div style=\"padding: 2rem\" class=\"container-fluid area-meter\">\r\n            <div class=\"text-center\" style=\"font-size: large\">Area Meter(Acres)</div>\r\n\r\n            <div class=\"row equal\">\r\n                <button class=\" col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"currentClasses \" \r\n                        i18n=\"dashboard.areaMeter.current\" click.delegate=\"sendChange(0, 'area1CurrentDisplayed')\"></button>\r\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.two-way=\"state.area1Current | hectaresToAcres:'0.0'\"\r\n                       change.delegate=\"sendChange(state.area1Current, 'area1Current')\"/>\r\n                <div class=\"col-xs-3 m-t-3\">\r\n                    <button click.delegate=\"resetCurrent()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.areaMeter.reset\">Reset</button>\r\n                </div>\r\n            </div>\r\n\r\n            <div class=\"row equal\">\r\n                <button class=\"col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"counterClasses\" \r\n                        i18n=\"dashboard.areaMeter.counter\" click.delegate=\"sendChange(1, 'area1CurrentDisplayed')\"></button>\r\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.area1Counter | hectaresToAcres:'0.0'\"\r\n                       change.delegate=\"sendChange(state.area1Counter, 'area1Counter')\"/>\r\n                <div class=\"col-xs-3 m-t-3\">\r\n                    <button click.delegate=\"resetCounter()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.areaMeter.reset\">Reset</button>\r\n                </div>\r\n            </div>\r\n            \r\n            <div class=\"row equal\">\r\n                <button class=\"col-xs-5 m-t-3 btn btn-lg btn-outline \" class.bind=\"lifeTimeClasses\" \r\n                        i18n=\"dashboard.areaMeter.lifetime\" click.delegate=\"sendChange(2, 'area1CurrentDisplayed')\"></button>\r\n                <input readonly type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" value.bind=\"state.area1Lifetime | hectaresToAcres:'0.0'\"\r\n                       change.delegate=\"sendChange(state.area1Lifetime, 'area1Lifetime')\"/>\r\n            </div>\r\n\r\n        </div>\r\n        <div style=\"padding: 2rem\" class=\"container-fluid\">\r\n            <operation-panel-item val.bind=\"state.area1Bounded | sqMmToAcres\" label=\"dashboard.areaMeter.area1Bounded\">\r\n            </operation-panel-item>\r\n\r\n            <operation-panel-item val.bind=\"state.area1Sprayable | sqMmToAcres\" label=\"dashboard.areaMeter.area1Sprayable\">\r\n            </operation-panel-item>\r\n\r\n            <operation-panel-item val.bind=\"state.area1Unsprayed | sqMmToAcres\" label=\"dashboard.areaMeter.area1Unsprayed\">\r\n            </operation-panel-item>\r\n\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_2govscgxgv = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\updates-service.js',
        hash = 'c443a8546faf355cecf32f1912556b9ebd0dfbcc',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\updates-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/updates-service',['exports', 'aurelia-framework', '../clients/updates-client'], function (exports, _aureliaFramework, _updatesClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.UpdatesService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var UpdatesService = exports.UpdatesService = (_dec = (0, _aureliaFramework.inject)(_updatesClient.UpdatesClient), _dec(_class = function () {
        function UpdatesService(client) {
            _classCallCheck(this, UpdatesService);

            this.client = client;
        }

        UpdatesService.prototype.connect = function connect(callback) {
            this.client.connect(callback);
        };

        UpdatesService.prototype.subscribe = function subscribe(callback) {
            this.client.subscribe(callback);
        };

        UpdatesService.prototype.getCurrentVersion = function getCurrentVersion() {
            return this.client.getCurrentVersion();
        };

        UpdatesService.prototype.isUpdateAvailable = function isUpdateAvailable() {
            return this.client.isUpdateAvailable();
        };

        UpdatesService.prototype.getAllPackages = function getAllPackages() {
            return this.client.getAllPackages();
        };

        UpdatesService.prototype.getDownloadSize = function getDownloadSize(version) {
            return this.client.getDownloadSize(version);
        };

        UpdatesService.prototype.downloadUpdate = function downloadUpdate(version) {
            this.client.downloadUpdate(version);
        };

        UpdatesService.prototype.installUpdate = function installUpdate(update, current) {
            this.client.installUpdate(update, current);
        };

        UpdatesService.prototype.checkIfDownloaded = function checkIfDownloaded(version) {
            return this.client.checkIfDownloaded(version);
        };

        return UpdatesService;
    }()) || _class);
});
var cov_29n03xgk19 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\test-service.js',
        hash = '3fbd8a5a17168ce3d75d41b0795a33f52ddc0ed0',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\test-service.js',
        statementMap: {
            '0': {
                start: {
                    line: 15,
                    column: 8
                },
                end: {
                    line: 15,
                    column: 25
                }
            },
            '1': {
                start: {
                    line: 23,
                    column: 17
                },
                end: {
                    line: 23,
                    column: 38
                }
            },
            '2': {
                start: {
                    line: 30,
                    column: 8
                },
                end: {
                    line: 30,
                    column: 43
                }
            },
            '3': {
                start: {
                    line: 39,
                    column: 8
                },
                end: {
                    line: 39,
                    column: 51
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 14,
                        column: 4
                    },
                    end: {
                        line: 14,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 14,
                        column: 22
                    },
                    end: {
                        line: 16,
                        column: 5
                    }
                },
                line: 14
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 23,
                        column: 12
                    },
                    end: {
                        line: 23,
                        column: 13
                    }
                },
                loc: {
                    start: {
                        line: 23,
                        column: 17
                    },
                    end: {
                        line: 23,
                        column: 38
                    }
                },
                line: 23
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 29,
                        column: 4
                    },
                    end: {
                        line: 29,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 29,
                        column: 16
                    },
                    end: {
                        line: 31,
                        column: 5
                    }
                },
                line: 29
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 38,
                        column: 4
                    },
                    end: {
                        line: 38,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 38,
                        column: 18
                    },
                    end: {
                        line: 40,
                        column: 5
                    }
                },
                line: 38
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 23,
                        column: 29
                    },
                    end: {
                        line: 23,
                        column: 36
                    }
                },
                type: 'binary-expr',
                locations: [{
                    start: {
                        line: 23,
                        column: 29
                    },
                    end: {
                        line: 23,
                        column: 30
                    }
                }, {
                    start: {
                        line: 23,
                        column: 34
                    },
                    end: {
                        line: 23,
                        column: 36
                    }
                }],
                line: 23
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0
        },
        b: {
            '0': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/test-service',['exports', 'aurelia-framework', '../resources/clients/json-client'], function (exports, _aureliaFramework, _jsonClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.TestService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var TestService = exports.TestService = (_dec = (0, _aureliaFramework.inject)(_jsonClient.JsonClient), _dec(_class = function () {
        function TestService(json) {
            _classCallCheck(this, TestService);

            this.route = function (r) {
                cov_29n03xgk19.f[1]++;
                cov_29n03xgk19.s[1]++;
                return '/api/test' + ((cov_29n03xgk19.b[0][0]++, r) || (cov_29n03xgk19.b[0][1]++, ''));
            };

            cov_29n03xgk19.f[0]++;
            cov_29n03xgk19.s[0]++;

            this.json = json;
        }

        TestService.prototype.getValues = function getValues() {
            cov_29n03xgk19.f[2]++;
            cov_29n03xgk19.s[2]++;

            return this.json.get(this.route());
        };

        TestService.prototype.getNoAuth = function getNoAuth(id) {
            cov_29n03xgk19.f[3]++;
            cov_29n03xgk19.s[3]++;

            return this.json.get(this.route('/' + id));
        };

        return TestService;
    }()) || _class);
});
var cov_2q7ep3zssb = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\spray-session-service.js',
        hash = '094bf57d758155f0222cfa93218ba2ffc89294f2',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\spray-session-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/spray-session-service',['exports', 'aurelia-framework', '../clients/spray-session-client'], function (exports, _aureliaFramework, _spraySessionClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SpraySessionService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SpraySessionService = exports.SpraySessionService = (_dec = (0, _aureliaFramework.inject)(_spraySessionClient.SpraySessionClient), _dec(_class = function () {
        function SpraySessionService(client) {
            _classCallCheck(this, SpraySessionService);

            this.client = client;
        }

        SpraySessionService.prototype.getCurrentSpraySession = function getCurrentSpraySession() {
            return this.client.getCurrentSpraySession();
        };

        SpraySessionService.prototype.getSpraySessions = function getSpraySessions() {
            return this.client.getAllSpraySessions();
        };

        SpraySessionService.prototype.sendSpraySession = function sendSpraySession(spraySessionId) {
            return this.client.setSpraySession(spraySessionId);
        };

        SpraySessionService.prototype.setBoundaryMapCallback = function setBoundaryMapCallback(callback) {
            this.boundaryMapCallback = callback;
        };

        SpraySessionService.prototype.renderBoundayMap = function renderBoundayMap(boundaryMap) {
            if (this.boundaryMapCallback) {
                this.boundaryMapCallback(boundaryMap);
            }
        };

        SpraySessionService.prototype.sendBoundaryMaps = function sendBoundaryMaps(paths) {
            this.client.sendBoundaryMaps(paths);
        };

        SpraySessionService.prototype.getCurrentSpraySession = function getCurrentSpraySession() {
            return this.client.getCurrentSpraySession();
        };

        SpraySessionService.prototype.setPrescriptionMap = function setPrescriptionMap(path) {
            if (path === '') {
                path = null;
            }
            this.client.setPrescriptionMap(path);
        };

        SpraySessionService.prototype.useSeparableOverlapDistances = function useSeparableOverlapDistances() {
            return this.client.useSeparableOverlapDistances();
        };

        return SpraySessionService;
    }()) || _class);
});
var cov_2fyn7mn9aw = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\prescription-map-service.js',
        hash = '01871def8e8f4d6ae841e9c222a75eea4f08785d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\prescription-map-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/prescription-map-service',['exports', 'aurelia-framework', '../clients/prescription-map-client'], function (exports, _aureliaFramework, _prescriptionMapClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PrescriptionMapService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var PrescriptionMapService = exports.PrescriptionMapService = (_dec = (0, _aureliaFramework.inject)(_prescriptionMapClient.PrescriptionMapClient), _dec(_class = function () {
        function PrescriptionMapService(client) {
            _classCallCheck(this, PrescriptionMapService);

            this.client = client;
        }

        PrescriptionMapService.prototype.connect = function connect(callback) {
            return this.client.connect(callback);
        };

        PrescriptionMapService.prototype.getCurrentPrescriptionMap = function getCurrentPrescriptionMap() {
            return this.client.getCurrentPrescriptionMap();
        };

        return PrescriptionMapService;
    }()) || _class);
});
var cov_2ecz0j6q1b = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\mapping-service.js',
        hash = 'e4fb3eb42733bc7612d29aa0a15d3a49566a0887',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\mapping-service.js',
        statementMap: {
            '0': {
                start: {
                    line: 14,
                    column: 8
                },
                end: {
                    line: 14,
                    column: 29
                }
            },
            '1': {
                start: {
                    line: 126,
                    column: 8
                },
                end: {
                    line: 126,
                    column: 43
                }
            },
            '2': {
                start: {
                    line: 145,
                    column: 8
                },
                end: {
                    line: 145,
                    column: 50
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 13,
                        column: 4
                    },
                    end: {
                        line: 13,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 13,
                        column: 24
                    },
                    end: {
                        line: 15,
                        column: 5
                    }
                },
                line: 13
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 125,
                        column: 4
                    },
                    end: {
                        line: 125,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 125,
                        column: 20
                    },
                    end: {
                        line: 127,
                        column: 5
                    }
                },
                line: 125
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 144,
                        column: 4
                    },
                    end: {
                        line: 144,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 144,
                        column: 27
                    },
                    end: {
                        line: 146,
                        column: 5
                    }
                },
                line: 144
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/mapping-service',['exports', 'aurelia-framework', '../clients/mapping-client'], function (exports, _aureliaFramework, _mappingClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MappingService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var MappingService = exports.MappingService = (_dec = (0, _aureliaFramework.inject)(_mappingClient.MappingClient), _dec(_class = function () {
        function MappingService(client) {
            _classCallCheck(this, MappingService);

            cov_2ecz0j6q1b.f[0]++;
            cov_2ecz0j6q1b.s[0]++;

            this.client = client;
        }

        MappingService.prototype.connect = function connect(callback, clearCallback) {
            return this.client.connect(callback, clearCallback).then(function (data) {
                return data;
            });
        };

        MappingService.prototype.getRegionCoverageBytes = function getRegionCoverageBytes(blX, blY, trX, trY, resolution) {
            return this.client.getRegionCoverageBytes(blX, blY, trX, trY, resolution);
        };

        MappingService.prototype.getSystemErrors = function getSystemErrors(blX, blY, trX, trY, resolution) {
            return this.client.getSystemErrors(blX, blY, trX, trY, resolution);
        };

        MappingService.prototype.setBoundaryMapCallback = function setBoundaryMapCallback(callback) {
            this.boundaryMapCallback = callback;
        };

        MappingService.prototype.setPrescriptionMapCallback = function setPrescriptionMapCallback(callback) {
            this.prescriptionMapCallback = callback;
        };

        MappingService.prototype.renderBoundayMap = function renderBoundayMap(boundaryMap) {
            if (this.boundaryMapCallback) {
                this.boundaryMapCallback(boundaryMap);
            }
        };

        MappingService.prototype.renderPrescriptionMap = function renderPrescriptionMap(prescriptionMap) {
            if (this.prescriptionMapCallback) {
                this.prescriptionMapCallback(prescriptionMap);
            }
        };

        MappingService.prototype.setPrescriptionUnits = function setPrescriptionUnits(units) {
            this.client.setPrescriptionUnits(units);
        };

        MappingService.prototype.getCoverageBoundingBoxForSpraySessionId = function getCoverageBoundingBoxForSpraySessionId(spraySessionId) {
            return this.client.getCoverageBoundingBoxForSpraySessionId(spraySessionId);
        };

        MappingService.prototype.getTweenDelay = function getTweenDelay() {
            cov_2ecz0j6q1b.f[1]++;
            cov_2ecz0j6q1b.s[1]++;

            return this.client.getTweenDelay();
        };

        MappingService.prototype.getClosestError = function getClosestError(x, y) {
            return this.client.getClosestError(x, y);
        };

        MappingService.prototype.getMinimumResolution = function getMinimumResolution() {
            cov_2ecz0j6q1b.f[2]++;
            cov_2ecz0j6q1b.s[2]++;

            return this.client.getMinimumResolution();
        };

        MappingService.prototype.ignoreBoundary = function ignoreBoundary(ignore) {
            this.client.ignoreBoundary(ignore);
        };

        return MappingService;
    }()) || _class);
});
var cov_1tnxhus1kk = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\log-event-service.js',
        hash = '59952a115d893a8305452e5842dc50a9689ec40f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\log-event-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/log-event-service',['exports', 'aurelia-framework', '../clients/log-event-client'], function (exports, _aureliaFramework, _logEventClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LogEventService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var LogEventService = exports.LogEventService = (_dec = (0, _aureliaFramework.inject)(_logEventClient.LogEventClient), _dec(_class = function () {
        function LogEventService(logEventClient) {
            _classCallCheck(this, LogEventService);

            this.gatewaySystemError = [];
            this.nozzleErrors = [];
            this.lastError = {};

            this.logEventClient = logEventClient;
        }

        LogEventService.prototype.addSystemError = function addSystemError(systemError) {
            this.gatewaySystemError.push(systemError);
            $.extend(this.lastError, systemError);
        };

        LogEventService.prototype.addNozzleError = function addNozzleError(nozzleError) {
            this.nozzleErrors.push(nozzleError);
        };

        LogEventService.prototype.getLastError = function getLastError() {
            return this.lastError;
        };

        LogEventService.prototype.connect = function connect(callback) {
            var _this = this;

            return this.logEventClient.connect(function (errorState) {
                for (var prop in errorState.gateWaySystemErrors) {
                    if (errorState.gateWaySystemErrors.hasOwnProperty(prop)) {
                        _this.addSystemError(errorState.gateWaySystemErrors[prop]);
                    }
                }
            }, callback, function (nozzleError) {
                _this.addNozzleError(nozzleError);
            });
        };

        return LogEventService;
    }()) || _class);
});
var cov_2qg9a80pqz = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\gateway-service.js',
        hash = 'b467a93fa3c970bf9b81dbe0b65f39b46d177c43',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\gateway-service.js',
        statementMap: {
            '0': {
                start: {
                    line: 17,
                    column: 8
                },
                end: {
                    line: 17,
                    column: 29
                }
            },
            '1': {
                start: {
                    line: 18,
                    column: 8
                },
                end: {
                    line: 18,
                    column: 61
                }
            },
            '2': {
                start: {
                    line: 18,
                    column: 37
                },
                end: {
                    line: 18,
                    column: 59
                }
            },
            '3': {
                start: {
                    line: 26,
                    column: 8
                },
                end: {
                    line: 26,
                    column: 26
                }
            },
            '4': {
                start: {
                    line: 46,
                    column: 24
                },
                end: {
                    line: 46,
                    column: 109
                }
            },
            '5': {
                start: {
                    line: 47,
                    column: 8
                },
                end: {
                    line: 47,
                    column: 35
                }
            },
            '6': {
                start: {
                    line: 48,
                    column: 8
                },
                end: {
                    line: 48,
                    column: 36
                }
            },
            '7': {
                start: {
                    line: 58,
                    column: 8
                },
                end: {
                    line: 58,
                    column: 36
                }
            },
            '8': {
                start: {
                    line: 68,
                    column: 8
                },
                end: {
                    line: 68,
                    column: 53
                }
            },
            '9': {
                start: {
                    line: 78,
                    column: 8
                },
                end: {
                    line: 78,
                    column: 55
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 16,
                        column: 4
                    },
                    end: {
                        line: 16,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 16,
                        column: 24
                    },
                    end: {
                        line: 19,
                        column: 5
                    }
                },
                line: 16
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 18,
                        column: 28
                    },
                    end: {
                        line: 18,
                        column: 29
                    }
                },
                loc: {
                    start: {
                        line: 18,
                        column: 37
                    },
                    end: {
                        line: 18,
                        column: 59
                    }
                },
                line: 18
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 25,
                        column: 4
                    },
                    end: {
                        line: 25,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 25,
                        column: 15
                    },
                    end: {
                        line: 27,
                        column: 5
                    }
                },
                line: 25
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 44,
                        column: 4
                    },
                    end: {
                        line: 44,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 44,
                        column: 20
                    },
                    end: {
                        line: 49,
                        column: 5
                    }
                },
                line: 44
            },
            '4': {
                name: '(anonymous_4)',
                decl: {
                    start: {
                        line: 56,
                        column: 4
                    },
                    end: {
                        line: 56,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 56,
                        column: 22
                    },
                    end: {
                        line: 59,
                        column: 5
                    }
                },
                line: 56
            },
            '5': {
                name: '(anonymous_5)',
                decl: {
                    start: {
                        line: 67,
                        column: 4
                    },
                    end: {
                        line: 67,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 67,
                        column: 37
                    },
                    end: {
                        line: 69,
                        column: 5
                    }
                },
                line: 67
            },
            '6': {
                name: '(anonymous_6)',
                decl: {
                    start: {
                        line: 77,
                        column: 4
                    },
                    end: {
                        line: 77,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 77,
                        column: 39
                    },
                    end: {
                        line: 79,
                        column: 5
                    }
                },
                line: 77
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0,
            '7': 0,
            '8': 0,
            '9': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/gateway-service',['exports', 'aurelia-framework', '../clients/gateway-client', 'ramda'], function (exports, _aureliaFramework, _gatewayClient, _ramda) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GatewayService = undefined;

    var R = _interopRequireWildcard(_ramda);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var GatewayService = exports.GatewayService = (_dec = (0, _aureliaFramework.inject)(_gatewayClient.GatewayClient), _dec(_class = function () {
        function GatewayService(client) {
            var _this = this;

            _classCallCheck(this, GatewayService);

            this.state = {};
            cov_2qg9a80pqz.f[0]++;
            cov_2qg9a80pqz.s[0]++;

            this.client = client;
            cov_2qg9a80pqz.s[1]++;
            this.client.connect(function (state) {
                cov_2qg9a80pqz.f[1]++;
                cov_2qg9a80pqz.s[2]++;
                return _this.applyDelta(state);
            });
        }

        GatewayService.prototype.getState = function getState() {
            cov_2qg9a80pqz.f[2]++;
            cov_2qg9a80pqz.s[3]++;

            return this.state;
        };

        GatewayService.prototype.getProperties = function getProperties(props) {
            return this.client.getProperties(props);
        };

        GatewayService.prototype.send = function send(editDelta) {
            cov_2qg9a80pqz.f[3]++;

            var editState = (cov_2qg9a80pqz.s[4]++, R.pickBy(R.compose(R.not, R.isNil), R.pickBy(R.compose(R.not, R.isEmpty), editDelta)));
            cov_2qg9a80pqz.s[5]++;
            this.applyDelta(editState);
            cov_2qg9a80pqz.s[6]++;
            this.client.send(editState);
        };

        GatewayService.prototype.applyDelta = function applyDelta(delta) {
            cov_2qg9a80pqz.f[4]++;
            cov_2qg9a80pqz.s[7]++;

            $.extend(this.state, delta);
        };

        GatewayService.prototype.subscribe = function subscribe(properties, component) {
            cov_2qg9a80pqz.f[5]++;
            cov_2qg9a80pqz.s[8]++;

            this.client.subscribe(properties, component);
        };

        GatewayService.prototype.unsubscribe = function unsubscribe(properties, component) {
            cov_2qg9a80pqz.f[6]++;
            cov_2qg9a80pqz.s[9]++;

            this.client.unsubscribe(properties, component);
        };

        GatewayService.prototype.registerDebugCallbacks = function registerDebugCallbacks(maxExceededCallback, requestSentCallback, responseReceivedCallback, broadcastsClearedCallback) {
            this.client.registerDebugCallbacks(maxExceededCallback, requestSentCallback, responseReceivedCallback, broadcastsClearedCallback);
        };

        GatewayService.prototype.enableDebug = function enableDebug(enabled) {
            this.client.enableDebug(enabled);
        };

        GatewayService.prototype.getActiveBroadcastRequests = function getActiveBroadcastRequests() {
            return this.client.getActiveBroadcastRequests();
        };

        return GatewayService;
    }()) || _class);
});
var cov_2a78dj0u7x = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\file-service.js',
        hash = '9081aa3ad7443d4bf7f87ddcb08b48fe7cf199cd',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\file-service.js',
        statementMap: {
            '0': {
                start: {
                    line: 24,
                    column: 17
                },
                end: {
                    line: 24,
                    column: 39
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 24,
                        column: 12
                    },
                    end: {
                        line: 24,
                        column: 13
                    }
                },
                loc: {
                    start: {
                        line: 24,
                        column: 17
                    },
                    end: {
                        line: 24,
                        column: 39
                    }
                },
                line: 24
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 24,
                        column: 30
                    },
                    end: {
                        line: 24,
                        column: 37
                    }
                },
                type: 'binary-expr',
                locations: [{
                    start: {
                        line: 24,
                        column: 30
                    },
                    end: {
                        line: 24,
                        column: 31
                    }
                }, {
                    start: {
                        line: 24,
                        column: 35
                    },
                    end: {
                        line: 24,
                        column: 37
                    }
                }],
                line: 24
            }
        },
        s: {
            '0': 0
        },
        f: {
            '0': 0
        },
        b: {
            '0': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/file-service',['exports', 'aurelia-framework', '../resources/clients/json-client'], function (exports, _aureliaFramework, _jsonClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FileService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var FileService = exports.FileService = (_dec = (0, _aureliaFramework.inject)(_jsonClient.JsonClient), _dec(_class = function () {
        function FileService(json) {
            _classCallCheck(this, FileService);

            this.route = function (r) {
                cov_2a78dj0u7x.f[0]++;
                cov_2a78dj0u7x.s[0]++;
                return '/api/files' + ((cov_2a78dj0u7x.b[0][0]++, r) || (cov_2a78dj0u7x.b[0][1]++, ''));
            };

            this.json = json;
        }

        FileService.prototype.getSystemFiles = function getSystemFiles() {
            return this.json.get(this.route('/system'));
        };

        FileService.prototype.getUsbFiles = function getUsbFiles() {
            return this.json.get(this.route('/usb'));
        };

        FileService.prototype.usbAvailable = function usbAvailable() {
            return this.json.get(this.route('/usb-available'));
        };

        FileService.prototype.getBoundaryMaps = function getBoundaryMaps() {
            return this.json.get(this.route('/boundary-maps'));
        };

        FileService.prototype.getPrescriptionMaps = function getPrescriptionMaps() {
            return this.json.get(this.route('/prescription-maps'));
        };

        FileService.prototype.getAppliedAsMaps = function getAppliedAsMaps(boundaryMap) {
            return this.json.post(this.route('/applied-as-maps'), boundaryMap);
        };

        FileService.prototype.transferFile = function transferFile(fromPath, toPath, fromDevice, toDevice) {
            return this.json.post(this.route('/transfer-file'), { FromPath: fromPath, ToPath: toPath, FromDevice: fromDevice, ToDevice: toDevice });
        };

        FileService.prototype.transferFolder = function transferFolder(fromPath, toPath, fromDevice, toDevice) {
            return this.json.post(this.route('/transfer-folder'), { FromPath: fromPath, ToPath: toPath, FromDevice: fromDevice, ToDevice: toDevice });
        };

        FileService.prototype.deleteFolder = function deleteFolder(path) {
            return this.json.post(this.route('/delete-folder'), path);
        };

        FileService.prototype.deleteFile = function deleteFile(path) {
            return this.json.post(this.route('/delete-file'), path);
        };

        return FileService;
    }()) || _class);
});
var cov_19upt6cz7t = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\boundary-map-service.js',
        hash = '933203501cb9a1d4b2f5caf494ea730330bbd9b0',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\boundary-map-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/boundary-map-service',['exports', 'aurelia-framework', '../clients/boundary-map-client'], function (exports, _aureliaFramework, _boundaryMapClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var BoundaryMapService = exports.BoundaryMapService = (_dec = (0, _aureliaFramework.inject)(_boundaryMapClient.BoundaryMapClient), _dec(_class = function () {
        function BoundaryMapService(client) {
            _classCallCheck(this, BoundaryMapService);

            this.client = client;
        }

        BoundaryMapService.prototype.connect = function connect(callback, addBoundaryPointCallBack, pruneBoundaryPointCallBack, clearBoundaryPointsCallBack) {
            return this.client.connect(callback, addBoundaryPointCallBack, pruneBoundaryPointCallBack, clearBoundaryPointsCallBack);
        };

        BoundaryMapService.prototype.registerBoundaryMapCreatedCallback = function registerBoundaryMapCreatedCallback(callback) {
            this.client.registerBoundaryMapCreatedCallback(callback);
        };

        BoundaryMapService.prototype.getBoundaryMap = function getBoundaryMap() {
            return this.client.getCurrentBoundaryMap();
        };

        BoundaryMapService.prototype.getRecordedBoundaryPoints = function getRecordedBoundaryPoints() {
            return this.client.getRecordedBoundaryPoints();
        };

        BoundaryMapService.prototype.getRecordedInternalPoints = function getRecordedInternalPoints() {
            return this.client.getRecordedInternalPoints();
        };

        BoundaryMapService.prototype.getBoundaryRecorderStatus = function getBoundaryRecorderStatus() {
            return this.client.getBoundaryRecorderStatus();
        };

        BoundaryMapService.prototype.setBoundaryRecorderSide = function setBoundaryRecorderSide(side) {
            this.client.setBoundaryRecorderSide(side);
        };

        BoundaryMapService.prototype.setRecordInternal = function setRecordInternal(flag) {
            this.client.setRecordInternal(flag);
        };

        BoundaryMapService.prototype.recordBoundary = function recordBoundary() {
            this.client.recordBoundary();
        };

        BoundaryMapService.prototype.pauseBoundary = function pauseBoundary() {
            this.client.pauseBoundary();
        };

        BoundaryMapService.prototype.saveBoundary = function saveBoundary(name) {
            this.client.saveBoundary(name);
        };

        BoundaryMapService.prototype.discardBoundary = function discardBoundary() {
            this.client.discardBoundary();
        };

        return BoundaryMapService;
    }()) || _class);
});
var cov_w0ypp6bl0 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\auth-service-helper.js',
        hash = 'd122b1b5fcfe9087a20a6f1c094ad457c436c4b9',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\services\\auth-service-helper.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/auth-service-helper',['exports', 'aurelia-framework', 'aurelia-open-id-connect', 'aurelia-configuration'], function (exports, _aureliaFramework, _aureliaOpenIdConnect, _aureliaConfiguration) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AuthServiceHelper = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var authLogger = _aureliaFramework.LogManager.getLogger('auth-service-helper');

    var AuthServiceHelper = exports.AuthServiceHelper = (_dec = (0, _aureliaFramework.inject)(_aureliaOpenIdConnect.OpenIdConnect, _aureliaConfiguration.AureliaConfiguration), _dec(_class = function () {
        function AuthServiceHelper(openIdConnect, appConfig) {
            var _this = this;

            _classCallCheck(this, AuthServiceHelper);

            this.appConfig = appConfig;
            this.openIdConnect = openIdConnect;
            this.openIdConnect.observeUser(function (user) {
                if (typeof user === 'undefined' || user === null) {
                    return;
                }
                if (user.expired) {
                    _this.loginSilent().catch(function (error) {
                        authLogger.error(error);
                        _this.openIdConnect.login();
                    });
                } else {
                    _this.user = user;
                }

                _this.openIdConnect.userManager.events.addAccessTokenExpiring(function () {
                    _this.openIdConnect.userManager.clearStaleState();
                    authLogger.info('token expiring in ... ' + _this.user.expires_in + ' seconds');
                });

                _this.openIdConnect.userManager.events.addAccessTokenExpired(function () {
                    _this.openIdConnect.userManager.clearStaleState();
                    authLogger.info('token expired...');
                });

                _this.openIdConnect.userManager.events.addSilentRenewError(function () {
                    _this.openIdConnect.userManager.clearStaleState();
                    _this.user = null;
                    authLogger.info('automatic silent renew of access token has failed...');
                    _this.loginSilent().catch(function (error) {
                        authLogger.error(error);
                        _this.openIdConnect.login();
                    });
                });

                _this.openIdConnect.userManager.events.addUserSignedOut(function () {
                    _this.openIdConnect.userManager.removeUser();
                    _this.openIdConnect.userManager.clearStaleState();
                    _this.user = null;
                    _this.openIdConnect.login();
                    authLogger.info('users sign-in status at the OP has changed...');
                });
            });
        }

        AuthServiceHelper.prototype.isAdmin = function isAdmin() {
            var isCloud = this.appConfig.get('Web.IsCloud');

            if (!isCloud) {
                return true;
            }
            var profile = this.user.profile;

            if (profile.role !== null && profile.role instanceof Array) {
                return profile.role.some(function (r) {
                    return r === 'SystemAdministrator';
                });
            } else if (profile.role !== null) {
                return profile.role === 'SystemAdministrator';
            }
            return false;
        };

        AuthServiceHelper.prototype.getAccessToken = function getAccessToken() {
            return this.user.access_token;
        };

        AuthServiceHelper.prototype.getUser = function getUser() {
            return this.user;
        };

        AuthServiceHelper.prototype.loginSilent = function loginSilent() {
            return this.openIdConnect.loginSilent();
        };

        AuthServiceHelper.prototype.login = function login() {
            this.openIdConnect.login();
        };

        AuthServiceHelper.prototype.logout = function logout() {
            this.openIdConnect.logout();
        };

        return AuthServiceHelper;
    }()) || _class);
});
var cov_1ho5jqd4gx = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\sqMmToAcres.js',
        hash = '103290c6d78c6ed8d4401d8edb6af4859a379f25',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\sqMmToAcres.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/sqMmToAcres',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SqMmToAcresValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var SqMmToAcresValueConverter = exports.SqMmToAcresValueConverter = function () {
        function SqMmToAcresValueConverter() {
            _classCallCheck(this, SqMmToAcresValueConverter);
        }

        SqMmToAcresValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var sqMmPerAcre = 4046856422.4;
            var txtValue = (0, _numeral2.default)(value / sqMmPerAcre).format(format);
            return txtValue;
        };

        SqMmToAcresValueConverter.prototype.fromView = function fromView(value) {
            var sqMmPerAcre = 4046856422.4;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * sqMmPerAcre).value();
            return val;
        };

        return SqMmToAcresValueConverter;
    }();
});
var cov_2pln1qh6eq = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\radiansToDegrees.js',
        hash = '8a19e5886c224882184947f9eb333d647d6fbef0',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\radiansToDegrees.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/radiansToDegrees',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RadiansToDegreesValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var RadiansToDegreesValueConverter = exports.RadiansToDegreesValueConverter = function () {
        function RadiansToDegreesValueConverter() {
            _classCallCheck(this, RadiansToDegreesValueConverter);
        }

        RadiansToDegreesValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0.0';
            }
            return (0, _numeral2.default)(value * 180 / Math.PI).format(format);
        };

        RadiansToDegreesValueConverter.prototype.fromView = function fromView(value) {
            return (0, _numeral2.default)(value * Math.PI / 180).value();
        };

        RadiansToDegreesValueConverter.prototype.forValidate = function forValidate(value) {
            return (0, _numeral2.default)(value * 180 / Math.PI).value();
        };

        return RadiansToDegreesValueConverter;
    }();
});
var cov_2driw4bfbk = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\plusone-format.js',
        hash = 'a06de7524e20864f42d4941850a702e09cbbceb6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\plusone-format.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/plusone-format',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PlusoneFormatValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var PlusoneFormatValueConverter = exports.PlusoneFormatValueConverter = function () {
        function PlusoneFormatValueConverter() {
            _classCallCheck(this, PlusoneFormatValueConverter);
        }

        PlusoneFormatValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var txtValue = (0, _numeral2.default)(value + 1).format(format);
            return txtValue;
        };

        PlusoneFormatValueConverter.prototype.fromView = function fromView(value) {
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num - 1).value();
            return val;
        };

        PlusoneFormatValueConverter.prototype.forValidate = function forValidate(value) {
            var val = (0, _numeral2.default)(value + 1).value();
            return val;
        };

        return PlusoneFormatValueConverter;
    }();
});
var cov_20tj5zg1f0 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\number-format.js',
        hash = '0f2c8dc697e0e8518362408247b1b7ff7011a549',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\number-format.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/number-format',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NumberFormatValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var NumberFormatValueConverter = exports.NumberFormatValueConverter = function () {
        function NumberFormatValueConverter() {
            _classCallCheck(this, NumberFormatValueConverter);
        }

        NumberFormatValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var val = (0, _numeral2.default)(value).format(format);
            return val;
        };

        NumberFormatValueConverter.prototype.fromView = function fromView(value) {
            var numValue = (0, _numeral2.default)(value).value();
            return numValue;
        };

        return NumberFormatValueConverter;
    }();
});
var cov_2okuwxxo2q = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\multiplier-format.js',
        hash = '9513c039a479aa4056cd0671511132f6f3e22bd5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\multiplier-format.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/multiplier-format',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MultiplierFormatValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MultiplierFormatValueConverter = exports.MultiplierFormatValueConverter = function () {
        function MultiplierFormatValueConverter() {
            _classCallCheck(this, MultiplierFormatValueConverter);
        }

        MultiplierFormatValueConverter.prototype.toView = function toView(value, divisor, format) {
            if (!format) {
                format = '0';
            }
            var txtValue = (0, _numeral2.default)(value / divisor).format(format);
            return txtValue;
        };

        MultiplierFormatValueConverter.prototype.fromView = function fromView(value, multiplier) {
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * multiplier).value();
            return val;
        };

        MultiplierFormatValueConverter.prototype.forValidate = function forValidate(value, divisor) {
            var val = (0, _numeral2.default)(value / divisor).value();
            return val;
        };

        return MultiplierFormatValueConverter;
    }();
});
var cov_rkbo8baiz = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mmToInches.js',
        hash = '85521b79b499c2c231ef1005a22eff635cea5710',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mmToInches.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mmToInches',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MmToInchesValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MmToInchesValueConverter = exports.MmToInchesValueConverter = function () {
        function MmToInchesValueConverter() {
            _classCallCheck(this, MmToInchesValueConverter);
        }

        MmToInchesValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var mmPerInch = 25.4;
            var txtValue = (0, _numeral2.default)(value / mmPerInch).format(format);
            return txtValue;
        };

        MmToInchesValueConverter.prototype.fromView = function fromView(value) {
            var mmPerInch = 25.4;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * mmPerInch).value();
            return val;
        };

        MmToInchesValueConverter.prototype.forValidate = function forValidate(value) {
            var mmPerInch = 25.4;
            var num = (0, _numeral2.default)(value / mmPerInch).value();
            return num;
        };

        return MmToInchesValueConverter;
    }();
});
var cov_5dfpgkmmb = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mmPerSecondToMph.js',
        hash = '2235d9f1ba1551ef98b1552a93e0c52adae3ddb2',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mmPerSecondToMph.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mmPerSecondToMph',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MmPerSecondToMphValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MmPerSecondToMphValueConverter = exports.MmPerSecondToMphValueConverter = function () {
        function MmPerSecondToMphValueConverter() {
            _classCallCheck(this, MmPerSecondToMphValueConverter);
        }

        MmPerSecondToMphValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0.0';
            }

            var mmPerMile = 1609340;
            var secondsPerHour = 3600;
            return (0, _numeral2.default)(value * secondsPerHour / mmPerMile).format(format);
        };

        MmPerSecondToMphValueConverter.prototype.fromView = function fromView(value) {
            var mmPerMile = 1609340;
            var secondsPerHour = 3600;
            return (0, _numeral2.default)(value / secondsPerHour * mmPerMile).value();
        };

        MmPerSecondToMphValueConverter.prototype.forValidate = function forValidate(value) {
            var mmPerMile = 1609340;
            var secondsPerHour = 3600;
            return (0, _numeral2.default)(value * secondsPerHour / mmPerMile).value();
        };

        return MmPerSecondToMphValueConverter;
    }();
});
var cov_4or96oey6 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mlToGal.js',
        hash = 'a14e30f7739294aadf637a9e09c9ae15f954948f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mlToGal.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mlToGal',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MlToGalValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MlToGalValueConverter = exports.MlToGalValueConverter = function () {
        function MlToGalValueConverter() {
            _classCallCheck(this, MlToGalValueConverter);
        }

        MlToGalValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var galPerMl = 0.0002641721;
            var txtValue = (0, _numeral2.default)(value * galPerMl).format(format);
            return txtValue;
        };

        MlToGalValueConverter.prototype.fromView = function fromView(value) {
            var galPerMl = 0.0002641721;
            var num = (0, _numeral2.default)(value).value();
            var val = Math.floor((0, _numeral2.default)(num / galPerMl).value());
            return val;
        };

        MlToGalValueConverter.prototype.forValidate = function forValidate(value) {
            var galPerMl = 0.0002641721;
            var num = (0, _numeral2.default)(value * galPerMl).value();
            return num;
        };

        return MlToGalValueConverter;
    }();
});
var cov_2cf7n9loea = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mlPerHectareToGpa.js',
        hash = '240caa7b88ed8629a3c8f0ac43c98367d1de440b',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mlPerHectareToGpa.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mlPerHectareToGpa',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MlPerHectareToGpaValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MlPerHectareToGpaValueConverter = exports.MlPerHectareToGpaValueConverter = function () {
        function MlPerHectareToGpaValueConverter() {
            _classCallCheck(this, MlPerHectareToGpaValueConverter);
        }

        MlPerHectareToGpaValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var txtValue = (0, _numeral2.default)(value / mLPerGallon / acrePerHectare).format(format);
            return txtValue;
        };

        MlPerHectareToGpaValueConverter.prototype.fromView = function fromView(value) {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * mLPerGallon * acrePerHectare).value();
            return val;
        };

        MlPerHectareToGpaValueConverter.prototype.forValidate = function forValidate(value) {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var num = (0, _numeral2.default)(value / mLPerGallon / acrePerHectare).value();
            return num;
        };

        return MlPerHectareToGpaValueConverter;
    }();
});
var cov_ku6cfy4n8 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mVoltToVolt.js',
        hash = 'f543b99e05fd1fe4d3c2a86bef3a4f9114c38493',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\mVoltToVolt.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mVoltToVolt',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MVoltToVoltValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MVoltToVoltValueConverter = exports.MVoltToVoltValueConverter = function () {
        function MVoltToVoltValueConverter() {
            _classCallCheck(this, MVoltToVoltValueConverter);
        }

        MVoltToVoltValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var mvoltsPerVolt = 1000;
            var txtValue = (0, _numeral2.default)(value).divide(mvoltsPerVolt).format(format);
            return txtValue;
        };

        MVoltToVoltValueConverter.prototype.fromView = function fromView(value) {
            var mvoltsPerVolt = 1000;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num).multiply(mvoltsPerVolt).value();
            return val;
        };

        MVoltToVoltValueConverter.prototype.forValidate = function forValidate(value) {
            var mvoltsPerVolt = 1000;
            var num = (0, _numeral2.default)(value).divide(mvoltsPerVolt).value();
            return num;
        };

        return MVoltToVoltValueConverter;
    }();
});
var cov_1c8xo5pfj6 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\literToGal.js',
        hash = '18261d6ac3e320a5e2453c722bbb48d8fd22c80e',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\literToGal.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/literToGal',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LiterToGalValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var LiterToGalValueConverter = exports.LiterToGalValueConverter = function () {
        function LiterToGalValueConverter() {
            _classCallCheck(this, LiterToGalValueConverter);
        }

        LiterToGalValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var litersPerGallon = 0.264172;
            var txtValue = (0, _numeral2.default)(value).divide(litersPerGallon).format(format);
            return txtValue;
        };

        LiterToGalValueConverter.prototype.fromView = function fromView(value) {
            var litersPerGallon = 0.264172;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num).multiply(litersPerGallon).value();
            return val;
        };

        LiterToGalValueConverter.prototype.forValidation = function forValidation(value) {
            var litersPerGallon = 3.78541;
            var num = (0, _numeral2.default)(value / litersPerGallon).value();
            return num;
        };

        return LiterToGalValueConverter;
    }();
});
var cov_1tiissu7v7 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\kpaToPsi.js',
        hash = '297a68c2a11ff30fb94aa542417020db307f07c9',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\kpaToPsi.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/kpaToPsi',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.KpaToPsiValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var KpaToPsiValueConverter = exports.KpaToPsiValueConverter = function () {
        function KpaToPsiValueConverter() {
            _classCallCheck(this, KpaToPsiValueConverter);
        }

        KpaToPsiValueConverter.prototype.toView = function toView(value, format) {
            if (isNaN(value)) {
                return '-';
            }
            if (!format) {
                format = '0.0';
            }
            var psiPerKpa = 6.89475729;
            return (0, _numeral2.default)(value).divide(psiPerKpa).format(format);
        };

        KpaToPsiValueConverter.prototype.fromView = function fromView(value) {
            var psiPerKpa = 6.89475729;
            return (0, _numeral2.default)(value).multiply(psiPerKpa).value();
        };

        KpaToPsiValueConverter.prototype.forValidate = function forValidate(value) {
            var psiPerKpa = 6.89475729;
            return (0, _numeral2.default)(value).divide(psiPerKpa).value();
        };

        return KpaToPsiValueConverter;
    }();
});
var cov_2ebmeb72xk = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\hectaresToAcres.js',
        hash = 'a07c1e4034e7470b6f99c38127232c5064ecfc34',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\hectaresToAcres.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/hectaresToAcres',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.HectaresToAcresValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var HectaresToAcresValueConverter = exports.HectaresToAcresValueConverter = function () {
        function HectaresToAcresValueConverter() {
            _classCallCheck(this, HectaresToAcresValueConverter);
        }

        HectaresToAcresValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var acresPerHectare = 2.47105;
            var txtValue = (0, _numeral2.default)(value * acresPerHectare).format(format);
            return txtValue;
        };

        HectaresToAcresValueConverter.prototype.fromView = function fromView(value) {
            var acresPerHectare = 2.47105;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num / acresPerHectare).value();
            return val;
        };

        HectaresToAcresValueConverter.prototype.forValidation = function forValidation(value) {
            var acresPerHectare = 2.47105;
            var num = (0, _numeral2.default)(value * acresPerHectare).value();
            return num;
        };

        return HectaresToAcresValueConverter;
    }();
});
var cov_1r0y64u70g = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\flowmeterCalibration.js',
        hash = '15d8884e0f4144dd4bcbef595cdc94f151fd8c1a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\flowmeterCalibration.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/flowmeterCalibration',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowmeterCalibrationValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var FlowmeterCalibrationValueConverter = exports.FlowmeterCalibrationValueConverter = function () {
        function FlowmeterCalibrationValueConverter() {
            _classCallCheck(this, FlowmeterCalibrationValueConverter);

            this.conversion = 3.78544119317;
        }

        FlowmeterCalibrationValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }

            return (0, _numeral2.default)(value).multiply(this.conversion).format(format);
        };

        FlowmeterCalibrationValueConverter.prototype.fromView = function fromView(value) {
            return (0, _numeral2.default)(value).divide(this.conversion).value();
        };

        FlowmeterCalibrationValueConverter.prototype.forValidate = function forValidate(value) {
            var validationConversion = 3.78544119317;
            var val = (0, _numeral2.default)(value).multiply(validationConversion).value();

            return val;
        };

        return FlowmeterCalibrationValueConverter;
    }();
});
var cov_9elro2lsg = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\dutyCycle.js',
        hash = '7d0f45f769e3dc9221e4ac7171f505030d15379d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\dutyCycle.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/dutyCycle',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.DutyCycleValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var DutyCycleValueConverter = exports.DutyCycleValueConverter = function () {
        function DutyCycleValueConverter() {
            _classCallCheck(this, DutyCycleValueConverter);
        }

        DutyCycleValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            return (0, _numeral2.default)(100 * value / 200).format(format);
        };

        return DutyCycleValueConverter;
    }();
});
var cov_2nkd4mu750 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\datetime-format.js',
        hash = '4a810031c95fcd6e627202acd416509c5fa2d136',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\datetime-format.js',
        statementMap: {
            '0': {
                start: {
                    line: 14,
                    column: 8
                },
                end: {
                    line: 16,
                    column: 9
                }
            },
            '1': {
                start: {
                    line: 15,
                    column: 12
                },
                end: {
                    line: 15,
                    column: 48
                }
            },
            '2': {
                start: {
                    line: 18,
                    column: 8
                },
                end: {
                    line: 18,
                    column: 20
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 13,
                        column: 4
                    },
                    end: {
                        line: 13,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 13,
                        column: 26
                    },
                    end: {
                        line: 19,
                        column: 5
                    }
                },
                line: 13
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 14,
                        column: 8
                    },
                    end: {
                        line: 16,
                        column: 9
                    }
                },
                type: 'if',
                locations: [{
                    start: {
                        line: 14,
                        column: 8
                    },
                    end: {
                        line: 16,
                        column: 9
                    }
                }, {
                    start: {
                        line: 14,
                        column: 8
                    },
                    end: {
                        line: 16,
                        column: 9
                    }
                }],
                line: 14
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        f: {
            '0': 0
        },
        b: {
            '0': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/datetime-format',['exports', 'moment'], function (exports, _moment) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.DateTimeFormatValueConverter = undefined;

    var _moment2 = _interopRequireDefault(_moment);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var DateTimeFormatValueConverter = exports.DateTimeFormatValueConverter = function () {
        function DateTimeFormatValueConverter() {
            _classCallCheck(this, DateTimeFormatValueConverter);
        }

        DateTimeFormatValueConverter.prototype.toView = function toView(value, format) {
            cov_2nkd4mu750.f[0]++;
            cov_2nkd4mu750.s[0]++;

            if (value) {
                cov_2nkd4mu750.b[0][0]++;
                cov_2nkd4mu750.s[1]++;

                return (0, _moment2.default)(value).format(format);
            } else {
                cov_2nkd4mu750.b[0][1]++;
            }

            cov_2nkd4mu750.s[2]++;
            return null;
        };

        return DateTimeFormatValueConverter;
    }();
});
var cov_17gc5a4epx = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\bytesToKilobytes.js',
        hash = '0d5a7d43adf0d411b5b30b7e177d90a5947d0812',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\bytesToKilobytes.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/bytesToKilobytes',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BytesToKilobytesValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BytesToKilobytesValueConverter = exports.BytesToKilobytesValueConverter = function () {
        function BytesToKilobytesValueConverter() {
            _classCallCheck(this, BytesToKilobytesValueConverter);
        }

        BytesToKilobytesValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0,0';
            }
            var bytesPerKilobyte = 1024;
            return (0, _numeral2.default)(value / bytesPerKilobyte).format(format);
        };

        return BytesToKilobytesValueConverter;
    }();
});
var cov_2fvdm0rsj1 = function () {
  var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\bitToStatus.js',
      hash = 'f2a514f0964feb466fa30d3cf49437590b30feea',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\bitToStatus.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('resources/value-converters/bitToStatus',['exports'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var BitToStatusValueConverter = exports.BitToStatusValueConverter = function () {
    function BitToStatusValueConverter() {
      _classCallCheck(this, BitToStatusValueConverter);
    }

    BitToStatusValueConverter.prototype.toView = function toView(value) {
      return value === 1 ? 'ON' : 'OFF';
    };

    return BitToStatusValueConverter;
  }();
});
var cov_2qyeoaoaf1 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\barToPsi.js',
        hash = '099472f07f80d1088aea4a3072eb81f405280895',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\value-converters\\barToPsi.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/barToPsi',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BarToPsiValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BarToPsiValueConverter = exports.BarToPsiValueConverter = function () {
        function BarToPsiValueConverter() {
            _classCallCheck(this, BarToPsiValueConverter);
        }

        BarToPsiValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0.0';
            }
            var psiPerBar = 0.0689475729;
            return (0, _numeral2.default)(value).divide(psiPerBar).format(format);
        };

        BarToPsiValueConverter.prototype.fromView = function fromView(value) {
            var psiPerBar = 0.0689475729;
            return (0, _numeral2.default)(value).multiply(psiPerBar).value();
        };

        BarToPsiValueConverter.prototype.forValidate = function forValidate(value) {
            var psiPerBar = 0.0689475729;
            return (0, _numeral2.default)(value).divide(psiPerBar).value();
        };

        return BarToPsiValueConverter;
    }();
});
var cov_2dz2v42xio = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\managers\\root-manager.js',
        hash = '6bdd2013bbff16a6c9bd85727c0f05abdfec8a18',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\managers\\root-manager.js',
        statementMap: {
            '0': {
                start: {
                    line: 16,
                    column: 8
                },
                end: {
                    line: 16,
                    column: 31
                }
            },
            '1': {
                start: {
                    line: 17,
                    column: 8
                },
                end: {
                    line: 17,
                    column: 29
                }
            },
            '2': {
                start: {
                    line: 26,
                    column: 8
                },
                end: {
                    line: 26,
                    column: 69
                }
            },
            '3': {
                start: {
                    line: 27,
                    column: 8
                },
                end: {
                    line: 27,
                    column: 28
                }
            },
            '4': {
                start: {
                    line: 28,
                    column: 8
                },
                end: {
                    line: 28,
                    column: 33
                }
            },
            '5': {
                start: {
                    line: 30,
                    column: 8
                },
                end: {
                    line: 30,
                    column: 35
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 15,
                        column: 4
                    },
                    end: {
                        line: 15,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 15,
                        column: 33
                    },
                    end: {
                        line: 18,
                        column: 5
                    }
                },
                line: 15
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 25,
                        column: 4
                    },
                    end: {
                        line: 25,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 25,
                        column: 18
                    },
                    end: {
                        line: 31,
                        column: 5
                    }
                },
                line: 25
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0
        },
        f: {
            '0': 0,
            '1': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/managers/root-manager',['exports', 'aurelia-framework', 'aurelia-router'], function (exports, _aureliaFramework, _aureliaRouter) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RootManager = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var RootManager = exports.RootManager = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.Aurelia, _aureliaRouter.Router), _dec(_class = function () {
        function RootManager(aurelia, router) {
            _classCallCheck(this, RootManager);

            cov_2dz2v42xio.f[0]++;
            cov_2dz2v42xio.s[0]++;

            this.aurelia = aurelia;
            cov_2dz2v42xio.s[1]++;
            this.router = router;
        }

        RootManager.prototype.setRoot = function setRoot(root) {
            cov_2dz2v42xio.f[1]++;
            cov_2dz2v42xio.s[2]++;

            this.router.navigate('/', { replace: true, trigger: false });
            cov_2dz2v42xio.s[3]++;
            this.router.reset();
            cov_2dz2v42xio.s[4]++;
            this.router.deactivate();

            cov_2dz2v42xio.s[5]++;
            this.aurelia.setRoot(root);
        };

        return RootManager;
    }()) || _class);
});
define('resources/index',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.configure = configure;
  function configure(config) {}
});
var cov_28c40o4b5k = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\clients\\json-client.js',
        hash = 'b78f507135969a642adcafbac2996b125b574667',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\clients\\json-client.js',
        statementMap: {
            '0': {
                start: {
                    line: 16,
                    column: 8
                },
                end: {
                    line: 16,
                    column: 25
                }
            },
            '1': {
                start: {
                    line: 25,
                    column: 8
                },
                end: {
                    line: 25,
                    column: 37
                }
            },
            '2': {
                start: {
                    line: 35,
                    column: 22
                },
                end: {
                    line: 38,
                    column: 9
                }
            },
            '3': {
                start: {
                    line: 40,
                    column: 8
                },
                end: {
                    line: 40,
                    column: 40
                }
            },
            '4': {
                start: {
                    line: 50,
                    column: 22
                },
                end: {
                    line: 53,
                    column: 9
                }
            },
            '5': {
                start: {
                    line: 55,
                    column: 8
                },
                end: {
                    line: 55,
                    column: 40
                }
            },
            '6': {
                start: {
                    line: 65,
                    column: 22
                },
                end: {
                    line: 68,
                    column: 9
                }
            },
            '7': {
                start: {
                    line: 70,
                    column: 8
                },
                end: {
                    line: 70,
                    column: 40
                }
            },
            '8': {
                start: {
                    line: 80,
                    column: 8
                },
                end: {
                    line: 84,
                    column: 10
                }
            },
            '9': {
                start: {
                    line: 82,
                    column: 16
                },
                end: {
                    line: 82,
                    column: 39
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 15,
                        column: 4
                    },
                    end: {
                        line: 15,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 15,
                        column: 22
                    },
                    end: {
                        line: 17,
                        column: 5
                    }
                },
                line: 15
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 24,
                        column: 4
                    },
                    end: {
                        line: 24,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 24,
                        column: 13
                    },
                    end: {
                        line: 26,
                        column: 5
                    }
                },
                line: 24
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 34,
                        column: 4
                    },
                    end: {
                        line: 34,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 34,
                        column: 23
                    },
                    end: {
                        line: 41,
                        column: 5
                    }
                },
                line: 34
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 49,
                        column: 4
                    },
                    end: {
                        line: 49,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 49,
                        column: 22
                    },
                    end: {
                        line: 56,
                        column: 5
                    }
                },
                line: 49
            },
            '4': {
                name: '(anonymous_4)',
                decl: {
                    start: {
                        line: 64,
                        column: 4
                    },
                    end: {
                        line: 64,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 64,
                        column: 32
                    },
                    end: {
                        line: 71,
                        column: 5
                    }
                },
                line: 64
            },
            '5': {
                name: '(anonymous_5)',
                decl: {
                    start: {
                        line: 79,
                        column: 4
                    },
                    end: {
                        line: 79,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 79,
                        column: 24
                    },
                    end: {
                        line: 85,
                        column: 5
                    }
                },
                line: 79
            },
            '6': {
                name: '(anonymous_6)',
                decl: {
                    start: {
                        line: 81,
                        column: 12
                    },
                    end: {
                        line: 81,
                        column: 13
                    }
                },
                loc: {
                    start: {
                        line: 81,
                        column: 24
                    },
                    end: {
                        line: 83,
                        column: 13
                    }
                },
                line: 81
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 64,
                        column: 16
                    },
                    end: {
                        line: 64,
                        column: 30
                    }
                },
                type: 'default-arg',
                locations: [{
                    start: {
                        line: 64,
                        column: 26
                    },
                    end: {
                        line: 64,
                        column: 30
                    }
                }],
                line: 64
            },
            '1': {
                loc: {
                    start: {
                        line: 67,
                        column: 18
                    },
                    end: {
                        line: 67,
                        column: 48
                    }
                },
                type: 'cond-expr',
                locations: [{
                    start: {
                        line: 67,
                        column: 28
                    },
                    end: {
                        line: 67,
                        column: 41
                    }
                }, {
                    start: {
                        line: 67,
                        column: 44
                    },
                    end: {
                        line: 67,
                        column: 48
                    }
                }],
                line: 67
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0,
            '7': 0,
            '8': 0,
            '9': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0
        },
        b: {
            '0': [0],
            '1': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/clients/json-client',['exports', 'aurelia-framework', 'aurelia-fetch-client'], function (exports, _aureliaFramework, _aureliaFetchClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.JsonClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var JsonClient = exports.JsonClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFetchClient.HttpClient), _dec(_class = function () {
        function JsonClient(http) {
            _classCallCheck(this, JsonClient);

            cov_28c40o4b5k.f[0]++;
            cov_28c40o4b5k.s[0]++;

            this.http = http;
        }

        JsonClient.prototype.get = function get(url) {
            cov_28c40o4b5k.f[1]++;
            cov_28c40o4b5k.s[1]++;

            return this.fetch(url, null);
        };

        JsonClient.prototype.post = function post(url, content) {
            cov_28c40o4b5k.f[2]++;

            var options = (cov_28c40o4b5k.s[2]++, {
                method: 'post',
                body: (0, _aureliaFetchClient.json)(content)
            });

            cov_28c40o4b5k.s[3]++;
            return this.fetch(url, options);
        };

        JsonClient.prototype.put = function put(url, content) {
            cov_28c40o4b5k.f[3]++;

            var options = (cov_28c40o4b5k.s[4]++, {
                method: 'put',
                body: (0, _aureliaFetchClient.json)(content)
            });

            cov_28c40o4b5k.s[5]++;
            return this.fetch(url, options);
        };

        JsonClient.prototype.delete = function _delete(url) {
            var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (cov_28c40o4b5k.b[0][0]++, null);
            cov_28c40o4b5k.f[4]++;

            var options = (cov_28c40o4b5k.s[6]++, {
                method: 'delete',
                body: content ? (cov_28c40o4b5k.b[1][0]++, (0, _aureliaFetchClient.json)(content)) : (cov_28c40o4b5k.b[1][1]++, null)
            });

            cov_28c40o4b5k.s[7]++;
            return this.fetch(url, options);
        };

        JsonClient.prototype.fetch = function fetch(url, options) {
            cov_28c40o4b5k.f[5]++;
            cov_28c40o4b5k.s[8]++;

            return this.http.fetch(url, options).then(function (response) {
                cov_28c40o4b5k.f[6]++;
                cov_28c40o4b5k.s[9]++;

                return response.json();
            });
        };

        return JsonClient;
    }()) || _class);
});
var cov_11qpdmyvbv = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\binding-behavior\\auto-sync.js',
        hash = '4b7a1b6d2d5b9e768a05946f975fbc17a721558f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\binding-behavior\\auto-sync.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/binding-behavior/auto-sync',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AutoSyncBindingBehavior = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var autoSyncLogger = _aureliaFramework.LogManager.getLogger('auto-sync');

    var AutoSyncBindingBehavior = exports.AutoSyncBindingBehavior = function () {
        function AutoSyncBindingBehavior() {
            _classCallCheck(this, AutoSyncBindingBehavior);
        }

        AutoSyncBindingBehavior.prototype.bind = function bind(binding, scope) {
            var cancellable = {
                originalUpdateSource: binding.updateSource,
                originalUpdateTarget: binding.updateTarget
            };

            binding.updateSource = function (val) {
                var propertyName = void 0;
                if (scope.bindingContext.prop) {
                    propertyName = scope.bindingContext.prop;
                } else {
                    propertyName = binding.target.name;
                }
                if (scope.bindingContext._needsSync) {
                    scope.bindingContext._needsSync.push(propertyName);
                } else if (scope.bindingContext.parent._needsSync) {
                    scope.bindingContext.parent._needsSync.push(propertyName);
                } else {
                    throw new Error('binding context or parent binding context requires _needsSync array');
                }

                cancellable.originalUpdateSource.call(binding, val);
            };

            binding.updateTarget = function (val) {
                if (!isNaN(val)) {
                    cancellable.originalUpdateTarget.call(binding, val);
                } else {
                    var s = scope;
                    autoSyncLogger.warn('value must be a number for ' + s.bindingContext.prop);
                }
            };

            binding.cancellable = cancellable;
        };

        AutoSyncBindingBehavior.prototype.unbind = function unbind(binding, scope) {
            binding.updateSource = binding.cancellable.originalUpdateSource;
            binding.updateTarget = binding.cancellable.originalUpdateTarget;
            binding.cancellable = null;
        };

        return AutoSyncBindingBehavior;
    }();
});
var cov_1ycfe5athq = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\attributes\\focus-bind-break.js',
        hash = '3beb9ab7b2e00b7be666fb3d71bf34c4126a2d0b',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\resources\\attributes\\focus-bind-break.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/attributes/focus-bind-break',['exports', 'aurelia-framework', 'numeral'], function (exports, _aureliaFramework, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FocusBindBreak = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _dec2, _class;

    var FocusBindBreak = exports.FocusBindBreak = (_dec = (0, _aureliaFramework.customAttribute)('focus-bind-break', _aureliaFramework.bindingMode.twoWay), _dec2 = (0, _aureliaFramework.inject)(_aureliaFramework.DOM.Element, _aureliaFramework.TaskQueue), _dec(_class = _dec2(_class = function () {
        function FocusBindBreak(input, taskQueue) {
            var _this = this;

            _classCallCheck(this, FocusBindBreak);

            this.format = '0.0';

            this.change = function () {
                if (_this.input.value === '') {
                    _this.value = null;
                    return;
                }

                var number = _this.getNumber(_this.input.value);
                if (isNaN(number)) {
                    _this.valueChanged();
                } else {
                    var s = (0, _numeral2.default)(number).format(_this.format);
                    _this.input.value = s;
                    _this.value = number;
                    _this.input.blur();
                }
            };

            this.input = input;
            this.taskQueue = taskQueue;
            this.focusListener = function (e) {
                return _this.focused = true;
            };
            this.blurListener = function (e) {
                if (document.activeElement !== _this.input) {
                    _this.focused = false;
                }
            };
        }

        FocusBindBreak.prototype.valueChanged = function valueChanged() {
            if (!this.focused) {
                var number = (0, _numeral2.default)(this.value).value();
                if (isNaN(number)) {
                    this.input.value = '';
                } else {
                    this.input.value = (0, _numeral2.default)(number).format(this.format);
                }
            }
        };

        FocusBindBreak.prototype.getNumber = function getNumber(value) {
            var number = parseFloat(value);
            return !isNaN(number) && isFinite(value) ? number : NaN;
        };

        FocusBindBreak.prototype.focusedChanged = function focusedChanged(newValue) {
            if (newValue) {
                this.giveFocus();
            } else {
                this.input.blur();
            }
        };

        FocusBindBreak.prototype.giveFocus = function giveFocus() {
            var _this2 = this;

            this.taskQueue.queueMicroTask(function () {
                if (_this2.focused) {
                    _this2.input.focus();
                }
            });
        };

        FocusBindBreak.prototype.attached = function attached() {
            this.valueChanged();
            this.input.addEventListener('change', this.change);
            this.input.addEventListener('focus', this.focusListener);
            this.input.addEventListener('blur', this.blurListener);
        };

        FocusBindBreak.prototype.detached = function detached() {
            this.input.removeEventListener('change', this.change);
            this.input.removeEventListener('focus', this.focusListener);
            this.input.removeEventListener('blur', this.blurListener);
        };

        return FocusBindBreak;
    }()) || _class) || _class);
});
var cov_29c41innyz = function () {
        var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\oidc-config.js',
            hash = 'bbcd754bbca40c514e2fd9a2da2554537da931be',
            global = new Function('return this')(),
            gcv = '__coverage__',
            coverageData = {
                path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\oidc-config.js',
                statementMap: {},
                fnMap: {},
                branchMap: {},
                s: {},
                f: {},
                b: {},
                _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
        },
            coverage = global[gcv] || (global[gcv] = {});

        if (coverage[path] && coverage[path].hash === hash) {
                return coverage[path];
        }

        coverageData.hash = hash;
        return coverage[path] = coverageData;
}();

define('oidc-config',['exports', 'oidc-client'], function (exports, _oidcClient) {
        'use strict';

        Object.defineProperty(exports, "__esModule", {
                value: true
        });

        var appHost = 'http://10.1.1.10:9000';

        var oidcConfig = {
                loginRedirectRoute: '/',
                logoutRedirectRoute: '/dashboard',
                unauthorizedRedirectRoute: '/home',
                userManagerSettings: {
                        accessTokenExpiringNotificationTime: 1,

                        authority: 'http://localhost:5000',

                        automaticSilentRenew: true,

                        monitorSession: true,
                        checkSessionInterval: 2000,

                        client_id: 'cloud-app',

                        filterProtocolClaims: true,
                        loadUserInfo: true,
                        post_logout_redirect_uri: appHost + '/signout-oidc',
                        redirect_uri: appHost + '/signin-oidc',
                        response_type: 'id_token token',
                        scope: 'openid email profile api1',

                        silentRequestTimeout: 10000,
                        silent_redirect_uri: appHost + '/signin-oidc',
                        userStore: new _oidcClient.WebStorageStateStore({
                                prefix: 'oidc',
                                store: window.localStorage
                        })
                }
        };
        exports.default = oidcConfig;
});
define('main',['exports', './environment', 'aurelia-configuration', 'aurelia-router', 'i18next-xhr-backend', './oidc-config', 'aurelia-framework', 'aurelia-logging-console', 'stats', 'jquery'], function (exports, _environment, _aureliaConfiguration, _aureliaRouter, _i18nextXhrBackend, _oidcConfig, _aureliaFramework, _aureliaLoggingConsole) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.configure = configure;

    var _environment2 = _interopRequireDefault(_environment);

    var _i18nextXhrBackend2 = _interopRequireDefault(_i18nextXhrBackend);

    var _oidcConfig2 = _interopRequireDefault(_oidcConfig);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function configure(aurelia) {
        var container = aurelia.container;
        var aureliaConfig = container.get(_aureliaConfiguration.AureliaConfiguration);

        aurelia.use.standardConfiguration().globalResources(['views/dashboard/popover-element', 'components/shared/select2']).feature('resources').plugin('aurelia-configuration', function (config) {
            config.setEnvironments({
                development: ['10.1.1.10:9000'],
                production: ['demeter-dev.azurewebsites.net']
            });

            config.setConfig('config.json');
        }).plugin('aurelia-open-id-connect', function () {
            var webConfig = aureliaConfig.get('Web');
            var idSrvrConfig = aureliaConfig.get('IdentityProvider');

            _oidcConfig2.default.appHost = webConfig.AppUrl;

            _oidcConfig2.default.userManagerSettings.authority = idSrvrConfig.AuthorityUrl;
            _oidcConfig2.default.userManagerSettings.post_logout_redirect_uri = idSrvrConfig.PostLogoutRedirectUrl;
            _oidcConfig2.default.userManagerSettings.redirect_uri = idSrvrConfig.RedirectUri;
            _oidcConfig2.default.userManagerSettings.silent_redirect_uri = idSrvrConfig.SilentRedirectUrl;
            _oidcConfig2.default.userManagerSettings.silentRequestTimeout = idSrvrConfig.SilentRequestTimeout;
            return _oidcConfig2.default;
        }).plugin('aurelia-i18n', function (instance) {
            instance.i18next.use(_i18nextXhrBackend2.default);

            return instance.setup({
                backend: {
                    loadPath: '/api/translations/{{lng}}/{{ns}}'
                },
                lng: 'en',
                attributes: ['translate', 'i18n'],
                fallbackLng: 'en',
                debug: false,
                ns: ['translation'],
                defaultNS: 'translation'
            }).then(function () {
                aurelia.container.get(_aureliaRouter.Router).transformTitle = function (title) {
                    return instance.tr(title);
                };
            });
        }).plugin('aurelia-validation').plugin('aurelia-dialog', function (cfg) {
            cfg.useCSS('');
        });

        _aureliaFramework.LogManager.addAppender(new _aureliaLoggingConsole.ConsoleAppender());
        _aureliaFramework.LogManager.setLevel(_environment2.default.debug ? _aureliaFramework.LogManager.logLevel.debug : _aureliaFramework.LogManager.logLevel.error);

        if (_environment2.default.testing) {
            aurelia.use.plugin('aurelia-testing');
        }

        aurelia.start().then(function () {
            aurelia.setRoot('app');
        });
    }
});
var cov_scc6rn0x7 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\logout.js',
        hash = '73d6fb4dcb6bc3aebecec8754c677eafadf9dfe6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\logout.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('logout',['exports', 'aurelia-auth', 'aurelia-framework'], function (exports, _aureliaAuth, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Logout = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Logout = exports.Logout = (_dec = (0, _aureliaFramework.inject)(_aureliaAuth.AuthService, _aureliaAuth.Authentication), _dec(_class = function () {
        function Logout(authService, authentication) {
            _classCallCheck(this, Logout);

            this.authService = authService;
            this.authentication = authentication;
        }

        Logout.prototype.activate = function activate() {
            var idToken = this.authentication.getToken('aurelia_token');
            this.authService.logout('http://localhost:5000/connect/endsession?id_token_hint=' + idToken + 'post_logout_redirect_uri' + ' http://localhost:5002').then(function (response) {}).catch(function (err) {});
        };

        return Logout;
    }()) || _class);
});
define('text!logout.html', ['module'], function(module) { module.exports = "<template>\r\n    <section class=\"au-animate\">\r\n    \r\n    </section>\r\n</template>\r\n"; });
var cov_26xksq5812 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\login.js',
        hash = '6226eaf04666c588bd9223d2a57198e027d5e9b5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\login.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('login',['exports', 'aurelia-auth', 'aurelia-framework'], function (exports, _aureliaAuth, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Login = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Login = exports.Login = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.Aurelia, _aureliaAuth.AuthService), _dec(_class = function () {
        function Login(aurelia, auth) {
            _classCallCheck(this, Login);

            this.heading = 'Login';

            this.auth = auth;
            this.aurelia = aurelia;
        }

        Login.prototype.authenticate = function authenticate(name) {
            var _this = this;

            return this.auth.authenticate(name, false, null).then(function (response) {
                _this.auth.setToken(response.id_token);
            }).catch(function (err) {});
        };

        return Login;
    }()) || _class);
});
define('text!login.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"./components/shared/login-footer\"></require>\r\n    <require from=\"./components/shared/login-header\"></require>\r\n\r\n    <login-header></login-header>\r\n    <div>\r\n        <h1>${message}</h1>\r\n    </div>\r\n    <h2 class=\"text-center\">Log in</h2>\r\n    <button class=\"btn btn-block btn-facebook\" click.delegate=\"authenticate('identSrv', true)\">\r\n        <i class=\"ion-social-facebook\"></i> Sign in with IdentityServer\r\n    </button>\r\n    <router-view></router-view>\r\n    <login-footer></login-footer>\r\n</template>\r\n"; });
var cov_i93nsexph = function () {
  var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\layouts\\default.js',
      hash = '8062ef7044f4a0c41f93db224b6981cbe15219c0',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\layouts\\default.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('layouts/default',['exports', 'px-navbar'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.Default = undefined;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var Default = exports.Default = function Default() {
    _classCallCheck(this, Default);
  };
});
define('text!layouts/default.html', ['module'], function(module) { module.exports = "<template>\r\n    <!-- Components -->\r\n    <require from=\"px/css/bootstrap.min.css\"></require>\r\n    <require from=\"px/css/pixeladmin.min.css\"></require>\r\n    <require from=\"px/css/widgets.min.css\"></require>\r\n    <require from=\"px/css/themes/candy-green.min.css\"></require>\r\n    <require from=\"px/ionicons/css/ionicons.min.css\"></require>\r\n    <require from=\"../components/shared/app-nav\"></require>\r\n    <require from=\"../app.css\"></require>\r\n    <require from=\"../components/shared/app-header\"></require>\r\n    <require from=\"../components/shared/app-footer\"></require>\r\n    <require from=\"../layouts/default\"></require>\r\n    <nav as-element=\"app-nav\" class=\"px-nav px-nav-right\" id=\"px-nav-base-right\">\r\n    </nav>\r\n    <nav class=\"navbar px-navbar\">\r\n        <app-header></app-header>\r\n    </nav>\r\n    <div class=\"px-content\">\r\n        <slot></slot>\r\n    </div>\r\n    <app-footer></app-footer>\r\n</template>\r\n"; });
define('text!layouts/basic.html', ['module'], function(module) { module.exports = "<template>\r\n    <slot></slot>\r\n</template>\r\n"; });
var cov_tbgyuillp = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\home.js',
        hash = 'b923e4c15c475ea2c7d4f4f9286363410b555bc7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\home.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('home',['exports', 'aurelia-framework', 'aurelia-open-id-connect'], function (exports, _aureliaFramework, _aureliaOpenIdConnect) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Home = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Home = exports.Home = (_dec = (0, _aureliaFramework.inject)(_aureliaOpenIdConnect.OpenIdConnect), _dec(_class = function () {
        function Home(openIdConnect) {
            _classCallCheck(this, Home);

            this.openIdConnect = openIdConnect;
        }

        Home.prototype.attached = function attached() {
            var _this = this;

            this.openIdConnect.getUser().then(function (user) {
                if (user) {
                    _this.user = user.profile;
                    _this.message = 'Hello ' + _this.user.name;
                } else {
                    _this.message = 'Not Logged In';
                }
            });
        };

        return Home;
    }()) || _class);
});
define('text!home.html', ['module'], function(module) { module.exports = "<template>\r\n    ${message}\r\n</template>\r\n"; });
var cov_1u4cret7ma = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\fetch-config.js',
        hash = '4e44b963554ca116221a0e509bdb6763694c7269',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\fetch-config.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('fetch-config',['exports', 'aurelia-dependency-injection', 'aurelia-fetch-client', 'aurelia-open-id-connect'], function (exports, _aureliaDependencyInjection, _aureliaFetchClient, _aureliaOpenIdConnect) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FetchConfig = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var FetchConfig = exports.FetchConfig = (_dec = (0, _aureliaDependencyInjection.inject)(_aureliaFetchClient.HttpClient, _aureliaOpenIdConnect.OpenIdConnect), _dec(_class = function () {
        function FetchConfig(httpClient, openIdConnect) {
            _classCallCheck(this, FetchConfig);

            this.httpClient = httpClient;
            this.openIdConnect = openIdConnect;
        }

        FetchConfig.prototype.configure = function configure() {
            var _this = this;

            var loggedInUser = null;
            this.openIdConnect.getUser().then(function (user) {
                loggedInUser = user;
                _this.httpClient.configure(function (httpConfig) {
                    httpConfig.withDefaults({
                        headers: {
                            'Accept': 'application/json'
                        }
                    }).withInterceptor(_this.tokenInterceptor(loggedInUser));
                });
            });
        };

        FetchConfig.prototype.tokenInterceptor = function tokenInterceptor(loggedInUser) {
            return {
                request: function request(_request) {
                    if (loggedInUser) {
                        _request.headers.append('Authorization', 'Bearer ' + loggedInUser.access_token);
                    }
                    return _request;
                }
            };
        };

        return FetchConfig;
    }()) || _class);
});
var cov_10risn5wij = function () {
  var path = "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\environment.js",
      hash = "1699e12cf1b23fc8deff80d341e06cdc1f2e7a8d",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\environment.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('environment',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = {
    debug: true,
    testing: true
  };
});
define('configs/login-router-configuration',['exports', 'aurelia-framework', 'aurelia-router'], function (exports, _aureliaFramework, _aureliaRouter) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.default = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var _default = (_dec = (0, _aureliaFramework.inject)(_aureliaRouter.Router), _dec(_class = function () {
        function _default(router) {
            _classCallCheck(this, _default);

            this.router = router;
        }

        _default.prototype.configure = function configure() {
            this.router.configure(function (config) {
                config.title = 'Demeter';

                config.map([{ route: ['', 'sign-in'], name: 'sign-in', moduleId: './views/sign-in/sign-in', nav: true }, { route: 'forgot-password', name: 'forgot-password', moduleId: './views/forgot-password/forgot-password', nav: true }]);

                config.mapUnknownRoutes('./views/sign-in/sign-in');
            });
        };

        return _default;
    }()) || _class);

    exports.default = _default;
});
define('configs/auth-configuration',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    var authConfig = {
        httpInterceptor: true,
        baseUrl: '/',
        loginRoute: '#/login',
        loginUrl: '/api/authorize/token',
        loginRedirect: null,
        logoutRedirect: '#/login',
        profileUrl: '/api/authorize/me',
        tokenRoot: false,
        tokenName: 'token',
        tokenPrefix: 'aurelia',
        responseTokenProp: 'access_token',
        authHeader: 'Authorization',
        authToken: 'Bearer',
        withCredentials: true,
        platform: 'browser',
        storage: 'localStorage',
        providers: {

            identSrv: {
                name: 'identSrv',
                url: 'Token/Exchange',
                authorizationEndpoint: 'http://localhost:5000/connect/authorize',

                redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
                scope: ['api1'],

                responseType: 'code',

                scopePrefix: '',
                scopeDelimiter: ' ',
                requiredUrlParams: ['scope', 'nonce'],
                optionalUrlParams: ['display', 'state'],
                state: function state() {
                    var val = ((Date.now() + Math.random()) * Math.random()).toString().replace('.', '');
                    return encodeURIComponent(val);
                },
                display: 'popup',
                type: '2.0',
                clientId: 'cloud-app',

                nonce: function nonce() {
                    var val = ((Date.now() + Math.random()) * Math.random()).toString().replace('.', '');
                    return encodeURIComponent(val);
                },
                popupOptions: { width: 452, height: 633 }
            }
        }
    };

    exports.default = authConfig;
});
define('configs/app-router-configuration',['exports', 'aurelia-framework', 'aurelia-router', 'aurelia-configuration', 'aurelia-open-id-connect'], function (exports, _aureliaFramework, _aureliaRouter, _aureliaConfiguration, _aureliaOpenIdConnect) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.default = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var _default = (_dec = (0, _aureliaFramework.inject)(_aureliaRouter.Router, _aureliaConfiguration.AureliaConfiguration, _aureliaOpenIdConnect.OpenIdConnect), _dec(_class = function () {
        function _default(router, appConfig, openIdConnect) {
            _classCallCheck(this, _default);

            this.router = router;
            this.appConfig = appConfig;
            this.openIdConnect = openIdConnect;
        }

        _default.prototype.configure = function configure() {
            var _this = this;

            var isCloud = this.appConfig.get('Web').IsCloud;
            this.router.configure(function (config) {
                config.options.pushState = true;
                config.title = 'Demeter';

                var dashboardRoutes = ['dashboard'];
                if (!isCloud) {
                    dashboardRoutes.push('');
                }

                var routes = [{
                    route: dashboardRoutes,
                    name: 'dashboard',
                    moduleId: isCloud ? './views/dashboard/cloud-dashboard' : './views/dashboard/dashboard',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'filetransfer',
                    name: 'filetransfer',
                    moduleId: './views/filetransfer/filetransfer',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'logs',
                    name: 'logs',
                    moduleId: './views/logs/logs',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'updates',
                    name: 'updates',
                    moduleId: './views/updates/system-updates',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'settings',
                    name: 'settings',
                    moduleId: './views/settings/settings',
                    layoutView: 'layouts/default.html'
                }, {
                    route: 'vcm-setup',
                    name: 'vcm-setup',
                    moduleId: './views/settings/initial-setup/vcm-setup',
                    layoutView: 'layouts/default.html'
                }, {
                    route: 'pid-control-tuning',
                    name: 'pid-control-tuning',
                    moduleId: './views/pid-control-tuning/pid-control-tuning',
                    layoutView: 'layouts/default.html'
                }, {
                    route: 'debug',
                    name: 'debug',
                    moduleId: './views/debug/debug',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }];

                if (isCloud) {
                    routes.push({
                        route: ['', 'home'],
                        name: 'home',
                        moduleId: './home',
                        layoutView: 'layouts/default.html',
                        nav: false
                    });
                }

                config.map(routes);

                config.mapUnknownRoutes({
                    moduleId: './views/error/error-404',
                    layoutView: 'layouts/basic.html'
                });

                _this.openIdConnect.configure(config);
            });
        };

        return _default;
    }()) || _class);

    exports.default = _default;
});
var cov_26f3dxs4yp = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\updates\\update-package.js',
        hash = '002784558ce574cfbdc21a268c3c1304f23fce02',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\updates\\update-package.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/updates/update-package',['exports', 'aurelia-framework', '../../services/updates-service'], function (exports, _aureliaFramework, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.UpdatePackage = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

    var UpdatePackage = exports.UpdatePackage = (_dec = (0, _aureliaFramework.inject)(_updatesService.UpdatesService), _dec(_class = (_class2 = function () {
        function UpdatePackage(updatesService) {
            _classCallCheck(this, UpdatePackage);

            _initDefineProp(this, 'updatePackage', _descriptor, this);

            _initDefineProp(this, 'currentVersion', _descriptor2, this);

            _initDefineProp(this, 'newestVersion', _descriptor3, this);

            this.updatesService = updatesService;
            var installSeconds = 30;
            this.installLength = 10 * installSeconds;
        }

        UpdatePackage.prototype.attached = function attached() {
            var _this = this;

            if (this.isCurrent || this.isNewest) {
                this.panelOpen = true;
            }
            this.updatesService.connect(this.processDownloadProgress.bind(this));
            this.updatesService.checkIfDownloaded(this.updatePackage.version).then(function (downloaded) {
                _this.downloadComplete = downloaded;
                if (!downloaded) {
                    _this.getDownloadSize(_this.updatePackage.version);
                }
            });
        };

        UpdatePackage.prototype.togglePanel = function togglePanel() {
            this.panelOpen = !this.panelOpen;
        };

        UpdatePackage.prototype.getDownloadSize = function getDownloadSize() {
            var _this2 = this;

            this.updatesService.getDownloadSize(this.updatePackage.version).then(function (size) {
                _this2.downloadSize = size;
            });
        };

        UpdatePackage.prototype.downloadUpdate = function downloadUpdate() {
            this.downloading = true;
            this.updatesService.downloadUpdate(this.updatePackage.version);
        };

        UpdatePackage.prototype.processDownloadProgress = function processDownloadProgress(version, bytes) {
            if (version === this.updatePackage.version) {
                this.bytesTransferred = bytes;
                this.downloading = true;
            }
        };

        UpdatePackage.prototype.installUpdate = function installUpdate() {
            this.installing = true;
            this.updatesService.installUpdate(this.updatePackage.version, this.currentVersion);
            this.installProgress = 0;
            this.downloadSize = 0;
            this.downloading = false;
            this.installProgressTimer = setInterval(this.updateInstallProgress.bind(this), 100);
        };

        UpdatePackage.prototype.updateInstallProgress = function updateInstallProgress() {
            this.installProgress += 1;
            if (this.installProgress === this.installLength) {
                clearInterval(this.installProgressTimer);
            }
        };

        UpdatePackage.prototype.downloadProgressPercent = function downloadProgressPercent() {
            var percent = this.downloadSize > 0 ? Math.round(100 * this.bytesTransferred / this.downloadSize) : 0;
            this.downloadComplete = this.bytesTransferred === this.downloadSize;
            this.downloading = !this.downloadComplete;
            return percent;
        };

        UpdatePackage.prototype.installProgressPercent = function installProgressPercent() {
            var percent = 100 * this.installProgress / this.installLength;
            this.installComplete = this.installProgress === this.installLength;
            if (this.installComplete) {
                location.reload();
            }

            return percent;
        };

        _createClass(UpdatePackage, [{
            key: 'downloadProgressStyle',
            get: function get() {
                return {
                    width: this.downloadProgressPercent() + '%'
                };
            }
        }, {
            key: 'installProgressStyle',
            get: function get() {
                return {
                    width: this.installProgressPercent() + '%'
                };
            }
        }, {
            key: 'isCurrent',
            get: function get() {
                return this.currentVersion === this.updatePackage.version;
            }
        }, {
            key: 'isNew',
            get: function get() {
                return this.currentVersion < this.updatePackage.version;
            }
        }, {
            key: 'isNewest',
            get: function get() {
                return this.updatePackage.version === this.newestVersion;
            }
        }]);

        return UpdatePackage;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'updatePackage', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'currentVersion', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'newestVersion', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/updates/update-package.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/bytesToKilobytes\"></require>\r\n    <require from=\"resources/value-converters/datetime-format\"></require>\r\n    <div class=\"panel ${isCurrent ? 'panel-success' : isNew ? 'panel-primary' : 'panel-default'}\">\r\n        <a click.delegate=\"togglePanel()\">\r\n            <div if.bind=\"!updatePackage.fromFileSystem\" class=\"panel-heading\" style=\"cursor: pointer\">\r\n                ${updatePackage.version} - ${updatePackage.date | dateTimeFormat:'MMMM Do YYYY'}\r\n            </div>\r\n            <div if.bind=\"updatePackage.fromFileSystem\" class=\"panel-heading\" style=\"cursor: pointer\">\r\n                ${updatePackage.version}\r\n            </div>\r\n        </a>\r\n        <div if.bind=\"panelOpen\">\r\n            <div if.bind=\"isCurrent || !updatePackage.fromFileSystem\" class=\"panel-body\">\r\n                <div if.bind=\"isCurrent\">\r\n                    <p class=\"text-success\">This is your current version</p>\r\n                </div>\r\n                <div if.bind=\"!isCurrent\">\r\n                    <h4>${updatePackage.title}</h4>\r\n                    <p>${updatePackage.details}</p>\r\n                </div>\r\n            </div>\r\n            <div class=\"panel-footer\" if.bind=\"!isCurrent\">\r\n                <div if.bind=\"!installing && !downloading && !downloadComplete\">\r\n                    <button click.delegate=\"downloadUpdate()\" class=\"btn ${isNew ? 'btn-primary' : 'btn-default'}\">${\"Download\" | t} ${downloadSize | bytesToKilobytes} KB</button>\r\n                </div>\r\n                <div if.bind=\"downloading\">\r\n                    <b><p class=\"${isNew ? 'text-primary' : 'text-default'}\">${\"Progress\" |t}: ${bytesTransferred | bytesToKilobytes} KB / ${downloadSize | bytesToKilobytes} KB</p></b>\r\n                    <div class=\"progress\">\r\n                        <div style.bind=\"downloadProgressStyle\" class=\"progress-bar ${isNew ? 'progress-bar-primary' : ''} progress-bar-striped\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\r\n                    </div>\r\n                </div>\r\n                <div if.bind=\"downloadComplete && !installing\">\r\n                    <p class=\"text-warning\">This version is ready to install.</p>\r\n                    <button click.delegate=\"installUpdate()\" class=\"btn btn-warning\">Install</button>\r\n                </div>\r\n                <div if.bind=\"installing\">\r\n                    <b><p class=\"text-warning\">Installing...</p></b>\r\n                    <div class=\"progress\">\r\n                        <div style.bind=\"installProgressStyle\" class=\"progress-bar progress-bar-warning progress-bar-striped\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\r\n                    </div>\r\n                </div>\r\n                <div if.bind=\"installComplete\">\r\n                    <p class=\"text-warning\">Installation is complete.  The update will take effect the next time you restart.</p>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_2ay8i5ogeg = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\toolbar.js',
        hash = 'a3eb7026ca229f90ccb7c64feb69689a51b3a48f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\toolbar.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/toolbar',['exports', 'aurelia-framework', '../../services/file-service', '../../services/spray-session-service', '../../services/mapping-service'], function (exports, _aureliaFramework, _fileService, _spraySessionService, _mappingService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Toolbar = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var Toolbar = exports.Toolbar = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _spraySessionService.SpraySessionService, _mappingService.MappingService), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
        function Toolbar(fileService, spraySessionService, mappingService) {
            _classCallCheck(this, Toolbar);

            _initDefineProp(this, 'selectedBoundaryMaps', _descriptor, this);

            this.selectedPrescriptionUnit = 'Pounds/Acre';
            this.selectedSpraySession = 'Create New...';
            this.prescriptionUnits = ['Gallons/Acre', 'Pounds/Acre'];

            this.fileService = fileService;
            this.spraySessionService = spraySessionService;
            this.mappingService = mappingService;
            this.getBoundaryMaps();
            this.getSpraySessions();
            this.getPrescriptionMaps();
        }

        Toolbar.prototype.getBoundaryMaps = function getBoundaryMaps() {
            var _this = this;

            this.fileService.getBoundaryMaps().then(function (response) {
                return _this.boundaryMaps = response;
            });
        };

        Toolbar.prototype.getSpraySessions = function getSpraySessions() {
            var _this2 = this;

            return this.spraySessionService.getSpraySessions().then(function (sessions) {
                _this2.spraySessions = sessions;

                _this2.spraySessionService.getCurrentSpraySession().then(function (current) {
                    _this2.selectedBoundaryMaps = current.boundaryMapPaths;
                    _this2.selectedPrescriptionMap = current.prescriptionMapPath;
                    _this2.selectedPrescriptionUnit = current.prescriptionMapUnits;
                    _this2.spraySessions.forEach(function (s) {
                        if (s.spraySessionId === current.spraySessionId) {
                            _this2.selectedSpraySession = s;
                        }
                    });
                });
            });
        };

        Toolbar.prototype.getPrescriptionMaps = function getPrescriptionMaps() {
            var _this3 = this;

            this.fileService.getPrescriptionMaps().then(function (response) {
                return _this3.prescriptionMaps = response;
            });
        };

        Toolbar.prototype.boundaryMapChanged = function boundaryMapChanged() {
            var _this4 = this;

            this.selectedBoundaryMaps.forEach(function (path) {
                _this4.fileService.getAppliedAsMaps(path).then(function (response) {
                    return _this4.appliedAsMaps.push(response);
                });
            });

            this.spraySessionService.sendBoundaryMaps(this.selectedBoundaryMaps);
        };

        Toolbar.prototype.spraySessionChanged = function spraySessionChanged(spraySession) {
            this.selectedSpraySession = spraySession;
            this.spraySessionService.sendSpraySession(spraySession ? spraySession.spraySessionId : null);
        };

        Toolbar.prototype.prescriptionMapChanged = function prescriptionMapChanged(changedValue) {
            this.spraySessionService.setPrescriptionMap(changedValue);
        };

        Toolbar.prototype.prescriptionUnitChanged = function prescriptionUnitChanged(changedValue) {
            this.mappingService.setPrescriptionUnits(changedValue);
        };

        return Toolbar;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'selectedBoundaryMaps', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    })), _class2)) || _class);
});
define('text!components/shared/toolbar.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"components/shared/boundary-map-select2\"></require>\r\n    <div class=\"row\">\r\n        <div class=\"col-sm-12\">\r\n            <div class=\"card card-body\" style=\"padding-top: 10px\">\r\n                <label for=\"bmaps\" class=\"pull-left\" style=\"margin-right: 10px; margin-top: 5px\">Boundary Maps</label>\r\n                <boundary-map-select2 selected-boundary-maps.bind=\"selectedBoundaryMaps\" id=\"bmaps\" style=\"width: 300px; z-index: 1011; height: inherit\"></boundary-map-select2>\r\n            </div>\r\n            <div class=\"pull-left dashboard-dropdown\">\r\n                <label for=\"prescription_map\">${\"Prescription Map\" | t}</label>\r\n                <select value.bind=\"selectedPrescriptionMap\" change.delegate=\"prescriptionMapChanged(selectedPrescriptionMap)\" class=\"form-control\" id=\"prescription_map\">\r\n                    <option value=\"\">${\"None\" | t}</option>\r\n                    <option repeat.for=\"map of prescriptionMaps\" value.bind=\"map\">\r\n                        ${map}\r\n                    </option>\r\n                </select>\r\n            </div>\r\n            <div class=\"pull-left dashboard-dropdown\">\r\n                <label for=\"prescription_map\">${\"Units\" | t}</label>\r\n                <select value.bind=\"selectedPrescriptionUnit\" change.delegate=\"prescriptionUnitChanged(selectedPrescriptionUnit)\" class=\"form-control\" id=\"prescription_unit\">\r\n                    <option repeat.for=\"unit of prescriptionUnits\" model.bind=\"unit\">\r\n                        ${unit}\r\n                    </option>\r\n                </select>\r\n            </div>\r\n            <div class=\"pull-left dashboard-dropdown\">\r\n                <label for=\"spray_session\">${\"Spray Session\" | t}</label>\r\n                <select value.bind=\"selectedSpraySession\" change.delegate=\"spraySessionChanged(selectedSpraySession)\" class=\"form-control\" id=\"spray_session\">\r\n                    <option model.bind=\"null\">${\"Create New\" | t}</option>\r\n                    <option repeat.for=\"spraySession of spraySessions\" model.bind=\"spraySession\">\r\n                        ${spraySession.title}\r\n                    </option>\r\n                </select>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n</template>\r\n"; });
var cov_2likmqfpyb = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\select2.js',
        hash = 'ae3637061430caaaed58935d8ac342837434452d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\select2.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/select2',['exports', 'aurelia-framework', 'px-select2'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Select2 = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var Select2 = exports.Select2 = (_dec = (0, _aureliaFramework.customElement)('select2'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = _dec2(_class = (_class2 = function () {
        function Select2(element) {
            _classCallCheck(this, Select2);

            _initDefineProp(this, 'name', _descriptor, this);

            _initDefineProp(this, 'selected', _descriptor2, this);

            _initDefineProp(this, 'options', _descriptor3, this);

            _initDefineProp(this, 'placeholder', _descriptor4, this);

            _initDefineProp(this, 'allowClear', _descriptor5, this);

            this.element = element;
        }

        Select2.prototype.attached = function attached() {
            var el = $(this.element).find('select');
            var sel = el.select2({ width: 'resolve' });

            sel.val(this.selected).trigger('change');

            sel.on('change', function (event) {
                if (event.originalEvent) {
                    return;
                }

                var notice = new Event('change', { bubbles: true });
                $(el)[0].dispatchEvent(notice);
            });
        };

        Select2.prototype.detached = function detached() {
            $(this.element).find('select').select2('destroy');
        };

        return Select2;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'name', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return null;
        }
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'selected', [_dec3], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'options', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'placeholder', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'Select Your Boundary Map(s)';
        }
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'allowClear', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    })), _class2)) || _class) || _class);
});
define('text!components/shared/select2.html', ['module'], function(module) { module.exports = "<template>\r\n    <select value.two-way=\"selected\" name.one-way=\"name\" id.one-way=\"name\" \r\n            class=\"form-control\" multiple data-placeholder.one-way=\"placeholder\" data-allow-clear.one-way=\"allow_clear\" size=\"1\">\r\n        <option repeat.for=\"option of options\" value.bind=\"option.value\">${option.label}</option>\r\n    </select>\r\n</template>\r\n"; });
var cov_or8z4e6et = function () {
  var path = "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\login-header.js",
      hash = "16479c8ec82a5e0548d461a46b278d66db2ca682",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\login-header.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('components/shared/login-header',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var LoginHeader = exports.LoginHeader = function LoginHeader() {
    _classCallCheck(this, LoginHeader);
  };
});
define('text!components/shared/login-header.html', ['module'], function(module) { module.exports = "<template>\r\n    \r\n</template>\r\n"; });
var cov_pedi35qqb = function () {
  var path = "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\login-footer.js",
      hash = "4b114d39e03be13421076f4acdbd1675e4a7317c",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\login-footer.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('components/shared/login-footer',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var LoginFooter = exports.LoginFooter = function LoginFooter() {
    _classCallCheck(this, LoginFooter);
  };
});
define('text!components/shared/login-footer.html', ['module'], function(module) { module.exports = "<template>\r\n    \r\n</template>\r\n"; });
var cov_2ayx4uiuoa = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\rate-input-dialog.js',
        hash = '0a0c0688d76755c0f7c160ae6236b2ba87253b34',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\rate-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/rate-input-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

    var RateInputDialog = exports.RateInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function RateInputDialog(validationController, gatewayService, dialogController) {
            _classCallCheck(this, RateInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
        }

        RateInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.converter = model.converter;
            this.format = model.format;
            this.displayName = model.displayName;
            if (model.max) {
                _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('numberRange', model.min, model.max, this.converter, '0.0').on(this);
            }
        };

        RateInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        RateInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        RateInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        RateInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return RateInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/rate-input-dialog.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n    <ux-dialog>\r\n        <ux-dialog-body>\r\n            <div class=\"form-group\">\r\n                <label style=\"display: block\">${displayName}</label>\r\n                <input attach-focus=\"true\" value.bind=\"val | mlPerHectareToGpa:format & updateTrigger:'blur' & validateManually\">\r\n\r\n            </div>\r\n        </ux-dialog-body>\r\n        <ux-dialog-footer>\r\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\r\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\r\n        </ux-dialog-footer>\r\n    </ux-dialog>\r\n</template>\r\n"; });
var cov_5pptgthb3 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\psi-input-dialog.js',
        hash = '069f0b574c7b0f1b688a8ca6ee59d191d7d9a9c3',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\psi-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/psi-input-dialog',['exports', 'aurelia-framework', '../../../resources/value-converters/kpaToPsi', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _kpaToPsi, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PsiInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;

    var PsiInputDialog = exports.PsiInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _kpaToPsi.KpaToPsiValueConverter, _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function PsiInputDialog(validationController, kpaToPsiValueConverter, gatewayService, dialogController) {
            _classCallCheck(this, PsiInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            _initDefineProp(this, 'displayName', _descriptor4, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
            this.kpaToPsiValueConverter = kpaToPsiValueConverter;
        }

        PsiInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.converter = model.converter;
            this.format = model.format;
            this.displayName = model.displayName;

            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('kpaToPsiRange', model.min, model.max, this.converter, '0.0').on(this);
        };

        PsiInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        PsiInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        PsiInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        PsiInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('kpaToPsiRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return PsiInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'displayName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/psi-input-dialog.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\r\n    <require from=\"components/shared/dialogs/dialog-footer.html\"></require>\r\n    <ux-dialog>\r\n        <ux-dialog-body>\r\n            <div class=\"form-group\">\r\n                <label style=\"display: block\">${displayName}</label>\r\n                <input attach-focus=\"true\" value.bind=\"val | kpaToPsi:format & updateTrigger:'blur' & validateManually\">\r\n            </div>\r\n        </ux-dialog-body>\r\n        <ux-dialog-footer style=\"text-align: center\">\r\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\r\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\r\n        </ux-dialog-footer>\r\n    </ux-dialog>\r\n</template>\r\n"; });
var cov_1p7jqu54tb = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\number-input-dialog.js',
        hash = 'd4a98faa53397c4dfaf49db12cdcf9c235898250',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\number-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/number-input-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NumberInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;

    var NumberInputDialog = exports.NumberInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function NumberInputDialog(validationController, gatewayService, dialogController) {
            _classCallCheck(this, NumberInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'format', _descriptor2, this);

            _initDefineProp(this, 'property', _descriptor3, this);

            _initDefineProp(this, 'converter', _descriptor4, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
        }

        NumberInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.converter = model.converter;
            this.format = model.format;
            this.customRulesInit();
            this.displayName = model.displayName;
            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('numberRange', model.min, model.max, this.converter, '0.0').on(this);
        };

        NumberInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        NumberInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        NumberInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        NumberInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return NumberInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'format', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/number-input-dialog.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/number-format\"></require>\r\n    <ux-dialog>\r\n        <ux-dialog-body>\r\n            <div class=\"form-group\">\r\n                <label style=\"display: block\">${displayName}</label>\r\n                <input attach-focus=\"true\" value.bind=\"val | numberFormat:format & updateTrigger:'blur' & validateManually\">\r\n            </div>\r\n        </ux-dialog-body>\r\n        <ux-dialog-footer style=\"text-align: center\">\r\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\r\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\r\n        </ux-dialog-footer>\r\n    </ux-dialog>\r\n</template>\r\n"; });
var cov_agbnsc2te = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\mph-input-dialog.js',
        hash = '391dfce6cc909a4f474746140ef57f92660b9143',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\mph-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/mph-input-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MphInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

    var MphInputDialog = exports.MphInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function MphInputDialog(validationController, gatewayService, dialogController) {
            _classCallCheck(this, MphInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
        }

        MphInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.displayName = model.displayName;

            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('numberRange', model.min, model.max, this.converter, '0.0').on(this);
        };

        MphInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        MphInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        MphInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        MphInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return MphInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/mph-input-dialog.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\r\n    <ux-dialog>\r\n        <ux-dialog-body>\r\n            <div class=\"form-group\">\r\n                <label style=\"display: block\">${displayName}</label>\r\n                <input attach-focus=\"true\" value.bind=\"val | mmPerSecondToMph:format & updateTrigger:'blur' & validateManually\">\r\n            </div>\r\n        </ux-dialog-body>\r\n        <ux-dialog-footer>\r\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\r\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\r\n        </ux-dialog-footer>\r\n    </ux-dialog>\r\n</template>\r\n"; });
define('text!components/shared/dialogs/mm-gal-input-dialog.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"resources/value-converters/mlToGal\"></require>\r\n    <ux-dialog>\r\n        <ux-dialog-body>\r\n            <div class=\"form-group\">\r\n                <label style=\"display: block\">${displayName}</label>\r\n                <input type=\"number\" attach-focus=\"true\" value.bind=\"val | mlToGal:format & updateTrigger:'blur' & validateManually\">\r\n            </div>\r\n        </ux-dialog-body>\r\n        <ux-dialog-footer>\r\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\r\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\r\n        </ux-dialog-footer>\r\n    </ux-dialog>\r\n</template>\r\n"; });
var cov_1fhq9yvgyd = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\input-dialog.js',
        hash = 'd6a2bdee5f23c908a50b3706065bbc555356c057',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialogs\\input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/input-dialog',['exports', 'aurelia-framework', '../../../resources/value-converters/mlToGal', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _mlToGal, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.InputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var InputDialog = exports.InputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _mlToGal.MlToGalValueConverter, _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function InputDialog(validationController, mlToGalValueConverter, gatewayService, dialogController) {
            _classCallCheck(this, InputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            _initDefineProp(this, 'converterName', _descriptor4, this);

            _initDefineProp(this, 'displayName', _descriptor5, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
            this.mlToGalValueConverter = mlToGalValueConverter;
        }

        InputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.property = model.property;
            this.format = model.format;
            this.min = model.min;
            this.max = model.max;
            this.displayName = model.displayName;
        };

        InputDialog.prototype.created = function created(owningView, myView) {
            var valueConverters = Object.keys(myView.resources.valueConverters);

            this.converterName = valueConverters[0];
            var valueConverter = myView.resources.getValueConverter(this.converterName);

            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('kpaToPsiRange', this.min, this.max, valueConverter.forValidate, '0.0').on(this);
        };

        InputDialog.prototype.lowerCaseFirstLetter = function lowerCaseFirstLetter(string) {
            return string.charAt(0).toLowerCase() + string.slice(1);
        };

        InputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        InputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        InputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        InputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('kpaToPsiRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return InputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'converterName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'displayName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/dialog-footer.html', ['module'], function(module) { module.exports = "<template>\r\n        <button style=\"width: 45%\" class=\"btn btn-lg btn-danger\"click.trigger=\"$parent.cancel()\">Cancel</button>\r\n        <button style=\"width: 45%\" class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"$parent.ok(person)\">Ok</button>\r\n</template>\r\n"; });
var cov_mro5dkync = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialog-bootstrap-renderer.js',
        hash = '90b43bf50d113b8eac1bd7766c68e9a9d254a3cc',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\dialog-bootstrap-renderer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialog-bootstrap-renderer',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BootstrapFormRenderer = exports.BootstrapFormRenderer = function () {
        function BootstrapFormRenderer() {
            _classCallCheck(this, BootstrapFormRenderer);
        }

        BootstrapFormRenderer.prototype.render = function render(instruction) {
            for (var _iterator = instruction.unrender, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
                var _ref2;

                if (_isArray) {
                    if (_i >= _iterator.length) break;
                    _ref2 = _iterator[_i++];
                } else {
                    _i = _iterator.next();
                    if (_i.done) break;
                    _ref2 = _i.value;
                }

                var _ref5 = _ref2;
                var result = _ref5.result,
                    elements = _ref5.elements;

                for (var _iterator3 = elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
                    var _ref6;

                    if (_isArray3) {
                        if (_i3 >= _iterator3.length) break;
                        _ref6 = _iterator3[_i3++];
                    } else {
                        _i3 = _iterator3.next();
                        if (_i3.done) break;
                        _ref6 = _i3.value;
                    }

                    var element = _ref6;

                    this.remove(element, result);
                }
            }

            for (var _iterator2 = instruction.render, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
                var _ref4;

                if (_isArray2) {
                    if (_i2 >= _iterator2.length) break;
                    _ref4 = _iterator2[_i2++];
                } else {
                    _i2 = _iterator2.next();
                    if (_i2.done) break;
                    _ref4 = _i2.value;
                }

                var _ref7 = _ref4;
                var result = _ref7.result,
                    elements = _ref7.elements;

                for (var _iterator4 = elements, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
                    var _ref8;

                    if (_isArray4) {
                        if (_i4 >= _iterator4.length) break;
                        _ref8 = _iterator4[_i4++];
                    } else {
                        _i4 = _iterator4.next();
                        if (_i4.done) break;
                        _ref8 = _i4.value;
                    }

                    var _element = _ref8;

                    this.add(_element, result);
                }
            }
        };

        BootstrapFormRenderer.prototype.add = function add(element, result) {
            var formGroup = element.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (!formGroup.classList.contains('has-error')) {
                    formGroup.classList.add('has-success');
                }
            } else {
                formGroup.classList.remove('has-success');
                formGroup.classList.add('has-error');

                var message = document.createElement('span');
                message.className = 'help-block validation-message';
                message.textContent = result.message;
                message.id = 'validation-message-' + result.id;
                formGroup.appendChild(message);
            }
        };

        BootstrapFormRenderer.prototype.remove = function remove(element, result) {
            var formGroup = element.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (formGroup.classList.contains('has-success')) {
                    formGroup.classList.remove('has-success');
                }
            } else {
                var message = formGroup.querySelector('#validation-message-' + result.id);
                if (message) {
                    formGroup.removeChild(message);

                    if (formGroup.querySelectorAll('.help-block.validation-message').length === 0) {
                        formGroup.classList.remove('has-error');
                    }
                }
            }
        };

        return BootstrapFormRenderer;
    }();
});
var cov_1us1u2661x = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\boundary-map-select2.js',
        hash = '47aee17affb6ac47676c0213db39e6524b6bbbb8',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\boundary-map-select2.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/boundary-map-select2',['exports', 'aurelia-framework', '../../services/file-service', '../../services/spray-session-service', '../../services/boundary-map-service'], function (exports, _aureliaFramework, _fileService, _spraySessionService, _boundaryMapService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapSelect2 = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var BoundaryMapSelect2 = exports.BoundaryMapSelect2 = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _spraySessionService.SpraySessionService, _boundaryMapService.BoundaryMapService), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
        function BoundaryMapSelect2(fileService, spraySessionService, boundaryMapService) {
            var _this = this;

            _classCallCheck(this, BoundaryMapSelect2);

            _initDefineProp(this, 'selectedBoundaryMaps', _descriptor, this);

            this.selectOptions = [];
            this.subscriptions = [];

            this.fileService = fileService;
            this.spraySessionService = spraySessionService;
            this.boundaryMapService = boundaryMapService;
            this.getBoundaryMaps();

            this.boundaryMapService.registerBoundaryMapCreatedCallback(function (map) {
                _this.selectOptions.push({
                    label: map.path,
                    value: map.path
                });
                _this.selectedBoundaryMaps.push(map.path);
            });
        }

        BoundaryMapSelect2.prototype.getBoundaryMaps = function getBoundaryMaps() {
            var _this2 = this;

            this.fileService.getBoundaryMaps().then(function (response) {
                response.forEach(function (map) {
                    _this2.selectOptions.push({
                        label: map,
                        value: map
                    });
                });
            });
        };

        BoundaryMapSelect2.prototype.changeCallback = function changeCallback(evt) {
            this.spraySessionService.sendBoundaryMaps(this.selectedBoundaryMaps);
        };

        return BoundaryMapSelect2;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'selectedBoundaryMaps', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    })), _class2)) || _class);
});
define('text!components/shared/boundary-map-select2.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"components/shared/select2\"></require>\r\n    <select2 name=\"myCustomSelect\" selected.bind=\"selectedBoundaryMaps\" \r\n             options.bind=\"selectOptions\" change.delegate=\"changeCallback($event)\"></select2>\r\n</template>\r\n"; });
var cov_qewwn097g = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\bootstrap-form-renderer.js',
        hash = '8f65fef4d1eec4aba8c2fa02a55494b1ef94727a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\bootstrap-form-renderer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/bootstrap-form-renderer',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BootstrapFormRenderer = exports.BootstrapFormRenderer = function () {
        function BootstrapFormRenderer() {
            _classCallCheck(this, BootstrapFormRenderer);
        }

        BootstrapFormRenderer.prototype.render = function render(instruction) {
            var _this = this;

            var _loop = function _loop() {
                if (_isArray) {
                    if (_i >= _iterator.length) return 'break';
                    _ref2 = _iterator[_i++];
                } else {
                    _i = _iterator.next();
                    if (_i.done) return 'break';
                    _ref2 = _i.value;
                }

                var _ref = _ref2;
                var result = _ref.result,
                    elements = _ref.elements;

                elements.forEach(function (element) {
                    return _this.remove(element, result);
                });
            };

            for (var _iterator = instruction.unrender, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
                var _ref2;

                var _ret = _loop();

                if (_ret === 'break') break;
            }

            var _loop2 = function _loop2() {
                if (_isArray2) {
                    if (_i2 >= _iterator2.length) return 'break';
                    _ref4 = _iterator2[_i2++];
                } else {
                    _i2 = _iterator2.next();
                    if (_i2.done) return 'break';
                    _ref4 = _i2.value;
                }

                var _ref3 = _ref4;
                var result = _ref3.result,
                    elements = _ref3.elements;

                elements.forEach(function (element) {
                    return _this.add(element, result);
                });
            };

            for (var _iterator2 = instruction.render, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
                var _ref4;

                var _ret2 = _loop2();

                if (_ret2 === 'break') break;
            }
        };

        BootstrapFormRenderer.prototype.add = function add(element, result) {
            if (!element.firstElementChild) {
                return;
            }
            var formGroup = element.firstElementChild.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (!formGroup.classList.contains('has-error')) {
                    formGroup.classList.add('has-success');
                }
            } else {
                formGroup.classList.remove('has-success');
                formGroup.classList.add('has-error');

                var message = document.createElement('span');
                message.className = 'help-block validation-message';
                message.textContent = result.message;
                message.id = 'validation-message-' + result.id;
                $(formGroup).find('input').parent().append(message);
            }
        };

        BootstrapFormRenderer.prototype.remove = function remove(element, result) {
            if (!element.firstElementChild) {
                return;
            }
            var formGroup = element.firstElementChild.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (formGroup.classList.contains('has-success')) {
                    formGroup.classList.remove('has-success');
                }
            } else {
                var message = $(formGroup).find('#validation-message-' + result.id);
                if (message) {
                    message.remove();

                    if (formGroup.querySelectorAll('.help-block.validation-message').length === 0) {
                        formGroup.classList.remove('has-error');
                    }
                }
            }
        };

        return BootstrapFormRenderer;
    }();
});
var cov_idbz2ecop = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\app-nav.js',
        hash = 'f85b65f1dab5a5b7522b7f82c256c14251411659',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\app-nav.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/app-nav',['exports', 'aurelia-dependency-injection', 'aurelia-configuration', '../../services/auth-service-helper', '../../services/updates-service', 'px-nav'], function (exports, _aureliaDependencyInjection, _aureliaConfiguration, _authServiceHelper, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AppNav = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var AppNav = exports.AppNav = (_dec = (0, _aureliaDependencyInjection.inject)(_authServiceHelper.AuthServiceHelper, _aureliaConfiguration.AureliaConfiguration, _updatesService.UpdatesService), _dec(_class = function () {
        function AppNav(authServiceHelper, appConfig, updatesService) {
            _classCallCheck(this, AppNav);

            this.appConfig = appConfig;
            this.authServiceHelper = authServiceHelper;
            this.updatesService = updatesService;
        }

        AppNav.prototype.attached = function attached() {
            var _this = this;

            this.updatesService.subscribe(this.handleUpdateNotification.bind(this));
            this.updatesService.isUpdateAvailable().then(function (available) {
                _this.updateAvailable = available;
            });
        };

        AppNav.prototype.handleUpdateNotification = function handleUpdateNotification() {
            this.updateAvailable = true;
        };

        AppNav.prototype.attached = function attached() {
            $('.px-nav').pxNav();
        };

        AppNav.prototype.login = function login() {
            this.authServiceHelper.login();
        };

        AppNav.prototype.logout = function logout() {
            this.authServiceHelper.logout();
        };

        _createClass(AppNav, [{
            key: 'isLoggedIn',
            get: function get() {
                var user = this.authServiceHelper.getUser();
                return user !== null && user !== undefined;
            }
        }, {
            key: 'isCloud',
            get: function get() {
                var isCloud = this.appConfig.get('Web').IsCloud;
                return isCloud;
            }
        }]);

        return AppNav;
    }()) || _class);
});
define('text!components/shared/app-nav.html', ['module'], function(module) { module.exports = "<template>\r\n        <button type=\"button\" class=\"px-nav-toggle\" data-toggle=\"px-nav\">\r\n            <span class=\"px-nav-toggle-arrow\"></span>\r\n            <span class=\"navbar-toggle-icon\"></span>\r\n            <span class=\"px-nav-toggle-label font-size-11\">${\"HIDE MENU\" | t}</span>\r\n        </button>\r\n\r\n        <ul class=\"px-nav-content\">\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"route: dashboard\"><i class=\"px-nav-icon ion-ios-pulse-strong\"></i><span class=\"px-nav-label\">${\"Dashboard\" | t}</span></a>\r\n            </li>\r\n            <li class=\"px-nav-item px-nav-dropdown\">\r\n                <!-- Root dropdown -->\r\n                <a><i class=\"px-nav-icon ion-settings\"></i><span class=\"px-nav-label\">Settings</span></a>\r\n                <ul class=\"px-nav-dropdown-menu\">\r\n                    <li class=\"px-nav-item\">\r\n                        <a route-href=\"route: settings\"><i class=\"px-nav-icon ion-ios-list\"></i><span class=\"px-nav-label\"> System Setup</span></a>\r\n                    </li>\r\n\r\n                    <!--                    <li class=\"px-nav-item\">\r\n                <a route-href=\"#\"><i class=\"px-nav-icon ion-navigate\"></i><span class=\"px-nav-label\">Gps Setup</span></a>\r\n            </li>\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-cog\"></i><span class=\"px-nav-label\"> Boom Sway Setup</span></a>\r\n            </li>\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-cog\"></i><span class=\"px-nav-label\">Nozzle Setup</span></a>\r\n            </li>\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-cog\"></i><span class=\"px-nav-label\">Location Setup</span></a>\r\n            </li>-->\r\n                </ul>\r\n            </li>\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"route: pid-control-tuning\"><i class=\"px-nav-icon ion-arrow-graph-up-right\"></i><span class=\"px-nav-label\">Pid Control Tuning</span></a>\r\n            </li>\r\n            <!--            <li class=\"px-nav-item px-nav-dropdown\">\r\n                    $1$ Root dropdown #1#\r\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-hammer\"></i><span class=\"px-nav-label\">Management</span></a>\r\n                    <ul class=\"px-nav-dropdown-menu\">\r\n                        <li class=\"px-nav-item\">\r\n                            <a route-href=\"#\"><i class=\"px-nav-icon ion-settings\"></i><span class=\"px-nav-label\">Management Setup</span></a>\r\n                        </li>\r\n                        <li class=\"px-nav-item\">\r\n                            <a route-href=\"#\"><i class=\"px-nav-icon ion-beaker\"></i><span class=\"px-nav-label\">Product</span></a>\r\n                        </li>\r\n                        <li class=\"px-nav-item\">\r\n\r\n                            <a route-href=\"#\"><i class=\"px-nav-icon ion-map\"></i><span class=\"px-nav-label\">Map Preview</span></a>\r\n                        </li>\r\n                        <li class=\"px-nav-item\">\r\n                            <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-paper\"></i><span class=\"px-nav-label\">Field Notes</span></a>\r\n                        </li>\r\n                    </ul>\r\n                </li>-->\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"route: filetransfer\"><i class=\"px-nav-icon ion-usb\"></i><span class=\"px-nav-label\">${\"File Transfer\" | t}</span></a>\r\n            </li>\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"route: logs\"><i class=\"px-nav-icon ion-android-list\"></i><span class=\"px-nav-label\">${\"Log\" | t}</span></a>\r\n            </li>\r\n            <li if.bind=\"isCloud && !isLoggedIn\" class=\"px-nav-item\">\r\n                <a click.delegate=\"login()\"><i class=\"px-nav-icon ion-log-in\"></i><span class=\"px-nav-label\">${\"Login\" | t}</span></a>\r\n            </li>\r\n            <li if.bind=\"isCloud && isLoggedIn\" class=\"px-nav-item\">\r\n                <a click.delegate=\"logout()\"><i class=\"px-nav-icon ion-log-out\"></i><span class=\"px-nav-label\">${\"Logout\" | t}</span></a>\r\n            </li>\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"route: updates\"><i class=\"px-nav-icon ion-android-cloud-outline\"></i><i if.bind=\"updateAvailable\" class=\"px-notification-icon ion-ios-information\"></i><span class=\"px-nav-label\">${\"Updates\" | t}</span></a>\r\n            </li>\r\n            <li class=\"px-nav-item\">\r\n                <a route-href=\"route: debug\"><i class=\"px-nav-icon ion-code\"></i><span class=\"px-nav-label\">${\"Debug\" | t}</span></a>\r\n            </li>\r\n        </ul>\r\n</template>\r\n"; });
var cov_i5iu1x3cy = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\app-header.js',
        hash = 'fc1120cbe0e8d46924697d8c02236172bdb34404',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\app-header.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/app-header',['exports', 'aurelia-framework', 'aurelia-configuration', '../../views/map/map-view-state', 'aurelia-router'], function (exports, _aureliaFramework, _aureliaConfiguration, _mapViewState, _aureliaRouter) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AppHeader = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var AppHeader = exports.AppHeader = (_dec = (0, _aureliaFramework.inject)(_mapViewState.MapViewState, _aureliaRouter.Router, _aureliaConfiguration.AureliaConfiguration), _dec(_class = function () {
        function AppHeader(mapViewState, router, appConfig) {
            _classCallCheck(this, AppHeader);

            this.mapViewState = mapViewState;
            this.router = router;
            this.appConfig = appConfig;
        }

        AppHeader.prototype.overheadView = function overheadView() {
            this.mapViewState.setViewMode('overhead');
        };

        AppHeader.prototype.fieldView = function fieldView() {
            this.mapViewState.setViewMode('field');
        };

        AppHeader.prototype.chaseView = function chaseView() {
            this.mapViewState.setViewMode('chase');
        };

        AppHeader.prototype.getRoute = function getRoute() {
            return this.router.currentInstruction.config.name;
        };

        AppHeader.prototype.attached = function attached() {
            var appUrl = this.appConfig.get('Web.AppUrl');
            var protocol = window.location.protocol;
            var hostname = window.location.hostname;
            var port = window.location.port;
            var actualUrl = protocol + '//' + hostname + ':' + port;
            if (actualUrl !== appUrl) {
                window.location.assign(appUrl);
            }
        };

        return AppHeader;
    }()) || _class);
});
define('text!components/shared/app-header.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"components/shared/toolbar\"></require>\r\n        <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#px-navbar-collapse\" aria-expanded=\"false\">\r\n            <i class=\"navbar-toggle-icon\"></i>\r\n        </button>\r\n        <div style=\"min-height: 50px;\" class=\"navbar-header\">\r\n            <a class=\"mr-1\" route-href=\"route: dashboard\">\r\n                <img height=\"40em\" width=\"auto\" src=\"../assets/CapstanLogo.png\" alt=\"CapstanAG\"/>\r\n            </a>\r\n        </div>\r\n   \r\n        <div if.bind=\"getRoute() === 'dashboard'\" class=\"navbar-collapse collapse\" id=\"px-navbar-collapse\" aria-expanded=\"false\">\r\n            <ui class=\"nav navbar-nav\">\r\n                <li style=\"padding-top: 10px\">\r\n                    <button class=\"btn btn-primary ion-arrow-down-a\" type=\"button\" data-toggle=\"collapse\" data-target=\"#toolbar-container\" aria-expanded=\"false\"\r\n                            aria-controls=\"toolbar-container\">\r\n                        Toolbar\r\n                    </button>\r\n\r\n                </li>\r\n                <li style=\"padding-top: 10px\">\r\n                    <button class=\"btn btn-primary ion-eye\" type=\"button\" click.delegate=\"chaseView()\">\r\n                        Chase\r\n                    </button>\r\n                </li>\r\n                <li style=\"padding-top: 10px\">\r\n                    <button class=\"btn btn-primary ion-eye\" type=\"button\" click.delegate=\"overheadView()\">\r\n                        Overhead\r\n                    </button>\r\n\r\n\r\n                </li>\r\n                <li style=\"padding-top: 10px\">\r\n                    <button class=\"btn btn-warning ion-eye\" type=\"button\" click.delegate=\"fieldView()\">\r\n                        DEBUG\r\n                    </button>\r\n                </li>\r\n            </ui>\r\n\r\n        </div>\r\n</template>\r\n"; });
var cov_4legg30y7 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\app-footer.js',
        hash = '940ad780146ddf498dc62de95b4881b735fdfed1',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\shared\\app-footer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/app-footer',['exports', 'aurelia-framework', '../../services/updates-service'], function (exports, _aureliaFramework, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AppFooter = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var AppFooter = exports.AppFooter = (_dec = (0, _aureliaFramework.inject)(_updatesService.UpdatesService), _dec(_class = function () {
        function AppFooter(updatesService) {
            _classCallCheck(this, AppFooter);

            this.updatesService = updatesService;
        }

        AppFooter.prototype.attached = function attached() {
            var _this = this;

            this.updatesService.getCurrentVersion().then(function (version) {
                _this.currentVersion = version;
            });
        };

        return AppFooter;
    }()) || _class);
});
define('text!components/shared/app-footer.html', ['module'], function(module) { module.exports = "<template>\r\n    <div class=\"px-footer px-footer-bottom app-footer\">&copy; 2018 - ${\"CapstanAg\" | t} - [${currentVersion}]</div>\r\n</template>\r\n"; });
var cov_11ciq3ic3x = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\pressure-chart.js',
        hash = '25f87f656ebfb076e54a99a6baf25b3067ffe63a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\pressure-chart.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/pressure-chart',['exports', 'aurelia-framework', './graphtab', './canvas-element-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _graphtab, _canvasElementService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureChart = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor;

    var PressureChart = exports.PressureChart = (_dec = (0, _aureliaFramework.inject)(_canvasElementService.CanvasElementService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = _dec2(_class = (_class2 = function (_ref) {
        _inherits(PressureChart, _ref);

        function PressureChart(canvasElementService, gatewayService) {
            _classCallCheck(this, PressureChart);

            var data = {
                labels: [],
                datasets: [{
                    data: [],
                    borderWidth: 0,
                    hoverBackgroundColor: 'rgba(93, 198, 98, 1)',
                    borderColor: 'rgba(217,217,217, 80)'
                }]
            };

            var _this = _possibleConstructorReturn(this, _ref.call(this, gatewayService, data, false, 1));

            _initDefineProp(_this, 'state', _descriptor, _this);

            _this.subscribeProperties = ['BoomAAPressure'];

            _this.gatewayService = gatewayService;
            _this.canvasElementService = canvasElementService;
            _this.canvasElement = _this.canvasElementService.getCanvas('pressure-chart');
            _this.ctx = _this.canvasElementService.get2DContext('pressure-chart');
            return _this;
        }

        PressureChart.prototype.activate = function activate(model) {
            this.state = model.state;
        };

        PressureChart.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.gatewayService.subscribe(this.subscribeProperties, 'pressure-chart');
            this.setDataLabels();
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'boomAAPressure').subscribe(function () {
                _this2.updateChart();
            }));
        };

        PressureChart.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'pressure-chart');
        };

        PressureChart.prototype.getChartData = function getChartData() {
            var _this3 = this;

            var nozzlesAsBoom = [];

            var _loop = function _loop(j) {
                _this3.state.nozzleBoomCh.forEach(function (n) {
                    if (n === j) {
                        nozzlesAsBoom.push(_this3.state.boomAAPressure[j] / _this3.state.pSensor1MaxPressure * 100);
                    }
                });
            };

            for (var j = 0; j <= this.boomCount; j++) {
                _loop(j);
            }
            return nozzlesAsBoom;
        };

        PressureChart.prototype.setDataLabels = function setDataLabels() {
            var boomLabelArray = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                boomLabelArray.push('ch' + this.state.nozzleBoomCh[i]);
            }
            this._activeChart.config.data.labels = boomLabelArray;
        };

        PressureChart.prototype.updateChart = function updateChart() {
            var _this4 = this;

            this._activeChart.data.datasets.forEach(function (dataset) {
                dataset.data = _this4.getChartData();
                dataset.backgroundColor = _this4.getChartBackgroundColors();
            });

            this.refreshChart();
        };

        PressureChart.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this5 = this;

            var nozzleColors = [];

            var _loop2 = function _loop2(j) {
                var color = 'rgb(64, 181, 59)';
                var firstNozzleOnBoom = _this5.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j;
                });
                var lastNozzleOnBoom = j + 1 <= _this5.boomCount ? _this5.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j + 1;
                }) : _this5.state.nozzleMax;
                if (_this5.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this5.isFlowError(n);
                })) {
                    color = 'rgb(235,237,28)';
                }
                if (_this5.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this5.isElectricalError(n);
                })) {
                    color = 'rgb(238,29,35)';
                }
                _this5.state.nozzleBoomCh.forEach(function (n) {
                    if (n === j) {
                        nozzleColors.push(color);
                    }
                });
            };

            for (var j = 0; j <= this.boomCount; j++) {
                _loop2(j);
            }

            return nozzleColors;
        };

        return PressureChart;
    }((_graphtab.SprayNozzleGraph)), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec3], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/pressure-chart.html', ['module'], function(module) { module.exports = "<template>\r\n    <div ref=\"container\" style=\"height:200px\"></div>\r\n</template>\r\n"; });
var cov_gzjkicfmg = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\nozzle-info.js',
        hash = '8621039612ef93531f7067f63a824905695d8ee1',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\nozzle-info.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/nozzle-info',['exports', 'aurelia-framework', 'aurelia-i18n', '../../components/graphtab/boom-section-graph', '../../components/graphtab/pressure-chart', '../../components/graphtab/duty-chart', '../../components/graphtab/flow-chart', 'aurelia-event-aggregator', './canvas-element-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaI18n, _boomSectionGraph, _pressureChart, _dutyChart, _flowChart, _aureliaEventAggregator, _canvasElementService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NozzleInfoCustomElement = undefined;

    var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
        return typeof obj;
    } : function (obj) {
        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2;

    var NozzleInfoCustomElement = exports.NozzleInfoCustomElement = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.BindingEngine, _aureliaI18n.I18N, _aureliaEventAggregator.EventAggregator, _canvasElementService.CanvasElementService, _pressureChart.PressureChart, _dutyChart.DutyChart, _flowChart.FlowChart, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(false), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = _dec2(_class = (_class2 = function () {
        function NozzleInfoCustomElement(bindingEngine, i18n, eventAggregator, canvasElementService, pressureChart, dutyChart, flowChart, gatewayService) {
            _classCallCheck(this, NozzleInfoCustomElement);

            this.selectedNozzle = {};
            this.currentErrorIndex = 0;
            this.nozzleErrors = [];
            this.flowErrorCodes = [0, 1, 5, 9, 11, 12];
            this.electricalErrorCodes = [2, 3, 4];
            this.subscribeProperties = ['NozzleErrorCode', 'boomAAPressure'];
            this.activeChartIndex = 0;
            this.subscriptions = [];

            _initDefineProp(this, 'state', _descriptor, this);

            _initDefineProp(this, 'chartOption', _descriptor2, this);

            this.gatewayService = gatewayService;
            this.bindingEngine = bindingEngine;
            this.i18n = i18n;
            this.ea = eventAggregator;

            this.canvasElementService = canvasElementService;
            this.boomCanvas = this.canvasElementService.getCanvas('boom-chart');
            this.boomCanvas.setAttribute('width', 400);
            this.boomCanvas.setAttribute('height', 10);
            this.boomCtx = this.canvasElementService.get2DContext('boom-chart');

            this.charts = [dutyChart, pressureChart, flowChart];
        }

        NozzleInfoCustomElement.prototype.attached = function attached() {
            var _this = this;

            this.carousel = $('#graph-tab');
            this.gatewayService.subscribe(this.subscribeProperties, 'nozzle-info');
            this.subscriptions.push(this.ea.subscribe('nozzleSelected', function (response) {
                _this.selectedIndex = response.index;
            }));

            this.carousel.owlCarousel({
                items: 1,
                margin: 20,
                mouseDrag: true,
                touchDrag: true,

                dotsContainer: '#owl-dots',
                rtl: $('html').attr('dir') === 'rtl'
            });

            this.carousel.on('changed.owl.carousel', function (event) {
                _this.activeChartIndex = event.item.index;

                if (_this.activeChartIndex !== 1 && typeof _this.selectedIndex !== 'undefined') {
                    _this.charts[_this.activeChartIndex].openTip(0, _this.selectedIndex);
                }
            });

            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleErrorCode').subscribe(function () {
                _this.updateCharts();
            }));

            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'boomAAPressure').subscribe(function () {
                _this.updateCharts();
            }));

            this.selectedNozzle = this.charts[this.activeChartIndex].getSelectedNozzle();

            var boomSectionData = {
                labels: [],
                datasets: []
            };

            this.chartCarousel.insertAdjacentElement('afterend', this.boomCanvas);
            this.boomChart = new _boomSectionGraph.BoomSectionGraph(this.boomCtx, boomSectionData);

            this.errorInterval = setInterval(function () {
                return _this.cycleErrors();
            }, 5000);
        };

        NozzleInfoCustomElement.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'nozzle-info');
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
            clearInterval(this.errorInterval);
            clearTimeout(this.errorTimeout);
        };

        NozzleInfoCustomElement.prototype.backError = function backError() {
            this.currentErrorIndex = this.currentErrorIndex === 0 ? this.nozzleErrors.length - 1 : this.currentErrorIndex - 1;
            clearInterval(this.errorInterval);
            clearTimeout(this.errorTimeout);
            this.restartErrorInterval(this);
        };

        NozzleInfoCustomElement.prototype.nextError = function nextError() {
            clearInterval(this.errorInterval);
            clearTimeout(this.errorTimeout);
            this.cycleErrors(this);
            this.restartErrorInterval(this);
        };

        NozzleInfoCustomElement.prototype.cycleErrors = function cycleErrors() {
            var _this2 = this;

            this.currentErrorIndex = this.currentErrorIndex < this.nozzleErrors.length - 1 ? this.currentErrorIndex + 1 : 0;
            if (this.nozzleErrors.some(function (e) {
                return e.index === _this2.selectedNozzle;
            })) {
                $.extend(this.selectedNozzle, this.nozzleErrors[this.currentErrorIndex]);
            } else {
                clearInterval(this.errorInterval);
                clearTimeout(this.errorTimeout);
                this.errorTimeout = setTimeout(function () {
                    return _this2.restartErrorInterval(_this2);
                }, 5000);
            }
            if (this.activeChartIndex !== 1 && typeof this.selectedNozzle.index !== 'undefined') {
                this.charts[this.activeChartIndex].openTip(0, this.selectedNozzle.index);
            }
        };

        NozzleInfoCustomElement.prototype.updateCharts = function updateCharts() {
            this.nozzleErrors = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                if (this.state.nozzleErrorCode[i] !== 15) {
                    this.nozzleErrors.push({ index: i });
                }
            }

            this.boomChart.options.scales.xAxes[0].ticks.max = this.state.nozzleMax;
            var newBoomSectionData = this.getBoomSectionData();
            if (this.boomChart.data.datasets !== newBoomSectionData) {
                this.boomChart.data.datasets = newBoomSectionData;
                this.boomChart.update();
            }
        };

        NozzleInfoCustomElement.prototype.getChartLabel = function getChartLabel() {
            if (this.chartOption === 'psi') {
                return 'Pressure';
            }
            if (this.chartOption === 'duty') {
                return 'Duty Cycle';
            }
            if (this.chartOption === 'flow') {
                return 'Flow Rate';
            }
        };

        NozzleInfoCustomElement.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this3 = this;

            if (this.chartOption === 'psi') {
                var _ret = function () {
                    var nozzleColors = [];

                    var _loop = function _loop(j) {
                        var color = 'rgb(64, 181, 59)';
                        var firstNozzleOnBoom = _this3.state.nozzleBoomCh.findIndex(function (n) {
                            return n === j;
                        });
                        var lastNozzleOnBoom = j + 1 <= _this3.boomCount ? _this3.state.nozzleBoomCh.findIndex(function (n) {
                            return n === j + 1;
                        }) : _this3.state.nozzleMax;
                        if (_this3.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                            return _this3.isFlowError(n);
                        })) {
                            color = 'rgb(235,237,28)';
                        }
                        if (_this3.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                            return _this3.isElectricalError(n);
                        })) {
                            color = 'rgb(238,29,35)';
                        }
                        _this3.state.nozzleBoomCh.forEach(function (n) {
                            if (n === j) {
                                nozzleColors.push(color);
                            }
                        });
                    };

                    for (var j = 0; j <= _this3.boomCount; j++) {
                        _loop(j);
                    }

                    return {
                        v: nozzleColors
                    };
                }();

                if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
            }

            return this.state.nozzleErrorCode.map(function (n) {
                if (_this3.electricalErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(238,29,35)';
                }
                if (_this3.flowErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(235,237,28)';
                }
                return 'rgb(63, 140, 211)';
            });
        };

        NozzleInfoCustomElement.prototype.getBoomSectionData = function getBoomSectionData() {
            var _this4 = this;

            this.boomCount = this.state.nozzleBoomCh[this.state.nozzleMax - 1];
            var boomSections = [];

            var _loop2 = function _loop2(j) {
                var color = 'rgb(64, 181, 59)';

                var firstNozzleOnBoom = _this4.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j;
                });
                var lastNozzleOnBoom = j + 1 <= _this4.boomCount ? _this4.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j + 1;
                }) : _this4.state.nozzleMax;
                if (_this4.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this4.isFlowError(n);
                })) {
                    color = 'rgb(235,237,28)';
                }
                if (_this4.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this4.isElectricalError(n);
                })) {
                    color = 'rgb(238,29,35)';
                }

                if (_this4.state.nozzleAADutyCycle.slice(firstNozzleOnBoom, lastNozzleOnBoom).every(function (n) {
                    return n === 0;
                })) {
                    color = 'rgb(68,68,68)';
                }
                boomSections.push({
                    label: '',
                    data: [lastNozzleOnBoom],
                    borderWidth: 2,
                    backgroundColor: color,
                    borderColor: 'rgb(217,217,217)'
                });
            };

            for (var j = 0; j <= this.boomCount; j++) {
                _loop2(j);
            }
            return boomSections;
        };

        NozzleInfoCustomElement.prototype.restartErrorInterval = function restartErrorInterval() {
            var _this5 = this;

            $.extend(this.selectedNozzle, this.nozzleErrors[this.currentErrorIndex]);
            this.errorInterval = setInterval(function () {
                return _this5.cycleErrors(_this5);
            }, 5000);
        };

        NozzleInfoCustomElement.prototype.isFlowError = function isFlowError(code) {
            return this.flowErrorCodes.some(function (e) {
                return e === code;
            });
        };

        NozzleInfoCustomElement.prototype.isElectricalError = function isElectricalError(code) {
            return this.electricalErrorCodes.some(function (e) {
                return e === code;
            });
        };

        return NozzleInfoCustomElement;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec3], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'chartOption', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return '';
        }
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/nozzle-info.html', ['module'], function(module) { module.exports = "<template view-cache=\"1\">\r\n    <require from=\"resources/value-converters/dutyCycle\"></require>\r\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\r\n\r\n    <div class=\"container-fluid nozzle-container\">\r\n        <div id=\"graph-tab\" style=\"display: inline-block;\" class=\"owl-carousel row\" ref=\"chartCarousel\">\r\n            <compose view-model=\"components/graphtab/duty-chart\" model.bind=\"{state: state}\"> </compose>\r\n            <compose view-model=\"components/graphtab/pressure-chart\" model.bind=\"{state: state}\"> </compose>\r\n            <compose view-model=\"components/graphtab/flow-chart\" view=\"components/graphtab/chart-element.html\" model.bind=\"state\"> </compose>\r\n        </div>\r\n        <div id=\"owl-dots\" class=\"owl-dots\" style=\"margin-top:0\"></div>\r\n        <div class=\"row\">\r\n            <button class=\"btn btn-primary pull-left spray-nozzle-button\" click.trigger=\"backError()\"><i class=\"ion-ios-arrow-back\"></i></button>\r\n            <button class=\"btn btn-primary pull-right spray-nozzle-button\" click.trigger=\"nextError()\"><i class=\"ion-ios-arrow-forward\"></i></button>\r\n            <div class=\"bg-primary\" id=\"error-info\">\r\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Valve\" | t}: <span class=\"spray-nozzle-text\">${selectedNozzle.index}</span> </span>\r\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Duty Cycle\" | t}: <span class=\"spray-nozzle-text\">${state.nozzleAADutyCycle[selectedNozzle.index] | dutyCycle}%</span> </span>\r\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Flow Rate\" | t}: <span class=\"spray-nozzle-text\">${state.nozzleAAFlowRate[selectedNozzle.index] | mlPerHectareToGpa}</span> </span>\r\n                <span class=\"col-sm-3 spray-nozzle-info\"> ${\"Plunger\" | t}: <span i18n=\"nozzleErrorCodes.${state.nozzleErrorCode[selectedNozzle.index]}\" class=\"${isFlowError(state.nozzleErrorCode[selectedNozzle.index]) ? 'spray-nozzle-error' : 'spray-nozzle-text'}\">${state.nozzleErrorCode[selectedNozzle.index]}</span> </span>\r\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Coil\" | t}: <span i18n=\"coilErrorCodes.${state.nozzleErrorCode[selectedNozzle.index]}\" class=\"${isElectricalError(state.nozzleErrorCode[selectedNozzle.index]) ? 'spray-nozzle-error' : 'spray-nozzle-text'}\">${state.nozzleErrorCode[selectedNozzle.index]}</span> </span>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</template>\r\n"; });
var cov_2m6nt8oplh = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\graphtab.js',
        hash = '3598491a7759cbe4405adcce4ee855bd1a91d869',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\graphtab.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/graphtab',['exports', 'aurelia-framework', 'px-chart', 'aurelia-event-aggregator'], function (exports, _aureliaFramework, _pxChart, _aureliaEventAggregator) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SprayNozzleGraph = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _desc, _value, _class;

    var SprayNozzleGraph = exports.SprayNozzleGraph = (_dec = (0, _aureliaFramework.computedFrom)('state.nozzleBoomCh, state.nozzleMax'), (_class = function () {
        function SprayNozzleGraph(gatewayService, data) {
            var tooltipEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
            var barPercent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.95;

            var _this = this;

            var max = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 100;
            var stepSize = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 10;

            _classCallCheck(this, SprayNozzleGraph);

            this.isActiveChart = false;
            this.flowErrorCodes = [0, 1, 5, 9, 11, 12];
            this.electricalErrorCodes = [2, 3, 4];
            this.subscriptions = [];
            this.selectedNozzle = {};

            this.gatewayService = gatewayService;
            this.bindingEngine = _aureliaFramework.Container.instance.get(_aureliaFramework.BindingEngine);
            this.ea = _aureliaFramework.Container.instance.get(_aureliaEventAggregator.EventAggregator);

            this._chartData = {
                type: 'bar',
                data: data,
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    animation: {
                        duration: 5
                    },
                    layout: {
                        padding: {
                            left: 0,
                            right: 3,
                            top: 0,
                            bottom: 0
                        }
                    },
                    tooltips: {
                        enabled: tooltipEnabled,
                        intersect: false,
                        mode: 'index',
                        callbacks: {
                            afterFooter: function afterFooter(tooltipItem) {
                                if (tooltipItem.length > 0 && tooltipItem[0].index >= 0) {
                                    var index = tooltipItem[0].index;
                                    _this.ea.publish('nozzleSelected', { index: index });
                                    $.extend(_this.selectedNozzle, {
                                        index: index
                                    });
                                }
                            }
                        }
                    },
                    events: ['click', 'touchstart', 'touchmove', 'touchend'],
                    legend: {
                        display: false
                    },
                    scales: {
                        xAxes: [{
                            display: false,
                            categoryPercentage: 1.0,
                            barPercentage: barPercent,
                            gridLines: {
                                display: false
                            }
                        }],
                        yAxes: [{
                            ticks: {
                                beginAtZero: true,
                                max: max,
                                stepSize: stepSize
                            },
                            gridLines: {
                                display: false
                            }
                        }]
                    }
                }
            };
        }

        SprayNozzleGraph.prototype.openTip = function openTip(datasetIndex, pointIndex) {
            this._activeChart.tooltip._active = [];
            var activeElements = this._activeChart.tooltip._active;
            var requestedElem = this._activeChart.getDatasetMeta(datasetIndex).data[pointIndex];
            for (var i = 0; i < activeElements.length; i++) {
                if (requestedElem._index === activeElements[i]._index) {
                    return;
                }
            }
            activeElements.push(requestedElem);
            this._activeChart.tooltip._active = activeElements;
            this._activeChart.tooltip.update(true);
            this._activeChart.draw();
        };

        SprayNozzleGraph.prototype.attached = function attached() {
            var _this2 = this;

            this.container.appendChild(this.canvasElement);
            this._isSetup = true;
            this.createChart();

            this.gatewayService.subscribe(['NozzleMax'], 'graphtab');
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleMax').subscribe(function () {
                _this2.setDataLabels();
                _this2.refreshChart();
            }));
        };

        SprayNozzleGraph.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(['NozzleMax'], 'graphtab');
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
            this.subscriptions = [];
            this._activeChart.destroy();
            this._isSetup = false;
        };

        SprayNozzleGraph.prototype.createChart = function createChart() {
            this._activeChart = new _pxChart.Chart(this.ctx, this._chartData);
            this.refreshChart();
        };

        SprayNozzleGraph.prototype.refreshChart = function refreshChart() {
            if (this._isSetup) {
                this._activeChart.update();
                this._activeChart.resize();
            }
        };

        SprayNozzleGraph.prototype.isFlowError = function isFlowError(code) {
            return this.flowErrorCodes.some(function (e) {
                return e === code;
            });
        };

        SprayNozzleGraph.prototype.isElectricalError = function isElectricalError(code) {
            return this.electricalErrorCodes.some(function (e) {
                return e === code;
            });
        };

        SprayNozzleGraph.prototype.getSelectedNozzle = function getSelectedNozzle() {
            return this.selectedNozzle;
        };

        SprayNozzleGraph.prototype.setSelectedNozzle = function setSelectedNozzle(nozzle) {
            this.selectedNozzle = nozzle;
        };

        _createClass(SprayNozzleGraph, [{
            key: 'boomCount',
            get: function get() {
                return this.state.nozzleBoomCh[this.state.nozzleMax - 1];
            }
        }]);

        return SprayNozzleGraph;
    }(), (_applyDecoratedDescriptor(_class.prototype, 'boomCount', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'boomCount'), _class.prototype)), _class));
});
var cov_zdksdhmz5 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\flow-chart.js',
        hash = 'e601e292dae2738f646053a15fe2c2db41c83a90',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\flow-chart.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/flow-chart',['exports', 'aurelia-framework', './graphtab', './canvas-element-service', '../../resources/value-converters/mlPerHectareToGpa', '../../services/gateway-service'], function (exports, _aureliaFramework, _graphtab, _canvasElementService, _mlPerHectareToGpa, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowChart = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var FlowChart = exports.FlowChart = (_dec = (0, _aureliaFramework.inject)(_mlPerHectareToGpa.MlPerHectareToGpaValueConverter, _canvasElementService.CanvasElementService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(), _dec(_class = _dec2(_class = (_class2 = function (_ref) {
        _inherits(FlowChart, _ref);

        function FlowChart(mlPerHectareToGpaValueConverter, canvasElementService, gatewayService) {
            _classCallCheck(this, FlowChart);

            var data = {
                labels: [],
                datasets: [{
                    data: ['8', '9', '77'],
                    borderWidth: 0,
                    hoverBackgroundColor: 'rgba(93, 198, 98, 1)',
                    borderColor: 'rgba(217,217,217, 80)'
                }]
            };

            var _this = _possibleConstructorReturn(this, _ref.call(this, gatewayService, data, true, 0.95, 10, 1));

            _initDefineProp(_this, 'state', _descriptor, _this);

            _this.electricalErrorCodes = [2, 3, 4];
            _this.flowErrorCodes = [0, 1, 5, 9, 11, 12];
            _this.subscribeProperties = ['NozzleAAFlowRate'];

            _this.gatewayService = gatewayService;
            _this.mlPerHectareToGpaValueConverter = mlPerHectareToGpaValueConverter;
            _this.canvasElementService = canvasElementService;
            _this.canvasElement = _this.canvasElementService.getCanvas('flow-chart');
            _this.ctx = _this.canvasElementService.get2DContext('flow-chart');
            return _this;
        }

        FlowChart.prototype.activate = function activate(state) {
            this.state = state;
        };

        FlowChart.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setDataLabels();
            this.gatewayService.subscribe(this.subscribeProperties, 'flow-chart');
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleAAFlowRate').subscribe(function () {
                _this2._activeChart.data.datasets.forEach(function (dataset) {
                    dataset.data = _this2.getChartData();
                    dataset.backgroundColor = _this2.getChartBackgroundColors();
                });
                _this2.refreshChart();
            }));
        };

        FlowChart.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'flow-chart');
        };

        FlowChart.prototype.setDataLabels = function setDataLabels() {
            var sprayNozzleLabelArray = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                sprayNozzleLabelArray.push('sp' + i);
            }
            this._activeChart.config.data.labels = sprayNozzleLabelArray;
        };

        FlowChart.prototype.getChartData = function getChartData() {
            var _this3 = this;

            return this.state.nozzleAAFlowRate.map(function (n) {
                return _this3.mlPerHectareToGpaValueConverter.toView(n);
            });
        };

        FlowChart.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this4 = this;

            return this.state.nozzleErrorCode.map(function (n) {
                if (_this4.electricalErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(238,29,35)';
                }
                if (_this4.flowErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(235,237,28)';
                }
                return 'rgb(63, 140, 211)';
            });
        };

        return FlowChart;
    }((_graphtab.SprayNozzleGraph)), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/flow-chart.html', ['module'], function(module) { module.exports = "<template>\r\n    <div ref=\"container\" style=\"height:200px\"></div>\r\n</template>\r\n"; });
var cov_lizw1o1eb = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\duty-chart.js',
        hash = '41b1cf496b5948ce0a95e18c07ae4611eed8700d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\duty-chart.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/duty-chart',['exports', 'aurelia-framework', './graphtab', '../../resources/value-converters/dutyCycle', './canvas-element-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _graphtab, _dutyCycle, _canvasElementService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.DutyChart = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var DutyChart = exports.DutyChart = (_dec = (0, _aureliaFramework.inject)(_dutyCycle.DutyCycleValueConverter, _canvasElementService.CanvasElementService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(), _dec(_class = _dec2(_class = (_class2 = function (_ref) {
        _inherits(DutyChart, _ref);

        function DutyChart(dutyCycleValueConverter, canvasElementService, gatewayService) {
            _classCallCheck(this, DutyChart);

            var data = {
                labels: [],
                datasets: [{
                    data: [],
                    borderWidth: 0,
                    hoverBackgroundColor: 'rgba(93, 198, 98, 1)',
                    borderColor: 'rgba(217,217,217, 80)'
                }]
            };

            var _this = _possibleConstructorReturn(this, _ref.call(this, gatewayService, data));

            _initDefineProp(_this, 'state', _descriptor, _this);

            _this.electricalErrorCodes = [2, 3, 4];
            _this.flowErrorCodes = [0, 1, 5, 9, 11, 12];
            _this.subscribeProperties = ['NozzleAADutyCycle'];

            _this.gatewayService = gatewayService;
            _this.dutyCycleValueConverter = dutyCycleValueConverter;
            _this.canvasElementService = canvasElementService;
            _this.canvasElement = _this.canvasElementService.getCanvas('duty-chart');
            _this.ctx = _this.canvasElementService.get2DContext('duty-chart');
            return _this;
        }

        DutyChart.prototype.activate = function activate(model) {
            this.state = model.state;
        };

        DutyChart.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setDataLabels();
            this.gatewayService.subscribe(this.subscribeProperties, 'duty-chart');
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleAADutyCycle').subscribe(function () {
                _this2._activeChart.data.datasets.forEach(function (dataset) {
                    dataset.data = _this2.getChartData();
                    dataset.backgroundColor = _this2.getChartBackgroundColors();
                });
                _this2.refreshChart();
            }));
        };

        DutyChart.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'duty-chart');
        };

        DutyChart.prototype.setDataLabels = function setDataLabels() {
            var sprayNozzleLabelArray = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                sprayNozzleLabelArray.push('sp' + i);
            }
            this._activeChart.config.data.labels = sprayNozzleLabelArray;
        };

        DutyChart.prototype.getChartData = function getChartData() {
            var _this3 = this;

            return this.state.nozzleAADutyCycle.map(function (n) {
                return _this3.dutyCycleValueConverter.toView(n);
            });
        };

        DutyChart.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this4 = this;

            return this.state.nozzleErrorCode.map(function (n) {
                if (_this4.electricalErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(238,29,35)';
                }
                if (_this4.flowErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(235,237,28)';
                }
                return 'rgb(63, 140, 211)';
            });
        };

        return DutyChart;
    }((_graphtab.SprayNozzleGraph)), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/duty-chart.html', ['module'], function(module) { module.exports = "<template>\r\n    <div ref=\"container\" style=\"height:200px\"></div>\r\n</template>\r\n"; });
define('text!components/graphtab/chart-element.html', ['module'], function(module) { module.exports = "<template>\r\n    <div ref=\"container\" style=\"height:200px\"></div>\r\n</template>\r\n"; });
var cov_mu9ldsxhj = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\canvas-element-service.js',
        hash = 'f5d0b5db74130113d2d872577fd75c37f8c443cb',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\canvas-element-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/canvas-element-service',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var CanvasElementService = exports.CanvasElementService = function () {
        function CanvasElementService() {
            _classCallCheck(this, CanvasElementService);

            this.canvasRegistry = {};
        }

        CanvasElementService.prototype.getCanvas = function getCanvas(id) {
            if (this.canvasRegistry[id]) {
                return this.canvasRegistry[id].el;
            }
            var el = document.createElement('canvas');
            el.setAttribute('id', id);
            this.canvasRegistry[id] = {
                el: el,
                ctx: el.getContext('2d')
            };
            return el;
        };

        CanvasElementService.prototype.get2DContext = function get2DContext(id) {
            return this.canvasRegistry[id].ctx;
        };

        return CanvasElementService;
    }();
});
var cov_pxw426ygg = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\boom-section-graph.js',
        hash = 'de82a3b47b790b541fb306b9bfa9839eafe1b71f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\graphtab\\boom-section-graph.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/boom-section-graph',['exports', 'px-chart'], function (exports, _pxChart) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomSectionGraph = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var BoomSectionGraph = exports.BoomSectionGraph = function (_ref) {
        _inherits(BoomSectionGraph, _ref);

        function BoomSectionGraph(ctx, data) {
            _classCallCheck(this, BoomSectionGraph);

            return _possibleConstructorReturn(this, _ref.call(this, ctx, {
                type: 'horizontalBar',
                data: data,
                options: {
                    animation: {
                        duration: 5
                    },
                    layout: {
                        padding: {
                            left: 37,
                            right: 0,
                            top: 0,
                            bottom: 0
                        }
                    },
                    tooltips: {
                        enabled: false
                    },
                    hover: {
                        mode: 'nearest'
                    },
                    events: ['click', 'touchstart', 'touchmove', 'touchend'],
                    legend: {
                        display: false
                    },
                    scales: {
                        xAxes: [{
                            stacked: false,
                            display: false,
                            gridLines: {
                                display: false
                            },
                            ticks: {
                                beginAtZero: true,
                                max: 0
                            }
                        }],
                        yAxes: [{
                            stacked: true,
                            display: false,
                            barPercentage: 0.6,
                            gridLines: {
                                display: false
                            }
                        }]
                    }
                }
            }));
        }

        return BoomSectionGraph;
    }((_pxChart.Chart));
});
var cov_2oakp1ceux = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\filetransfer\\system-folder.js',
        hash = 'f576426ee4840395ce501b90885760d06e6f67d4',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\filetransfer\\system-folder.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/filetransfer/system-folder',['exports', 'aurelia-framework', '../../services/file-service', 'dragster'], function (exports, _aureliaFramework, _fileService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemFolder = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var SystemFolder = exports.SystemFolder = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, Element), _dec(_class = (_class2 = function () {
        function SystemFolder(fileService, element) {
            var _this = this;

            _classCallCheck(this, SystemFolder);

            _initDefineProp(this, 'parent', _descriptor, this);

            _initDefineProp(this, 'folder', _descriptor2, this);

            _initDefineProp(this, 'collapsed', _descriptor3, this);

            _initDefineProp(this, 'draggable', _descriptor4, this);

            _initDefineProp(this, 'unavailable', _descriptor5, this);

            this.fileService = fileService;
            this.element = element;

            this.dragsterEnter = function (event) {
                if (_this.folder.ghost || _this.unavailable) {
                    return;
                }
                if (_this.parent) {
                    _this.parent.removeGhosts();
                }
                _this.dragenter(event);
            };
            this.dragsterLeave = function (event) {
                if (_this.unavailable) {
                    return;
                }
                if (_this.parent) {
                    _this.parent.dragsterEnter(event);
                }
                _this.dragexit(event);
            };

            this.dragsterBootstrap = new Dragster(this.element);

            this.element.addEventListener('dragster:enter', this.dragsterEnter);
            this.element.addEventListener('dragster:leave', this.dragsterLeave);
        }

        SystemFolder.prototype.collapseFolder = function collapseFolder() {
            this.collapsed = !this.collapsed;
        };

        SystemFolder.prototype.dragStart = function dragStart(event) {
            event.dataTransfer.setData('data', JSON.stringify(this.folder));
            return this.draggable;
        };

        SystemFolder.prototype.dragover = function dragover(event) {
            event.preventDefault();
        };

        SystemFolder.prototype.removeGhosts = function removeGhosts() {
            this.deghostArray(this.folder.folders);
            this.deghostArray(this.folder.files);
        };

        SystemFolder.prototype.deghostArray = function deghostArray(array) {
            var i = array.length;
            while (i--) {
                if (array[i].ghost) {
                    array.splice(i, 1);
                }
            }
        };

        SystemFolder.prototype.itemExists = function itemExists(array, name) {
            var i = array.length;
            while (i--) {
                if (array[i].name === name) {
                    return true;
                }
            }
        };

        SystemFolder.prototype.pushGhost = function pushGhost(array, item) {
            item.ghost = true;
            array.push(item);
            array.sort(function (a, b) {
                return a.name > b.name;
            });
        };

        SystemFolder.prototype.dragenter = function dragenter(event) {
            if (!this.collapsed) {
                var data = JSON.parse(event.detail.dataTransfer.getData('data'));

                if (this.folder.device !== data.device) {
                    if (data.type === 'Folder') {
                        if (!this.itemExists(this.folder.folders, data.name)) {
                            this.pushGhost(this.folder.folders, data);
                        }
                    }
                    if (data.type === 'File') {
                        if (!this.itemExists(this.folder.files, data.name)) {
                            this.pushGhost(this.folder.files, data);
                        }
                    }
                }
            }
            event.stopPropagation();
        };

        SystemFolder.prototype.dragexit = function dragexit(event) {
            this.removeGhosts();
            event.stopPropagation();
        };

        SystemFolder.prototype.dragdropBody = function dragdropBody(event) {
            if (this.unavailable) {
                return;
            }

            this.processDrop(JSON.parse(event.dataTransfer.getData('data')));

            event.stopPropagation();
        };

        SystemFolder.prototype.dragdropHeading = function dragdropHeading(event) {
            if (this.unavailable) {
                return;
            }

            event.stopPropagation();
            if (this.folder.ghost) {
                this.parent.dragdropHeading(event);
            } else {
                this.collapsed = !this.processDrop(JSON.parse(event.dataTransfer.getData('data')));
            }
        };

        SystemFolder.prototype.processDrop = function processDrop(data) {
            var _this2 = this;

            if (data.device === this.folder.device) {
                return false;
            }
            if (data.type === 'File') {
                if (data.path.replace(data.name, '') === this.folder.path + '\\' || data.path.replace(data.name, '') === this.folder.path + '/') {
                    return false;
                }
                this.fileService.transferFile(data.path, this.folder.path, data.device, this.folder.device).then(function (response) {
                    _this2.folder = response;
                });
                return true;
            }

            if (data.type === 'Folder') {
                if (data.path === this.folder.path) {
                    return false;
                }
                this.fileService.transferFolder(data.path, this.folder.path, data.device, this.folder.device).then(function (response) {
                    _this2.folder = response;
                });
                return true;
            }

            return false;
        };

        SystemFolder.prototype.confirmDelete = function confirmDelete(event) {
            this.showConfirmDelete = true;
            event.stopPropagation();
        };

        SystemFolder.prototype.cancelDelete = function cancelDelete(event) {
            this.showConfirmDelete = false;
            event.stopPropagation();
        };

        SystemFolder.prototype.deleteFolder = function deleteFolder(event) {
            var _this3 = this;

            this.fileService.deleteFolder(this.folder.path).then(function (response) {
                if (response) {
                    var i = _this3.parent.folder.folders.length;
                    while (i--) {
                        if (_this3.parent.folder.folders[i].path === _this3.folder.path) {
                            _this3.parent.folder.folders.splice(i, 1);
                        }
                    }
                }
            });
            event.stopPropagation();
        };

        return SystemFolder;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'parent', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'folder', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'collapsed', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'draggable', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'unavailable', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/filetransfer/system-folder.html', ['module'], function(module) { module.exports = "<template>\r\n    <require from=\"./system-file\"></require>\r\n    <div class=\"panel panel-info system-folder ${collapsed ? 'panel-dark' : ''} ${folder.ghost ? 'ghost' : ''}\" dragover.trigger=\"dragover($event)\" >\r\n        <div class=\"panel-heading\" click.trigger=\"collapseFolder()\" draggable=\"true\" dragstart.trigger=\"dragStart($event)\" drop.trigger=\"dragdropHeading($event)\">\r\n            <span class=\"${folder.name =='USB' || unavailable ? 'ion-usb' : folder.name =='System' ? 'ion-android-desktop' :  'ion-android-folder'} folder-icon\"></span>${folder.name | t}\r\n            <div if.bind=\"folder.device == 'system' && folder.name != 'System'\" class=\"pull-right\">\r\n                <div if.bind=\"showConfirmDelete\">\r\n                    <span>${\"Delete entire folder?\" | t}</span>\r\n                    <a class=\"btn btn-danger btn-sm\" click.trigger=\"deleteFolder($event)\">${\"Delete\" | t}</a>\r\n                    <a class=\"btn btn-primary btn-sm\" click.trigger=\"cancelDelete($event)\">${\"Cancel\" | t}</a>\r\n                </div>\r\n                <div else>\r\n                    <div click.trigger=\"confirmDelete($event)\"><span class=\"ion-trash-a delete-icon\"></span></div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <div class=\"panel-collapse collapse ${collapsed ? '' : 'in'}\" dragover.trigger=\"dragover($event)\" drop.trigger=\"dragdropBody($event)\">\r\n            <div class=\"panel-body\">\r\n                <div if.bind=\"unavailable\">\r\n                    <span class=\"text-info\">USB device is not connected.</span>\r\n                </div>\r\n                <div if.bind=\"folder.files.length === 0 && folder.folders.length === 0\">\r\n                    <span class=\"text-info\">There are no files on the USB device.</span>\r\n                </div>\r\n                <div repeat.for=\"folder of folder.folders\">\r\n                    <system-folder parent.bind=\"$parent\" folder.bind=\"folder\" collapsed.bind=\"true\" draggable.bind=\"true\"></system-folder>\r\n                </div>\r\n                <div class=\"folder-files\">\r\n                    <div repeat.for=\"file of folder.files\">\r\n                        <system-file parent.bind=\"$parent\" file.bind=\"file\"></system-file>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n</template>\r\n"; });
var cov_1xtxi4d97a = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\filetransfer\\system-file.js',
        hash = '38b0fcc81e217f5bb0b10abccd26294fb9d53301',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\components\\filetransfer\\system-file.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/filetransfer/system-file',['exports', 'aurelia-framework', '../../services/file-service'], function (exports, _aureliaFramework, _fileService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemFile = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2;

    var SystemFile = exports.SystemFile = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService), _dec(_class = (_class2 = function () {
        function SystemFile(fileService) {
            _classCallCheck(this, SystemFile);

            _initDefineProp(this, 'parent', _descriptor, this);

            _initDefineProp(this, 'file', _descriptor2, this);

            this.fileService = fileService;
        }

        SystemFile.prototype.dragStart = function dragStart(event) {
            event.dataTransfer.setData('data', JSON.stringify(this.file));
            return true;
        };

        SystemFile.prototype.confirmDelete = function confirmDelete(event) {
            this.showConfirmDelete = true;
            event.stopPropagation();
        };

        SystemFile.prototype.cancelDelete = function cancelDelete(event) {
            this.showConfirmDelete = false;
            event.stopPropagation();
        };

        SystemFile.prototype.deleteFile = function deleteFile(event) {
            var _this = this;

            this.fileService.deleteFile(this.file.path).then(function (response) {
                if (response) {
                    var i = _this.parent.folder.files.length;
                    while (i--) {
                        if (_this.parent.folder.files[i].path === _this.file.path) {
                            _this.parent.folder.files.splice(i, 1);
                        }
                    }
                }
            });
            event.stopPropagation();
        };

        return SystemFile;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'parent', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'file', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/filetransfer/system-file.html', ['module'], function(module) { module.exports = "<template>\r\n    \r\n    <div draggable=\"true\" dragstart.trigger=\"dragStart($event)\" class=\"panel panel-info system-file\">\r\n        <div class=\"panel-body ${file.ghost ? 'ghost' : ''}\">\r\n        <span class=\"ion-document file-icon\"></span>${file.name}\r\n            <div if.bind=\"file.device == 'system'\" class=\"pull-right\">\r\n                <div if.bind=\"showConfirmDelete\">\r\n                    <span>${\"Delete file?\" | t} </span>\r\n                    <a class=\"btn btn-danger btn-sm\" click.trigger=\"deleteFile($event)\">${\"Delete\" | t}</a>\r\n                    <a class=\"btn btn-primary btn-sm\" click.trigger=\"cancelDelete($event)\">${\"Cancel\" | t}</a>\r\n                </div>\r\n                <div else>\r\n                    <div click.trigger=\"confirmDelete($event)\"><span class=\"ion-trash-a delete-icon\"></span></div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n</template>\r\n"; });
var cov_1g9r07iihr = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\updates-client.js',
        hash = 'fd890cd7136fd261d8673931d4a45ff0fa87909a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\updates-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/updates-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.UpdatesClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var UpdatesClient = exports.UpdatesClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function UpdatesClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, UpdatesClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/updates').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        UpdatesClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        UpdatesClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args).catch(function (error) {
                    return hubLogger.error(error);
                });
            });
        };

        UpdatesClient.prototype.connect = function connect(callback) {
            this.hub.on('processDownloadProgress', callback);
        };

        UpdatesClient.prototype.subscribe = function subscribe(callback) {
            this.hub.on('newVersionAvailable', callback);
        };

        UpdatesClient.prototype.getCurrentVersion = function getCurrentVersion() {
            return this.invoke('GetCurrentVersion');
        };

        UpdatesClient.prototype.isUpdateAvailable = function isUpdateAvailable() {
            return this.invoke('isUpdateAvailable');
        };

        UpdatesClient.prototype.getAllPackages = function getAllPackages() {
            return this.invoke('GetAllPackages');
        };

        UpdatesClient.prototype.getDownloadSize = function getDownloadSize(version) {
            return this.invoke('GetDownloadSize', version);
        };

        UpdatesClient.prototype.downloadUpdate = function downloadUpdate(version) {
            this.invoke('DownloadUpdate', version);
        };

        UpdatesClient.prototype.installUpdate = function installUpdate(update, current) {
            this.invoke('InstallUpdate', update, current);
        };

        UpdatesClient.prototype.checkIfDownloaded = function checkIfDownloaded(version) {
            return this.invoke('CheckIfDownloaded', version);
        };

        return UpdatesClient;
    }()) || _class);
});
var cov_25shpgq0nd = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\spray-session-client.js',
        hash = 'e2076bfaa5dbd003c60e92189ba3a5a57958e4e7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\spray-session-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/spray-session-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SpraySessionClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var SpraySessionClient = exports.SpraySessionClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function SpraySessionClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, SpraySessionClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/spraySession').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        SpraySessionClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        SpraySessionClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        SpraySessionClient.prototype.setSpraySession = function setSpraySession(sessionId) {
            return this.invoke('SetCurrentSpraySession', sessionId);
        };

        SpraySessionClient.prototype.getAllSpraySessions = function getAllSpraySessions() {
            return this.invoke('GetSpraySessions');
        };

        SpraySessionClient.prototype.getCurrentSpraySession = function getCurrentSpraySession() {
            return this.invoke('GetCurrentSpraySession');
        };

        SpraySessionClient.prototype.sendBoundaryMaps = function sendBoundaryMaps(paths) {
            return this.invoke('SendBoundaryMap', paths);
        };

        SpraySessionClient.prototype.setPrescriptionMap = function setPrescriptionMap(paths) {
            return this.invoke('SetPrescriptionMap', paths);
        };

        SpraySessionClient.prototype.useSeparableOverlapDistances = function useSeparableOverlapDistances() {
            return true;
        };

        return SpraySessionClient;
    }()) || _class);
});
var cov_1vvyoxjojn = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\prescription-map-client.js',
        hash = '40357b5926cbb74f412157c27ce29f6ee2f9e1e5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\prescription-map-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/prescription-map-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PrescriptionMapClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var PrescriptionMapClient = exports.PrescriptionMapClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function PrescriptionMapClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, PrescriptionMapClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/prescriptionMap').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        PrescriptionMapClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        PrescriptionMapClient.prototype.connect = function connect(callback) {
            this.hub.on('broadcastPrescriptionMap', callback);
            return this.invoke('getCurrentPrescriptionMap');
        };

        PrescriptionMapClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start();
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        PrescriptionMapClient.prototype.getCurrentPrescriptionMap = function getCurrentPrescriptionMap() {
            return this.invoke('GetCurrentPrescriptionMap');
        };

        return PrescriptionMapClient;
    }()) || _class);
});
var cov_1qb844hp48 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\mapping-client.js',
        hash = 'f0c636a2f555b507d2f067b9db3fd368ec29a1fb',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\mapping-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/mapping-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MappingClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var MappingClient = exports.MappingClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function MappingClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, MappingClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/mapping').configureLogging(_signalrClient.LogLevel.Error).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        MappingClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attampts > _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        MappingClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        MappingClient.prototype.connect = function connect(callback, clearCallback) {
            this.hub.on('broadcastCoordinates', callback);
            this.hub.on('newSpraySession', clearCallback);
            return this.invoke('GetLocation');
        };

        MappingClient.prototype.getRegionCoverage = function getRegionCoverage(blX, blY, trX, trY, resolution) {
            return this.invoke('GetRegionCoverage', blX, blY, trX, trY, resolution);
        };

        MappingClient.prototype.getRegionCoverageBytes = function getRegionCoverageBytes(blX, blY, trX, trY, resolution) {
            return this.invoke('GetRegionCoverageBytes', blX, blY, trX, trY, resolution);
        };

        MappingClient.prototype.getSystemErrors = function getSystemErrors(blX, blY, trX, trY, resolution) {
            return this.invoke('GetSystemErrors', blX, blY, trX, trY, resolution);
        };

        MappingClient.prototype.getCoverageBoundingBoxForSpraySessionId = function getCoverageBoundingBoxForSpraySessionId(spraySessionId) {
            return this.invoke('GetCoverageBoundingBoxForSpraySessionId', spraySessionId);
        };

        MappingClient.prototype.getClosestError = function getClosestError(x, y) {
            return this.invoke('GetClosestError', x, y);
        };

        MappingClient.prototype.sendBoundaryMap = function sendBoundaryMap(path, originLong, originLat) {
            return this.invoke('SendBoundaryMap', path, originLong, originLat);
        };

        MappingClient.prototype.sendPrescriptionMap = function sendPrescriptionMap(path, originLong, originLat) {
            return this.invoke('SendPrescriptionMap', path, originLong, originLat);
        };

        MappingClient.prototype.setPrescriptionUnits = function setPrescriptionUnits(units) {
            this.invoke('SetPrescriptionUnits', units);
        };

        MappingClient.prototype.getBoundaryMap = function getBoundaryMap() {
            return this.invoke('GetCurrentBoundaryMap');
        };

        MappingClient.prototype.getPrescriptionMap = function getPrescriptionMap() {
            return this.invoke('GetCurrentPrescriptionMap');
        };

        MappingClient.prototype.getTweenDelay = function getTweenDelay() {
            return this.invoke('GetTweenDelay');
        };

        MappingClient.prototype.getMinimumResolution = function getMinimumResolution() {
            return this.invoke('GetMinimumResolution');
        };

        MappingClient.prototype.ignoreBoundary = function ignoreBoundary(ignore) {
            this.invoke('SetBoundaryIgnore', ignore);
        };

        return MappingClient;
    }()) || _class);
});
var cov_z3usdz347 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\log-event-client.js',
        hash = '2ffd1d6830fef8490db5d7edfbfc839cd812b920',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\log-event-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/log-event-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LogEventClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var LogEventClient = exports.LogEventClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function LogEventClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, LogEventClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/logs').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });

            this.startPromise = this.startPromise || this.hub.start();
        }

        LogEventClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        LogEventClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        LogEventClient.prototype.connect = function connect(connectCallBack, systemErrorCb, nozzleErrCb) {
            this.hub.on('sendSystemError', systemErrorCb);
            this.hub.on('sendNozzleError', nozzleErrCb);
            this.invoke('Connect').then(connectCallBack);
        };

        return LogEventClient;
    }()) || _class);
});
var cov_2me305beok = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\gateway-client.js',
        hash = 'a41cca70bcba35469545664bca52af4a0375f69f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\gateway-client.js',
        statementMap: {
            '0': {
                start: {
                    line: 40,
                    column: 8
                },
                end: {
                    line: 53,
                    column: 15
                }
            },
            '1': {
                start: {
                    line: 42,
                    column: 16
                },
                end: {
                    line: 42,
                    column: 36
                }
            },
            '2': {
                start: {
                    line: 45,
                    column: 16
                },
                end: {
                    line: 45,
                    column: 38
                }
            },
            '3': {
                start: {
                    line: 46,
                    column: 16
                },
                end: {
                    line: 48,
                    column: 17
                }
            },
            '4': {
                start: {
                    line: 47,
                    column: 20
                },
                end: {
                    line: 47,
                    column: 91
                }
            },
            '5': {
                start: {
                    line: 49,
                    column: 16
                },
                end: {
                    line: 52,
                    column: 41
                }
            },
            '6': {
                start: {
                    line: 50,
                    column: 20
                },
                end: {
                    line: 50,
                    column: 40
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 39,
                        column: 4
                    },
                    end: {
                        line: 39,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 39,
                        column: 12
                    },
                    end: {
                        line: 54,
                        column: 5
                    }
                },
                line: 39
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 41,
                        column: 18
                    },
                    end: {
                        line: 41,
                        column: 19
                    }
                },
                loc: {
                    start: {
                        line: 42,
                        column: 16
                    },
                    end: {
                        line: 42,
                        column: 36
                    }
                },
                line: 42
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 44,
                        column: 19
                    },
                    end: {
                        line: 44,
                        column: 20
                    }
                },
                loc: {
                    start: {
                        line: 44,
                        column: 28
                    },
                    end: {
                        line: 53,
                        column: 13
                    }
                },
                line: 44
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 49,
                        column: 27
                    },
                    end: {
                        line: 49,
                        column: 28
                    }
                },
                loc: {
                    start: {
                        line: 49,
                        column: 33
                    },
                    end: {
                        line: 51,
                        column: 17
                    }
                },
                line: 49
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 46,
                        column: 16
                    },
                    end: {
                        line: 48,
                        column: 17
                    }
                },
                type: 'if',
                locations: [{
                    start: {
                        line: 46,
                        column: 16
                    },
                    end: {
                        line: 48,
                        column: 17
                    }
                }, {
                    start: {
                        line: 46,
                        column: 16
                    },
                    end: {
                        line: 48,
                        column: 17
                    }
                }],
                line: 46
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0
        },
        b: {
            '0': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/gateway-client',['exports', 'aurelia-framework', 'signalr-client', 'backoff'], function (exports, _aureliaFramework, _signalrClient, _backoff) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GatewayClient = undefined;

    var _backoff2 = _interopRequireDefault(_backoff);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var GatewayClient = exports.GatewayClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder), _aureliaFramework.Factory.of(_backoff2.default)), _dec(_class = function () {
        function GatewayClient(hubConnectionBuilder, BackOff) {
            var _this = this;

            _classCallCheck(this, GatewayClient);

            this.maxAttempts = 10;

            this.backoff = new BackOff({ min: 100, max: 10000 });

            this.hub = hubConnectionBuilder.withUrl('api/hubs/gateway').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        GatewayClient.prototype.start = function start() {
            var _this2 = this;

            cov_2me305beok.f[0]++;
            cov_2me305beok.s[0]++;

            return this.hub.start().then(function () {
                cov_2me305beok.f[1]++;
                cov_2me305beok.s[1]++;
                return _this2.backoff.reset();
            }).catch(function (error) {
                cov_2me305beok.f[2]++;
                cov_2me305beok.s[2]++;

                hubLogger.info(error);
                cov_2me305beok.s[3]++;
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    cov_2me305beok.b[0][0]++;
                    cov_2me305beok.s[4]++;

                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                } else {
                    cov_2me305beok.b[0][1]++;
                }
                cov_2me305beok.s[5]++;
                setTimeout(function () {
                    cov_2me305beok.f[3]++;
                    cov_2me305beok.s[6]++;

                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        GatewayClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args).catch(function (error) {
                    hubLogger.error(error.toString());
                });
            });
        };

        GatewayClient.prototype.connect = function connect(callback) {
            this.hub.on('broadcastDelta', callback);
            this.invoke('Connect').then(callback);
        };

        GatewayClient.prototype.getProperties = function getProperties(props) {
            return this.invoke('GetProperties', props);
        };

        GatewayClient.prototype.send = function send(stateDelta) {
            this.invoke('Send', stateDelta);
        };

        GatewayClient.prototype.subscribe = function subscribe(properties, component) {
            this.invoke('Subscribe', properties, component);
        };

        GatewayClient.prototype.unsubscribe = function unsubscribe(properties, component) {
            this.invoke('Unsubscribe', properties, component);
        };

        GatewayClient.prototype.registerDebugCallbacks = function registerDebugCallbacks(maxExceededCallback, requestSentCallback, responseReceivedCallback, broadcastsClearedCallback) {
            this.hub.on('broadcastMaxExceeded', maxExceededCallback);
            this.hub.on('broadcastRequestSent', requestSentCallback);
            this.hub.on('broadcastResponseReceived', responseReceivedCallback);
            this.hub.on('broadcastsCleared', broadcastsClearedCallback);
        };

        GatewayClient.prototype.enableDebug = function enableDebug(enabled) {
            this.invoke('EnableDebug', enabled);
        };

        GatewayClient.prototype.getActiveBroadcastRequests = function getActiveBroadcastRequests() {
            return this.invoke('GetActiveBroadcastRequests');
        };

        return GatewayClient;
    }()) || _class);
});
var cov_1ru8v3q86 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\boundary-map-client.js',
        hash = 'c04b7d9c6e0e4482b859c1dbbf6053bd81ec42f2',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\clients\\boundary-map-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/boundary-map-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var BoundaryMapClient = exports.BoundaryMapClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function BoundaryMapClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, BoundaryMapClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/boundaryMap').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        BoundaryMapClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        BoundaryMapClient.prototype.connect = function connect(callback, addBoundaryPointCallBack, pruneBoundaryPointCallBack, clearBoundaryPointsCallBack) {
            this.hub.on('broadcastBoundaryMap', callback);
            this.hub.on('addBoundaryPoint', addBoundaryPointCallBack);
            this.hub.on('pruneBoundaryPoint', pruneBoundaryPointCallBack);
            this.hub.on('clearBoundaryPoints', clearBoundaryPointsCallBack);
            return this.invoke('GetBoundaryMapAndRecorderStatus');
        };

        BoundaryMapClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        BoundaryMapClient.prototype.registerBoundaryMapCreatedCallback = function registerBoundaryMapCreatedCallback(callback) {
            this.hub.on('boundaryMapCreated', callback);
        };

        BoundaryMapClient.prototype.getCurrentBoundaryMap = function getCurrentBoundaryMap() {
            return this.invoke('GetCurrentBoundaryMapRegions');
        };

        BoundaryMapClient.prototype.getRecordedBoundaryPoints = function getRecordedBoundaryPoints() {
            return this.invoke('GetRecordedBoundaryPoints');
        };

        BoundaryMapClient.prototype.getRecordedInternalPoints = function getRecordedInternalPoints() {
            return this.invoke('GetRecordedInternalPoints');
        };

        BoundaryMapClient.prototype.getBoundaryRecorderStatus = function getBoundaryRecorderStatus() {
            return this.invoke('GetBoundaryRecorderStatus');
        };

        BoundaryMapClient.prototype.setBoundaryRecorderSide = function setBoundaryRecorderSide(side) {
            this.invoke('SetBoundaryRecorderSide', side);
        };

        BoundaryMapClient.prototype.setRecordInternal = function setRecordInternal(flag) {
            this.invoke('SetRecordInternal', flag);
        };

        BoundaryMapClient.prototype.recordBoundary = function recordBoundary() {
            this.invoke('RecordBoundary');
        };

        BoundaryMapClient.prototype.pauseBoundary = function pauseBoundary() {
            this.invoke('PauseBoundary');
        };

        BoundaryMapClient.prototype.saveBoundary = function saveBoundary(name) {
            this.invoke('SaveBoundary', name);
        };

        BoundaryMapClient.prototype.discardBoundary = function discardBoundary() {
            this.invoke('DiscardBoundary');
        };

        return BoundaryMapClient;
    }()) || _class);
});
var cov_78mxt44v2 = function () {
    var path = 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\app.js',
        hash = 'b6ab69c4de6514835505fcd4b49a765f8751ebf1',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: 'C:\\Users\\CMorris\\Documents\\Code\\demeter\\Web\\src\\app.js',
        statementMap: {
            '0': {
                start: {
                    line: 19,
                    column: 8
                },
                end: {
                    line: 19,
                    column: 39
                }
            },
            '1': {
                start: {
                    line: 20,
                    column: 8
                },
                end: {
                    line: 20,
                    column: 55
                }
            },
            '2': {
                start: {
                    line: 21,
                    column: 8
                },
                end: {
                    line: 21,
                    column: 31
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 18,
                        column: 4
                    },
                    end: {
                        line: 18,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 18,
                        column: 50
                    },
                    end: {
                        line: 22,
                        column: 5
                    }
                },
                line: 18
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        f: {
            '0': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('app',['exports', 'aurelia-framework', './fetch-config', './configs/app-router-configuration', 'aurelia-validation', 'numeral'], function (exports, _aureliaFramework, _fetchConfig, _appRouterConfiguration, _aureliaValidation, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.App = undefined;

    var _appRouterConfiguration2 = _interopRequireDefault(_appRouterConfiguration);

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var App = exports.App = (_dec = (0, _aureliaFramework.inject)(_fetchConfig.FetchConfig, _appRouterConfiguration2.default), _dec(_class = function () {
        function App(fetchConfig, routerConfiguration) {
            _classCallCheck(this, App);

            cov_78mxt44v2.f[0]++;
            cov_78mxt44v2.s[0]++;

            this.fetchConfig = fetchConfig;
            cov_78mxt44v2.s[1]++;
            this.routerConfiguration = routerConfiguration;
            cov_78mxt44v2.s[2]++;
            this.customRulesInit();
        }

        App.prototype.activate = function activate() {
            this.routerConfiguration.configure();
            this.fetchConfig.configure();
        };

        App.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numRange', function (value, obj, min, max, displayMin, displayMax) {
                return value !== null && value !== undefined && !Number.isNaN(value) && value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return App;
    }()) || _class);
});
define('text!app.html', ['module'], function(module) { module.exports = "<template>\r\n    <router-view></router-view>\r\n</template>\r\n"; });
define('text!app.css', ['module'], function(module) { module.exports = "/* heading styling */\r\n.px-content h4 { margin-top: 0; }\r\n\r\n.px-content { padding: 10px; }\r\n\r\n/* app-footer styling */\r\n\r\n.app-footer {\r\n    height: 30px;\r\n    padding: 5px;\r\n    margin-left: 10px;\r\n}\r\n\r\n#map { position: relative; }\r\n\r\n#map > .stats > * {\r\n    position: absolute !important;\r\n    margin: 5px;\r\n}\r\n\r\n#map > .leftPanel {\r\n    position: absolute !important;\r\n    bottom: 10px;\r\n    width: 500px;\r\n    margin: 5px;\r\n}\r\n\r\n.border {\r\n    border-width: 5px;\r\n}\r\n\r\n.px-navbar { background-color: #424242; }\r\n\r\n\r\n.px-navbar .navbar-collapse { background-color: #424242; }\r\n\r\n.px-navbar .navbar-header { background-color: #424242; }\r\n\r\n.select2-container--open { z-index: 1011; }\r\n\r\n/* app-nav styling */\r\n\r\n.px-nav-label { margin-left: 15px; }\r\n\r\n.px-nav-item .px-nav-icon { font-size: x-large; }\r\n.px-nav-item .px-notification-icon {\r\n    margin-left: -15px;\r\n    font-size: large;\r\n    color: orange;\r\n}\r\n\r\n/* dashboard styling */\r\n\r\n.dashboard.switcher { margin-top: 38px; }\r\n\r\n.dashboard-dropdown { margin-right: 25px; }\r\n\r\n.dashboard-map {\r\n    margin-top: 5px;\r\n    height: 75vh;\r\n    margin-bottom: 5px;\r\n}\r\n\r\n.dashboard-map-cloud {\r\n    margin-top: 15px;\r\n    height: 800px;\r\n}\r\n\r\n.dashboard-map-cloud {\r\n    margin-top: 15px;\r\n    height: 800px;\r\n}\r\n\r\n.dashboard-map .jumbotron {\r\n    min-height: 100px;\r\n    max-height: 200px\r\n}\r\n\r\n.dashboard-carousel {\r\n    display: inline-block;\r\n    background-color: #424242;\r\n}\r\n\r\ninput[readonly] {\r\n    background-color: transparent;\r\n    border: 0;\r\n    box-shadow: none;\r\n}\r\n\r\n.dashboard-map .jumbotron > h1 { text-align: center; }\r\n\r\n.dot {\r\n    height: 25px;\r\n    width: 25px;\r\n    background-color: #4caf50;\r\n    border-radius: 50%;\r\n    display: inline-block;\r\n    position: absolute;\r\n    top: 12.5px;\r\n}\r\n\r\n.vcm-hr {\r\n    margin-top: 0px;\r\n    background-color: black;\r\n    border-top-width: 0;\r\n    width: 100%;\r\n    height: 6px;\r\n}\r\n\r\n.left-dot {\r\n    left: 10px;\r\n}\r\n.right-dot {\r\n    right: 10px;\r\n}\r\n.flex-container {\r\n    padding: 0;\r\n    margin: 0;\r\n    list-style: none;\r\n    display: flex;\r\n}\r\n\r\n.space-evenly {\r\n    justify-content: space-evenly;\r\n}\r\n.flex-item {\r\n    padding: 0px;\r\n    flex: 1;\r\n    height: 50px;\r\n    margin: 5px;\r\n    line-height: 50px;\r\n    max-width: 5px;\r\n    color: white;\r\n    text-align: center;\r\n}\r\n\r\n#owl-demo .item{\r\n    padding: 30px 0px;\r\n    margin: 10px;\r\n    -webkit-border-radius: 3px;\r\n    -moz-border-radius: 3px;\r\n    border-radius: 3px;\r\n    text-align: center;\r\n}\r\n\r\n.left-vertical-bar {\r\n    border-left: 6px solid black;\r\n    height: 5rem;\r\n    margin-bottom: 0\r\n}\r\n\r\n.right-vertical-bar {\r\n    border-right: 6px solid black;\r\n    height: 5rem;\r\n    margin-bottom: 0\r\n}\r\n\r\n.left-vertical-bar-3 {\r\n    border-left: 6px solid black;\r\n    height: 3rem;\r\n    margin-bottom: 0\r\n}\r\n\r\n.right-vertical-bar-3 {\r\n    border-right: 6px solid black;\r\n    height: 3rem;\r\n    margin-bottom: 0\r\n}\r\n\r\n.subnet-nozzle {\r\n    display: inline-flex;\r\n    background-color: #000000;\r\n    height: 4rem;\r\n    position: relative;\r\n}\r\n\r\n.noz-num {\r\n    position: absolute;\r\n    top: 40px;\r\n    left: 50%;\r\n    transform: translateX(-50%);\r\n    color: black;\r\n    font-size: large;\r\n    font-weight: bold;\r\n}\r\n\r\n.panel-dark {\r\n   background-color: #424242;\r\n   color: #fafafa;\r\n}\r\n\r\n.panel-default > .panel-heading {\r\n    border-color: #424242;\r\n    background-color: #424242;\r\n    color: #fafafa;\r\n}\r\n\r\n.panel-default > .active-tree-toggle {\r\n    border-color: #44a548;\r\n    background-color: #44a548 !important;\r\n    color: #fafafa;\r\n}\r\n\r\n.panel.gauge {\r\n    width: 150px;\r\n    float: left;\r\n    margin-right: 10px;\r\n}\r\n\r\n.panel.gauge .panel-heading {\r\n    border-top-left-radius: 5px;\r\n    border-top-right-radius: 5px;\r\n    text-align: center;\r\n}\r\n\r\n.panel.gauge .panel-heading .panel-heading-text { font-weight: bold; }\r\n\r\n\r\n.panel.gauge .panel-body { text-align: center; }\r\n\r\n/* file transfer styling */\r\n\r\n.file-transfer-pane {\r\n    height: 80vh;\r\n    overflow-y: auto;\r\n}\r\n\r\n.panel.system-file {\r\n    font-size: x-large;\r\n    margin-bottom: 5px;\r\n}\r\n\r\n.panel.system-file .panel-body {\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    cursor: grab;\r\n}\r\n\r\n.panel.system-file .file-icon {\r\n    margin-right: 10px;\r\n    margin-left: 10px;\r\n}\r\n\r\n.delete-icon {\r\n    padding: 0;\r\n    padding-right: 10px;\r\n    margin: 0;\r\n    font-size: x-large;\r\n    cursor: pointer;\r\n}\r\n\r\n.panel.system-folder .panel-heading {\r\n    font-size: x-large;\r\n    cursor: grab;\r\n}\r\n\r\n.panel.system-folder .panel-heading .folder-icon { margin-right: 10px; }\r\n\r\n/*.system-settings > li > compose > label:after {\r\n    content: \"\\f35d\";\r\n    font-family: \"Ionicons\"\r\n}*/\r\n\r\n.ion-chevron-down:after { position: relative }\r\n\r\n.folder-files { margin-bottom: 10px; }\r\n\r\n.ghost { opacity: .25; }\r\n\r\n.interactive-panel {\r\n    position: absolute;\r\n    z-index: 1;\r\n    top: 20px;\r\n    right: 20px;\r\n}\r\n\r\n.interactive-panel-left {\r\n    position: absolute;\r\n    z-index: 1;\r\n    top: 20px;\r\n    left: 73px;\r\n}\r\n\r\n.interactive-panel .operations-btn-dark { margin: 10px 73px 10px 20px; }\r\n\r\n.interactive-panel-left .operations-btn-dark { margin: 10px 20px 10px 20px; }\r\n\r\n.interactive-panel-left .gauge-label-box {\r\n    right: 11rem;\r\n    left: initial;\r\n}\r\n\r\n.btn-circle {\r\n    width: 30px;\r\n    height: 30px;\r\n    text-align: center;\r\n    padding: 6px 0;\r\n    font-size: 12px;\r\n    line-height: 1.428571429;\r\n    border-radius: 15px;\r\n}\r\n\r\n.btn-circle.btn-lg {\r\n    width: 50px;\r\n    height: 50px;\r\n    padding: 10px 16px;\r\n    font-size: 18px;\r\n    line-height: 1.33;\r\n    border-radius: 25px;\r\n}\r\n\r\n.btn-circle.btn-xl {\r\n    border-radius: 35px;\r\n}\r\n\r\n.btn-xl {\r\n    width: 10rem;\r\n    height: 7rem;\r\n    padding: 10px 16px;\r\n    font-size: 20px;\r\n    text-align: center;\r\n    line-height: 1.33;\r\n}\r\n\r\n.bg-dark {\r\n    background-color: #424242;\r\n    color: #fafafa;\r\n}\r\n\r\n.equal {\r\n    display: -webkit-box;\r\n    display: -webkit-flex;\r\n    display: -ms-flexbox;\r\n    display: flex;\r\n    flex-wrap: nowrap;\r\n}\r\n\r\n.equal div {\r\n    align-content: center;\r\n    align-self: center;\r\n    text-align: center;\r\n    flex-wrap: nowrap;\r\n}\r\n\r\nhr {\r\n    display: block;\r\n    height: 1px;\r\n    border: 0;\r\n    border-top: 1px solid #ccc;\r\n    margin: 1em 0;\r\n    padding: 0;\r\n}\r\n\r\n.owl-centered .owl-stage-outer {\r\n    height: 10vh;\r\n}\r\n\r\n.owl-dots {\r\n    zoom: 2;\r\n    margin-top: 5px !important;\r\n}\r\n\r\n.dialog-btn {\r\n    width: 45%\r\n}\r\n\r\n.label-top {\r\n    text-align: center;\r\n    width: 100%;\r\n    display: block;\r\n}\r\n\r\n.label-xs {\r\n    vertical-align: super;\r\n    font-size: x-small;\r\n}\r\n\r\n.label-sm {\r\n    vertical-align: super;\r\n    font-size: small;\r\n}\r\n\r\n.label-md {\r\n    vertical-align: super;\r\n    font-size: medium;\r\n}\r\n\r\n.label-lg {\r\n    vertical-align: super;\r\n    font-size: large;\r\n}\r\n\r\n.label-xl {\r\n    font-size: x-large;\r\n}\r\n\r\n.label-bs {\r\n    vertical-align: super;\r\n}\r\n\r\n.boom-btn {\r\n    height: 5rem;\r\n    flex: 1;\r\n    font-size: large;\r\n    font-weight: bold;\r\n}\r\n\r\n.boom-btn-toolbar {\r\n    display: flex;\r\n}\r\n\r\n.manual-control-offset .form-group div{\r\n    margin-left: 3.6em;\r\n}\r\n\r\n.operations-dark {\r\n    background-color: #212121;\r\n    color: #fbff00;\r\n    text-align: center;\r\n}\r\n\r\n.operations-dark.input-lg {\r\n    font-size: x-large;\r\n    line-height: 1;\r\n    font-weight: bold;\r\n    padding-left: 6px;\r\n    padding-right: 6px;\r\n    min-width: 3.2em;\r\n}\r\n\r\n.operations-dark-text-xl {\r\n    font-size: x-large;\r\n    font-weight: bold;\r\n}\r\n\r\ninput[type=number]::-webkit-inner-spin-button, \r\ninput[type=number]::-webkit-outer-spin-button { \r\n    -webkit-appearance: none; \r\n    margin: 0; \r\n}\r\n\r\n.operations-btn {\r\n    background-color: #616161;\r\n    color: #fbff00;\r\n    border-radius: 5rem;\r\n    border-color: #4caf50;\r\n    text-align: center;\r\n}\r\n\r\n.operation-txt {\r\n    color: #fbff00;\r\n    font-size: 15px;\r\n    text-align: center;\r\n}\r\n\r\n.operations-btn-dark {\r\n    border-width: 3px;\r\n    border-style: solid;\r\n    color: #fbff00;\r\n    position: relative;\r\n    background-color: #424242;\r\n}\r\n\r\n.btn-orange {\r\n    background-color: rgb(249, 161, 58);\r\n    color: black;\r\n}\r\n\r\n.btn-blue {\r\n    background-color: rgb(0, 103, 167);\r\n    color: white;\r\n}\r\n\r\n.btn-red {\r\n    background-color: rgb(140, 12, 4);\r\n    color: white;\r\n}\r\n\r\n.btn-brown {\r\n    background-color: #af6448;\r\n    color: white;\r\n}\r\n\r\n.btn-gray {\r\n    background-color: rgb(158, 159, 163);\r\n    color: black;\r\n}\r\n\r\n.btn-white {\r\n    background-color: white;\r\n    color: black;\r\n}\r\n\r\n.btn-silver {\r\n    background-color: silver;\r\n    color: black;\r\n}\r\n\r\n\r\n.operation-bdr-success { border-color: #4caf50; }\r\n\r\n.operation-bdr-warn { border-color: #fbff00; }\r\n\r\n.operation-bdr-error { border-color: #e91e63; }\r\n\r\n.operation-bdr-disabled { border-color: lightgrey !important; }\r\n\r\n.operation-bdr-off { border-width: 0; }\r\n\r\n.operation-popover {\r\n    border-radius: 1rem;\r\n    border-color: #4caf50 !important;\r\n    border-width: 5px;\r\n    border-style: solid;\r\n    padding: 15px;\r\n    background-color: #212121;\r\n    color: #fafafa;\r\n    -webkit-box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\r\n    -moz-box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\r\n    box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.operation-popover label {\r\n    background-color: inherit;\r\n    font-size: large;\r\n    text-align: center;\r\n}\r\n\r\n.operation-popover div {\r\n    font-size: large;\r\n    text-align: center;\r\n}\r\n\r\n.operation-popover input {\r\n    background-color: inherit;\r\n    font-size: large;\r\n    text-align: center;\r\n}\r\n\r\n.operation-popover .area-meter .btn.btn-outline {\r\n    background-color: inherit;\r\n    font-size: large;\r\n    font-weight: bold;\r\n    text-align: center;\r\n    color: #fafafa;\r\n}\r\n\r\n.operation-popover .area-meter .btn.btn-outline.btn-primary {\r\n        color: #419d45;\r\n}\r\n\r\n.ux-dialog {\r\n    border-color: #4caf50 !important;\r\n    border-width: 5px;\r\n}\r\n.gps-setup-img {\r\n    background: url(assets/gps.jpg) no-repeat center center;\r\n}\r\n\r\n.boom-sway-img {\r\n    background: url(assets/boom-sway.jpg) no-repeat center center;\r\n}\r\n\r\n.tractor-img {\r\n    background: url(assets/tractor.jpg) no-repeat center center;\r\n    height: 300px;\r\n    background-size: contain;\r\n    margin-top: 30px;\r\n    width: auto;\r\n}\r\n\r\n.pid-display-box {\r\n    position: absolute;\r\n    padding: 7px;\r\n    top: 28%;\r\n    left: 570px;\r\n    width: 80px;\r\n}\r\n\r\n.pid-display-box span {\r\n    border-radius: 3px;\r\n    border-width: 3px;\r\n    border-style: solid;\r\n    border-color: #818a91;\r\n    width: 100%;\r\n    text-align: center;\r\n    background-color: #d6d6d6;\r\n    display: inline-block;\r\n}\r\n\r\n.yaxis {\r\n}\r\n\r\n.graph .yaxis {\r\n}\r\n\r\n.graph .axis {\r\n    stroke-width: 1;\r\n}\r\n\r\n.graph .axis .tick line {\r\n    stroke: black;\r\n}\r\n\r\n.graph .axis .tick text {\r\n    fill: black;\r\n}\r\n\r\n.graph .axis .domain {\r\n    fill: none;\r\n    stroke: black;\r\n}\r\n\r\n.graph .group {\r\n    fill: none;\r\n    stroke: black;\r\n    stroke-width: 1.5;\r\n}\r\n\r\n.grid line {\r\n    stroke: lightgrey;\r\n    stroke-width: 1;\r\n    stroke-opacity: 0.7;\r\n    shape-rendering: geometricPrecision;\r\n}\r\n\r\n.grid.y path {\r\n    stroke-width: 0;\r\n    fill: #000000;\r\n}\r\n\r\n.graphic {\r\n    height: -moz-available;\r\n    height: -webkit-fill-available;\r\n    background-size: contain;\r\n    margin-top: 30px;\r\n    width: auto;\r\n}\r\n\r\n.graphic-sm {\r\n    height: -moz-available;\r\n    height: -webkit-fill-available;\r\n    background-size: contain;\r\n    margin-top: 30px;\r\n    width: auto;\r\n}\r\n\r\n/* Large Devices, Wide Screens */\r\n@media only screen and (max-width : 1200px) {\r\n    .graphic {\r\n        height: 33vh;\r\n        margin-top: 30px;\r\n        background-size: contain;\r\n        width: auto\r\n    }\r\n\r\n    .font-responsive {\r\n        font-size: x-large\r\n    }\r\n}\r\n\r\n/* Medium Devices, Desktops */\r\n@media only screen and (max-width : 992px) {\r\n    .graphic {\r\n        height: 31vh;\r\n        background-size: contain;\r\n    }\r\n    .font-responsive {\r\n        font-size: x-large\r\n    }\r\n}\r\n\r\n/* Small Devices, Tablets */\r\n@media only screen and (max-width : 768px) {\r\n    .graphic {\r\n        height: 31vh;\r\n        margin-top: 30px;\r\n        background-size: contain;\r\n        width: auto;\r\n    }\r\n    .font-responsive {\r\n        font-size: large\r\n    }\r\n}\r\n\r\n/* Extra Small Devices, Phones */ \r\n@media only screen and (max-width : 480px) {\r\n    .graphic {\r\n        height: 38vh; \r\n        background-size: contain;\r\n    }\r\n    .font-responsive {\r\n        font-size: x-small\r\n    }\r\n    .subnet-nozzle {\r\n        height: 3rem;\r\n    }\r\n    .noz-num {\r\n        top: 2rem;\r\n    }\r\n}\r\n\r\n/* Custom, iPhone Retina */ \r\n@media only screen and (max-width : 320px) {\r\n    .graphic {\r\n        height: 38vh; \r\n    }\r\n}\r\n\r\n\r\n.gauge-label-box {\r\n    top: 20px;\r\n    left: 11rem;\r\n    font-size: 20px;\r\n    font-weight: 500;\r\n    line-height: normal;\r\n    display: flex;\r\n    justify-content: center;\r\n    align-items: center;\r\n    position: absolute;\r\n    width: 103px;\r\n    height: 50px;\r\n    color: #fafafa;\r\n    background: rgba(153, 153, 153, 0.7);\r\n}\r\n\r\n.gauge-label {\r\n    text-align: center;\r\n    position: relative;\r\n}\r\n\r\n.gauge-circle {\r\n    width: 61px;\r\n    height: 61px;\r\n    z-index: 11;\r\n    background: black;\r\n    border-radius: 50%;\r\n    position: relative;\r\n    -moz-border-radius: 36px;\r\n    border: 1px solid #000;\r\n    background: radial-gradient(lime 100%, #000);\r\n    margin-bottom: 15px;\r\n}\r\n\r\n.gauge-circle-green {\r\n    width: 70px;\r\n    height: 70px;\r\n    bottom: -1px;\r\n    right: -1px;\r\n    z-index: 12;\r\n    background: lime;\r\n    position: relative;\r\n    -moz-border-radius: 35px;\r\n    -webkit-border-radius: 35px;\r\n    border-radius: 35px;\r\n}\r\n\r\n.gauge-circle.mph {\r\n    position: absolute;\r\n    right: 100px;\r\n    top: 220px;\r\n}\r\n\r\n.gauge-circle.psi {\r\n    right: 100px;\r\n    top: 380px;\r\n    position: absolute;\r\n}\r\n\r\n.gauge-circle.gpa {\r\n    right: 100px;\r\n    top: 300px;\r\n    position: absolute;\r\n}\r\n\r\n.gauge-reading {\r\n    position: relative;\r\n    color: yellow;\r\n    font-size: 20px;\r\n}\r\n\r\n.gauge-reading.circle {\r\n    text-align: center;\r\n    top: 10px;\r\n}\r\n\r\n.gauge-circle-grey {\r\n    width: 51px;\r\n    height: 51px;\r\n    left: 4px;\r\n    bottom: -4px;\r\n    z-index: 12;\r\n    background: #444;\r\n    position: relative;\r\n    -moz-border-radius: 25px;\r\n    -webkit-border-radius: 25px;\r\n    border-radius: 26px;\r\n}\r\n\r\n.nozzle-container {\r\n    background: rgba(217, 217, 217, .8);\r\n    padding-top: 5px;\r\n    margin: 10px;\r\n    margin-bottom: 30px;\r\n}\r\n\r\n.spray-nozzle-info {\r\n    /* font-size: 15px; */\r\n    margin-top: 5px;\r\n    color: rgb(127, 123, 119);\r\n}\r\n\r\n.spray-nozzle-error { color: rgb(238, 29, 35); }\r\n\r\n.spray-nozzle-text { color: rgb(68, 68, 68); }\r\n\r\n.spray-nozzle-button { position: relative; }\r\n\r\n.debug-button { background-color: #f7872c }\r\n\r\n/* debug styling */\r\n\r\ntable.dataTable {\r\n    width: 100%;\r\n    margin: 0 auto;\r\n    clear: both;\r\n    border-collapse: separate;\r\n    border-spacing: 0\r\n}\r\n\r\ntable.dataTable thead th,\r\ntable.dataTable tfoot th { font-weight: bold; }\r\n\r\ntable.dataTable thead th,\r\ntable.dataTable thead td {\r\n    padding: 10px 18px;\r\n    border-bottom: 1px solid #111\r\n}\r\n\r\ntable.dataTable thead th:active,\r\ntable.dataTable thead td:active { outline: none }\r\n\r\ntable.dataTable tfoot th,\r\ntable.dataTable tfoot td {\r\n    padding: 10px 18px 6px 18px;\r\n    border-top: 1px solid #111\r\n}\r\n\r\ntable.dataTable tbody tr { background-color: #fff }\r\n\r\ntable.dataTable tbody th,\r\ntable.dataTable tbody td { padding: 8px 10px }\r\n\r\ntable.dataTable.row-border tbody th,\r\ntable.dataTable.row-border tbody td,\r\ntable.dataTable.display tbody th,\r\ntable.dataTable.display tbody td { border-top: 1px solid #ddd }\r\n\r\ntable.dataTable.row-border tbody tr:first-child th,\r\ntable.dataTable.row-border tbody tr:first-child td,\r\ntable.dataTable.display tbody tr:first-child th,\r\ntable.dataTable.display tbody tr:first-child td { border-top: none }\r\n\r\ntable.dataTable.cell-border tbody th,\r\ntable.dataTable.cell-border tbody td {\r\n    border-top: 1px solid #ddd;\r\n    border-right: 1px solid #ddd\r\n}\r\n\r\ntable.dataTable.cell-border tbody tr th:first-child,\r\ntable.dataTable.cell-border tbody tr td:first-child { border-left: 1px solid #ddd }\r\n\r\ntable.dataTable.cell-border tbody tr:first-child th,\r\ntable.dataTable.cell-border tbody tr:first-child td { border-top: none }\r\n\r\ntable.dataTable.stripe tbody tr.odd,\r\ntable.dataTable.display tbody tr.odd { background-color: #f9f9f9 }\r\n\r\n\r\n/* tree menu*/\r\n\r\n.nav > li + li { margin-left: 15px; }\r\n\r\n.nav > li:first-child { margin-left: 15px; }\r\n\r\n.no-padding { padding: 0px; }\r\n\r\nul.nav-menu-list-style .nav-header .menu-collapsible-icon {\r\n    position: absolute;\r\n    right: 3px;\r\n    top: 16px;\r\n    font-size: 9px;\r\n}\r\n\r\n\r\n\r\nul.nav-menu-list-style { margin: 0; }\r\n\r\nul.nav-menu-list-style .nav-header {\r\n    border-top: 1px solid #FFFFFF;\r\n    border-bottom: 1px solid #e8e8e8;\r\n    display: block;\r\n    margin: 0;\r\n    line-height: 42px;\r\n    padding: 0 8px;\r\n    font-weight: 600;\r\n}\r\n\r\nul.nav-menu-list-style > li { position: relative; }\r\n\r\nul.nav-menu-list-style > li a {\r\n    border-top: 1px solid #FFFFFF;\r\n    border-bottom: 1px solid #e8e8e8;\r\n    padding: 0 10px;\r\n    line-height: 32px;\r\n}\r\n\r\nul.nav-menu-list-style > li:first-child a { }\r\n\r\n\r\nul.nav-menu-list-style {\r\n    list-style: none;\r\n    padding: 0px;\r\n    margin: 0px;\r\n}\r\n\r\nul.nav-menu-list-style li .badge, ul.nav-menu-list-style li .pull-right, ul.nav-menu-list-style li span.badge, ul.nav-menu-list-style li label.badge {\r\n    float: right;\r\n    margin-top: 7px;\r\n}\r\n\r\nul.bullets { list-style: inside disc }\r\n\r\nul.numerics { list-style: inside decimal }\r\n\r\n.ul.kas-icon-aero { }\r\n\r\nul.kas-icon-aero li a:before {\r\n    font-family: 'Glyphicons Halflings';\r\n    font-size: 9px;\r\n    content: \"\\e258\";\r\n    padding-right: 8px;\r\n}\r\n\r\n/* aurelia dialog styling*/\r\n\r\nux-dialog-container, ux-dialog-overlay {\r\n    position: fixed;\r\n    top: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    left: 0\r\n}\r\n\r\nux-dialog-overlay { opacity: 0 }\r\n\r\nux-dialog-overlay.active { opacity: 1 }\r\n\r\nux-dialog-container {\r\n    display: block;\r\n    transition: opacity .2s linear;\r\n    opacity: 0;\r\n    overflow-x: hidden;\r\n    overflow-y: auto;\r\n    -webkit-overflow-scrolling: touch\r\n}\r\n\r\nux-dialog-container.active { opacity: 1 }\r\n\r\nux-dialog-container > div { padding: 30px }\r\n\r\nux-dialog-container > div > div {\r\n    display: block;\r\n    min-width: 300px;\r\n    width: -moz-fit-content;\r\n    width: -webkit-fit-content;\r\n    width: fit-content;\r\n    height: -moz-fit-content;\r\n    height: -webkit-fit-content;\r\n    height: fit-content;\r\n    margin: auto\r\n}\r\n\r\nux-dialog-container, ux-dialog-container > div, ux-dialog-container > div > div { outline: 0 }\r\n\r\nux-dialog {\r\n    display: table;\r\n    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\r\n    border: 1px solid rgba(0, 0, 0, .2);\r\n    border-radius: 5px;\r\n    padding: 3px;\r\n    min-width: 300px;\r\n    width: -moz-fit-content;\r\n    width: -webkit-fit-content;\r\n    width: fit-content;\r\n    height: -moz-fit-content;\r\n    height: -webkit-fit-content;\r\n    height: fit-content;\r\n    margin: auto;\r\n    border-image-source: initial;\r\n    border-image-slice: initial;\r\n    border-image-width: initial;\r\n    border-image-outset: initial;\r\n    border-image-repeat: initial;\r\n    background: #fff\r\n}\r\n\r\nux-dialog > ux-dialog-header {\r\n    display: block;\r\n    padding: 16px;\r\n    border-bottom: 1px solid #e5e5e5\r\n}\r\n\r\nux-dialog > ux-dialog-header > button {\r\n    float: right;\r\n    border: none;\r\n    display: block;\r\n    width: 32px;\r\n    height: 32px;\r\n    background: 0 0;\r\n    font-size: 22px;\r\n    line-height: 16px;\r\n    margin: -14px -16px 0 0;\r\n    padding: 0;\r\n    cursor: pointer\r\n}\r\n\r\nux-dialog > ux-dialog-body {\r\n    display: block;\r\n    padding: 16px\r\n}\r\n\r\nux-dialog > ux-dialog-footer {\r\n    display: block;\r\n    padding: 6px;\r\n    border-top: 1px solid #e5e5e5;\r\n    text-align: right\r\n}\r\n\r\nux-dialog > ux-dialog-footer button {\r\n    color: #333;\r\n    background-color: #fff;\r\n    padding: 6px 12px;\r\n    font-size: 14px;\r\n    text-align: center;\r\n    white-space: nowrap;\r\n    vertical-align: middle;\r\n    -ms-touch-action: manipulation;\r\n    touch-action: manipulation;\r\n    cursor: pointer;\r\n    background-image: none;\r\n    border: 1px solid #ccc;\r\n    border-radius: 4px;\r\n    margin: 5px 0 5px 5px\r\n}\r\n\r\nux-dialog > ux-dialog-footer button:disabled {\r\n    cursor: default;\r\n    opacity: .45\r\n}\r\n\r\nux-dialog > ux-dialog-footer button:hover:enabled {\r\n    color: #333;\r\n    background-color: #e6e6e6;\r\n    border-color: #adadad\r\n}\r\n\r\n.ux-dialog-open { overflow: hidden }\r\n\r\n.vcenter {\r\n    margin-top: 15px;\r\n}\r\n\r\n.dashboard-map-container {\r\n    height: 70vh;\r\n}\r\n"; });
//# sourceMappingURL=app-bundle.js.map