/* Minification failed. Returning unminified contents.
(3931,83-84): run-time error JS1195: Expected expression: >
(3933,93-94): run-time error JS1195: Expected expression: >
(3935,22-23): run-time error JS1195: Expected expression: )
(3936,17-18): run-time error JS1002: Syntax error: }
(3942,72-73): run-time error JS1195: Expected expression: )
(3942,74-75): run-time error JS1004: Expected ';': {
(3951,14-15): run-time error JS1195: Expected expression: )
(3954,27-28): run-time error JS1195: Expected expression: )
(3954,29-30): run-time error JS1004: Expected ';': {
(3957,13-14): run-time error JS1195: Expected expression: )
(3960,10-11): run-time error JS1197: Too many errors. The file might not be a JavaScript file: ,
 */
/*
    A simple jQuery modal (http://github.com/kylefox/jquery-modal)
    Version 0.9.2
*/
!function (o) { "object" == typeof module && "object" == typeof module.exports ? o(require("jquery"), window, document) : o(jQuery, window, document) }(function (o, t, i, e) { var s = [], l = function () { return s.length ? s[s.length - 1] : null }, n = function () { var o, t = !1; for (o = s.length - 1; o >= 0; o--)s[o].$blocker && (s[o].$blocker.toggleClass("current", !t).toggleClass("behind", t), t = !0) }; o.modal = function (t, i) { var e, n; if (this.$body = o("body"), this.options = o.extend({}, o.modal.defaults, i), this.options.doFade = !isNaN(parseInt(this.options.fadeDuration, 10)), this.$blocker = null, this.options.closeExisting) for (; o.modal.isActive();)o.modal.close(); if (s.push(this), t.is("a")) if (n = t.attr("href"), this.anchor = t, /^#/.test(n)) { if (this.$elm = o(n), 1 !== this.$elm.length) return null; this.$body.append(this.$elm), this.open() } else this.$elm = o("<div>"), this.$body.append(this.$elm), e = function (o, t) { t.elm.remove() }, this.showSpinner(), t.trigger(o.modal.AJAX_SEND), o.get(n).done(function (i) { if (o.modal.isActive()) { t.trigger(o.modal.AJAX_SUCCESS); var s = l(); s.$elm.empty().append(i).on(o.modal.CLOSE, e), s.hideSpinner(), s.open(), t.trigger(o.modal.AJAX_COMPLETE) } }).fail(function () { t.trigger(o.modal.AJAX_FAIL); var i = l(); i.hideSpinner(), s.pop(), t.trigger(o.modal.AJAX_COMPLETE) }); else this.$elm = t, this.anchor = t, this.$body.append(this.$elm), this.open() }, o.modal.prototype = { constructor: o.modal, open: function () { var t = this; this.block(), this.anchor.blur(), this.options.doFade ? setTimeout(function () { t.show() }, this.options.fadeDuration * this.options.fadeDelay) : this.show(), o(i).off("keydown.modal").on("keydown.modal", function (o) { var t = l(); 27 === o.which && t.options.escapeClose && t.close() }), this.options.clickClose && this.$blocker.click(function (t) { t.target === this && o.modal.close() }) }, close: function () { s.pop(), this.unblock(), this.hide(), o.modal.isActive() || o(i).off("keydown.modal") }, block: function () { this.$elm.trigger(o.modal.BEFORE_BLOCK, [this._ctx()]), this.$body.css("overflow", "hidden"), this.$blocker = o('<div class="' + this.options.blockerClass + ' blocker current"></div>').appendTo(this.$body), n(), this.options.doFade && this.$blocker.css("opacity", 0).animate({ opacity: 1 }, this.options.fadeDuration), this.$elm.trigger(o.modal.BLOCK, [this._ctx()]) }, unblock: function (t) { !t && this.options.doFade ? this.$blocker.fadeOut(this.options.fadeDuration, this.unblock.bind(this, !0)) : (this.$blocker.children().appendTo(this.$body), this.$blocker.remove(), this.$blocker = null, n(), o.modal.isActive() || this.$body.css("overflow", "")) }, show: function () { this.$elm.trigger(o.modal.BEFORE_OPEN, [this._ctx()]), this.options.showClose && (this.closeButton = o('<a href="#close-modal" rel="modal:close" class="close-modal ' + this.options.closeClass + '">' + this.options.closeText + "</a>"), this.$elm.append(this.closeButton)), this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker), this.options.doFade ? this.$elm.css({ opacity: 0, display: "inline-block" }).animate({ opacity: 1 }, this.options.fadeDuration) : this.$elm.css("display", "inline-block"), this.$elm.trigger(o.modal.OPEN, [this._ctx()]) }, hide: function () { this.$elm.trigger(o.modal.BEFORE_CLOSE, [this._ctx()]), this.closeButton && this.closeButton.remove(); var t = this; this.options.doFade ? this.$elm.fadeOut(this.options.fadeDuration, function () { t.$elm.trigger(o.modal.AFTER_CLOSE, [t._ctx()]) }) : this.$elm.hide(0, function () { t.$elm.trigger(o.modal.AFTER_CLOSE, [t._ctx()]) }), this.$elm.trigger(o.modal.CLOSE, [this._ctx()]) }, showSpinner: function () { this.options.showSpinner && (this.spinner = this.spinner || o('<div class="' + this.options.modalClass + '-spinner"></div>').append(this.options.spinnerHtml), this.$body.append(this.spinner), this.spinner.show()) }, hideSpinner: function () { this.spinner && this.spinner.remove() }, _ctx: function () { return { elm: this.$elm, $elm: this.$elm, $blocker: this.$blocker, options: this.options, $anchor: this.anchor } } }, o.modal.close = function (t) { if (o.modal.isActive()) { t && t.preventDefault(); var i = l(); return i.close(), i.$elm } }, o.modal.isActive = function () { return s.length > 0 }, o.modal.getCurrent = l, o.modal.defaults = { closeExisting: !0, escapeClose: !0, clickClose: !0, closeText: "Close", closeClass: "", modalClass: "modal", blockerClass: "jquery-modal", spinnerHtml: '<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>', showSpinner: !0, showClose: !0, fadeDuration: null, fadeDelay: 1 }, o.modal.BEFORE_BLOCK = "modal:before-block", o.modal.BLOCK = "modal:block", o.modal.BEFORE_OPEN = "modal:before-open", o.modal.OPEN = "modal:open", o.modal.BEFORE_CLOSE = "modal:before-close", o.modal.CLOSE = "modal:close", o.modal.AFTER_CLOSE = "modal:after-close", o.modal.AJAX_SEND = "modal:ajax:send", o.modal.AJAX_SUCCESS = "modal:ajax:success", o.modal.AJAX_FAIL = "modal:ajax:fail", o.modal.AJAX_COMPLETE = "modal:ajax:complete", o.fn.modal = function (t) { return 1 === this.length && new o.modal(this, t), this }, o(i).on("click.modal", 'a[rel~="modal:close"]', o.modal.close), o(i).on("click.modal", 'a[rel~="modal:open"]', function (t) { t.preventDefault(), o(this).modal() }) });;
(function ($, Cobalt, global, undefined) {
    "use strict";

    global.Elerium = {
        priority: 2,
        initialize: function () {}
    };
    global.Elerium.Routes = new Cobalt.Routes();
    global.Elerium.User = Cobalt.User;
})(jQuery, Cobalt, window || this);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.Routes = new Cobalt.Routes();
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, global, undefined) {
	"use strict";

	Elerium.Localization = new Cobalt.Localization(true);
	global.L = Elerium.Localization;

})(jQuery, Cobalt, Elerium, window || this);;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var AccountConnectedAccounts = /** @class */ (function () {
        function AccountConnectedAccounts() {
        }
        AccountConnectedAccounts.initialize = function () {
            var providers = ['steam', 'xbl', 'psn', 'tebex'];
            var _loop_1 = function (provider) {
                $("#" + provider + "-disconnect-requested-btn").on('click', function (e) {
                    $("#field-" + provider + "-disconnect-requested").val('true');
                    $(this).closest('form').submit();
                    return false;
                });
            };
            for (var _i = 0, providers_1 = providers; _i < providers_1.length; _i++) {
                var provider = providers_1[_i];
                _loop_1(provider);
            }
        };
        return AccountConnectedAccounts;
    }());
    Elerium.AccountConnectedAccounts = AccountConnectedAccounts;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.AccountConnectedAccounts.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var ChunkedFileUpload = /** @class */ (function () {
        function ChunkedFileUpload($e) {
            this.lastChunkSize = 0;
            this.lastChunkSuccesful = true;
            this.lastChunkTimeElapsed = 0;
            this.percentageUploaded = 0;
            this.form = $e.closest('form');
            this.file = $e[0].files[0];
        }
        ChunkedFileUpload.initialize = function () {
            if (FileReader) {
                // Disable submit buttons on any forms containing a data-file-field
                $(function () { return $('[data-file-field]').closest('form').find(':submit').prop('disabled', true); });
                // Instantiate the chunked uploader whenever a file data-file-field changes value (e.g. the user picks a file)
                $('[data-file-field]').on('change', function () {
                    new ChunkedFileUpload($(this)).upload();
                });
            }
        };
        ChunkedFileUpload.prototype.upload = function () {
            if (this.file.size > ChunkedFileUpload.maxFileSize) {
                this.error('File exceeds the maximum allowed file size of ' + ChunkedFileUpload.maxFileSize / 1024 / 1024 + 'MB.');
                return;
            }
            var htmlRegex = /[\<\>]/i;
            if (htmlRegex.test(this.file.name)) {
                this.error('File name contains invalid characters');
                return;
            }
            this.percentageUploaded = 0;
            this.updateProgress();
            this.form.find('[data-file-field]').hide();
            this.form.find('[data-progress-info]').html('Uploading "' + this.file.name + '"...').show();
            this.form.find('[data-progress-completion]').show();
            this.form.find('[data-progress-bar]').slideDown();
            this.uploadChunk(0);
        };
        ChunkedFileUpload.prototype.uploadChunk = function (offset, attempt) {
            var _this = this;
            if (attempt === void 0) { attempt = 1; }
            if (offset >= this.file.size) {
                // Upload completed
                this.percentageUploaded = 100;
                this.completeUpload();
                return;
            }
            // Set defaults
            var chunkSize = ChunkedFileUpload.minChunkSize;
            var timeout = ChunkedFileUpload.idealChunkTimeWindow;
            if (this.lastChunkTimeElapsed > 0) {
                if (this.lastChunkSuccesful) {
                    // Bigger of `chunkSize` and 1% of the file
                    chunkSize = Math.max(chunkSize, this.file.size / 100);
                    // Bigger of `chunkSize`, and amount that can be uploaded in `idealChunkTimeWindow` ms
                    chunkSize = Math.max(chunkSize, this.lastChunkSize / this.lastChunkTimeElapsed * ChunkedFileUpload.idealChunkTimeWindow);
                    // Smaller of `chunkSize` and `maxChunkSize`
                    chunkSize = Math.min(chunkSize, ChunkedFileUpload.maxChunkSize);
                    // Calculate `timeout` based on the time it took to upload the last chunk, and add the `timeoutBuffer` value to it
                    timeout = (this.lastChunkTimeElapsed / this.lastChunkSize * chunkSize) + ChunkedFileUpload.timeoutBuffer;
                    // If `timeout` exceeds `maxTimeout`, recalculate `chunkSize` to fit in `maxTimeout` minus `timeoutBuffer`
                    if (timeout > ChunkedFileUpload.maxTimeout) {
                        chunkSize = Math.max(chunkSize * (ChunkedFileUpload.maxTimeout - ChunkedFileUpload.timeoutBuffer) / timeout, ChunkedFileUpload.minChunkSize);
                        timeout = ChunkedFileUpload.maxTimeout;
                    }
                }
                else {
                    // Last request failed, double timeout until we reach `maxTimeout`
                    timeout = Math.min(this.lastChunkTimeElapsed * 2, ChunkedFileUpload.maxTimeout);
                }
            }
            // Normalize values
            chunkSize = Math.floor(chunkSize);
            offset = Math.floor(offset);
            timeout = Math.floor(timeout);
            var end = Math.min(offset + chunkSize, this.file.size);
            console.log('Uploading chunk:', {
                size: Math.floor((end - offset) / 1024),
                offset: offset,
                timeout: timeout,
                lastChunkTimeElapsed: this.lastChunkTimeElapsed,
            });
            var blob;
            if (this.file.slice) {
                blob = this.file.slice(offset, end);
            }
            else if (this.file.webkitSlice) {
                blob = this.file.webkitSlice(offset, end);
            }
            else if (this.file.mozSlice) {
                blob = this.file.mozSlice(offset, end);
            }
            else {
                this.error('Could not upload file.');
                return;
            }
            // Because we need access to the blob for hashing purposes, we have to use the convoluted FileReader API to get the bytes of the slice
            var fileReader = new FileReader();
            fileReader.onload = function (e) {
                Cobalt.Utils.getRequestVerificationToken().done(function (token) {
                    var formData = new FormData();
                    formData.append('request-verification-token', token);
                    formData.append('attempt', String(attempt));
                    formData.append('chunk', String(offset));
                    formData.append('file', blob);
                    formData.append('hash', String(Elerium.MurmurHash2.compute(e.target.result)));
                    if (_this.guid != null) {
                        formData.append('guid', _this.guid);
                    }
                    var startTime = Date.now();
                    $.ajax({
                        url: ChunkedFileUpload.url,
                        contentType: false,
                        data: formData,
                        processData: false,
                        timeout: timeout,
                        type: 'POST',
                        error: function (request, textStatus, errorThrown) {
                            if (textStatus === 'timeout') {
                                console.log('Upload timed out, retrying.');
                                _this.lastChunkSize = chunkSize;
                                _this.lastChunkSuccesful = false;
                                _this.lastChunkTimeElapsed = Date.now() - startTime;
                                _this.uploadChunk(offset, attempt + 1);
                            }
                            else {
                                _this.error(textStatus);
                            }
                        },
                        success: function (data, textStatus, request) {
                            if (data['status'] === 'success') {
                                _this.guid = data['guid'];
                                _this.lastChunkSize = chunkSize;
                                _this.lastChunkSuccesful = true;
                                _this.lastChunkTimeElapsed = Date.now() - startTime;
                                _this.percentageUploaded = end / _this.file.size * 100;
                                _this.uploadChunk(end);
                            }
                            else {
                                _this.error(data['message'] !== undefined ? data['message'] : 'Unknown error, please try again.');
                            }
                        }
                    });
                });
            };
            fileReader.readAsArrayBuffer(blob);
        };
        ChunkedFileUpload.prototype.error = function (message) {
            this.form.find('[data-progress-info]').html('Uploading "' + $('<div/>').text(this.file.name).html() + '"... Error: ' + message).show();
        };
        ChunkedFileUpload.prototype.completeUpload = function () {
            var _this = this;
            this.form.find('[data-file-name]').val(this.file.name);
            this.form.find('[data-file-guid]').val(this.guid);
            // We need to clear the file from the form field since we successfully chunk loaded it
            this.form.find('[data-file-field]').remove();
            setTimeout(function () {
                _this.form.find('[data-progress-info]').html('"' + _this.file.name + '" is ready for upload.');
                _this.form.find('[data-progress-completion]').fadeOut();
                _this.form.find('[data-progress-bar]').slideUp();
                // Enable any submit buttons on the form
                _this.form.find(':submit').prop('disabled', false);
            }, 1200);
        };
        ChunkedFileUpload.prototype.updateProgress = function () {
            var _this = this;
            var $fill = this.form.find('[data-progress-bar-fill]');
            var maxWidth = parseInt($fill.parent().css('width'), 10) - parseInt($fill.parent().css('padding-right'), 10) - parseInt($fill.parent().css('padding-left'), 10);
            var percentage = Math.min(Math.ceil($fill.width() / maxWidth * 100), 100);
            this.form.find('[data-progress-completion]').html(percentage + '%');
            $fill.css('width', Math.ceil(maxWidth * this.percentageUploaded / 100) + 'px');
            console.log('percentage', percentage);
            if (percentage < 100) {
                setTimeout(function () { return _this.updateProgress(); }, 100);
            }
        };
        ChunkedFileUpload.priority = 3;
        ChunkedFileUpload.idealChunkTimeWindow = 2000;
        ChunkedFileUpload.maxTimeout = 30000;
        ChunkedFileUpload.timeoutBuffer = 2000;
        return ChunkedFileUpload;
    }());
    Elerium.ChunkedFileUpload = ChunkedFileUpload;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ChunkedFileUpload.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var CPClientFeaturedProjects = /** @class */ (function () {
        function CPClientFeaturedProjects() {
        }
        CPClientFeaturedProjects.initialize = function () {
            var template = Handlebars.compile($('[data-template="project-row"]').html());
            CPClientFeaturedProjects.enableDragAndDrop();
            $('[data-target="add-project"]').on('click', function () {
                var $input = $('[data-target="project-autocomplete"]');
                if ($input.val().length > 0) {
                    var projectID = parseInt($input.siblings('#field-project-autocomplete-symbol').val());
                    var projectName = $input.siblings('#field-project-autocomplete-previous').val();
                    if (!CPClientFeaturedProjects.projectAlreadyFeatured(projectID)) {
                        $('[data-target="featured-projects"] tbody').append(template({
                            id: projectID,
                            name: projectName
                        }));
                        $input.val('');
                        // Remove no results row
                        $('[data-target="featured-projects"] td.no-results').parent().remove();
                        // Rerun drag & drop
                        CPClientFeaturedProjects.enableDragAndDrop();
                    }
                    else {
                        alert('Project "' + projectName + '" is already in the list.');
                    }
                }
            });
            $('[data-target="featured-projects"] tbody').on('click', '[data-target="remove-project"]', function (e) {
                $(this).closest('tr').remove();
                return false;
            });
            $('[data-target="project-search-autocomplete-form"]').on('submit', function (e) {
                var sortedIDs = [];
                $('[data-target="featured-projects"] tr').each(function (index, row) {
                    sortedIDs.push(parseInt($(row).attr('data-project-id')));
                });
                $('#field-projects').val(sortedIDs);
            });
        };
        CPClientFeaturedProjects.enableDragAndDrop = function () {
            $('[data-target="featured-projects"] tbody').tableDnD({
                onDragClass: 'dragging',
                dragHandle: 'col-icon-drag-handle',
            });
        };
        CPClientFeaturedProjects.projectAlreadyFeatured = function (projectID) {
            var projectExists = false;
            $('[data-target="featured-projects"] tr').each(function (index, row) {
                if (projectID == parseInt($(row).attr('data-project-id'))) {
                    projectExists = true;
                }
            });
            return projectExists;
        };
        return CPClientFeaturedProjects;
    }());
    Elerium.CPClientFeaturedProjects = CPClientFeaturedProjects;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.CPClientFeaturedProjects.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var CPClientGameCategoryNavigation = /** @class */ (function () {
        function CPClientGameCategoryNavigation() {
        }
        CPClientGameCategoryNavigation.initialize = function () {
            var template = Handlebars.compile($('[data-template="row"]').html());
            CPClientGameCategoryNavigation.enableDragAndDrop();
            $('[data-target="add-row"]').on('click', function (e) {
                $('[data-target="navigation-items"] tbody').append(template(null));
                // Remove no results row
                $('[data-target="navigation-items"] td.no-results').parent().remove();
                // Rerun drag & drop
                CPClientGameCategoryNavigation.enableDragAndDrop();
                return false;
            });
            $('[data-target="navigation-items"] tbody').on('click', '[data-target="remove-row"]', function (e) {
                $(this).closest('tr')
                    .attr('data-state', 'removed')
                    .removeClass('modified new')
                    .addClass('removed');
                return false;
            });
            $('[data-target="navigation-items"] tbody').on('keyup', ('[data-target="name"], [data-target="url"]'), function (e) {
                var $tr = $(this).closest('tr');
                if (!$tr.hasClass('new') && !$tr.hasClass('removed') && !$tr.hasClass('modified')) {
                    $tr.attr('data-state', 'modified').addClass('modified');
                }
                return false;
            });
            $('[data-target="save-navigation-form"]').on('submit', function (e) {
                var items = [];
                $('[data-target="navigation-items"] tbody tr').each(function (index, row) {
                    var id = parseInt($(row).attr('data-id'));
                    var state = $(row).attr('data-state');
                    if ((!id && state === "removed")) {
                        return;
                    }
                    var item = {
                        displayIndex: index,
                        name: $('[data-target="name"]', row).val(),
                        url: $('[data-target="url"]', row).val(),
                    };
                    if (id) {
                        item['id'] = id;
                        if (state === "removed") {
                            item['removed'] = true;
                        }
                    }
                    items.push(item);
                });
                $('#field-items').val(JSON.stringify(items));
            });
        };
        CPClientGameCategoryNavigation.enableDragAndDrop = function () {
            $('[data-target="navigation-items"] tbody').tableDnD({
                onDragClass: 'dragging',
                dragHandle: 'col-icon-drag-handle',
                onDrop: function (table, row) {
                    if ($(row).attr('data-state') !== 'removed' && $(row).attr('data-state') !== 'new') {
                        $(row).attr('data-state', 'modified').addClass('modified');
                    }
                }
            });
        };
        return CPClientGameCategoryNavigation;
    }());
    Elerium.CPClientGameCategoryNavigation = CPClientGameCategoryNavigation;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.CPClientGameCategoryNavigation.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var CPHomeFeaturedProjects = /** @class */ (function () {
        function CPHomeFeaturedProjects() {
        }
        CPHomeFeaturedProjects.initialize = function () {
            // compile the Handlebars template
            CPHomeFeaturedProjects.template = Handlebars.compile($('[data-template="featured-project"]').html());
            CPHomeFeaturedProjects.bindControls();
            $("[data-target='add-project']").click(function (e) {
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    CPHomeFeaturedProjects.AddProject(requestVerificationToken);
                });
            });
            $("[data-target='project-form-submit']").submit(function (e) {
                var SortedContestIDs = new Array();
                $("[data-target='home-featured-projects'] > div > table > tbody > tr").each(function (index, project) {
                    var projectID = $(project).find("[data-target='project-info']").attr("data-id");
                    SortedContestIDs.push(projectID);
                });
                $("#field-project-order").val(SortedContestIDs);
            });
            $('[data-target="save-avatar"]').click(function () {
                var id = $(this).attr("data-id");
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    CPHomeFeaturedProjects.UploadAvatar(requestVerificationToken, id);
                });
            });
            $('[data-target="delete-avatar"]').click(function () {
                var id = $(this).attr("data-id");
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    CPHomeFeaturedProjects.DeleteAvatar(requestVerificationToken, id);
                });
            });
        };
        CPHomeFeaturedProjects.bindControls = function () {
            CPHomeFeaturedProjects.setupProjectSort();
            CPHomeFeaturedProjects.bindRemoveButton();
            CPHomeFeaturedProjects.BindAvatarDialog();
        };
        CPHomeFeaturedProjects.checkIfProjectSelected = function (projectID) {
            var projectExists = false;
            $("[data-target='home-featured-projects'] > div > table > tbody > tr").each(function (index, project) {
                var rowProjectID = parseInt($(project).find("[data-target='project-info']").attr("data-id"));
                if (rowProjectID == projectID) {
                    projectExists = true;
                }
            });
            return projectExists;
        };
        CPHomeFeaturedProjects.bindRemoveButton = function () {
            $("[data-target='remove-project']").click(function (e) {
                var projectID = $(this).attr("data-id");
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    CPHomeFeaturedProjects.DeleteProject(requestVerificationToken, projectID);
                });
            });
        };
        CPHomeFeaturedProjects.setupProjectSort = function () {
            $("[data-target='home-featured-projects'] > div > table").tableDnD({
                onDragClass: "dragHandle",
                dragHandle: "col-icon-drag-handle",
                onDrop: function (table, rowDropped) {
                },
                onDragStart: function (table, row) {
                },
                onAllowDrop: function (draggedRow, dropRow) {
                    return true;
                }
            });
        };
        CPHomeFeaturedProjects.BindAvatarDialog = function () {
            $('[data-target="upload-avatar"]').click(function () {
                CPHomeFeaturedProjects.SetupEditAvatar($(this).attr("data-id"));
                CPHomeFeaturedProjects.avatarEditDialog.dialog("open");
            });
            CPHomeFeaturedProjects.avatarEditDialog = $('[data-target="project-avatar-dialog-edit"]').dialog({
                autoOpen: false,
                height: 300,
                width: 350,
                modal: true,
                title: "Custom Avatar",
                close: function () {
                    $("#game-avatar-edit").find('.game-avatars-title').val('');
                    $("#game-avatar-edit").find("input.game-avatars-file-upload").val('');
                }
            });
        };
        CPHomeFeaturedProjects.AddProject = function (requestVerificationToken) {
            var $this = $("[data-target='project-autocomplete']");
            if ($this.val().length > 0) {
                var myFormData = new FormData();
                var title = $this.siblings("#field-project-autocomplete-previous").val();
                var projectID = $this.siblings("#field-project-autocomplete-symbol").val().split(':')[1];
                myFormData.append("request-verification-token", requestVerificationToken);
                if (!CPHomeFeaturedProjects.checkIfProjectSelected(parseInt(projectID))) {
                    var url = "/cp/site-featured-projects/add/" + projectID;
                    $.ajax({
                        url: url,
                        type: 'POST',
                        processData: false,
                        contentType: false,
                        dataType: 'json',
                        data: myFormData,
                        success: function (data) {
                            $("[data-target='home-featured-projects'] > div > table > tbody").append(CPHomeFeaturedProjects.template(data));
                            CPHomeFeaturedProjects.bindControls();
                            $("[data-target='project-autocomplete']").val("");
                            //remove the no results row
                            $("[data-target='home-featured-projects'] > div > table > tbody > tr >td.no-results").parent().remove();
                        }
                    });
                }
                else {
                    alert("Project '" + title + "' is already in the list");
                }
            }
            else {
                alert("You need to select a project");
            }
        };
        CPHomeFeaturedProjects.DeleteProject = function (requestVerificationToken, projectID) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            var url = "/cp/site-featured-projects/delete/" + projectID;
            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    $("[data-target='project-row'][data-id='" + data.ID + "").remove();
                }
            });
        };
        CPHomeFeaturedProjects.SetupEditAvatar = function (featureID) {
            var editBox = $('[data-target="project-avatar-dialog-edit"]');
            $('[data-target="project-avatars-file-upload"]').val('');
            var activeRow = $("[data-target='project-row'][data-id='" + featureID + "");
            editBox.find('[data-target="project-avatars-img"]').attr("src", activeRow.find(".feature-avatar").attr("href"));
            $('[data-target="save-avatar"]').attr("data-id", featureID);
            $('[data-target="delete-avatar"]').attr("data-id", featureID);
            var customAvatar = activeRow.attr("data-custom-avatar");
            if (customAvatar == 'true') {
                editBox.find('[data-target="delete-avatar"]').removeClass("hide");
            }
            else {
                editBox.find('[data-target="delete-avatar"]').addClass("hide");
            }
        };
        CPHomeFeaturedProjects.UploadAvatar = function (requestVerificationToken, id) {
            var editBox = $('[data-target="project-avatar-dialog-edit"]');
            var avatarFile = editBox.find('[data-target="project-avatars-file-upload"]');
            // generate a form to be passed to the controller
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            if (avatarFile.val() != '') {
                myFormData.append('pictureFile', avatarFile[0].files[0]);
            }
            else {
                alert("A file must be uploaded when createing an avatar");
                return false;
            }
            myFormData.append("featuredProjectID", id);
            var url = "/cp/site-featured-projects/update-avatar";
            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    CPHomeFeaturedProjects.HandleAvatarUpload(data);
                    CPHomeFeaturedProjects.avatarEditDialog.dialog("close");
                }
            });
            return true;
        };
        CPHomeFeaturedProjects.DeleteAvatar = function (requestVerificationToken, id) {
            var editBox = $('[data-target="project-avatar-dialog-edit"]');
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            var url = "/cp/site-featured-projects/delete-avatar/" + id;
            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    CPHomeFeaturedProjects.HandleAvatarUpload(data);
                    CPHomeFeaturedProjects.avatarEditDialog.dialog("close");
                }
            });
            return true;
        };
        CPHomeFeaturedProjects.HandleAvatarUpload = function (data) {
            var editRow = $("[data-target='project-row'][data-id='" + data.Item1 + "");
            editRow.attr("data-custom-avatar", data.Item5);
            editRow.find(".feature-avatar").attr("href", data.Item4);
        };
        return CPHomeFeaturedProjects;
    }());
    Elerium.CPHomeFeaturedProjects = CPHomeFeaturedProjects;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.CPHomeFeaturedProjects.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var DashboardIssues = /** @class */ (function () {
        function DashboardIssues() {
        }
        DashboardIssues.initialize = function () {
            $('#filter-project,#filter-status').on('change', function (e) {
                $(this).closest('form').submit();
            });
        };
        return DashboardIssues;
    }());
    Elerium.DashboardIssues = DashboardIssues;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.DashboardIssues.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var FeaturedProject = /** @class */ (function () {
        function FeaturedProject() {
        }
        FeaturedProject.initialize = function () {
            // compile the Handlebars template
            var template = Handlebars.compile($('[data-template="featured-project-files"]').html());
            // on page load
            $(function () {
                var relationData = $('[data-selectable-project-files-json]').val();
                if (relationData.length > 0) {
                    // Render template
                    var $list = $('[data-target="featured-project-file-list"]');
                    $list.append(template(JSON.parse(relationData)));
                    Cobalt.triggerHtmlInsert($list);
                    // file previous selected
                    var selectedProjectFile = $('[data-selected-project-file-json]').val();
                    // set the previously selected file's radio button
                    if (selectedProjectFile.length > 0) {
                        $('input[name=selectableProjectFilesRadioGroup][value=' + selectedProjectFile + ']').prop('checked', true);
                    }
                }
            });
            // ensure only one radio button selected at a time
            $("input[name=selectableProjectFilesRadioGroup]").click(function () {
                var $this = $(this);
                $this.siblings("input[name=selectableProjectFilesRadioGroup]").prop("checked", false);
            });
            // Showing Files
            $('[data-target="featured-project-autocomplete-add-project"]').on('click', function (e) {
                var $list = $('[data-target="featured-project-file-list"]');
                $list.empty(); // clear the list incase user clicked the button again
                var projectID = $('#field-project-autocomplete-symbol').val().toString().split(':')[1];
                $.ajax({
                    url: Elerium.Routes.CPFeaturedProjectFiles(projectID),
                    error: function (request, error) {
                        alert(error);
                    },
                    success: function (data) {
                        $('#file-data').append(data);
                        $list.append(template(JSON.parse(data)));
                        $list.hide();
                        Cobalt.triggerHtmlInsert($list);
                        $list.slideDown(200);
                        $list.show();
                    }
                });
                return false;
            });
            // Form submit
            $('[data-featured-project-submit]').on('click', function (e) {
                var sel = $('input[name=selectableProjectFilesRadioGroup]:checked', '#featured-project-form').val();
                // update hidden form field with updated JSON data
                $('[data-selected-project-file-json]').val(sel);
                $('#featured-project-form').submit();
                return false;
            });
        };
        return FeaturedProject;
    }());
    Elerium.FeaturedProject = FeaturedProject;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.FeaturedProject.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var FeaturedSite = /** @class */ (function () {
        function FeaturedSite() {
        }
        FeaturedSite.initialize = function () {
            if ($(window).width() >= 1060) {
                atvImg();
            }
            var $selectedSite = $('[data-target="featured-site-target"] .selected');
            FeaturedSite.loadFeaturedSiteDetails($selectedSite.attr('data-site'), parseInt($selectedSite.attr('data-index')));
            FeaturedSite.preloadFeaturedSiteDetails();
            $('[data-target="featured-site-target"] li').on('click', function (event) {
                $(this).siblings().removeClass('selected');
                $(this).addClass('selected');
                $('#e-selected-featured-site').removeClass();
                $('#e-selected-featured-site').addClass('position-selected-' + $(this).attr('data-index'));
                FeaturedSite.loadFeaturedSiteDetails($(this).attr('data-site'), parseInt($(this).attr('data-index')));
                if ($(window).width() <= 1065) {
                    Elerium.FeaturedSite.centerListItem($('div.featured-site-container'), $('div.featured-site-container ul li'), $('div.featured-site-container ul li.selected'), true);
                }
            });
            if ($(window).width() <= 1065) {
                Elerium.FeaturedSite.centerListItem($('div.featured-site-container'), $('div.featured-site-container ul li'), $('div.featured-site-container ul li.selected'), false);
            }
            $(window).resize(function () {
                if ($(window).width() <= 1065) {
                    Elerium.FeaturedSite.centerListItem($('div.featured-site-container'), $('div.featured-site-container ul li'), $('div.featured-site-container ul li.selected'), false);
                }
            });
            $('[data-target="show-more-communities"]').on('click', function (event) {
                $(this).css('display', 'none');
                $('[data-target="mobile-list-collapse"]').addClass('open');
            });
        };
        FeaturedSite.centerListItem = function ($elementWithOverflow, $listItems, $selectedListItem, animate) {
            /// <summary>scrolls the scrollable element so that, if possible, the selected item appears centered</summary>
            /// <param name="elementWidthOverflow">The jQuery object with the overflow: hidden style applied</param>
            /// <param name="listItems">The jQuery object for the unordered list's list items</param>
            /// <param name="selectedListItem">The jQuery object for the selected list item</param>
            var centerOfElementWithOverflow = $elementWithOverflow.outerWidth(true) / 2;
            var scrollToWidth = 0;
            for (var i = 0; i < $selectedListItem.index() - 1; i++) {
                scrollToWidth += $($listItems[i]).outerWidth(false);
            }
            if (animate) {
                $elementWithOverflow.animate({ scrollLeft: (scrollToWidth - centerOfElementWithOverflow + ($selectedListItem.outerWidth(true) / 2) + 43) }, 300);
            }
            else {
                $elementWithOverflow.scrollLeft(scrollToWidth - centerOfElementWithOverflow + ($selectedListItem.outerWidth(true) / 2) + 43);
            }
        };
        FeaturedSite.preloadFeaturedSiteDetails = function () {
            $('[data-target="featured-site-target"] li').each(function () {
                var listIndex = parseInt($(this).attr('data-index'));
                var siteSlug = $(this).attr('data-site');
                if (FeaturedSite.FeaturedSites[listIndex] === undefined) {
                    $.ajax({
                        url: Elerium.Routes.HomeFeaturedSiteJson(siteSlug),
                        success: function (data) {
                            FeaturedSite.FeaturedSites[listIndex] = data;
                        }
                    });
                }
            });
        };
        FeaturedSite.loadFeaturedSiteDetails = function (siteSlug, listIndex) {
            var $list = $('[data-target="featured-site-info"]');
            $list.empty(); // clear the list incase user clicked the button again
            if (FeaturedSite.FeaturedSites[listIndex] !== undefined) {
                FeaturedSite.setFeaturedSiteTemplate($list, FeaturedSite.FeaturedSites[listIndex]);
            }
            else {
                $.ajax({
                    url: Elerium.Routes.HomeFeaturedSiteJson(siteSlug),
                    error: function (request, error) {
                        alert(error);
                    },
                    success: function (data) {
                        FeaturedSite.setFeaturedSiteTemplate($list, data);
                        FeaturedSite.FeaturedSites[listIndex] = data;
                    }
                });
            }
        };
        FeaturedSite.setFeaturedSiteTemplate = function (templateContainer, templateDate) {
            // compile the Handlebars template  
            var template = Handlebars.compile($('[data-template="featured-site-template"]').html());
            templateContainer.append(template(templateDate));
            FeaturedSite.minifyDownloadCount();
            FeaturedSite.hideStartProjectButton();
        };
        FeaturedSite.hideStartProjectButton = function () {
            $(".project-downloads").each(function () {
                var $span = $(this);
                var downloads = FeaturedSite.abbrNum(parseInt($span.html()), 2);
                $span.html(downloads.toLocaleString());
            });
        };
        FeaturedSite.minifyDownloadCount = function () {
            $('[data-target="project-start"]').each(function () {
                var $button = $(this);
                if ($button.attr("href").length <= 0) {
                    $button.hide();
                }
            });
        };
        FeaturedSite.abbrNum = function (number, decPlaces) {
            decPlaces = Math.pow(10, decPlaces);
            var abbrev = ["K", "M", "B", "T"];
            for (var i = abbrev.length - 1; i >= 0; i--) {
                var size = Math.pow(10, (i + 1) * 3);
                if (size <= number) {
                    number = Math.round(number * decPlaces / size) / decPlaces;
                    if ((number == 1000) && (i < abbrev.length - 1)) {
                        number = 1;
                        i++;
                    }
                    number += abbrev[i];
                    break;
                }
            }
            return number;
        };
        FeaturedSite.FeaturedSites = [];
        return FeaturedSite;
    }());
    Elerium.FeaturedSite = FeaturedSite;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.FeaturedSite.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var HomeFeaturedProjects = /** @class */ (function () {
        function HomeFeaturedProjects() {
        }
        HomeFeaturedProjects.initialize = function () {
            $('[data-target="project-featured-list"] > li.selected').each(function () {
                var slug = $(this).find("a").attr('data-slug');
                var id = $(this).find("a").attr('data-id');
                HomeFeaturedProjects.showProjectDetails(id, slug);
            });
            $('[data-target="project-featured-list"]').on('click', '[data-action="show-project-details"]', function (event) {
                event.preventDefault();
                var $items = $('[data-target="project-featured-list"] > li');
                var $parent = $(this).parent('li');
                var slug = $(this).attr('data-slug');
                var id = $(this).attr('data-id');
                if (slug && !$parent.hasClass('selected')) {
                    $items.removeClass('selected');
                    $parent.addClass('selected');
                    HomeFeaturedProjects.showProjectDetails(id, slug);
                }
            });
            $('[data-action="project-feature-move"]').on('click', function (event) {
                HomeFeaturedProjects.featureSlide($(this).attr("data-direction"));
                return false;
            });
            HomeFeaturedProjects.scrollWidth(420);
            HomeFeaturedProjects.arrowDisplay();
            $(window).resize(HomeFeaturedProjects.arrowDisplay);
        };
        HomeFeaturedProjects.showProjectDetails = function (projectID, projectSlug) {
            if (HomeFeaturedProjects.projects[projectID] !== undefined) {
                HomeFeaturedProjects.populateProjectDetails(HomeFeaturedProjects.projects[projectID]);
            }
            else {
                $('[data-target="project-details"]').mask();
                $.ajax({
                    url: Elerium.Routes.ProjectFeaturedDetailsAjax(projectSlug),
                    type: 'GET',
                    dataType: 'json',
                    success: function (data) {
                        HomeFeaturedProjects.projects[projectID] = data;
                        HomeFeaturedProjects.populateProjectDetails(data);
                        setTimeout(function () { $('[data-target="project-details"]').unmask(); }, 100);
                    },
                });
            }
        };
        HomeFeaturedProjects.populateProjectDetails = function (data) {
            $('[data-target="project-avatar"]').attr('src', data.avatar);
            $('[data-target="project-url"]').attr('href', data.url);
            $('[data-target="project-summary"]').text(data.summary);
            $('[data-target="project-name"]').text(data.name);
            $('[data-target="project-game-version"]').text(data.gameVersion);
            $('[data-target="project-last-release"]').text(new Date(data.lastRelease).toLocaleDateString());
            $('[data-target="project-downloads"]').text(data.downloads);
            var $categories = $('[data-target="project-categories"]');
            $categories.empty();
            data.categories.forEach(function (item) {
                $categories.append('<li><a href="' + item.url + '"><img src="' + item.avatar + '" title="' + item.name + '" /></a></li>');
            });
        };
        HomeFeaturedProjects.featureSlide = function (direction) {
            var $slider = $('[data-target="project-featured-list"]');
            var item_width = $slider.find('li').outerWidth();
            var left_indent = parseInt($slider.css('left'));
            if (direction == 'left') {
                left_indent = left_indent + item_width;
                $('[data-target="project-featured-list"]:not(:animated)').animate({ 'left': (left_indent), queue: false, duration: 500 }, undefined, function () {
                    //get the first list item and put it after the last list item (that's how the infinite effects is made) '  
                    $slider.find('li:first').before($slider.find('li:last'));
                    //and get the left indent to the default -210px  
                    $slider.css({ 'left': '-210px' });
                });
            }
            else if (direction == 'right') {
                left_indent = left_indent - item_width;
                $('[data-target="project-featured-list"]:not(:animated)').animate({ 'left': (left_indent), queue: false, duration: 500 }, undefined, function () {
                    //get the first list item and put it after the last list item (that's how the infinite effects is made) '   
                    $slider.find('li:last').after($slider.find('li:first'));
                    //and get the left indent to the default -210px  
                    $slider.css({ 'left': '-210px' });
                });
            }
        };
        HomeFeaturedProjects.arrowDisplay = function () {
            if ($('[data-target="project-featured-list"]').width() < window.innerWidth) {
                $('[data-target="project-featured-view"]').parent().addClass("no-scroll");
                HomeFeaturedProjects.scrollWidth(0);
                $('[data-target="project-featured-list"]').css({ 'left': '0' });
            }
            else {
                $('[data-target="project-featured-view"]').parent().removeClass("no-scroll");
                HomeFeaturedProjects.scrollWidth(420);
                $('[data-target="project-featured-list"]').css({ 'left': '- 210px' });
            }
        };
        HomeFeaturedProjects.scrollWidth = function (plusSize) {
            var itemWidth = $('[data-target="project-featured-list"] > li').innerWidth();
            var itemNum = $('[data-target="project-featured-list"] > li').length;
            var totalWidth = itemWidth * itemNum;
            $('[data-target="project-featured-list"]').css("width", totalWidth);
            if ($(window).width() <= 740) {
                $('[data-target="project-featured-slider"]').css("width", totalWidth);
                Elerium.HomeFeaturedProjects.centerListItem($('div[data-target="project-featured-view"]'), $('div.e-slide ul li'), $('div.e-slide ul li.selected'));
            }
            else {
                $('[data-target="project-featured-slider"]').css("width", totalWidth - plusSize);
            }
        };
        HomeFeaturedProjects.centerListItem = function ($elementWithOverflow, $listItems, $selectedListItem) {
            ///<summary>scrolls the scrollable element so that, if possible, the selected item appears centered</summary>
            ///<param name="elementWidthOverflow">The jQuery object with the overflow: hidden style applied</param>
            ///<param name="listItems">The jQuery object for the unordered list's list items</param>
            ///<param name="selectedListItem">The jQuery object for the selected list item</param>
            var centerOfElementWithOverflow = $elementWithOverflow.outerWidth(true) / 2;
            var scrollToWidth = 0;
            for (var i = 0; i < $selectedListItem.index(); i++) {
                scrollToWidth += $($listItems[i]).outerWidth(true);
            }
            $elementWithOverflow.scrollLeft(scrollToWidth - centerOfElementWithOverflow + ($selectedListItem.outerWidth(true) / 2));
        };
        HomeFeaturedProjects.projects = [];
        return HomeFeaturedProjects;
    }());
    Elerium.HomeFeaturedProjects = HomeFeaturedProjects;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.HomeFeaturedProjects.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var MurmurHash2 = /** @class */ (function () {
        function MurmurHash2() {
        }
        // Based on MIT-licensed JavaScript implementation by Gary Court, https://github.com/mikolalysenko/murmurhash-js
        MurmurHash2.compute = function (buffer) {
            var input = new Uint8Array(buffer), l = input.length, h = MurmurHash2.seed ^ l, i = 0, k = 0;
            while (l >= 4) {
                k =
                    ((input[i] & 0xff)) |
                        ((input[++i] & 0xff) << 8) |
                        ((input[++i] & 0xff) << 16) |
                        ((input[++i] & 0xff) << 24);
                k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
                k ^= k >>> 24;
                k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
                h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;
                l -= 4;
                ++i;
            }
            switch (l) {
                case 3: h ^= (input[i + 2] & 0xff) << 16;
                case 2: h ^= (input[i + 1] & 0xff) << 8;
                case 1:
                    h ^= (input[i] & 0xff);
                    h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
            }
            h ^= h >>> 13;
            h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
            h ^= h >>> 15;
            return h >>> 0;
        };
        MurmurHash2.seed = 1;
        return MurmurHash2;
    }());
    Elerium.MurmurHash2 = MurmurHash2;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.MurmurHash2.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var OverflowTip = /** @class */ (function () {
        function OverflowTip() {
        }
        OverflowTip.initialize = function () {
            Cobalt.runOnHtmlInsert(function () {
                $('.overflow-tip').each(function (e) {
                    var $this = $(this);
                    if (this.offsetWidth < this.scrollWidth) {
                        if (!$this.attr('title')) {
                            $this.attr('title', $this.html().trim().replace(/\.+$/, ''));
                        }
                        if (!$this.hasClass('j-tooltip')) {
                            $this.addClass('j-tooltip');
                            $this.tooltip();
                        }
                    }
                });
            });
        };
        return OverflowTip;
    }());
    Elerium.OverflowTip = OverflowTip;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.OverflowTip.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var Pastebin = /** @class */ (function () {
        function Pastebin() {
        }
        Pastebin.initialize = function () {
            if (typeof Pastebin.languageField !== 'undefined') {
                $('#field-' + Pastebin.languageField).change(function () {
                    $('[data-target="pastebin-live-preview"]').removeClass().addClass("hljs");
                    $('[data-target="pastebin-live-preview"]').addClass($(this).find('option:selected').attr('data-css-class'));
                    Pastebin.highlightLivePreview();
                });
            }
            if (typeof Pastebin.bodyField !== 'undefined') {
                $('#field-' + Pastebin.bodyField).bind('change keyup paste', function () {
                    Pastebin.highlightLivePreview();
                });
            }
        };
        Pastebin.highlightLivePreview = function () {
            $('[data-target="pastebin-live-preview"]').each(function (i, block) {
                $(block).text($('#field-' + Pastebin.bodyField).val().trim());
                hljs.highlightBlock(block);
            });
        };
        return Pastebin;
    }());
    Elerium.Pastebin = Pastebin;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.Pastebin.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var PostAction = /** @class */ (function () {
        function PostAction() {
        }
        PostAction.initialize = function () {
            $('body').on('click', 'a[data-action="post"]', function (e) {
                e.preventDefault();
                var $a = $(this);
                var message = $a.attr('data-confirm-message');
                if (!message || confirm(message)) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.PostAction.submitForm(requestVerificationToken, $a);
                    });
                }
            });
        };
        PostAction.submitForm = function (token, link) {
            var form = $('<form action="' + link.attr('href') + '" method="post"><input name="request-verification-token" type="hidden" value="' + token + '"/></form>');
            $('body').append(form);
            form.submit();
        };
        PostAction.priority = 3;
        return PostAction;
    }());
    Elerium.PostAction = PostAction;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.PostAction.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectFile = /** @class */ (function () {
        function ProjectFile() {
        }
        ProjectFile.initialize = function () {
            $('form').each(function () {
                var $form = $(this);
                var form = this;
                var submitted = false;
                var handler = function () {
                    if (!submitted && $form.valid()) {
                        $form.find("[type=submit]").each(function () {
                            $(this).attr("disabled", "disabled");
                        });
                        submitted = true;
                        return true;
                    }
                    else {
                        return false;
                    }
                };
                $form.submit(handler);
            });
        };
        return ProjectFile;
    }());
    Elerium.ProjectFile = ProjectFile;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectFile.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectFileDetails = /** @class */ (function () {
        function ProjectFileDetails() {
        }
        ProjectFileDetails.initialize = function () {
            $("[data-target='archive-button']").on('click', function (e) {
                e.stopImmediatePropagation();
                e.preventDefault();
                var formData = new FormData();
                formData.append('selected-project-file-ids', String(ProjectFileDetails.projectFileID));
                formData.append('initial-page-type', 'details');
                var route = Elerium.Routes.ProjectFileArchive(ProjectFileDetails.projectSlug);
                var version = $(this).attr('data-archive-version');
                if (version && version == "v2") {
                    route = Elerium.Routes.HomeSiteProjectFileArchive(ProjectFileDetails.projectID);
                }
                $.ajax({
                    url: route,
                    type: 'POST',
                    contentType: false,
                    data: formData,
                    processData: false,
                    error: function (request, error) {
                        alert(error);
                    },
                    success: function (data) {
                        $("<div>")
                            .html(data)
                            .dialog({
                            title: Elerium.Localization.Elerium.ProjectFile.SelectArchivalType,
                            modal: true,
                            closeText: '',
                            dialogClass: 'project-file-archive-dialog',
                            width: 550,
                            open: function () {
                                var dialog = this;
                                $(dialog).parent().focus();
                                $('[data-action="close-dialog"]', this).on('click', function () {
                                    $(dialog).dialog('close');
                                    return false;
                                });
                                Cobalt.Forms.setupAuthToken($(dialog));
                            },
                            close: function () { $(this).remove(); },
                        });
                    }
                });
            });
        };
        return ProjectFileDetails;
    }());
    Elerium.ProjectFileDetails = ProjectFileDetails;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectFileDetails.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectFileList = /** @class */ (function () {
        function ProjectFileList() {
        }
        ProjectFileList.initialize = function () {
            $('.j-project-files-bulk-select:checked').prop('checked', false);
            $('.j-project-files-bulk-archive-button').on('click', function (e) {
                e.stopImmediatePropagation();
                e.preventDefault();
                var route = Elerium.Routes.ProjectFileArchive(ProjectFileList.projectSlug);
                var version = $(this).attr('data-version');
                if (version && version == "v2") {
                    route = Elerium.Routes.HomeSiteProjectFileArchive(ProjectFileList.projectID);
                }
                var fileIDs = [];
                $(".j-project-files-bulk-select:checked").each(function () {
                    fileIDs.push($(this).data("id"));
                });
                var formData = new FormData();
                formData.append('selected-project-file-ids', fileIDs.join());
                formData.append('initial-page-type', 'listing');
                $.ajax({
                    url: route,
                    type: 'POST',
                    contentType: false,
                    data: formData,
                    processData: false,
                    error: function (request, error) {
                        alert(error);
                    },
                    success: function (data) {
                        $("<div>")
                            .html(data)
                            .dialog({
                            modal: true,
                            dialogClass: 'project-file-archive-dialog',
                            width: 550,
                            closeText: '',
                            title: Elerium.Localization.Elerium.ProjectFile.SelectArchivalType,
                            open: function () {
                                var dialog = this;
                                $(dialog).parent().focus();
                                $('[data-action="close-dialog"]', this).on('click', function () {
                                    $(dialog).dialog('close');
                                    return false;
                                });
                                Cobalt.Forms.setupAuthToken($(dialog));
                            },
                            close: function () { $(this).remove(); },
                        });
                    }
                });
            });
            $('.j-project-files-bulk-select').on('change', function () {
                $('.j-project-files-bulk-archive-button').toggleClass('disabled', $('.j-project-files-bulk-select:checked').length == 0);
                if ($('.j-project-files-bulk-select:checked').length == 0) {
                    $('.j-project-files-bulk-archive-button').attr('disabled', 'disabled');
                }
                else {
                    $('.j-project-files-bulk-archive-button').removeAttr('disabled');
                }
            });
            $('.j-project-file-list select').on('change', function (e) {
                $(this).closest("form").submit();
                return false;
            });
        };
        return ProjectFileList;
    }());
    Elerium.ProjectFileList = ProjectFileList;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectFileList.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectFileRelation = /** @class */ (function () {
        function ProjectFileRelation() {
        }
        ProjectFileRelation.initialize = function () {
            // Handlebars helper methods
            Handlebars.registerHelper('selectRelationOption', function (value, options) {
                var $el = $('<select />').html(options.fn(this));
                $el.find('[value=' + value + ']').attr({ 'selected': 'selected' });
                return $el.html();
            });
            Handlebars.registerHelper('selectFileOption', function (value, option) {
                return value == option.fileID ? ' selected' : '';
            });
            var template = Handlebars.compile($('[data-template="project-file-relations"]').html());
            // on page load
            $(function () {
                var relationData = $('[data-project-file-relations-json]').val();
                var context = {};
                // check for existing relations data. If have, build new JSON object that combined relations and options data
                if (relationData !== undefined && relationData.length > 0) {
                    context = {
                        projects: JSON.parse(relationData),
                        options: ProjectFileRelation.fileRelationTypes,
                    };
                }
                // Render template
                var $list = $('[data-target="project-file-relations-list"]');
                $list.append(template(context));
                Cobalt.triggerHtmlInsert($list);
            });
            // Adding a project relation
            $('[data-target="project-file-relations-autocomplete-add-project"]').on('click', function (e) {
                var relatedProjectID = $('#field-project-autocomplete-symbol').val().toString().split(':')[1];
                if (relatedProjectID) {
                    var relatedDiv = $('[data-target="project-file-relations-list"] [data-related-project-id="' + relatedProjectID + '"]');
                    if (relatedDiv.length > 0) {
                        // The relation was already added
                        relatedDiv.fadeOut(10);
                        relatedDiv.fadeIn();
                    }
                    else {
                        var $list = $('[data-target="project-file-relations-list"]');
                        $.ajax({
                            url: Elerium.Routes.HomeSiteProjectFileRelationEdit(ProjectFileRelation.projectID, relatedProjectID),
                            async: false,
                            error: function (request, error) {
                                alert(error);
                            },
                            success: function (data) {
                                if (data['status'] == 'success') {
                                    $list.append(data['data']);
                                    Cobalt.triggerHtmlInsert($list);
                                }
                            }
                        });
                    }
                }
                return false;
            });
            // Removing a relation, or undoing removal of a relation
            $('[data-target="project-file-relations"]').on('click', '[data-target="toggle-project-file-relation"]', function (e) {
                var $this = $(this);
                var $div = $this.closest('div[data-state]');
                if ($div.attr('data-state') == 'existing') {
                    $div.addClass('removed');
                    $div.attr('data-state', 'removed');
                    $this.text('undo remove');
                    $div.find('.project-tag-info').addClass('disabled');
                    $div.find('.project-tag-avatar').addClass('disabled');
                }
                else if ($div.attr('data-state') == 'added') {
                    $div.addClass('removed');
                    $div.attr('data-state', 'removed');
                    $this.text('undo remove');
                    $div.find('.project-tag-info').addClass('disabled');
                    $div.find('.project-tag-avatar').addClass('disabled');
                }
                else {
                    $div.removeClass('removed');
                    $div.attr('data-state', 'added');
                    $this.text('remove');
                    $div.find('.project-tag-info').removeClass('disabled');
                    $div.find('.project-tag-avatar').removeClass('disabled');
                }
                return false;
            });
            // Form submit
            $('[data-project-file-relations-submit]').on('click', function (e) {
                // only get divs that are not set to be removed.
                var addedDivs = $('[data-target="project-file-relations-list"] div[data-state="added"]');
                // build JSON obj from added divs
                var addedRelationships = $.map(addedDivs, function (n, i) {
                    var name = $(n).find('span').text();
                    var selectedRelationOption = $(n).find('#field-project-file-relation-type option:selected').val();
                    var selectedFileOption = $(n).find('#field-project-file-autocomplete-symbol').val();
                    return [{ 'name': name, 'id': parseInt($(n).attr('data-related-project-id')), 'type': parseInt(selectedRelationOption), 'fileID': parseInt(selectedFileOption) }];
                });
                var existingDivs = $('[data-target="project-file-relations-list"] div[data-state="existing"]');
                // build JSON obj from existing divs
                var existingRelationships = $.map(existingDivs, function (n, i) {
                    var name = $(n).find('[data-target="project-tag-name"]').text();
                    var selectedRelationOption = $(n).find('[data-target="project-tag-relation"]').data('project-typeid');
                    var selectedFileOption = $(n).find('[data-target="project-tag-relatedFileID"]').data('relatedfileid');
                    return [{ 'name': name, 'id': parseInt($(n).attr('data-related-project-id')), 'type': parseInt(selectedRelationOption), 'fileID': parseInt(selectedFileOption) }];
                });
                // update hidden form field with updated JSON data
                $('[data-project-file-relations-json]').val(JSON.stringify(addedRelationships.concat(existingRelationships)));
                $('[data-project-file-form]').submit();
                return false;
            });
        };
        return ProjectFileRelation;
    }());
    Elerium.ProjectFileRelation = ProjectFileRelation;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectFileRelation.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectIssueDetails = /** @class */ (function () {
        function ProjectIssueDetails() {
        }
        ProjectIssueDetails.initialize = function () {
            Handlebars.registerHelper("hasMoreThanOne", function (arrayLength, block) {
                if (parseInt(arrayLength) > 1) {
                    return block.fn(this);
                }
            });
            // Handle inline comment editing
            $("[data-target='project-issue-comment-link']").on('click', function (e) {
                var $editButton = $(this);
                var $comment = $editButton.closest("[data-target='project-issue-comment']");
                var $contentContainer = $comment.find("[data-target='project-issue-comment-edit']");
                var $contentWrapper = $comment.find("[data-target='project-issue-comment-body']");
                var commentID = $editButton.attr("data-project-issue-comment-id");
                $(this).addClass("disabled");
                $(this).addClass("button--disabled");
                $.ajax({
                    url: ProjectIssueDetails.projectGameSlug && ProjectIssueDetails.projectRootGameCategorySlug ? Elerium.Routes.HomeSiteProjectIssueActionComment(ProjectIssueDetails.projectGameSlug, ProjectIssueDetails.projectRootGameCategorySlug, ProjectIssueDetails.projectSlug, ProjectIssueDetails.projectIssueScopedID, commentID) : Elerium.Routes.ProjectIssueActionComment(ProjectIssueDetails.projectSlug, ProjectIssueDetails.projectIssueScopedID, commentID),
                    success: function (data) {
                        $contentWrapper.hide();
                        $contentContainer.hide();
                        $("[data-project-issue-comment-id='" + commentID + "']").hide();
                        var $editForm = $("<div data-target='project-issue-comment-editor-" + commentID + "'>");
                        $editForm.html(data);
                        $editForm.find("[data-target='project-issue-comment-cancel-button-" + commentID + "']").on('click', function (e) {
                            Cobalt.TinyMCE.removeEditor($contentContainer);
                            $editForm.remove();
                            $("[data-project-issue-comment-id='" + commentID + "']").show();
                            $contentWrapper.fadeIn(750);
                            $editButton.removeClass("disabled");
                            $editButton.removeClass("button--disabled");
                            return false;
                        });
                        $contentContainer.append($editForm);
                        $contentContainer.fadeIn(750);
                        Cobalt.triggerHtmlInsert($contentContainer);
                    },
                    dataType: "html",
                    type: "GET"
                });
                return false;
            });
            // Handles inline title and description editing
            $("[data-target='project-issue-edit-link']").on('click', function (e) {
                var $description = $("[data-target='project-issue-description']");
                var $events = $("[data-target='project-issue-event']");
                var $editContainer = $("[data-project-issue-edit-container]");
                $(this).addClass("disabled");
                $(this).addClass('button--disabled');
                $.ajax({
                    url: ProjectIssueDetails.projectGameSlug && ProjectIssueDetails.projectRootGameCategorySlug ? Elerium.Routes.HomeSiteProjectIssueEdit(ProjectIssueDetails.projectGameSlug, ProjectIssueDetails.projectRootGameCategorySlug, ProjectIssueDetails.projectSlug, ProjectIssueDetails.projectIssueScopedID) : Elerium.Routes.ProjectIssueEdit(ProjectIssueDetails.projectSlug, ProjectIssueDetails.projectIssueScopedID),
                    success: function (data) {
                        $description.hide();
                        $events.hide();
                        $editContainer.hide();
                        var $editForm = $("<div/>");
                        $editForm.html(data);
                        $editForm.find('[data-target="project-issue-cancel-button"]').click(function (e) {
                            Cobalt.TinyMCE.removeEditor($editContainer);
                            $editForm.remove();
                            $description.fadeIn(750);
                            $events.fadeIn(750);
                            $("[data-target='project-issue-edit-link']").removeClass("disabled");
                            $("[data-target='project-issue-edit-link']").removeClass('button--disabled');
                            return false;
                        });
                        $editContainer.append($editForm);
                        $editContainer.fadeIn(750);
                        Cobalt.triggerHtmlInsert($editContainer);
                    },
                    dataType: "html",
                    type: "GET"
                });
                return false;
            });
            // Handles marking an issue as Spam
            $("[data-target='project-issue-spam-link']").on('click', function (e) {
                var spamButton = $(this);
                spamButton.addClass("disabled");
                spamButton.addClass("button--disabled");
                if (confirm("Are you sure you want to mark this issue as spam?")) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.ProjectIssueDetails.markAsSpam(spamButton, ProjectIssueDetails.projectIssueModelID, ProjectIssueDetails.projectIssueID, requestVerificationToken);
                    });
                }
                spamButton.removeClass("disabled");
                spamButton.removeClass("button--disabled");
                return false;
            });
            // Handles marking an issue as Not Spam
            $("[data-target='project-issue-not-spam-link']").on('click', function (e) {
                var spamButton = $(this);
                spamButton.addClass("disabled");
                spamButton.addClass("button--disabled");
                if (confirm("Are you sure you want to mark this issue as not spam?")) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.ProjectIssueDetails.markAsNotSpam(spamButton, ProjectIssueDetails.projectIssueModelID, ProjectIssueDetails.projectIssueID, requestVerificationToken);
                    });
                }
                spamButton.removeClass("disabled");
                spamButton.removeClass("button--disabled");
                return false;
            });
            // Handles deleting a comment
            $("[data-target='project-issue-delete-comment-link']").on('click', function (e) {
                var deleteButton = $(this);
                var commentID = deleteButton.attr("data-project-issue-comment-id");
                deleteButton.addClass("disabled");
                deleteButton.addClass("button--disabled");
                if (confirm("Are you sure you want to delete this comment?")) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.ProjectIssueDetails.deleteComment(deleteButton, ProjectIssueDetails.projectSlug, ProjectIssueDetails.projectIssueScopedID, commentID, requestVerificationToken);
                    });
                }
                deleteButton.removeClass("disabled");
                deleteButton.removeClass("button--disabled");
                return false;
            });
            // Handles undeleting a comment
            $("[data-target='project-issue-undelete-comment-link']").on('click', function (e) {
                var undeleteButton = $(this);
                var commentID = undeleteButton.attr("data-project-issue-comment-id");
                undeleteButton.addClass("disabled");
                undeleteButton.addClass("button--disabled");
                if (confirm("Are you sure you want to undelete this comment?")) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.ProjectIssueDetails.undeleteComment(undeleteButton, ProjectIssueDetails.projectSlug, ProjectIssueDetails.projectIssueScopedID, commentID, requestVerificationToken);
                    });
                }
                undeleteButton.removeClass("disabled");
                undeleteButton.removeClass("button--disabled");
                return false;
            });
            // Handles marking a comment as Spam
            $("[data-target='project-issue-spam-comment-link']").on('click', function (e) {
                var spamButton = $(this);
                var commentID = spamButton.attr("data-project-issue-comment-id");
                spamButton.addClass("disabled");
                spamButton.addClass("button--disabled");
                if (confirm("Are you sure you want to mark this comment as spam?")) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.ProjectIssueDetails.markAsSpam(spamButton, ProjectIssueDetails.projectIssueActionModelID, commentID, requestVerificationToken);
                    });
                }
                spamButton.removeClass("disabled");
                spamButton.removeClass("button--disabled");
                return false;
            });
            // Handles marking a comment as Not spam
            $("[data-target='project-issue-unspam-comment-link']").on('click', function (e) {
                var notSpamButton = $(this);
                var commentID = notSpamButton.attr("data-project-issue-comment-id");
                notSpamButton.addClass("disabled");
                notSpamButton.addClass("button--disabled");
                if (confirm("Are you sure you want to mark this comment as not spam?")) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.ProjectIssueDetails.markAsNotSpam(notSpamButton, ProjectIssueDetails.projectIssueActionModelID, commentID, requestVerificationToken);
                    });
                }
                notSpamButton.removeClass("disabled");
                notSpamButton.removeClass("button--disabled");
                return false;
            });
        };
        ProjectIssueDetails.deleteComment = function (button, slug, issueID, actionID, requestVerificationToken) {
            $.ajax({
                url: ProjectIssueDetails.projectGameSlug && ProjectIssueDetails.projectRootGameCategorySlug ? Elerium.Routes.HomeSiteProjectIssueActionCommentDelete(ProjectIssueDetails.projectGameSlug, ProjectIssueDetails.projectRootGameCategorySlug, slug, issueID, actionID, requestVerificationToken) : Elerium.Routes.ProjectIssueActionCommentDelete(slug, issueID, actionID, requestVerificationToken),
                type: 'POST',
                data: {
                    'request-verification-token': requestVerificationToken,
                },
                success: function (data) {
                    if (data.result === "success") {
                        button.parents("li").addClass("deleted");
                        location.reload();
                    }
                }
            });
        };
        ProjectIssueDetails.undeleteComment = function (button, slug, issueID, actionID, requestVerificationToken) {
            $.ajax({
                url: ProjectIssueDetails.projectGameSlug && ProjectIssueDetails.projectRootGameCategorySlug ? Elerium.Routes.HomeSiteProjectIssueActionCommentUndelete(ProjectIssueDetails.projectGameSlug, ProjectIssueDetails.projectRootGameCategorySlug, slug, issueID, actionID, requestVerificationToken) : Elerium.Routes.ProjectIssueActionCommentUndelete(slug, issueID, actionID, requestVerificationToken),
                type: 'POST',
                data: {
                    'request-verification-token': requestVerificationToken,
                },
                success: function (data) {
                    if (data.result === "success") {
                        button.parents("li").removeClass("deleted");
                        location.reload();
                    }
                }
            });
        };
        ProjectIssueDetails.markAsSpam = function (button, modelID, spamItemID, requestVerificationToken) {
            $.ajax({
                url: Elerium.Routes.SpamReportSpam(modelID, spamItemID),
                type: 'POST',
                data: { "request-verification-token": requestVerificationToken },
                success: function (data) {
                    if (data.result === "success") {
                        button.parents("li").addClass("spam");
                        location.reload();
                    }
                }
            });
        };
        ProjectIssueDetails.markAsNotSpam = function (button, modelID, notSpamItemID, requestVerificationToken) {
            $.ajax({
                url: Elerium.Routes.SpamReportNotSpam(modelID, notSpamItemID),
                type: 'POST',
                data: { "request-verification-token": requestVerificationToken },
                success: function (data) {
                    if (data.result === "success") {
                        button.parents("li").removeClass("spam");
                        location.reload();
                    }
                }
            });
        };
        return ProjectIssueDetails;
    }());
    Elerium.ProjectIssueDetails = ProjectIssueDetails;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectIssueDetails.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var ProjectListingMobileMenu = /** @class */ (function () {
        function ProjectListingMobileMenu() {
        }
        ProjectListingMobileMenu.initialize = function () {
            var triggerToggle = '[data-action="toggle-category-listing"]';
            var listingMenu = 'section[data-target="project-category-listing"]';
            var closeButton = '[data-target="project-category-listing-close"]';
            var overlay = '[data-target="project-category-listing-overlay"]';
            $(triggerToggle).on('click', function () {
                $(listingMenu + ',' + closeButton + ',' + overlay).addClass("open");
                $('body.body-project-listing').addClass("no-scroll");
                return false;
            });
            $(closeButton).on('click', function () {
                $(listingMenu + ',' + closeButton + ',' + overlay).removeClass("open");
                $('body.body-project-listing').removeClass("no-scroll");
                return false;
            });
            $('body').on('click', function () {
                if ($(listingMenu).hasClass('open')) {
                    $(listingMenu + ',' + closeButton + ',' + overlay).removeClass("open");
                    $('body.body-project-listing').removeClass("no-scroll");
                }
            });
        };
        ProjectListingMobileMenu.priority = 3;
        return ProjectListingMobileMenu;
    }());
    Elerium.ProjectListingMobileMenu = ProjectListingMobileMenu;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectListingMobileMenu.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectLocalizationExport = /** @class */ (function () {
        function ProjectLocalizationExport() {
        }
        ProjectLocalizationExport.initialize = function () {
            var self = this;
            $('[data-show]').each(function () {
                $(this).change(function () {
                    ProjectLocalizationExport.showElements($(this));
                });
                ProjectLocalizationExport.showElements($(this));
            });
            ProjectLocalizationExport.bindLocalizationSetting('localization-handle-namespaces');
            ProjectLocalizationExport.bindLocalizationSetting('localization-export-type');
            ProjectLocalizationExport.bindLocalizationSetting('localization-table-name');
            ProjectLocalizationExport.bindLocalizationSetting('localization-escape-nonascii');
            ProjectLocalizationExport.bindLocalizationSetting('localization-true-value-equals-key');
            ProjectLocalizationExport.bindLocalizationSetting('localization-languages');
            ProjectLocalizationExport.bindLocalizationSetting('localization-unlocalized-handling');
        };
        ProjectLocalizationExport.showElements = function (control) {
            var showFilter = control.attr("data-show");
            var showValue = control.val();
            $('[data-show-' + showFilter + ']').each(function () {
                var filters = ($(this).attr('data-show-' + showFilter) || '').split('|');
                if (filters.indexOf(showValue) == -1) {
                    $(this).parent().hide();
                }
                else {
                    $(this).parent().show();
                }
            });
        };
        ProjectLocalizationExport.bindLocalizationSetting = function (actionName) {
            var itemData = localStorage.getItem(actionName);
            var item = $('[data-action="' + actionName + '"]');
            if (itemData != null && item.length > 0) {
                if (item.is(':checkbox')) {
                    item.prop("checked", (itemData == 'true'));
                }
                else {
                    item.val(itemData);
                }
            }
            item.on('change', function () {
                if (item.is(':checkbox')) {
                    localStorage.setItem(actionName, item.prop("checked"));
                }
                else {
                    localStorage.setItem(actionName, item.val());
                }
            });
        };
        return ProjectLocalizationExport;
    }());
    Elerium.ProjectLocalizationExport = ProjectLocalizationExport;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectLocalizationExport.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var ProjectLocalizationNamespacePhrases = /** @class */ (function () {
        function ProjectLocalizationNamespacePhrases() {
        }
        ProjectLocalizationNamespacePhrases.initialize = function () {
            history.replaceState(null, null, window.location.href.split('?')[0]); //remove filter querystring
            ProjectLocalizationNamespacePhrases.gameLanguageID = $("[data-target='pharse-list']").attr("data-langauge-id");
            ProjectLocalizationNamespacePhrases.isVerionTwo = $('[data-target="version-two"]').length > 0;
            $("[data-target='phrase']").click(ProjectLocalizationNamespacePhrases.phraseClick);
            ProjectLocalizationNamespacePhrases.bindSave();
            ProjectLocalizationNamespacePhrases.bindSearch();
            ProjectLocalizationNamespacePhrases.loadUpPharse(false);
            ProjectLocalizationNamespacePhrases.bindNamespaceFilter();
            ProjectLocalizationNamespacePhrases.bindStatusFilter();
            ProjectLocalizationNamespacePhrases.bindTranslatorFilter();
            ProjectLocalizationNamespacePhrases.bindFilterToggle();
            ProjectLocalizationNamespacePhrases.bindAddPhrase();
            ProjectLocalizationNamespacePhrases.bindEditPhrase();
            ProjectLocalizationNamespacePhrases.NoFilterResults();
            if ($('[data-target="phrase-container"]:not(.hide)').length > 0) {
                ProjectLocalizationNamespacePhrases.loadCreateForm($('[data-target="phrase-container"]').html());
                $('[data-target="cancel-phrase"]').attr("disabled", "disabled");
            }
        };
        ProjectLocalizationNamespacePhrases.phraseClick = function (phraseItem) {
            var phraseID = $(phraseItem.currentTarget).attr("data-phrase-id");
            ProjectLocalizationNamespacePhrases.setSelectedPhrase(phraseID);
            ProjectLocalizationNamespacePhrases.loadTranslation(phraseID);
            ProjectLocalizationNamespacePhrases.loadRevisions(phraseID);
            $('[data-target="phrase-container"]').addClass("hide");
            $('[data-target="translation-container"]').removeClass("hide");
        };
        ProjectLocalizationNamespacePhrases.loadTranslation = function (phraseID) {
            var primaryLanguageID = $('[data-target="primary-language-id"]').val();
            var url = "/localization/" + ProjectLocalizationNamespacePhrases.gameLanguageID + "/" + phraseID + "/" + primaryLanguageID + "/translation";
            $.ajax({
                url: url,
                type: 'GET',
                success: function (data) {
                    $('[data-target="localization-namespace"]').text(data.phraseNamespace);
                    $('[data-target="localization-phrase"]').text(data.phrase);
                    $('[data-target="localization-context"]').text(data.context);
                    $('[data-target="localization-text-org"]').val(data.translation);
                    $('[data-target="localization-input"]').val(data.translation);
                    $('[data-target="primary-translation"]').text(data.primaryTranslation);
                    $('[data-target="needs-review"]').attr("checked", "checked");
                    $('[data-target="save"]').attr("data-id", phraseID);
                    if (data.context.length > 0) {
                        $('[data-target="context-div"]').removeClass("hide");
                    }
                    else {
                        $('[data-target="context-div"]').addClass("hide");
                    }
                    if (data.status == "Locked") {
                        $('[data-target="localization-input"]').attr("disabled", "disabled");
                        $('[data-target="save"]').attr("disabled", "disabled");
                    }
                    else {
                        $('[data-target="localization-input"]').removeAttr("disabled");
                        $('[data-target="save"]').removeAttr("disabled");
                    }
                }
            });
        };
        ProjectLocalizationNamespacePhrases.loadRevisions = function (phraseID) {
            var url = "/localization/" + ProjectLocalizationNamespacePhrases.gameLanguageID + "/" + phraseID + "/translation/revisions";
            $.ajax({
                url: url,
                type: 'GET',
                success: function (data) {
                    $("[data-target='revision-list']").remove();
                    Cobalt.triggerHtmlInsert($("[data-target='revisions']").append(data.html));
                    ProjectLocalizationNamespacePhrases.bindTranslationTools();
                }
            });
        };
        ProjectLocalizationNamespacePhrases.bindSave = function () {
            $("[data-target='save']").click(function (e) {
                var $this = $(this);
                var phraseID = $this.attr("data-id");
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    ProjectLocalizationNamespacePhrases.submitSaveForm(phraseID, requestVerificationToken);
                });
            });
        };
        ProjectLocalizationNamespacePhrases.submitSaveForm = function (phraseID, requestVerificationToken) {
            // generate a form to be passed to the controller
            var myFormData = new FormData();
            var translation = $("[data-target='localization-input']").val();
            var orgText = $("[data-target='localization-text-org']").val();
            if (translation.trim().length > 0 && translation != orgText) {
                myFormData.append("translation", $("[data-target='localization-input']").val());
                myFormData.append("needs-review", $('[data-target="needs-review"]:checked').length > 0 ? "true" : "false");
                myFormData.append("request-verification-token", requestVerificationToken);
                var url = "/localization/" + ProjectLocalizationNamespacePhrases.gameLanguageID + "/" + phraseID + "/translations/create";
                $.ajax({
                    url: url,
                    type: 'POST',
                    processData: false,
                    contentType: false,
                    dataType: 'json',
                    data: myFormData,
                    success: function (data) {
                        var $phrase = $("[data-phrase-id='" + phraseID + "']");
                        if (ProjectLocalizationNamespacePhrases.isVerionTwo) {
                            $phrase.removeClass();
                            $phrase.addClass($('[data-target="phrase-style"]').val());
                            $phrase.addClass(data.statusClass);
                            $phrase.addClass("selected");
                            var figure = $phrase.find("figure");
                            figure.removeClass();
                            figure.addClass($('[data-target="figure-style"]').val());
                            figure.addClass(data.statusClass);
                        }
                        else {
                            $phrase.removeClass();
                            $phrase.addClass(data.statusClass);
                            $phrase.addClass("selected");
                        }
                        $phrase.attr("data-translator-id", data.translatorID);
                        ProjectLocalizationNamespacePhrases.loadTranslation(phraseID);
                        ProjectLocalizationNamespacePhrases.loadRevisions(phraseID);
                    }
                });
            }
        };
        ProjectLocalizationNamespacePhrases.bindSearch = function () {
            $("[data-target='search']").keyup($.debounce(300, function (e) {
                var $this = $(this);
                var searchVal = $this.val();
                if (searchVal.length > 0) {
                    $('[data-target="clear-search"]').removeClass("hide");
                    $("[data-target='phrase']").each(function (index, e) {
                        if ($(this).html().match(new RegExp(searchVal, "i"))) {
                            $(this).removeClass("search-hide");
                        }
                        else {
                            $(this).addClass("search-hide");
                        }
                    });
                }
                else {
                    $("[data-target='phrase']").removeClass("search-hide");
                    $('[data-target="clear-search"]').addClass("hide");
                }
                ProjectLocalizationNamespacePhrases.NoFilterResults();
            }));
            $('[data-target="clear-search"]').click(function (e) {
                e.preventDefault();
                $("[data-target='phrase']").removeClass("search-hide");
                $("[data-target='search']").val("");
                $('[data-target="clear-search"]').addClass("hide");
                ProjectLocalizationNamespacePhrases.NoFilterResults();
            });
        };
        ProjectLocalizationNamespacePhrases.loadUpPharse = function (forceChange) {
            var phraseID = encodeURIComponent(document.location.hash.slice(1));
            if (!$.isNumeric(phraseID) || $('[data-phrase-id="' + phraseID + '"]').length == 0) {
                phraseID = null;
            }
            if (!phraseID || phraseID == '0' || forceChange) {
                phraseID = $('[data-target="phrase"]:not(.status-hide,.search-hide,.translator-hide,.namespace-hide)').first().attr("data-phrase-id");
            }
            if (phraseID) {
                var phrasePosition = $("[data-phrase-id='" + phraseID + "']").position().top - 50;
                var visibleHeight = $(".e-localization-phrase-scroll-container").innerHeight();
                if (phrasePosition > (visibleHeight - 200)) {
                    $(".e-localization-phrase-scroll-container").scrollTop(($(".e-localization-phrase-scroll-container").scrollTop() + phrasePosition));
                }
                ProjectLocalizationNamespacePhrases.setSelectedPhrase(phraseID);
                ProjectLocalizationNamespacePhrases.loadTranslation(phraseID);
                ProjectLocalizationNamespacePhrases.loadRevisions(phraseID);
            }
        };
        ProjectLocalizationNamespacePhrases.setSelectedPhrase = function (phraseID) {
            $("[data-target='phrase']").removeClass("selected");
            $("[data-phrase-id='" + phraseID + "']").addClass('selected');
            if (phraseID.length > 0) {
                document.location.hash = phraseID;
            }
            else {
                document.location.hash = '0';
            }
        };
        ProjectLocalizationNamespacePhrases.bindTranslationTools = function () {
            $("[data-action='translation-tool']").click(function (e) {
                var $this = $(this);
                var message = $this.attr('data-confirm-message');
                if (!message || confirm(message)) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        ProjectLocalizationNamespacePhrases.postToolAction($this.attr("href"), requestVerificationToken);
                    });
                }
                return false;
            });
        };
        ProjectLocalizationNamespacePhrases.postToolAction = function (url, requestVerificationToken) {
            $.ajax({
                url: url,
                type: 'POST',
                data: {
                    'request-verification-token': requestVerificationToken,
                },
                success: function (data) {
                    if (data.success) {
                        ProjectLocalizationNamespacePhrases.loadTranslation(data.phraseID);
                        ProjectLocalizationNamespacePhrases.loadRevisions(data.phraseID);
                        var $phrase = $("[data-phrase-id='" + data.phraseID + "']");
                        if (data.statusClass) {
                            if (ProjectLocalizationNamespacePhrases.isVerionTwo) {
                                $phrase.removeClass();
                                $phrase.addClass($('[data-target="phrase-style"]').val());
                                $phrase.addClass(data.statusClass);
                                $phrase.addClass("selected");
                                var figure = $phrase.find("figure");
                                figure.removeClass();
                                figure.addClass($('[data-target="figure-style"]').val());
                                figure.addClass(data.statusClass);
                            }
                            else {
                                $phrase.removeClass();
                                $phrase.addClass(data.statusClass);
                            }
                        }
                        $phrase.attr("data-translator-id", data.translatorID);
                    }
                    else {
                        alert("An unexpected error occurred");
                    }
                }
            });
        };
        ProjectLocalizationNamespacePhrases.bindNamespaceFilter = function () {
            $('[data-target="namespace-filter"]').change(function (e) {
                var $this = $(this);
                var namespaceTitle = $('[data-target="namespace-title"]');
                var namespaceVal = $($(this).find('option:selected'));
                namespaceTitle.attr("data-value", namespaceVal.val());
                namespaceTitle.text(namespaceVal.attr("data-display-name"));
                if (namespaceVal.val() == "all") {
                    $('[data-target="phrase"]').removeClass('namespace-hide');
                }
                else {
                    $('[data-target="phrase"]').addClass('namespace-hide');
                    $('[data-namespace-value^="' + namespaceVal.val() + '"]').removeClass('namespace-hide');
                }
                ProjectLocalizationNamespacePhrases.loadUpPharse(true);
                ProjectLocalizationNamespacePhrases.NoFilterResults();
            });
        };
        ProjectLocalizationNamespacePhrases.bindStatusFilter = function () {
            var $filter = $('[data-target="status-filter"]');
            $filter.change(function (e) {
                var $this = $(this);
                var statusVal = $(this).find('option:selected').val();
                $('[data-target="phrase"]').removeClass("status-hide");
                if (statusVal == "active") {
                    $(".phrase-deleted").addClass("status-hide");
                }
                else if (statusVal != "all") {
                    $this.find('[data-target="specific-status"]').each(function () {
                        if ($(this).val() != statusVal) {
                            $("." + $(this).val()).addClass("status-hide");
                        }
                    });
                }
                ProjectLocalizationNamespacePhrases.loadUpPharse(true);
                ProjectLocalizationNamespacePhrases.NoFilterResults();
            });
        };
        ProjectLocalizationNamespacePhrases.bindTranslatorFilter = function () {
            var $filter = $('[data-target="translator-filter"]');
            $filter.change(function (e) {
                var $this = $(this);
                var statusVal = $(this).find('option:selected').val();
                $('[data-target="phrase"]').removeClass("translator-hide");
                if (statusVal != "all") {
                    $('[data-target="phrase"]:not([data-translator-id="' + statusVal + '"').addClass("translator-hide");
                }
                ;
                ProjectLocalizationNamespacePhrases.loadUpPharse(true);
                ProjectLocalizationNamespacePhrases.NoFilterResults();
            });
        };
        ProjectLocalizationNamespacePhrases.bindFilterToggle = function () {
            $('[data-target="filter-toggle"]').click(function (e) {
                $('[data-target="filter-div"]').toggleClass("filter-hide");
                $('[data-target="localization-filters"]').toggleClass('hidden');
            });
        };
        ProjectLocalizationNamespacePhrases.bindAddPhrase = function () {
            $('[data-action="create-phrase"]').click(function (e) {
                e.preventDefault();
                var slug = $('[data-target="phrase-container"]').attr('data-project-slug');
                var id = $('[data-target="phrase-container"]').attr('data-project-id');
                var url = '';
                if (id) {
                    url = "/v2/projects/" + id + "/localization/phrases/" + ProjectLocalizationNamespacePhrases.gameLanguageID + "/create";
                }
                else {
                    url = "/projects/" + slug + "/localization/phrases/" + ProjectLocalizationNamespacePhrases.gameLanguageID + "/create";
                }
                $.ajax({
                    url: url,
                    type: 'GET',
                    success: function (data) {
                        ProjectLocalizationNamespacePhrases.loadCreateForm(data.html);
                    }
                });
            });
        };
        ProjectLocalizationNamespacePhrases.loadCreateForm = function (formHtml) {
            $('[data-action="create-phrase"]').addClass("disabled");
            $('[data-target="phrase-form"]').remove();
            Cobalt.triggerHtmlInsert($('[data-target="phrase-container"]').append(formHtml));
            $('[data-target="phrase-container"]').removeClass("hide");
            $('[data-target="translation-container"]').addClass("hide");
            ProjectLocalizationNamespacePhrases.setSelectedPhrase("");
            ProjectLocalizationNamespacePhrases.bindSavePhrase();
            ProjectLocalizationNamespacePhrases.bindCancelPhrase();
        };
        ProjectLocalizationNamespacePhrases.bindEditPhrase = function () {
            $('[data-action="edit-phrase"]').click(function (e) {
                e.preventDefault();
                var id = $('[data-target="phrase-container"]').attr('data-project-id');
                var slug = $('[data-target="phrase-container"]').attr('data-project-slug');
                var phraseID = $("[data-target='save']").attr("data-id");
                var url = '';
                if (id) {
                    url = "/v2/projects/" + id + "/localization/phrases/" + phraseID + "/" + ProjectLocalizationNamespacePhrases.gameLanguageID + "/edit";
                }
                else {
                    url = "/projects/" + slug + "/localization/phrases/" + phraseID + "/" + ProjectLocalizationNamespacePhrases.gameLanguageID + "/edit";
                }
                $.ajax({
                    url: url,
                    type: 'GET',
                    success: function (data) {
                        $('[data-target="phrase-form"]').remove();
                        Cobalt.triggerHtmlInsert($('[data-target="phrase-container"]').append(data.html));
                        $('[data-target="phrase-container"]').removeClass("hide");
                        $('[data-target="translation-container"]').addClass("hide");
                        ProjectLocalizationNamespacePhrases.bindSavePhrase();
                        ProjectLocalizationNamespacePhrases.bindCancelPhrase();
                    }
                });
            });
        };
        ProjectLocalizationNamespacePhrases.bindSavePhrase = function () {
            var $form = $('[data-target="phrase-form"]');
            $form.submit(function (e) {
                e.preventDefault();
                $form.mask();
                $form.ajaxSubmit({
                    success: function (data) {
                        if (data.success == "success") {
                            if (data.action == "created") {
                                var phraseSpan = $("<span/>").text(data.phraseName);
                                var phraseItem = $("<li/>").attr("data-target", "phrase").attr("data-phrase-id", data.phraseID).addClass(data.statusClass);
                                if (ProjectLocalizationNamespacePhrases.isVerionTwo) {
                                    var figure = $("<figure/>").addClass($('[data-target="figure-style"]').val()).addClass(data.statusClass);
                                    phraseItem.addClass($('[data-target="phrase-style"]').val());
                                    phraseItem.append(figure);
                                }
                                phraseItem.append(phraseSpan);
                                phraseItem.click(ProjectLocalizationNamespacePhrases.phraseClick);
                                var namespaceList = $('[data-target="phrases"]');
                                if (namespaceList.length > 0) {
                                    namespaceList.append(phraseItem);
                                }
                                $form.unmask();
                                if (data.html.length == 0) {
                                    document.location.hash = data.phraseID;
                                    ProjectLocalizationNamespacePhrases.CancelPhrase();
                                }
                                else {
                                    ProjectLocalizationNamespacePhrases.loadCreateForm(data.html);
                                }
                            }
                            else {
                                var phrase = $('[data-phrase-id="' + data.phraseID + '"]');
                                phrase.find("span").text(data.phraseName);
                                if (data.requireReview && phrase.hasClass("has-translation")) {
                                    phrase.removeClass();
                                    phrase.addClass(data.statusClass);
                                    if (ProjectLocalizationNamespacePhrases.isVerionTwo) {
                                        phrase.addClass($('[data-target="phrase-style"]').val());
                                        var figure = phrase.find("figure");
                                        figure.removeClass();
                                        figure.addClass($('[data-target="figure-style"]').val());
                                        figure.addClass(data.statusClass);
                                    }
                                }
                                if ($('[data-space-id="' + data.namespaceID + '"][data-phrase-id="' + data.phraseID + '"]').length == 0) {
                                    var namespaceList = $('[data-target="phrases"]');
                                    if (namespaceList.length > 0) {
                                        namespaceList.append(phrase);
                                    }
                                }
                                ProjectLocalizationNamespacePhrases.CancelPhrase();
                            }
                            ProjectLocalizationNamespacePhrases.NoFilterResults();
                        }
                        else {
                            $form.unmask();
                            Cobalt.Forms.displayErrors($form, data.Errors);
                        }
                    }
                });
            });
        };
        ProjectLocalizationNamespacePhrases.bindCancelPhrase = function () {
            $('[data-target="cancel-phrase"]').click(function (e) {
                e.preventDefault();
                ProjectLocalizationNamespacePhrases.CancelPhrase();
            });
        };
        ProjectLocalizationNamespacePhrases.CancelPhrase = function () {
            $('[data-target="phrase-container"]').addClass("hide");
            $('[data-target="translation-container"]').removeClass("hide");
            $('[data-action="create-phrase"]').removeClass("disabled");
            ProjectLocalizationNamespacePhrases.loadUpPharse(false);
        };
        ProjectLocalizationNamespacePhrases.NoFilterResults = function () {
            if ($('[data-target="phrase"]:not(.status-hide,.search-hide,.translator-hide,.namespace-hide)').length == 0) {
                $('[data-target="no-phrases"]').removeClass("hide");
            }
            else {
                $('[data-target="no-phrases"]').addClass("hide");
            }
        };
        return ProjectLocalizationNamespacePhrases;
    }());
    Elerium.ProjectLocalizationNamespacePhrases = ProjectLocalizationNamespacePhrases;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectLocalizationNamespacePhrases.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var ProjectMobileSubMenu = /** @class */ (function () {
        function ProjectMobileSubMenu() {
        }
        ProjectMobileSubMenu.initialize = function () {
            var actionTarget = '[data-action="toggle-header-nav"]';
            var nav = '[data-target="e-header-nav"]';
            var actionProjectInfo = '[data-action="toggle-project-info"]';
            var targetProjectInfo = '[data-target="e-project-details"]';
            var targetProjectDiscription = '[data-target="e-project-discription"]';
            $(actionTarget).on('click', function () {
                $(nav).toggleClass("open");
                if ($(targetProjectInfo).hasClass("open")) {
                    $(targetProjectInfo).removeClass("open");
                    $(targetProjectDiscription).css('min-height', '0');
                }
                return false;
            });
            $(actionProjectInfo).on('click', function (e) {
                var projectInfoHeight = $(targetProjectInfo).outerHeight();
                e.preventDefault();
                if ($(nav).hasClass("open")) {
                    $(nav).removeClass("open");
                }
                $(targetProjectDiscription).css('min-height', projectInfoHeight);
                $(targetProjectInfo).addClass("open");
                return false;
            });
            $('body').on('click', function (e) {
                var $target = $(e.target);
                if (!$target.parent().hasClass('e-hasSubmenu') && $(nav).hasClass('open')) {
                    $(nav).removeClass("open");
                }
                if (!$target.parents().hasClass('e-project-details-secondary') && $(targetProjectInfo).hasClass("open")) {
                    $(targetProjectInfo).removeClass("open");
                    $(targetProjectDiscription).css('min-height', '0');
                }
            });
            if ($(window).width() < 1024) {
                $(nav).on('click', '.e-hasSubmenu > a', function (e) {
                    var $target = $(e.target);
                    e.preventDefault();
                    $target.parent().toggleClass('open');
                });
            }
        };
        ProjectMobileSubMenu.priority = 3;
        return ProjectMobileSubMenu;
    }());
    Elerium.ProjectMobileSubMenu = ProjectMobileSubMenu;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectMobileSubMenu.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectPageDetails = /** @class */ (function () {
        function ProjectPageDetails() {
        }
        ProjectPageDetails.initialize = function () {
            var hasStructuredContent = false;
            var indent = -1;
            var previousTitleType = 0;
            var currentTitleType;
            var listItem;
            var list;
            var stickyOffset = $('.sticky').offset().top;
            $(window).bind('hashchange', function () {
                $('html, body').stop().scrollTop($(location.hash).offset().top - 64);
            });
            $('[data-user-content]').find(' > h2, > h3, > h4, > h5, > h6').each(function () {
                hasStructuredContent = true;
                currentTitleType = parseInt($(this).prop("tagName").substr(1, 1));
                if ($('[data-user-content]').find(' > h2, > h3, > h4, > h5, > h6').length <= 1) {
                    $('.project-details-header').css('display', 'none');
                    return false;
                }
                if (currentTitleType < previousTitleType) {
                    var directParentTitle = $(this).prevAll('h' + (currentTitleType - 1)).first();
                    if (directParentTitle.length) {
                        indent = parseInt($('#item-' + directParentTitle.attr('id')).parent().attr('data-indent')) + 1;
                    }
                    else {
                        directParentTitle = $(this).prevAll('h' + currentTitleType).first();
                        indent = directParentTitle.length
                            ? parseInt($('#item-' + directParentTitle.attr('id')).parent().attr('data-indent')) :
                            indent > 0 ? indent - 1 : 0;
                    }
                    if (listItem && listItem.parents('[data-indent=' + indent + ']').length) {
                        list = listItem.closest('[data-indent=' + indent + ']');
                    }
                    else {
                        list = $('<ul data-indent="' + indent + '"></ul>');
                        list.appendTo(indent > 0 ?
                            $('#item-' + $(this).prevAll(Elerium.ProjectPageDetails.getPosibleParentTitleTypes(currentTitleType)).first().attr('id')) :
                            $('[data-content-table]'));
                    }
                }
                else if (currentTitleType > previousTitleType) {
                    indent++;
                    list = $('<ul data-indent="' + indent + '"></ul>');
                    list.appendTo(listItem || $('[data-content-table]'));
                }
                listItem = $('<li class="indent-' + indent + '"><div class="e-bar-item"><a></a></div></li>');
                listItem.appendTo(list);
                listItem.attr('data-index', $(list).find('> li').index(listItem) + 1);
                var index = Elerium.ProjectPageDetails.getIndex(listItem, indent) + listItem.attr('data-index');
                $(this).attr('id', 'title-' + index.replace(/\./g, '-'));
                listItem.attr('id', 'item-' + $(this).attr('id'));
                listItem.find('a').text($(this).text()).attr('href', '#' + $(this).attr('id'));
                previousTitleType = currentTitleType;
            });
            if (!hasStructuredContent) {
                $('[data-content-table]').hide();
            }
            else {
                $('[data-toc-link]').show();
                $('[data-indent="0"]').bind('mousewheel DOMMouseScroll', function (e) {
                    var e0 = e.originalEvent, delta = e0.wheelDelta || -e0.detail;
                    this.scrollTop += (delta < 0 ? 1 : -1) * 30;
                    e.preventDefault();
                });
                $('[data-content-table] a').on("click", function () {
                    $('.project-page-content-holder').hide();
                });
            }
            $(window).scroll(function () {
                var sticky = $('.sticky'), scroll = $(window).scrollTop(), stickyStop = sticky.parent().offset().top + sticky.parent().height() - sticky.height();
                if (scroll >= stickyStop) {
                    sticky.removeClass('fixed');
                    sticky.addClass('stopped');
                }
                else if (scroll >= stickyOffset) {
                    sticky.removeClass('stopped');
                    sticky.addClass('fixed');
                    sticky.parent().css('margin-top', sticky.height() + 28);
                }
                else {
                    sticky.removeClass('stopped');
                    sticky.removeClass('fixed');
                    sticky.parent().css('margin-top', '0px');
                }
            });
        };
        ProjectPageDetails.getPosibleParentTitleTypes = function (titleType) {
            var titleTypes = '';
            for (var i = titleType - 1; i >= 2; i--) {
                titleTypes += 'h' + i + (i > 2 ? ', ' : '');
            }
            return titleTypes;
        };
        ProjectPageDetails.getIndex = function (item, indent) {
            var index = '';
            var parent = item.parent().parent();
            for (var i = 0; i < indent; i++) {
                index = parent.attr('data-index') + '.' + index;
                parent = parent.parent().parent();
            }
            return index;
        };
        return ProjectPageDetails;
    }());
    Elerium.ProjectPageDetails = ProjectPageDetails;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectPageDetails.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectPageEdit = /** @class */ (function () {
        function ProjectPageEdit() {
        }
        ProjectPageEdit.initialize = function () {
            var slugTabIndex = -1;
            function autofillSlug() {
                if ($('input[name=project-page-slug-autofill]').is(':checked')) {
                    $('input[name=project-page-slug]').val(Cobalt.Utils.getSlug($('input[name=project-page-name]').val()).replace(/^-+|-+$/g, ''));
                }
            }
            $(function () {
                $('input[name=project-page-slug]').prop('readonly', $('input[name=project-page-slug-autofill]').is(':checked'));
                slugTabIndex = $('input[name=project-page-slug]').prop('tabindex');
            });
            $('input[name=project-page-slug-autofill]').on('change', function () {
                $('input[name=project-page-slug]').prop('readonly', $(this).is(':checked'));
                $('input[name=project-page-slug]').prop('tabindex', $(this).is(':checked') ? -1 : slugTabIndex);
                autofillSlug();
            });
            $('input[name=project-page-name]').on('input', autofillSlug);
        };
        return ProjectPageEdit;
    }());
    Elerium.ProjectPageEdit = ProjectPageEdit;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectPageEdit.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectSettingsIssues = /** @class */ (function () {
        function ProjectSettingsIssues() {
        }
        ProjectSettingsIssues.initialize = function () {
            $('input[name="' + this.issueTrackerName + '"]').on('click', function (e) {
                var selected = $('[data-issue-tracker="' + $(this).val() + '"] .details');
                if (!selected.hasClass('selected')) {
                    var oldSelected = $('[data-issue-tracker] .details.selected');
                    oldSelected.slideUp(200, function () { return oldSelected.removeClass('selected'); });
                    selected.slideDown(200, function () { return selected.addClass('selected'); });
                }
            });
            $('[data-create-tag]').click(function (e) {
                e.stopImmediatePropagation();
                e.preventDefault();
                Elerium.ProjectSettingsIssues.createTag($('[data-tag-name]').val());
            });
            $('[data-target="project-issue-tags"]').on('click', '[data-delete-tag]', function () {
                Elerium.ProjectSettingsIssues.deleteTag($(this).attr('data-delete-tag'));
            });
            Elerium.ProjectSettingsIssues.loadTags(true);
        };
        ProjectSettingsIssues.createTag = function (tagName) {
            var _this = this;
            Cobalt.Utils.getRequestVerificationToken().done(function (token) {
                var formData = new FormData();
                formData.append('request-verification-token', token);
                formData.append('tagName', tagName);
                $.ajax({
                    type: 'POST',
                    url: Elerium.Routes.PublicProjectSettingsCreateIssuesTag(_this.gameSlug, _this.rootGameCategorySlug, _this.projectSlug),
                    contentType: false,
                    data: formData,
                    processData: false,
                }).done(function (result) {
                    switch (result.status) {
                        case 'error':
                        case 'warning':
                            var div = $("<div><div>" + result.message + "</div></div>");
                            div.dialog({
                                draggable: false,
                                title: "Unable to Create Tag",
                                modal: true,
                                resizable: false,
                                dialogClass: 'modal'
                            });
                            break;
                        case 'invalid':
                            $('[data-create-tag-warning]').text(result.message);
                            break;
                    }
                    Elerium.ProjectSettingsIssues.loadTags(result.status == 'success');
                });
            });
        };
        ProjectSettingsIssues.deleteTag = function (tagSlug) {
            var _this = this;
            if (confirm('This tag will be removed from all issues. Are you sure you want to delete? ')) {
                Cobalt.Utils.getRequestVerificationToken().done(function (token) {
                    $.ajax({
                        type: 'POST',
                        data: { 'request-verification-token': token },
                        url: Elerium.Routes.PublicProjectSettingsDeleteIssuesTag(_this.gameSlug, _this.rootGameCategorySlug, _this.projectSlug, tagSlug),
                    }).done(function (result) {
                        if (result.status == 'error' || result.status == 'warning') {
                            var div = $("<div><div>" + result.message + "</div></div>");
                            div.dialog({
                                draggable: false,
                                title: "Unable to Delete Tag",
                                modal: true,
                                resizable: false,
                                dialogClass: 'modal'
                            });
                        }
                        Elerium.ProjectSettingsIssues.loadTags(result.status == 'success');
                    });
                });
            }
        };
        ProjectSettingsIssues.loadTags = function (resetUI) {
            var template = Handlebars.compile($('[data-template="project-issue-tags"]').html());
            $.ajax({
                type: 'POST',
                url: Elerium.Routes.PublicProjectSettingsIssuesTagList(this.gameSlug, this.rootGameCategorySlug, this.projectSlug)
            }).done(function (result) {
                switch (result.status) {
                    case 'error':
                    case 'warning':
                        var div = $("<div><div>" + result.message + "</div></div>");
                        div.dialog({
                            draggable: false,
                            title: Elerium.Localization.Elerium.ProjectIssues.UnableToListTags,
                            modal: true,
                            resizable: false,
                            dialogClass: 'modal'
                        });
                        break;
                    case 'success':
                        var list = $('[data-target="project-issue-tags"]');
                        list.empty();
                        list.append(template({
                            tags: result.tags
                        }));
                        Cobalt.triggerHtmlInsert(list);
                        if (resetUI) {
                            $('[data-create-tag-warning]').text('');
                            $('[data-tag-name]').val('');
                        }
                        break;
                }
            });
        };
        return ProjectSettingsIssues;
    }());
    Elerium.ProjectSettingsIssues = ProjectSettingsIssues;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectSettingsIssues.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var ProjectSettingsSecrets = /** @class */ (function () {
        function ProjectSettingsSecrets() {
        }
        ProjectSettingsSecrets.initialize = function () {
            var attachableItems = document.getElementsByClassName("j-hide-data");
            for (var i = 0; i < attachableItems.length; i++) {
                attachableItems[i].addEventListener("mouseover", Elerium.ProjectSettingsSecrets.HiddenHoverListener);
                attachableItems[i].addEventListener("mouseleave", Elerium.ProjectSettingsSecrets.HiddenHoverLeaveListener);
            }
        };
        ProjectSettingsSecrets.HiddenHoverListener = function (event) {
            if (event.target.dataset.key !== undefined) {
                event.target.innerText = event.target.dataset.key;
            }
        };
        ProjectSettingsSecrets.HiddenHoverLeaveListener = function (event) {
            event.target.innerText = "<Hover to reveal>";
        };
        return ProjectSettingsSecrets;
    }());
    Elerium.ProjectSettingsSecrets = ProjectSettingsSecrets;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectSettingsSecrets.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ProjectSettingsSource = /** @class */ (function () {
        function ProjectSettingsSource() {
        }
        ProjectSettingsSource.initialize = function () {
            $('[data-target="source-hosts"] input[type="radio"]').on('click', function (e) {
                var $li = $(this).closest('li');
                var $details = $li.children('.details');
                if (!$details.hasClass('selected')) {
                    var $oldDetails = $li.siblings().children('.details.selected');
                    $oldDetails.slideUp(200, function () { return $oldDetails.removeClass('selected'); });
                    $details.slideDown(200, function () { return $details.addClass('selected'); });
                    if ($li.attr('data-source-host')) {
                        $('.packager-mode ul').toggleClass('disabled', !$li.attr('data-enable-packager'));
                    }
                }
            });
        };
        return ProjectSettingsSource;
    }());
    Elerium.ProjectSettingsSource = ProjectSettingsSource;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectSettingsSource.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var SearchIndex = /** @class */ (function () {
        function SearchIndex() {
        }
        SearchIndex.initialize = function () {
            Cobalt.runOnHtmlInsert(function () {
                SearchIndex.highlightTerms($('.results-summary'));
                SearchIndex.highlightTerms($('.results-name > a'));
            });
        };
        SearchIndex.highlightTerms = function (e) {
            $(SearchIndex.query.split(/\s+/)).each(function () {
                var term = this;
                $(e).contents().filter(function () {
                    return this.nodeType === 3;
                }).each(function () {
                    $(this).replaceWith($(this).text().replace(new RegExp(term, "i"), '<span class="results-highlight">$&</span>'));
                });
            });
        };
        SearchIndex.query = "";
        return SearchIndex;
    }());
    Elerium.SearchIndex = SearchIndex;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.SearchIndex.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var UserMyApiTokens = /** @class */ (function () {
        function UserMyApiTokens() {
        }
        UserMyApiTokens.initialize = function () {
            $("[data-revoke-token-ajax]").click(function (e) {
                var url = this.href;
                var id = $(this).data("revoke-token-ajax");
                if (confirm("Are you sure you want to revoke this token? This action cannot be undone.")) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        Elerium.UserMyApiTokens.revoke(url, id, requestVerificationToken);
                    });
                }
                return false;
            });
        };
        UserMyApiTokens.revoke = function (url, tokenID, requestVerificationToken) {
            $.ajax({
                url: url,
                type: 'POST',
                data: {
                    'request-verification-token': requestVerificationToken,
                },
                success: function (data) {
                    if (data.success === true) {
                        $("[data-token-id=" + tokenID + "]").fadeOut("slow");
                    }
                }
            });
        };
        return UserMyApiTokens;
    }());
    Elerium.UserMyApiTokens = UserMyApiTokens;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.UserMyApiTokens.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var CPProjectFileModerationWhitelist = /** @class */ (function () {
        function CPProjectFileModerationWhitelist() {
        }
        CPProjectFileModerationWhitelist.initialize = function () {
            //prevent Enter from submitting form
            $(document).on("keypress", "form", function (event) {
                return event.keyCode != 13;
            });
            //when user autocomplete fields selects a user pull down any existing whitelist data
            $("#field-name-symbol").change(function () {
                var userID = parseInt($(this).val().split(':')[1]);
                if (userID != CPProjectFileModerationWhitelist.lastSelectedUser) {
                    CPProjectFileModerationWhitelist.lastSelectedUser = userID;
                    $.getJSON(Elerium.Routes.CPProjectFileModeationWhitelistUserJson(userID), function (data) {
                        if (data.Result == "success") {
                            $('[data-target="user-whitelist-json"]').val(data.Data);
                            CPProjectFileModerationWhitelist.loadWhitelistedSources(data.Data);
                            CPProjectFileModerationWhitelist.checkSources();
                        }
                    });
                }
            });
            //Update Whitelists with changed checkbox values and save to hidden field to send back to form
            $("#field-submit").click(function (e) {
                CPProjectFileModerationWhitelist.saveSources();
                $('[data-target="user-whitelist-json"]').val(JSON.stringify(CPProjectFileModerationWhitelist.whitelists));
                return true;
            });
            //initialize user whitelist data
            CPProjectFileModerationWhitelist.loadWhitelistedSources($('[data-target="user-whitelist-json"]').val());
            CPProjectFileModerationWhitelist.checkSources();
        };
        //Load json whitelist data into Whitelists model
        CPProjectFileModerationWhitelist.loadWhitelistedSources = function (whitelist) {
            CPProjectFileModerationWhitelist.whitelists = [];
            var json = JSON.parse(whitelist);
            for (var i = 0; i < json.length; i++) {
                CPProjectFileModerationWhitelist.whitelists.push(new WhitelistObject(json[i]));
            }
        };
        //Set the check boxes to match Whitelists data
        CPProjectFileModerationWhitelist.checkSources = function () {
            $('[data-target="upload-source"]').prop('checked', false);
            $(CPProjectFileModerationWhitelist.whitelists).each(function () {
                var whitelist = this;
                if (whitelist.uploadSources.length > 0) {
                    var $catRow = $('[data-target="game-category"][data-id="' + whitelist.gameCategoryID + '"]');
                    if ($catRow) {
                        for (var i = 0; i < whitelist.uploadSources.length; i++) {
                            $catRow.find('[data-target="upload-source"][data-upload-source="' + whitelist.uploadSources[i] + '"]').prop('checked', true);
                        }
                    }
                }
            });
        };
        //Update the check box data into the Whitelists model
        CPProjectFileModerationWhitelist.saveSources = function () {
            $(CPProjectFileModerationWhitelist.whitelists).each(function () {
                var whitelist = this;
                var $catRow = $('[data-target="game-category"][data-id="' + whitelist.gameCategoryID + '"]');
                if ($catRow) {
                    whitelist.uploadSources = [];
                    $catRow.find('[data-target="upload-source"]:checked').each(function () {
                        var uploadSource = parseInt($(this).attr('data-upload-source'));
                        whitelist.uploadSources.push(uploadSource);
                    });
                }
            });
        };
        CPProjectFileModerationWhitelist.whitelists = [];
        CPProjectFileModerationWhitelist.lastSelectedUser = 0;
        return CPProjectFileModerationWhitelist;
    }());
    Elerium.CPProjectFileModerationWhitelist = CPProjectFileModerationWhitelist;
    var WhitelistObject = /** @class */ (function () {
        function WhitelistObject(json) {
            if (json === void 0) { json = {}; }
            this.gameCategoryID = json.GameCategoryID;
            this.uploadSources = json.UploadSources;
        }
        return WhitelistObject;
    }());
    Elerium.WhitelistObject = WhitelistObject;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.CPProjectFileModerationWhitelist.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var ProjectLocalizationNamespace = /** @class */ (function () {
        function ProjectLocalizationNamespace() {
        }
        ProjectLocalizationNamespace.initialize = function () {
            ProjectLocalizationNamespace.bindNamespace();
            ProjectLocalizationNamespace.bindCreateNamespace();
            ProjectLocalizationNamespace.bindSaveNamespace();
            ProjectLocalizationNamespace.bindStatusFilter();
            ProjectLocalizationNamespace.loadUpNamespace();
            ProjectLocalizationNamespace.bindFilterToggle();
            ProjectLocalizationNamespace.bindSearch();
            ProjectLocalizationNamespace.NoFilterResults();
        };
        ProjectLocalizationNamespace.bindNamespace = function () {
            $('[data-target="namespace-title"]').click(function (e) {
                var $this = $(this);
                var spaceID = $this.attr("data-space-id");
                ProjectLocalizationNamespace.setSelectedNamespace(spaceID);
                ProjectLocalizationNamespace.loadNamespace(spaceID);
            });
        };
        ProjectLocalizationNamespace.setSelectedNamespace = function (spaceID) {
            $('[data-target="namespace-title"]').removeClass("selected");
            $('[data-target="namespace-create"]').removeClass("selected");
            $('[data-space-id="' + spaceID + '"]').addClass('selected');
        };
        ProjectLocalizationNamespace.loadNamespace = function (spaceID) {
            var url = "/localization/namespace/" + spaceID + "/get";
            $.ajax({
                url: url,
                type: 'GET',
                success: function (data) {
                    $("[data-target='namespace-id']").val(spaceID);
                    $("[data-target='namespace-name']").val(data.name);
                    $("[data-target='namespace-desc']").val(data.context);
                    $("[data-target='namespace-parent-select']").val(data.parentID);
                    $("[data-target='namespace-parent-select']").removeAttr("disabled");
                    $("[data-target='namespace-parent-select']>option").removeClass("hide");
                    $("[data-target='namespace-parent-select']>[value='" + spaceID + "']").addClass("hide");
                    ProjectLocalizationNamespace.handleNamespaceStatus(data.status, spaceID, data.isPrimary);
                    document.location.hash = spaceID;
                }
            });
        };
        ProjectLocalizationNamespace.bindCreateNamespace = function () {
            $('[data-target="namespace-create"]').click(function (e) {
                $("[data-target='namespace-id']").val("0");
                $("[data-target='namespace-name']").val("");
                $("[data-target='namespace-desc']").val("");
                $("[data-target='namespace-parent-select']").val("0");
                $("[data-target='namespace-parent-select']>option").removeClass("hide");
                $("[data-target='namespace-parent-select']").removeAttr("disabled");
                ProjectLocalizationNamespace.handleNamespaceStatus("New", 0, "False");
                document.location.hash = "0";
            });
        };
        ProjectLocalizationNamespace.bindSaveNamespace = function () {
            var $form = $('[data-target="namespace-form"]');
            $form.submit(function (e) {
                e.preventDefault();
                $form.mask();
                $form.ajaxSubmit({
                    success: function (data) {
                        if (data.success == "success") {
                            document.location.hash = data.namespaceID;
                            self.location.reload();
                        }
                        else {
                            $form.unmask();
                            Cobalt.Forms.displayErrors($form, data.Errors);
                        }
                    }
                });
            });
        };
        ProjectLocalizationNamespace.loadUpNamespace = function () {
            var spaceID = document.location.hash.slice(1);
            if (!spaceID || spaceID == '0' || !$.isNumeric(spaceID)) {
                spaceID = $('[data-target="namespace-title"]:not(.status-hide,.search-hide)').first().attr("data-space-id");
            }
            if (spaceID) {
                ProjectLocalizationNamespace.setSelectedNamespace(spaceID);
                ProjectLocalizationNamespace.loadNamespace(spaceID);
                var spacePosition = $("[data-space-id='" + spaceID + "']").position().top - 50;
                var visibleHeight = $(".e-localization-namespace-scroll-container").innerHeight();
                if (spacePosition > visibleHeight - 100) {
                    $(".e-localization-namespace-scroll-container").scrollTop(($(".e-localization-namespace-scroll-container").scrollTop() + spacePosition));
                }
            }
        };
        ProjectLocalizationNamespace.handleNamespaceStatus = function (status, spaceID, isPrimary) {
            var $formFooter = $('[data-target="namespace-form"] > .form-footer');
            var $input = $("<button></button>").attr("type", "button").attr("data-target", "namespace-status").addClass("button button--hollow");
            var confirmation = "";
            var msg = null;
            $formFooter.find('[data-target="namespace-status"]').remove();
            $formFooter.find('[data-target="primary-msg"]').remove();
            if (status == "New") {
                return;
            }
            else if (status == "Deleted") {
                $input.append('<span class="button__text">Restore</span>');
                confirmation = "Are you sure you want to restore this namespace and any sub-namespaces and phrases with it?";
            }
            else {
                $input.append('<span class="button__text">Delete</span>');
                confirmation = "Are you sure you want to delete this namespace and any sub-namespaces and phrases with it?";
            }
            if (isPrimary == "True") {
                $("[data-target='namespace-parent-select']").attr("disabled", "disabled");
                $input.attr("disabled", "disabled");
                msg = $("<span/>").addClass('e-localization-tip').attr('data-target', 'primary-msg').html("*This is the default namespace and cannot be deleted or moved");
            }
            $input.click(function (e) {
                e.preventDefault();
                if (confirm(confirmation)) {
                    Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                        ProjectLocalizationNamespace.deleteNamespace(spaceID, requestVerificationToken);
                    });
                }
            });
            $formFooter.append($input);
            if (msg) {
                $formFooter.append(msg);
            }
        };
        ProjectLocalizationNamespace.deleteNamespace = function (spaceID, requestVerificationToken) {
            // generate a form to be passed to the controller
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            var url = "/localization/namespace/" + spaceID + "/delete";
            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    if (data.success == "success") {
                        self.location.reload();
                    }
                    else {
                        var $formFooter = $('[data-target="namespace-form"] > .form-footer');
                        var msg = $("<span/>").addClass('e-localization-tip').attr('data-target', 'primary-msg').html(data.error);
                        $formFooter.append(msg);
                    }
                }
            });
        };
        ProjectLocalizationNamespace.bindStatusFilter = function () {
            var $filter = $('[data-target="status-filter"]');
            $(".deleted-namespace, .deleted-parent-namespace").addClass("status-hide");
            $filter.change(function (e) {
                var $this = $(this);
                var statusVal = $(this).find('option:selected').val();
                $('[data-target="namespace-title"]').removeClass("status-hide");
                if (statusVal == "normal") {
                    $(".deleted-namespace, .deleted-parent-namespace").addClass("status-hide");
                }
                else if (statusVal == "deleted") {
                    $(".active-namespace").addClass("status-hide");
                }
                ProjectLocalizationNamespace.NoFilterResults();
            });
        };
        ProjectLocalizationNamespace.bindSearch = function () {
            $("[data-target='search']").keyup($.debounce(300, function (e) {
                var $this = $(this);
                var searchVal = $this.val();
                if (searchVal.length > 0) {
                    $('[data-target="clear-search"]').removeClass("hide");
                    $('[data-target="namespace-title"]').each(function (index, e) {
                        if ($(this).html().match(new RegExp(searchVal, "i"))) {
                            $(this).removeClass("search-hide");
                        }
                        else {
                            $(this).addClass("search-hide");
                        }
                    });
                }
                else {
                    $('[data-target="namespace-title"]').removeClass("search-hide");
                    $('[data-target="clear-search"]').addClass("hide");
                }
            }));
            $('[data-target="clear-search"]').click(function (e) {
                e.preventDefault();
                $('[data-target="namespace-title"]').removeClass("search-hide");
                $("[data-target='search']").val("");
                $('[data-target="clear-search"]').addClass("hide");
                ProjectLocalizationNamespace.NoFilterResults();
            });
        };
        ProjectLocalizationNamespace.bindFilterToggle = function () {
            $('[data-target="filter-toggle"]').click(function (e) {
                $('[data-target="filter-div"]').toggleClass("filter-hide");
                $('[data-target="status-filter"]').toggleClass('hidden');
            });
        };
        ProjectLocalizationNamespace.NoFilterResults = function () {
            if ($('[data-target="namespace-title"]:not(.status-hide,.search-hide)').length == 0) {
                $('[data-target="no-phrases"]').removeClass("hide");
            }
            else {
                $('[data-target="no-phrases"]').addClass("hide");
            }
        };
        return ProjectLocalizationNamespace;
    }());
    Elerium.ProjectLocalizationNamespace = ProjectLocalizationNamespace;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ProjectLocalizationNamespace.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var DevSuccessSwagger = /** @class */ (function () {
        function DevSuccessSwagger() {
        }
        DevSuccessSwagger.initialize = function () {
            // select the target node
            var target = document.getElementById('swagger-ui');
            // create an observer instance
            Elerium.DevSuccessSwagger.Observer = new MutationObserver(function (mutations) {
                Elerium.DevSuccessSwagger.HandleSwaggerReady();
            });
            // configuration of the observer:
            var config = { attributes: true, childList: true, characterData: true, subtree: true };
            // pass in the target node, as well as the observer options
            Elerium.DevSuccessSwagger.Observer.observe(target, config);
        };
        DevSuccessSwagger.AddHeaderData = function (request) {
            var clientID = document.getElementById("clientid");
            var oAuth = document.getElementById("oauthtoken");
            if (clientID.value && clientID.value.trim() != "") {
                request.headers['Client-Id'] = clientID.value;
            }
            if (oAuth.value && oAuth.value.trim() != "") {
                request.headers['Authorization'] = "OAuth " + oAuth.value;
            }
        };
        DevSuccessSwagger.HandleSwaggerReady = function () {
            //Locate the base container
            var schemeDivs = document.getElementsByClassName("scheme-container");
            if (schemeDivs === undefined || schemeDivs === null || schemeDivs.length <= 0) {
                //Not ready yet, wait.
                return;
            }
            //We found what we need. Cancel the observer.
            Elerium.DevSuccessSwagger.Observer.disconnect();
            //Verify their PC isn't slow and already injected them.
            if (document.getElementById("clientid") === null) {
                //Inject ourselves at the end of the main div.
                var schemeDiv = schemeDivs[0];
                schemeDiv.innerHTML += Elerium.DevSuccessSwagger.HtmlToInject;
            }
        };
        DevSuccessSwagger.HtmlToInject = "<section class=\"schemes wrapper block col-12\" style=\"padding-top: 26px;\"><label for=\"clientid\"><span class=\"clientid-title\">ClientID</span><input type=\"text\" name=\"clientid\" data-headername=\"Client-ID\" id=\"clientid\" class=\"j-header-data\"></label><label for=\"oauthtoken\"><span class=\"oauthtoken-title\">OAuth Token</span><input type=\"text\" name=\"oauthtoken\" data-headername=\"Authorization\" data-headerdata=\"OAuth \" id=\"oauthtoken\" class=\"j-header-data\"></label></section>";
        DevSuccessSwagger.Observer = null;
        return DevSuccessSwagger;
    }());
    Elerium.DevSuccessSwagger = DevSuccessSwagger;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.DevSuccessSwagger.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var TwitchDocsHelper = /** @class */ (function () {
        function TwitchDocsHelper() {
        }
        TwitchDocsHelper.initialize = function () {
            var _this = this;
            var attachableItems = document.getElementsByClassName("j-docs-version-changer");
            for (var i = 0; i < attachableItems.length; i++) {
                attachableItems[i].addEventListener("change", Elerium.TwitchDocsHelper.docsSelectorClick);
            }
            window.addEventListener("hashchange", this.shiftWindow);
            window.onload = function () {
                if (window.location.hash) {
                    _this.shiftWindow();
                }
            };
            var elements = document.getElementsByTagName("a");
            for (var x = 0, len = elements.length; x < len; x++) {
                elements[x].addEventListener("click", this.checkForWindowShift);
            }
        };
        TwitchDocsHelper.docsSelectorClick = function (event) {
            var selectedVersion = event.target.value;
            if (selectedVersion === "latest") {
                window.location.href = "/docs/";
            }
            else {
                window.location.href = "/docs/" + event.target.value;
            }
        };
        TwitchDocsHelper.shiftWindow = function () {
            scrollBy(0, -50);
        };
        TwitchDocsHelper.checkForWindowShift = function (event) {
            if (event.target.hash === window.location.hash) {
                setTimeout(function () { window.scrollBy(0, -50); }, 3);
            }
        };
        return TwitchDocsHelper;
    }());
    Elerium.TwitchDocsHelper = TwitchDocsHelper;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.TwitchDocsHelper.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var OptionalHeaderHelper = /** @class */ (function () {
        function OptionalHeaderHelper() {
        }
        OptionalHeaderHelper.initialize = function () {
            var attachableItems = document.getElementsByClassName("j-optional-header");
            for (var i = 0; i < attachableItems.length; i++) {
                attachableItems[i].addEventListener("click", Elerium.OptionalHeaderHelper.OptionalHeaderClick);
                if (attachableItems[i].getAttribute('data-optional-keep-visible') === undefined || attachableItems[i].getAttribute('data-optional-keep-visible') === null) {
                    $("#" + attachableItems[i].getAttribute("data-optional-id")).hide();
                }
                attachableItems[i].classList.add("icon-carat-after");
            }
            //Optional Tables
            var attachableItems = document.getElementsByClassName("col-name-optional");
            for (var i = 0; i < attachableItems.length; i++) {
                attachableItems[i].addEventListener("click", Elerium.OptionalHeaderHelper.OptionalTableClick);
                attachableItems[i].classList.add("icon-carat-before-flipped");
            }
        };
        OptionalHeaderHelper.OptionalHeaderClick = function (event) {
            $("#" + event.target.getAttribute('data-optional-id')).toggle(500);
            if (event.target.classList.contains("icon-carat-after-flipped")) {
                event.target.classList.add("icon-carat-after");
                event.target.classList.remove("icon-carat-after-flipped");
            }
            else {
                event.target.classList.add("icon-carat-after-flipped");
                event.target.classList.remove("icon-carat-after");
            }
        };
        OptionalHeaderHelper.OptionalTableClick = function (event) {
            $(event.target.closest("table").getElementsByTagName("tbody")).toggle(500);
            if (event.target.classList.contains("icon-carat-before-flipped")) {
                event.target.classList.add("icon-carat-before");
                event.target.classList.remove("icon-carat-before-flipped");
            }
            else {
                event.target.classList.add("icon-carat-before-flipped");
                event.target.classList.remove("icon-carat-before");
            }
        };
        return OptionalHeaderHelper;
    }());
    Elerium.OptionalHeaderHelper = OptionalHeaderHelper;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.OptionalHeaderHelper.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var TwitchNavigation = /** @class */ (function () {
        function TwitchNavigation() {
        }
        TwitchNavigation.initialize = function () {
            $('body').on('click', this.toggleUserDropdown);
            $('[data-target="sign-out"]').click(function () {
                $('[data-target="signout-form"]').submit();
            });
        };
        TwitchNavigation.toggleUserDropdown = function (event) {
            if (event.target.closest("#user-card") && $('#user-dropdown').data('a-target') === 'dropdown-up') {
                $('#user-dropdown').addClass('toggled');
                $('#user-dropdown').data('a-target', 'dropdown-down');
                $('#user-card-container').addClass('top-nav__dropdown-open');
            }
            else {
                $('#user-dropdown').removeClass('toggled');
                $('#user-dropdown').data('a-target', 'dropdown-up');
                $('#user-card-container').removeClass('top-nav__dropdown-open');
            }
        };
        return TwitchNavigation;
    }());
    Elerium.TwitchNavigation = TwitchNavigation;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.TwitchNavigation.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var ExtensionVersionPage = /** @class */ (function () {
        function ExtensionVersionPage() {
        }
        ExtensionVersionPage.initialize = function () {
            $('#version-menu').on('click', this.toggleVersionDetailsUI);
            $("#field-file").on('change', this.toggleUploadDisable);
            $("#field-submit").attr("disabled", "true");
            ExtensionVersionPage.extensionsForceRequestIdentityLinkBind();
            $("#dialog-confirm").hide();
            //Extension anchor management
            $("#field-panel-view").on('click change', this.toggleAnchorViewsPanel);
            $("#field-video-overlay-view").on('click change', this.toggleAnchorViewsVideo);
            $("#field-video-component-view").on('click change', this.toggleAnchorViewsVideoComponent);
            $("#field-mobile-view").on('click change', this.toggleAnchorViewsMobile);
            ExtensionVersionPage.toggleAnchorViews();
            $("#dialog-confirm-anchor").hide();
            $("#tims-onboarding > a").on('click', this.bindSubmitExtensionsForm);
            $("#tims-onboarding > a > span").on('click', this.bindSubmitExtensionsForm);
            ExtensionVersionPage.setupConfigConfiguration();
        };
        ExtensionVersionPage.showOrHideEntity = function (checkbox, entity, event) {
            if ($(checkbox).prop('checked')) {
                $(entity).show();
            }
            else {
                if (event == null) {
                    $(entity).hide();
                }
                else {
                    event.preventDefault();
                    ExtensionVersionPage.confirmAnchorSupportToggle(checkbox);
                }
            }
        };
        ExtensionVersionPage.setupConfigConfiguration = function () {
            $("input#field-configuration-service-none").on("input propertychange paste change", Elerium.ExtensionVersionPage.handleConfigConfigurationClick);
            $("input#field-configuration-service-hosted").on("input propertychange paste change", Elerium.ExtensionVersionPage.handleConfigConfigurationClick);
            $("input#field-configuration-service-custom").on("input propertychange paste change", Elerium.ExtensionVersionPage.handleConfigConfigurationClick);
            ExtensionVersionPage.handleConfigConfigurationClick(null);
        };
        ExtensionVersionPage.handleConfigConfigurationClick = function (event) {
            if ($("input#field-configuration-service-none").length == 0) {
                $("#form-field-required-configuration").hide();
                $("#form-field-required-per-extension-configuration").hide();
                return;
            }
            else if ($("input#field-configuration-service-none").prop("checked")) {
                $("#form-field-required-configuration").hide();
                $("#form-field-required-per-extension-configuration").hide();
                return;
            }
            else if ($("input#field-configuration-service-hosted").prop("checked")) {
                $("#form-field-required-configuration").show();
                $("#form-field-required-per-extension-configuration").show();
                $("#form-field-required-configuration").find("span").html(Elerium.Localization.Elerium.Extension.DeveloperWritableChannelSegmentVersion);
                $("#form-field-required-configuration").find("p").html(Elerium.Localization.Elerium.Extension.DeveloperWritableChannelSegmentVersionDesc);
            }
            else {
                $("#form-field-required-configuration").show();
                $("#form-field-required-per-extension-configuration").hide();
                $("#form-field-required-configuration").find("span").html(Elerium.Localization.Elerium.Extension.RequiredPerChannelConfigurations);
                $("#form-field-required-configuration").find("p").html(Elerium.Localization.Elerium.Extension.RequiredPerChannelConfigurationsDesc);
            }
        };
        ExtensionVersionPage.toggleAnchorViews = function () {
            ExtensionVersionPage.toggleAnchorViewsPanel(null);
            ExtensionVersionPage.toggleAnchorViewsVideo(null);
            ExtensionVersionPage.toggleAnchorViewsVideoComponent(null);
            ExtensionVersionPage.toggleAnchorViewsMobile(null);
        };
        ExtensionVersionPage.toggleAnchorViewsPanel = function (event) {
            ExtensionVersionPage.showOrHideEntity("#field-panel-view", "#form-field-panel-path", event);
            ExtensionVersionPage.showOrHideEntity("#field-panel-view", "#form-field-panel-height", event);
        };
        ExtensionVersionPage.toggleAnchorViewsVideo = function (event) {
            ExtensionVersionPage.showOrHideEntity("#field-video-overlay-view", "#form-field-video-overlay-path", event);
        };
        ExtensionVersionPage.toggleAnchorViewsVideoComponent = function (event) {
            ExtensionVersionPage.showOrHideEntity("#field-video-component-view", "#form-field-video-component-path", event);
            ExtensionVersionPage.showOrHideEntity("#field-video-component-view", "#video-component-settings", event);
        };
        ExtensionVersionPage.toggleAnchorViewsMobile = function (event) {
            ExtensionVersionPage.showOrHideEntity("#field-mobile-view", "#form-field-mobile-path", event);
        };
        ExtensionVersionPage.confirmAnchorSupportToggle = function (checkbox) {
            $("#dialog-confirm-anchor").dialog({
                resizable: false,
                height: "auto",
                width: "400px",
                modal: true,
                buttons: {
                    'Cancel': {
                        click: function () {
                            $(this).dialog("close");
                        },
                        text: Elerium.Localization.Global.Buttons.Cancel,
                        "class": 'button button--hollow'
                    },
                    'Confirm': {
                        click: function () {
                            $(checkbox).prop('checked', false);
                            ExtensionVersionPage.toggleAnchorViews();
                            $(this).dialog("close");
                        },
                        text: Elerium.Localization.Global.Common.Confirm,
                        "class": 'button'
                    }
                },
                open: function (event, ui) {
                    $(".ui-dialog-titlebar-close").hide();
                }
            });
        };
        ExtensionVersionPage.toggleVersionDetailsUI = function (event) {
            var element = event.target;
            if (!$(element).hasClass("non-editable")) {
                ExtensionVersionPage.hideOtherDivs();
                var parentElement = element.parentElement;
                var divTarget = parentElement.id;
                $(parentElement).addClass("e-selected");
                $('div#' + divTarget).addClass('toggled').removeClass('hidden');
                ExtensionVersionPage.unhideSubmitButton(divTarget);
            }
        };
        ExtensionVersionPage.hideOtherDivs = function () {
            $('#version-menu li').each(function () {
                $(this).removeClass('e-selected');
            });
            $('.version-form-container div.toggled').each(function () {
                $(this).removeClass('toggled');
                $(this).addClass('hidden');
            });
        };
        ExtensionVersionPage.unhideSubmitButton = function (id) {
            var submitButonAvailableList = [
                "version-assets",
                "version-details",
                "application-capabilities",
                "asset-hosting",
                "access",
                "review-details"
            ];
            if ($.inArray(id, submitButonAvailableList) !== -1) {
                if (id === "version-assets") {
                    $('#extension-update span').text("Upload Assets");
                    $('#extension-update button')[0].dataset.title = "user_uploaded_extension_asset_bundle";
                    if ($("#field-submit").attr("force-disabled").toLowerCase() !== "true") {
                        ExtensionVersionPage.toggleUploadDisable();
                    }
                }
                else {
                    $('#extension-update span').text("Save Changes");
                    $('#extension-update button')[0].dataset.title = "user_save_extension_changes";
                    if ($("#field-submit").attr("force-disabled").toLowerCase() !== "true") {
                        $("#field-submit").removeAttr("disabled");
                    }
                }
                $('#extension-update').addClass('toggled').removeClass('hidden');
            }
        };
        ExtensionVersionPage.toggleUploadDisable = function () {
            if ($("#field-file").val().length == 0) {
                $("#field-submit").attr("disabled", "true");
            }
            else {
                $("#field-submit").removeAttr("disabled");
            }
        };
        ExtensionVersionPage.extensionsForceRequestIdentityLinkBind = function () {
            $("input#field-will-monitize-extension-no").on("input propertychange paste change", Elerium.ExtensionVersionPage.extensionsForceRequestIdentityLink);
            $("input#field-will-monitize-extension-bits").on("input propertychange paste change", Elerium.ExtensionVersionPage.extensionsForceRequestIdentityLink);
            $("input#field-will-monitize-extension-inapp").on("input propertychange paste change", Elerium.ExtensionVersionPage.extensionsForceRequestIdentityLink);
            Elerium.ExtensionVersionPage.extensionsForceRequestIdentityLink(null);
        };
        ExtensionVersionPage.extensionsForceRequestIdentityLink = function (e) {
            if ($("input#field-will-monitize-extension-no").length == 0) {
                Elerium.ExtensionVersionPage.enableRequestIdentityLink();
                return;
            }
            else if ($("input#field-will-monitize-extension-no").prop("checked")) {
                Elerium.ExtensionVersionPage.enableRequestIdentityLink();
                $("#vendor-info").hide();
                $("#bits-info").hide();
                $("#tims-onboarding").show();
                return;
            }
            else if ($("input#field-will-monitize-extension-bits").prop("checked")) {
                $("#vendor-info").hide();
                $("#tims-onboarding").hide();
                $("#bits-info").show();
            }
            else {
                $("#vendor-info").show();
                $("#tims-onboarding").hide();
                $("#bits-info").hide();
            }
            Elerium.ExtensionVersionPage.disableRequestIdentityLink();
        };
        ExtensionVersionPage.disableRequestIdentityLink = function () {
            $("#field-request-identity-link").prop('checked', true);
            $("#field-request-identity-link").disable();
            $("#field-request-identity-link").prop('title', L.Elerium.Extension.RequestIdentityLinkRequired());
            $("label[for='field-request-identity-link']").children().prop("title", L.Elerium.Extension.RequestIdentityLinkRequired());
        };
        ExtensionVersionPage.enableRequestIdentityLink = function () {
            $("#field-request-identity-link").enable();
            $("#field-request-identity-link").prop('title', "");
            $("label[for='field-request-identity-link']").children().prop("title", "");
        };
        ExtensionVersionPage.bindSubmitExtensionsForm = function (e) {
            var button = $(e.target);
            var returnUrl = button.attr("data-action-return-url");
            if (returnUrl == null || returnUrl == undefined) {
                returnUrl = $(button.parent()).attr("data-action-return-url");
            }
            if (returnUrl == null || returnUrl == undefined || returnUrl == "") {
                return;
            }
            $("#tims-onboarding > a").mask();
            e.preventDefault();
            Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                Elerium.ExtensionVersionPage.submitForTIMSInvite(Elerium.Routes.DashboardSignUpForTIMS(), returnUrl, button, requestVerificationToken);
            });
        };
        ExtensionVersionPage.submitForTIMSInvite = function (url, returnUrl, button, requestVerificationToken) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    window.location.replace(returnUrl);
                }
            });
        };
        return ExtensionVersionPage;
    }());
    Elerium.ExtensionVersionPage = ExtensionVersionPage;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.ExtensionVersionPage.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    "use strict";
    var $ = jQuery;
    var Favorite = /** @class */ (function () {
        function Favorite() {
        }
        Favorite.initialize = function () {
            $('[data-target="unfav-proj"]').on('click', Elerium.Favorite.sendFavoriteEvent);
            $('[data-target="fav-proj"]').on('click', Elerium.Favorite.sendFavoriteEvent);
        };
        Favorite.sendFavoriteEvent = function (event) {
            Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                Elerium.Favorite.sendFavoriteEventCallback(requestVerificationToken, event);
            });
        };
        Favorite.sendFavoriteEventCallback = function (requestVerificationToken, event) {
            var myFormData = new FormData();
            var target = $(event.target);
            myFormData.append("request-verification-token", requestVerificationToken);
            $.ajax({
                url: target.attr('data-target') == "fav-proj" ? event.target.dataset.addhref : event.target.dataset.remhref,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    if (target.attr('data-target') == "fav-proj") {
                        target.attr('data-target', "unfav-proj");
                        target.html(L.Elerium.Global.Unfavorite());
                    }
                    else {
                        target.attr('data-target', "fav-proj");
                        target.html(L.Elerium.Global.Favorite());
                    }
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    //NOP
                }
            });
        };
        Favorite.projects = [];
        return Favorite;
    }());
    Elerium.Favorite = Favorite;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.Favorite.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var Tad = /** @class */ (function () {
        function Tad() {
        }
        Tad.initialize = function () {
            $(".tad-cancel").on('click', this.tadCancel);
            $(".tad-subscribe").on('click', this.tadSubscribe);
            var dialog = $(".ui-dialog");
            dialog.on("dialogbeforeclose", function (event, ui) {
                if (Elerium.Tad.wasCancelled) {
                    Elerium.TwitchNurture.sendButtonClickWithData('experiment_modal_continue', null, { name: { ProjectID: Elerium.Tad.projectId, AuthorID: Elerium.Tad.authorId } });
                }
                else {
                    Elerium.TwitchNurture.sendButtonClickWithData('experiment_modal_subscribe', null, { name: { ProjectID: Elerium.Tad.projectId, AuthorID: Elerium.Tad.authorId } });
                }
                window.open(Elerium.Tad.url, "_self");
            });
        };
        Tad.tadCancel = function (e) {
            $(".ui-dialog-titlebar-close").click();
        };
        Tad.tadSubscribe = function (e) {
            window.open(Elerium.Tad.subUrl, "_blank");
            Elerium.Tad.wasCancelled = false;
            $(".ui-dialog-titlebar-close").click();
        };
        Tad.url = "";
        Tad.subUrl = "";
        Tad.projectId = 0;
        Tad.authorId = 0;
        Tad.wasCancelled = true;
        return Tad;
    }());
    Elerium.Tad = Tad;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.Tad.js.map;
/// <reference path="typings.d.ts" />
var Elerium;
(function (Elerium) {
    'use strict';
    var $ = jQuery;
    var Experiments = /** @class */ (function () {
        function Experiments() {
        }
        Experiments.initialize = function () {
            $("[data-experiment-modal]").on('click', this.experimentModal);
        };
        /*
         * Experiment Modal
         * This is used when you want to pop up a modal for experiments,
         * but follow the normal href when not poping the modal.
         *
         * This requires the following fields on the object being clicked
         * data-modal-href => Link to the modal
         * data-normal-href => Normal Link Flow
         * data-exp-name => Name of the experiment the user can join. This must match the enum!
         * data-exp-in => ExperimentUser Status, 0 = Needs Bucketing, 1 = Out, 2 = In
         */
        Experiments.experimentModal = function (e) {
            var eventObj = $(e.target).attr("data-modal-href") ? $(e.target) : $(e.target).parent();
            if (eventObj.attr("href") || eventObj.hasClass("modal-link")) {
                return; //NOOP, we already did something
            }
            var modalHref = eventObj.attr("data-modal-href");
            var normalHref = eventObj.attr("data-normal-href");
            var expName = eventObj.attr("data-exp-name");
            var inExp = eventObj.attr("data-exp-in");
            var nurtureName = eventObj.attr("data-exp-nurture-name");
            var nurtureData = eventObj.attr("data-exp-nurture");
            if (!modalHref || !normalHref || !expName || !inExp) {
                console.error("Invalid Experiement, missing field");
                return;
            }
            switch (inExp) {
                case "0":
                    Elerium.Experiments.launchUnknown(eventObj, e, expName);
                    break;
                case "1":
                    Elerium.Experiments.sendNurtureEvent(nurtureName, nurtureData, false);
                    Elerium.Experiments.launchNormal(eventObj, normalHref);
                    break;
                case "2":
                    Elerium.Experiments.sendNurtureEvent(nurtureName, nurtureData, true);
                    Elerium.Experiments.launchModal(eventObj, e, modalHref);
                    break;
                default:
                    console.error("Invalid ExperimentUser status.");
            }
        };
        Experiments.launchModal = function (eventObj, e, modalHref) {
            eventObj.addClass("modal-link");
            Cobalt.Forms.bindModalLinks($(eventObj.parent()));
            eventObj.click();
        };
        Experiments.launchNormal = function (eventObj, normalHref) {
            history.pushState({}, window.location.href, window.location.href);
            window.location.replace(normalHref);
        };
        Experiments.sendNurtureEvent = function (nurtureName, nurtureData, inExp) {
            if (!nurtureName) {
                return;
            }
            var toSend = JSON.parse(nurtureData || "{}");
            toSend.InExperiment = inExp;
            Elerium.TwitchNurture.sendButtonClickWithData(nurtureName, null, { name: toSend });
        };
        Experiments.launchUnknown = function (eventObj, event, expName) {
            Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                Elerium.Experiments.checkExperimentStatus(Elerium.Routes.ExperimentExperimentStatus(expName), requestVerificationToken, eventObj, event);
            });
        };
        Experiments.checkExperimentStatus = function (url, requestVerificationToken, eventObj, event) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    eventObj.attr("data-exp-in", data.InExperiment ? 2 : 1);
                    Elerium.Experiments.experimentModal(event);
                }
            });
        };
        return Experiments;
    }());
    Elerium.Experiments = Experiments;
})(Elerium || (Elerium = {}));
//# sourceMappingURL=Elerium.Experiments.js.map;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.CPCompanyManagment = {

        initialize: function () {
            $('[data-action="status-set"]').click(Elerium.CPCompanyManagment.bindGameStatusForm);
            $('[data-action="status-set-approved"]').click(Elerium.CPCompanyManagment.bindGameApproved);
            $('[data-action="manage-dev"]').click(Elerium.CPCompanyManagment.bindDevMangeForm);
            Elerium.CPCompanyManagment.bindCompanyManageForm();
            
        },
        bindCompanyManageForm: function () {
            $('#field-company-status').change(Elerium.CPCompanyManagment.companyManageStatusChangeHandler);
            $('.status-change-reason').hide();
            $('.show-with-error').show();
        },
        companyManageStatusChangeHandler: function (e) {
            if (e.target.value == 2) {
                $('.status-change-reason').show();
            } else {
                $('.status-change-reason').hide();
            }
        },
        bindGameStatusForm: function (e) {
            var $button = $(this);
            var $row = $button.closest('[data-target="management-row"]');
            var $form = $('[data-target="status-form"]');
            var $submitButton = $form.find('[data-action="status-submit"]');

            $form.find('[data-target="status-notes"]').val('');

            $submitButton.unbind();
            $submitButton.click(function (e) {
                e.preventDefault();
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    var url = "";
                    var gameID = $row.attr("data-value");
                    var status = $button.attr("data-value");
                    Elerium.CPCompanyManagment.submitGameStatus(Elerium.Routes.CPGameStatus(gameID), status, $form, requestVerificationToken);
                });
            });

            $form.dialog(
                {
                    draggable: false,
                    title: $button.text(),
                    modal: true,
                    resizable: false,
                    dialogClass: 'modal',
                    close: function (event, ui) {
                        $form.dialog("destroy");
                    }
                });
        },
        bindGameApproved: function (e) {
            var $button = $(this);
            var $row = $button.closest('[data-target="management-row"]');
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    var url = "";
                    var gameID = $row.attr("data-value");
                    var status = $button.attr("data-value");
                    Elerium.CPCompanyManagment.submitGameStatus(Elerium.Routes.CPGameStatus(gameID), status, null, requestVerificationToken);
                });
        },
        submitGameStatus: function (url, statusID, form, requestVerificationToken) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            myFormData.append("status-type", statusID);

            if (form !== null)
            {
                myFormData.append("status-note", form.find('[data-target="status-notes"]').val());
            }
            

            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function(data){
                    if (data.Status == "success") {
                        self.location.reload();
                    } else {
                        alert("Error updating status");
                        if (form !== null)
                        {
                            form.dialog("destroy");
                        }
                    }
                }
            });
        },
        bindDevMangeForm: function (e) {
            var $button = $(this);
            var $row = $button.closest('[data-target="management-row"]');
            var $form = $('[data-target="manage-form"]');
            var $submitButton = $form.find('[data-action="status-submit"]');
            var userID = $button.attr('data-user');

            $form.find('[data-target="developer-status"]').val($button.attr('data-status'));
            $form.find('[data-target="developer-role"]').val($button.attr('data-role'));
            $form.find('[data-target="status-notes"]').val('');

            if (userID == 0) {
                $form.find('[data-target="developer-role"]').attr("disabled", "disabled");
                $form.find('[data-target="role-msg"]').show();
            } else {
                $form.find('[data-target="developer-role"]').removeAttr("disabled");
                $form.find('[data-target="role-msg"]').hide();
            }

            $submitButton.unbind();
            $submitButton.click(function (e) {
                e.preventDefault();
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    var url = "";
                    var devID = $row.attr("data-value");
                    Elerium.CPCompanyManagment.submitDevManage(Elerium.Routes.CPDeveloperStatus(devID), $form, requestVerificationToken);
                });
            });

            $form.dialog(
                {
                    draggable: false,
                    title: $button.text(),
                    modal: true,
                    resizable: false,
                    dialogClass: 'modal',
                    close: function (event, ui) {
                        $form.dialog("destroy");
                    }
                });
        },
        submitDevManage: function (url, form, requestVerificationToken) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            myFormData.append("developer-status", form.find('[data-target="developer-status"]').val());
            myFormData.append("status-note", form.find('[data-target="status-notes"]').val());
            myFormData.append("developer-role", form.find('[data-target="developer-role"]').val());

            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    if (data.Status == "success") {
                        self.location.reload();
                    } else {
                        alert("Error updating status");
                        form.dialog("destroy");
                    }
                }
            });
        }
    };
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.CPProjectRolePermission = {
        priority: 3,
        initialize: function () {
            $("#project-role-permission-mapping").on("click", ".j-role-choice-field", Elerium.CPProjectRolePermission.handleRoleChoiceChanged);
        },
        handleRoleChoiceChanged: function (e) {
            if ($(this).val()) {
                $(".j-permission-choice-field").hide();
                $(".j-permission-choice-field-" + $(this).find(":selected").data("id")).show();
            }
        }
    };
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, undefined) {
    "use strict";

    Elerium.FTBHomeHeader = {
        initialize: function () {
            //Intialize google analytics
            (function (i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function () {
                    (i[r].q = i[r].q || []).push(arguments);
                }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                    m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m);
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

            ga('create', 'UA-389142-9', 'auto', { 'name': 'downloadTracker' });

            var downloadButton = $('[data-action="client-download"]');

            downloadButton.on('click', function () {
                var subCat = $(this).attr("data-client") + " Client";
                ga('downloadTracker.send', 'event', 'client download', 'click', subCat);
                Cobalt.Utils.sendSpadeEvent('Client Download', { "SubCat": subCat });
            });

            if (navigator.appVersion.indexOf("Mac") != -1) {
                $(".e-ftb-button").addClass("mac");
                $(".e-ftb-button").attr("href", "https://desktop.twitchsvc.net/installer/mac/Twitch.dmg?context=[plugin-Minecraft]");
            } 

        }

    }
})(jQuery, Cobalt, Elerium);
;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.GameSelect = {

        initialize: function () {
            if ($("#field-game-autocomplete-symbol").length > 0) {
                Elerium.GameSelect.replaceWithWrapper($("#field-game-autocomplete-symbol")[0], "value", function (obj, property, value) {
                    if (value.length > 0) {
                        var name = $("#field-game-autocomplete-previous").val();
                        var id = value.split(":")[1];

                        Elerium.GameSelect.generateSelectionDiv(id, name);
                    }
                });
                $('[data-target="game-autocomplete"]').focus(function () {
                    $(this).val('');
                });
            }

            var roleDialog = $(".ui-dialog");
            roleDialog.on("dialogbeforeclose", function (event, ui) {
                Elerium.GameSelect.killGameSelection
            });

            Elerium.GameSelect.findPreviousGames();
        },
        replaceWithWrapper: function (obj, property, callback) {
            Object.defineProperty(obj, property, new function () {
                var _value = obj[property];
                return {
                    set: function (value) {
                        _value = value;
                        callback(obj, property, value)
                    },
                    get: function () {
                        return _value;
                    }
                }
            });
        },
        setGameIDs: function () {
            var idField = $('[data-target="game-ids"]');
            var games = $('[data-target="selected-games"] > li');

            var ids = games.map(function () {
                return $(this).attr("data-id");
            }).get().join(",");

            idField.val(ids);
        },
        killGameSelection: function (e) {
            $(".ac_results").remove();
        },
        findPreviousGames: function (e) {
            var idField = $('[data-target="game-select-default"]');
            if (idField.val())
            {
                var games = idField.val().split("|||");

                games.forEach(function (game) {
                    Elerium.GameSelect.generateSelectionDiv(game.substr(0, game.indexOf(":")), game.substr(game.indexOf(":") + 1))
                });
            }
        },
        generateSelectionDiv: function (id, name) {
            var gameItem = $("<li></li>").attr("data-id", id).addClass("game-choice").append($("<div></div>").text(name));
            var removeBtn = $("<a></a>").attr("href", "#").addClass("game-choice-close");

            removeBtn.click(function (e) {
                e.preventDefault();
                $(this).parent().remove();
                Elerium.GameSelect.setGameIDs();
            });

            gameItem.append(removeBtn);
            $('[data-target="selected-games"]').append(gameItem);
            Elerium.GameSelect.setGameIDs();

            $('[data-target="game-autocomplete"]').blur();
            $('[data-target="game-autocomplete"]').val('');

        }
    };
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, undefined) {
    "use strict";

    Elerium.ProjectAnalytics = {
        initialize: function () {
            //Intialize google analytics
            (function (i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function () {
                    (i[r].q = i[r].q || []).push(arguments);
                }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                    m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m);
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

            ga('create', 'UA-389142-3', 'auto');
            ga('create', Cobalt.Analytics.trackingId, 'auto', { 'name': 'siteSpecificEventStats' });

            var donateButton = $('[data-action="donate"]');

            donateButton.on('click', function () {
            	var dataName = $(this).attr("data-name");
            	var dataID = $(this).attr("data-id");
                ga('send', 'event', 'Donate button', 'click', dataName, dataID);
                ga('siteSpecificEventStats.send', 'event', 'Donate button', 'click', dataName, dataID);
                Cobalt.Utils.sendSpadeEvent('Donate Button', null, { "Name": dataName, "DataID": dataID });
            });

            var modpackFileNameLink = $('[data-action="modpack-file-link"]');

            modpackFileNameLink.on('click', function () {
                var dataName = $(this).attr("data-name");
                var dataID = $(this).attr("data-id");
                ga('send', 'event', 'Modpack Filename Click', 'click', dataName, dataID);
                ga('siteSpecificEventStats.send', 'event', 'Modpack Filename Click', 'click', dataName, dataID);
                Cobalt.Utils.sendSpadeEvent('Modpack Filename Click', null, { "Name": dataName, "DataID": dataID });
            });

            var fileNameLink = $('[data-action="file-link"]');

            fileNameLink.on('click', function () {
                var dataName = $(this).attr("data-name");
                var dataID = $(this).attr("data-id");
                ga('send', 'event', 'Filename Click', 'click', dataName, dataID);
                ga('siteSpecificEventStats.send', 'event', 'Filename Click', 'click', dataName, dataID);
                Cobalt.Utils.sendSpadeEvent('Filename Click', null, { "Name": dataName, "DataID": dataID });
            });

            var installButton = $('[data-action="modpack-install"]');

            installButton.on('click', function () {
                var dataName = $(this).attr("data-name");
                var dataID = $(this).attr("data-id");
                ga('send', 'event', 'Modpack How-to Install', 'click', dataName, dataID);
                ga('siteSpecificEventStats.send', 'event', 'Modpack How-to Install', 'click', dataName, dataID);
                Cobalt.Utils.sendSpadeEvent('Modpack How-to Install', null, { "Name": dataName, "DataID": dataID });
            });

            var serverPackDownloadButton = $('[data-action="server-pack-download"]');

            serverPackDownloadButton.on('click',
                function() {
                    var dataName = $(this).attr("data-name");
                    var dataID = $(this).attr("data-id");
                    ga('send', 'event', 'Server Pack Download', 'click', dataName, dataID);
                    ga('siteSpecificEventStats.send', 'event', 'Server Pack Download', 'click', dataName, dataID);
                    Cobalt.Utils.sendSpadeEvent('Server Pack Download', null, { "Name": dataName, "DataID": dataID });
                });
        }

    }
})(jQuery, Cobalt, Elerium);
;
(function($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.ProjectEdit = {
        categoryIDsNoAllowedProjects: [],
        customProjectLicenseID: 0,
        defaultCategoryDisabledValues: {},
        primaryCategoryID: 0,
        projectID: 0,
        projectDonationTypeAttributes: {},
        newPrimaryCategoryID: 0,

        initialize: function () {
            Elerium.ProjectEdit.editDescriptionValidation();
            Elerium.ProjectEdit.handleEditDescriptionModal();
            Elerium.ProjectEdit.handleMemberTitleChange();
            Elerium.ProjectEdit.handleMemberPermissionLinks();
            Elerium.ProjectEdit.handleRootGameCategoryEdit();

            Elerium.ProjectEdit.disableCategoryNoAllowedProjects();

            $('#field-donation-type').change(function() {
                Elerium.ProjectEdit.updateProjectDonationTypeAttribute($(this).val());
            });

            Elerium.ProjectEdit.updateProjectDonationTypeAttribute($('#field-donation-type').val());

            $('#field-localization-enabled').on('click', function() {
                Elerium.ProjectEdit.updateLocalizationRequiresPermissions();
            });

            Elerium.ProjectEdit.updateLocalizationRequiresPermissions();

            /// Disable for Unification
            if (!$('[data-target="game-categories"]').length) {
                $('#field-game-categories.chosen-select').chosen({ max_selected_options: 4 }).change(function (evt, param) {
                    if (param.selected) {
                        $("#field-primary-category option:not(.secondaryonly)[value='" + param.selected + "']").prop('disabled', true);
                    } else {
                        $("#field-primary-category option:not(.secondaryonly)[value='" + param.deselected + "']").prop('disabled', false);
                    }
                });
            } else {
                $('[data-target="game-categories"] select').select2({
                    placeholder: 'Select Category',
                    maximumSelectionSize: 4,
                });

                $('[data-target="game-categories"] select').on('change', (event) => {
                    var vals = event.val;
                    $('#field-primary-category option:not(.secondaryonly)').each((idx, el) => {
                        $(el).prop('disabled', vals.indexOf(el.value) > -1);
                    });
                });
            }


            Elerium.ProjectEdit.categoryInit();

            $('body').on('change', '#field-primary-category', function() {
                var primaryCategoryID = $(this).val();

                $('[data-target="chosen-categories"] #field-game-categories option').prop('disabled', false);

                if (primaryCategoryID) {
                    $('[data-target="chosen-categories"] #field-game-categories option[value="' + primaryCategoryID + '"]').prop('disabled', true).trigger("chosen:updated");
                    this.primaryCategoryID = primaryCategoryID;
                }
            });

            $('#field-project-license').on("change",
                function () {
                    Elerium.ProjectEdit.handleLicenseDisplay($(this));
                }
            );

            Elerium.ProjectEdit.handleLicenseDisplay($('#field-project-license'));
        },
        categoryInit: function () {
            var chosenChoice = $('#field-game-categories.chosen-select option:selected').map(function () {
                return $(this).attr('value');
            });

            $.each(chosenChoice, function (i, v) {
                $("#field-primary-category option:not(.secondaryonly)[value='" + v + "']").prop('disabled', true);
            });

            Elerium.ProjectEdit.disableCategoryNoAllowedProjects();
        },
        disableCategoryNoAllowedProjects: function() {
            if (this.categoryIDsNoAllowedProjects.length > 0) {
                $.each(this.categoryIDsNoAllowedProjects, function() {
                    $("#field-game-categories option[value='" + this + "']").prop('disabled', true)
                    $("#field-primary-category option[value='" + this + "']").prop('disabled', true);
                });
            }
        },
        editDescriptionValidation: function() {
            $('body').on('click', ".j-edit-description-box button[type='submit']", function(e) {
                e.preventDefault();
                if (tinyMCE) {
                    if (tinyMCE.editors["field-description-wysiwyg"].getContent().replace(/(<([^>]+)>)/ig, "").replace(/&nbsp;/g, "").trim().length <= 0) {
                        $(".j-edit-description-box").find(".j-error-description").text("A description is required.").css('color', 'red');
                    } else {
                        $(".j-edit-description-box").find(".j-error-description").text("");
                        $(this).parents("form").submit();
                    }
                }
            });
        },
        handleEditDescriptionModal: function() {
            var $modal = $(".j-edit-description-box");
            $modal.hide();

            $('body').on('click', ".j-edit-description-link", function() {
                $(".j-project-edit-description").hide();
                $modal.show();
            });

            $('body').on('click', ".j-edit-description-cancel", function() {
                $(".j-project-edit-description").show();
                $modal.hide();
            });
        },
        updateProjectDonationTypeAttribute: function(id) {
            var text = Elerium.ProjectEdit.projectDonationTypeAttributes[id];
            if (text) {
                $('#form-field-donation-attribute label').text(text);
                $('#form-field-donation-attribute').show();
            } else {
                $('#form-field-donation-attribute').hide();
            }
        },
        updateLocalizationRequiresPermissions: function() {
            var disabled = $('#field-localization-enabled').prop('checked') == false;
            $('#field-localization-requires-permissions').prop('disabled', $('#field-localization-enabled').prop('checked') == false);
            if (disabled) {
                $('#form-field-localization-requires-permissions .switch-checkbox').addClass('disabled');
            } else {
                $('#form-field-localization-requires-permissions .switch-checkbox').removeClass('disabled');
            }
            
        },
        handleMemberTitleChange: function() {
            $("form.project-members-form").on('change', ".j-project-title-field", function() {
                var selectedOption = $(this).find(":selected");
                var parent = selectedOption.parents(".member-add-profile-box");
                if (parent.length == 0) {
                    parent = $(this).parents(".project-members-form");
                }
                parent.find(".j-permission-field").prop('checked', false);
                if (selectedOption.val() && selectedOption.val() != "") {
                    var defaultRoles = selectedOption.data("default-roles").toString().split(',');

                    $.each(defaultRoles, function() {
                        parent.find(".j-permission-field[data-role-id=" + this + "]").prop('checked', true);
                    });
                }
            });
        },
        handleMemberPermissionLinks: function() {
            $("form.project-members-form").on('click', ".j-member-reset-permisson", function(e) {
                e.preventDefault();

                var parent = $(this).parents(".project-member-permissions");
                var selectedOption = parent.find(".j-project-title-field").find(":selected");

                parent.find(".j-permission-field").prop('checked', false);
                if (selectedOption.val() && selectedOption.val() != "") {
                    var defaultRoles = selectedOption.data("default-roles").toString().split(',');

                    $.each(defaultRoles, function() {
                        parent.find(".j-permission-field[data-role-id=" + this + "]").prop('checked', true);
                    });
                }
            });
        },
        handleLicenseDisplay: function (e) {
            switch (e.val()) {
                case "":
                case Elerium.ProjectEdit.customProjectLicenseID.toString():
                    $('[data-project-license-body="standard"]').hide();
                    $('[data-project-license-body="custom"]').show();
                    break;
                default:
                    $.getJSON(Elerium.Routes.HomeSiteProjectProjectLicenseAjax(e.val()), function (data) {
                        $('[data-project-license-body="custom"]').hide();
                        $('[data-project-license-body="standard"]').html(data).show();
                    });
                    break;
            }
        },
        handleRootGameCategoryEdit: function () {
            $("#root-category-move-form").on("click", "#field-root-move-assign", function (e) {
                e.preventDefault();

                var container = $('#game-category-reselect');
                var button = $('#field-root-move-assign');
                button.attr("disabled");

                var newRootID = $('#field-root-game-categories').val();

                $.ajax({
                    url: Elerium.Routes.CPProjectRootGameCategoryAjax(Elerium.ProjectEdit.projectID, newRootID),
                    datatype: 'html',
                    success: function (data) {
                        container.empty();
                        container.append(data);
                        button.removeAttr("disabled");
                        Cobalt.Forms.setupAuthToken(container);
                    },
                    error: function (xhr) {
                        container.empty();
                        container.append(xhr);
                        button.removeAttr("disabled");
                    }
                });
            });
        },
    };
})(jQuery, Cobalt, Elerium);
;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.ProjectEditLicenseModal = {
        initialize: function () {
            var licenseType = $(".j-project-license-type").val();
            $("input[name='license-type'][value='" + licenseType + "']").prop("checked", true);
            $(".j-project-license-management").on("change", "input[name='license-type']", Elerium.ProjectEditLicenseModal.licenseTypeChanged);
            Elerium.ProjectEditLicenseModal.licenseTypeChanged($("input[name='license-type']:checked"));

            $(".j-project-license-management").on("change", ".j-custom-project-license", Elerium.ProjectEditLicenseModal.customLicenseChanged);
        },
        licenseTypeChanged: function (e) {
            $(".j-project-license-section").hide();
            var licenseType = e.target ? $(e.target).val() : $(e).val();
            $(".j-project-license-" + licenseType).show();
            $(".j-project-license-type").val(licenseType);
        },
        customLicenseChanged: function (e) {
            var option = $(e.target).find("option:selected");
            $(".j-custom-project-license-name").val(option.data("name"));
            $(".j-custom-project-license-body").text(option.data("body") ? option.data("body") : "");
        }
    };
})(jQuery, Cobalt, Elerium);
;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.ProjectListing = {
        priority: 3,
        initialize: function () {
            $(".listing-filters").on("change", "#filter-sort,#filter-reversed,#filter-game-version,#filter-related-dependents,#filter-related-dependencies,#filter-server-packs", Elerium.ProjectListing.handleListingSortChanged);
            $(".level-categories-text").each(function () {
                var width = $(this).width();
                var parent = $(this).parent();
                var max = parent.width();
                max -= parseInt(parent.css("padding-left"));

                if (width >= max) {
                    $(this).attr("title", $(this).text());
                }
            });
        },
        handleListingSortChanged: function () {
            if ($(this).attr("id") === "filter-sort") {
                $("#filter-reversed").prop("checked", false);
                $.cookie("projectfilterSort", $("#filter-sort").val());
            }
            $(this).closest("form").submit();
        }
    };
})(jQuery, Cobalt, Elerium);;
(function($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.ProjectModerationQueue = {
        projectFileStatusApproved: "0",
        projectFileStatusPublishing: "0",
        projectStatusApproved: "0",
        initialize: function() {
            $("#field-file-status").on('change', function() {
                Elerium.ProjectModerationQueue.showHideProjectFileReason($(this));
            });

            $("#field-project-status").on('change', function() {
                Elerium.ProjectModerationQueue.showHideProjectReason($(this));
            });

            $("#form-field-project-file-status-reason-choices").change(function() {
                Elerium.ProjectModerationQueue.populateEditorFromFileReasonChoice($("#field-project-file-status-reason-choices"));
            });

            $("#form-field-project-status-reason-choices").change(function() {
                Elerium.ProjectModerationQueue.populateEditorFromProjectReasonChoice($("#field-project-status-reason-choices"));
            });

            $(".select-all-project-files").click(function() {
                var $checkboxes = $(".project-file-listing input:not([disabled])");

                if ($(this).is(":checked")) {
                    $checkboxes.prop("checked", true);
                } else {
                    $checkboxes.prop("checked", false);
                }
            });

            $(".select-all-projects").click(function() {
                var $checkboxes = $(".project-listing input:not([disabled])");

                if ($(this).is(":checked")) {
                    $checkboxes.prop("checked", true);
                } else {
                    $checkboxes.prop("checked", false);
                }
            });

            $(".select-acceptable-project-files").click(function () {
                var $checkboxes = $("input[data-include-in-check-all]");

                if ($(this).is(":checked")) {
                    $checkboxes.prop("checked", true);
                } else {
                    $checkboxes.prop("checked", false);
                }
            });

            $(".select-acceptable-projects").click(function () {
                var $checkboxes = $("input[name^='project-item-']");

                if ($(this).is(":checked")) {
                    $checkboxes.prop("checked", true);
                } else {
                    $checkboxes.prop("checked", false);
                }
            });


            Elerium.ProjectModerationQueue.showHideProjectFileReason($("#field-file-status"));
            Elerium.ProjectModerationQueue.showHideProjectReason($("#field-project-status"));
        },
        populateEditorFromFileReasonChoice: function(choices) {
            tinyMCE.get("field-file-status-reason").setContent(choices.find(":selected").data("message"));
        },
        populateEditorFromProjectReasonChoice: function(choices) {
            tinyMCE.get("field-project-status-reason").setContent(choices.find(":selected").data("message"));
        },
        populateFileReasonChoices: function(choices) {
            choices.empty();
            choices.append("<option selected='selected' value='0' data-message=''>—</option>");

            $.getJSON(Elerium.Routes.CPProjectFileReasonChoicesAjax($("#field-file-status").val()), function(data) {
                var items = [];
                var id = 1;

                $.each(data, function(index, element) {
                    items.push($("<option>", { "value": id, "data-message": element.Message }).text(element.Title).wrap("<p>").parent().html());
                    id += 1;
                });

                choices.append(items.join(""));
            });
        },
        populateProjectReasonChoices: function(choices) {
            choices.empty();
            choices.append("<option selected='selected' value='0' data-message=''>—</option>");

            $.getJSON(Elerium.Routes.CPProjectReasonChoicesAjax($("#field-project-status").val()), function(data) {
                var items = [];
                var id = 1;

                $.each(data, function(index, element) {
                    items.push($("<option>", { "value": id, "data-message": element.Message }).text(element.Title).wrap("<p>").parent().html());
                    id += 1;
                });

                choices.append(items.join(""));
            });
        },
        showHideProjectFileReason: function(e) {
            switch (e.val()) {
            case "":
            case this.projectFileStatusApproved:
            case this.projectFileStatusPublishing:
                $("#form-field-file-status-reason").slideUp("fast");
                $("#form-field-project-file-status-reason-choices").hide();
                break;
            default:
                $("#form-field-file-status-reason").slideDown("fast");
                Elerium.ProjectModerationQueue.populateFileReasonChoices($("#field-project-file-status-reason-choices"));
                $("#form-field-project-file-status-reason-choices").show();
                break;
            }
        },
        showHideProjectReason: function(e) {
            switch (e.val()) {
            case "":
            case this.projectStatusApproved:
                $("#form-field-project-status-reason").slideUp("fast");
                $("#form-field-project-status-reason-choices").hide();
                break;
            default:
                $("#form-field-project-status-reason").slideDown("fast");
                Elerium.ProjectModerationQueue.populateProjectReasonChoices($("#field-project-status-reason-choices"));
                $("#form-field-project-status-reason-choices").show();
                break;
            }
        },
    };
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.ProjectTransferOwner = {
        initialize: function () {

            var button = $("#field-submit");

            var hasConfirmed = function (e) {

                if (e.checked) {
                    button.removeAttr("disabled");
                }
                else {
                    button.attr("disabled", "disabled");
                }
            };

            $('#field-confirm').change(function () {
                hasConfirmed(this);
            });

            hasConfirmed($('#field-confirm'));
        },
    };
})(jQuery, Cobalt, Elerium);
;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.Sortable = {
        priority: 3,

        initialize: function () {

            $('[data-sortable-url]').each(function (index) {

                var url = $(this).attr('data-sortable-url');

                if (url == undefined) {
                    return;
                }

                var listing = $(this);

                var table = $(listing).find('table');

                if (table == undefined) {
                    return;
                }

                table.tableDnD({

                    onDragClass: 'dragging',

                    onDrop: function (table, rowDropped) {
                        Elerium.Sortable.sortListing(listing, url);
                    },

                    onAllowDrop: function (draggedRow, dropRow) {

                        var group1 = undefined;
                        var group2 = undefined;

                        if ($(draggedRow).find('[data-sortable-group]') != undefined) {
                            group1 = $(draggedRow).find('[data-sortable-group]').attr('data-sortable-group');
                        }

                        if ($(dropRow).find('[data-sortable-group]') != undefined) {
                            group2 = $(dropRow).find('[data-sortable-group]').attr('data-sortable-group');
                        }

                        return group1 == group2;
                    }
                });
            });
        },

        sortListing: function (listing, url) {

            if (listing == undefined) {
                return;
            }

            if (url == undefined) {

                url = $(listing).attr('data-sortable-url');

                if (url == undefined) {
                    return;
                }
            }

            var table = $(listing).find('table');

            if (table == undefined) {
                return;
            }

            var ids = '';

            table.find('tbody > tr').each(function (index) {

                var id = $(this).find('[data-sortable-id]').attr('data-sortable-id');

                if (id == undefined) {
                    return;
                }

                if (ids != '') {
                    ids += ',';
                }

                ids += id;
            });

            if (ids == '') {
                return;
            }

            Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {

                var myFormData = new FormData();
                myFormData.append("request-verification-token", requestVerificationToken);
                myFormData.append("ids", encodeURI(ids));

                $.ajax({
                    url: url,
                    type: 'POST',
                    processData: false,
                    contentType: false,
                    dataType: 'json',
                    data: myFormData,
                    success: function (data) {
                        if (data == undefined) {
                            return;
                        }

                        if (!data.error) {
                            return;
                        }

                        alert(data.error);
                    },
                    error: function (xhr, ajaxOptions, thrownError) {
                        //NOP
                    }
                })
            });
        }
    };
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.StoreItemListing = {
        priority: 3,
        initialize: function () {
            /*
            Item Listing
            */
            $(document).on("click", "[data-item-checkout]", function () {
                if ($(this).hasClass("disabled")) {
                    return;
                }

                var parent = $(this).parents("[data-item]");
                var itemID = parent.attr("data-item");
                var quantity = parent.find("[data-item-quantity]").val() || 0;
                var dialogClass = $("#dialog").dialog("option", "dialogClass");

                if (quantity == 0 || isNaN(quantity)) {
                    $("<div>")
                        .text("You must specify a quantity greater than zero.")
                        .dialog({
                            modal: true,
                            title: "Invalid Quantity Specified",
                        });

                    return;
                }

                $.get(Elerium.Routes.StoreCheckoutModal(itemID, quantity), function (data) {          
                    $("<div>")
                        .html(data)
                        .dialog({
                            close: function () { $(this).remove(); },
                            dialogClass: 'checkout-dialog',
                            modal: true,
                            minWidth: 550,
                            minHeight: 180,

                        });
                    
                    $("[data-checkout-button]").blur();
                });
                
            });

            /*
            Checkout Modal
            */
            $(document).on("click", '[data-checkout-button]', function () {

                if ($(this).hasClass("disabled")) {
                    return;
                }
                $(this).addClass("disabled");

                $.post($("[data-checkout-form]").attr("action"), $("[data-checkout-form]").serialize(), function (data) {

                    if (data.success) {
                        document.location = data.url;
                    } else {
                        $("[data-checkout-button]").removeClass("disabled");
                        $("[data-checkout-error]").text(data.error);
                    }
                });
            });
        }
    };
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.StoreOrderListing = {
        priority: 3,
        initialize: function () {
            $(function () {
                $('[data-check-all-orders]').click(function () {
                    $('[data-order-checkbox]').attr('checked', this.checked);
                });
            });

            $('[data-update-form]').submit(function (event) {
                var allVals = [];
                $('.listing-body tbody input:checked').each(function () {
                    allVals.push($(this).val());
                });

                if (allVals.length === 0) {
                    alert("You must select at least one order to Fulfill");
                    $("[data-update-form]").attr('action', "");
                    event.preventDefault();
                    return;
                }

                if (!window.confirm('Are you sure you want to set these orders to ' + $('[data-order-status] option:selected').text() + '?')) {
                    event.preventDefault();
                    return;
                }

                var p = "";
                allVals.forEach(function (entry) {
                    p = p + entry.toString() + "-";
                });
                p = p.substring(0, p.length - 1);

                $("[data-order-ids]").val(p);
            });
        }
    };
})(jQuery, Cobalt, Elerium);


;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.StoreTransactionListing = {
        priority: 3,
        initialize: function () {

            var fetchCount = 20;

            var transactions = $("[data-item-transactions]");

            function getFilters() {
                var ordersCB = $("[data-item-filterOrders]:checked").val();
                var awardsCB = $("[data-item-filterAwards]:checked").val();
                var transfersCB = $("[data-item-filterTransfers]:checked").val();

                ordersCB = !isNaN(ordersCB) ? ordersCB : '0';
                awardsCB = !isNaN(awardsCB) ? awardsCB : '0';
                transfersCB = !isNaN(transfersCB) ? transfersCB : '0';

                return parseInt(ordersCB) | parseInt(awardsCB) | parseInt(transfersCB);
            }

            transactions.on("click", "[data-item-toggle]", function () {
                $(this).next().slideToggle("fast");
                $(this).next().next().slideToggle("fast");

                $(this).toggleClass("rolldown-plus");
                $(this).toggleClass("rolldown-minus");
            });

            $("[data-item-moreTransactions-button]").on("click", function (event) {
                var button = $(this);
                var processing = $("[data-item-moreTransactions-button]");

                if (button.attr("disabled")) {
                    return;
                }

                button.attr("disabled", "disabled");
                processing.addClass("loading");

                var count = $("[data-item-listingCount]").val();

                $.ajax({
                    url: Elerium.Routes.StoreTransactionListingAjax(count, fetchCount, getFilters()),
                    datatype: 'html',
                    success: function (data) {
                        count = parseInt(count) + fetchCount;

                        $("[data-item-listingCount]").val(count);
                        transactions.append(data);

                        if (!data) {
                            processing.text("All transactions loaded");
                            processing.addClass("disabled");
                        }
                        else {
                            button.removeAttr("disabled");
                            processing.text("Show More");
                        }

                        processing.removeClass("loading");
                        Cobalt.NiceDates.runNiceDates();
                    },
                    error: function (xhr) {
                        alert(xhr.toString());
                        button.removeAttr("disabled");
                        processing.hide();
                    }
                });
            });

            $("[data-item-filters] input[type=checkbox]").on("click", function (event) {
                var inputs = $("[data-item-filters] input[type=checkbox]");
                var processing = $("[data-item-moreTransactions-button]");

                processing.removeAttr("disabled");

                inputs.attr("disabled", "disabled");
                processing.addClass("loading");

                $.ajax({
                    url: Elerium.Routes.StoreTransactionListingAjax(0, $("[data-item-listingCount]").val(), getFilters()),
                    datatype: 'html',
                    success: function (data) {
                        transactions.html(data);

                        processing.removeClass("loading");
                        inputs.removeAttr("disabled");

                        Cobalt.NiceDates.runNiceDates();
                    },
                    error: function (xhr) {
                        alert(xhr.toString());

                        processing.removeClass("loading");
                        inputs.removeAttr("disabled");
                    }
                });
            });
        }
    };
 })(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.TwitchUserAutoComplete = {

        defaultImageUrl: "https://static-cdn.jtvnw.net/jtv_user_pictures/xarth/404_user_70x70.png",

        initialize: function () {
            algoliasearch('XLUO134HOR', 'aaf0b8830d8a0cafaafd947b360f50ed');
            var client = algoliasearch('XLUO134HOR', 'aaf0b8830d8a0cafaafd947b360f50ed');
            var index = client.initIndex('user');
            
            // Auto complete single user login
            autocomplete('#field-autocomplete-single-channel-input',
                {
                    hint: false
                }, {
                    source: autocomplete.sources.hits(index, { hitsPerPage: 15 }),
                    displayKey: 'login',
                    templates: {
                        suggestion: function (suggestion) {

                            var imageUrl = Elerium.TwitchUserAutoComplete.defaultImageUrl;
                            if (suggestion.profile_image) {
                                imageUrl = suggestion.profile_image;
                            }

                            var image = '<img class="autocomplete-channel-list-img" src="' + imageUrl + '" />';
                            return image + suggestion._highlightResult.login.value;
                        }
                    }
                }).on('autocomplete:selected', function (event, suggestion, dataset) {
                    Elerium.TwitchUserAutoComplete.setAutocompleteSingleID(suggestion);
                })

            // Auto complete list user login
            autocomplete('#field-autocomplete-channel-input',
                {
                    hint: false
                }, {
                    source: autocomplete.sources.hits(index, { hitsPerPage: 15 }),
                    displayKey: 'login',
                    templates: {
                        suggestion: function (suggestion) {
                            var imageUrl = Elerium.TwitchUserAutoComplete.defaultImageUrl;
                            if (suggestion.profile_image) {
                                imageUrl = suggestion.profile_image;
                            }

                            var image = '<img class="autocomplete-channel-list-img" src="' + imageUrl + '" />';
                            return image + suggestion._highlightResult.login.value;
                        }
                    }
                }).on('autocomplete:selected', function (event, suggestion, dataset) {
                    Elerium.TwitchUserAutoComplete.appendToWhitelistedChannel(suggestion);
                })

            // Remove the user on click
            $("#autocomplete-channel-list").on('click', "li", function () {
                $(this).remove();
            });
        },
        appendToWhitelistedChannel: function (val) {
            var channelID = val.objectID;

            var img = $("<img/>").addClass("autocomplete-channel-list-img");
            var imageUrl = Elerium.TwitchUserAutoComplete.defaultImageUrl;

            if (val.profile_image) {
                imageUrl = val.profile_image;
            }

            img.attr("src", imageUrl);

            var login = $("<span/>").addClass("autocomplete-channel-list-text").text(val.login);
            var input = $("<input/>").attr("type", "hidden").attr("name", "campaign[autocomplete_channel_ids][]").attr("multiple", "multiple").val(channelID);
            var li = $("<li/>").addClass("autocomplete-channel-list-item");

            li.append(img);
            li.append(login);
            li.append(input);

            var list = $("#autocomplete-channel-list");
            list.append(li);

            $('#field-autocomplete-channel-input').val("");
        },
        setAutocompleteSingleID: function (val) {
            $("#field-autocomplete-single-channel-output").val(val.objectID);
        }
    };
})(jQuery, Cobalt, Elerium);
;
(function($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.DashboardApps = {

        initialize: function () {
            if (document.getElementById("field-client-secret") !== null && document.getElementById("field-client-secret") !== undefined) {
                document.getElementById("field-client-secret").style.display = "none";

                if (document.getElementById("field-app-form-reset-secret") !== null)
                {
                    document.getElementById("field-app-form-reset-secret").addEventListener("click", Elerium.DashboardApps.handleButtonClick);
                }

                if (document.getElementById("field-app-form-reset-extension-secret") !== null)
                {
                    document.getElementById("field-app-form-reset-extension-secret").addEventListener("click", Elerium.DashboardApps.handleExtensionButtonClick);
                }
                
            }

            if ($("#field-application-category option").filter(":selected").val() === "other") {
                $("#other-field").removeClass("field-hidden");
            }

            if (document.getElementById("field-application-category") !== null && document.getElementById("field-application-category") !== undefined) {
                document.getElementById("field-application-category").addEventListener("change", Elerium.DashboardApps.handleApplicationCategoryClick);
            }
        },
        handleButtonClick: function (event) {
            if (confirm("Are you sure you want to regenerate your secret? This will immediately deactivate your existing secret.")) {
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    Elerium.DashboardApps.submitAppResetSecret(requestVerificationToken, Elerium.Routes.DashboardDeveloperAppResetSecret(AppID));
                });
            }
        },
        handleExtensionButtonClick: function (event) {
            if (confirm("Are you sure you want to regenerate your secret? This will immediately deactivate your existing secret.")) {
                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    var appID = $(event.target).is(":button") ? event.target.dataset.appid : event.target.parentElement.dataset.appid;
                    Elerium.DashboardApps.submitAppResetSecret(requestVerificationToken, Elerium.Routes.DashboardExtensionResetSecret(appID));
                });
            }
        },
        submitAppResetSecret: function (requestVerificationToken, endpointUrl) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);

            $.ajax({
                url: endpointUrl,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    if (data.Status == "success") {
                        document.getElementById("field-client-secret").value = data.Secret;
                        document.getElementById("field-client-secret").style.display = "initial";
                    } else {
                        console.log("Failed to fetch secret.");
                        console.log(data);
                    }
                }
            });
        },
        handleApplicationCategoryClick: function (event) {
            var field = document.getElementById("other-field");
            if (event.target.value == "other") {
                field.classList.remove("field-hidden");
            } else {
                field.classList.add("field-hidden");
            }
        }
    };
})(jQuery, Cobalt, Elerium);
;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.CompanyHelper = {

        initialize: function () {
            var attachableItems = document.getElementsByClassName("role-user-delete");
            for (var i = 0; i < attachableItems.length; i++) {
                attachableItems[i].addEventListener("click", Elerium.CompanyHelper.handleRemoveRoleClick);
            }
        },
        handleRemoveRoleClick: function (event) {
            event.preventDefault();

            if (confirm(Elerium.Localization.Elerium.Developer.AreYouSureRemoveRole(event.target.dataset["name"]))) {

                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    Elerium.CompanyHelper.submitRemovePermission(event.target, event.target.dataset["id"], requestVerificationToken);
                });
            }
        },
        submitRemovePermission: function(userElement, userID, requestVerificationToken) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);

            $.ajax({
                url: Elerium.Routes.DeveloperCompanyDeleteUserPermission(userID),
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    if (data.Status == "success") {
                        var ulParent = userElement.parentElement.parentElement;
                        ulParent.removeChild(userElement.parentElement);

                        if (ulParent.getElementsByTagName('li').length <= 0) {
                            //No children left, render the no items div
                            var items = ulParent.getElementsByClassName("role-user-none");
                            for (var i = 0; i < items.length; i++) {
                                items[i].style.display = "inherit";
                            }

                        }
                    }
                    else if (data.Status == "deleteown") {
                        alert("Cannot delete yourself");
                    } else {
                        alert("Error deleting role");
                    }
                }
            });
        }
    };
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.Dashboard = {
        initialize: function () {
            $('[data-action="signup-for-extensions"]').click(Elerium.Dashboard.bindSubmitExtensionsForm);
        },
        bindSubmitExtensionsForm: function (e) {
            var $button = $(this);
            var returnUrl = $button.attr("data-action-return-url");
            $button.mask();

            e.preventDefault();
            Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                Elerium.Dashboard.submitForTIMSInvite(Elerium.Routes.DashboardSignUpForTIMS(), returnUrl, $button, requestVerificationToken);
            });
        },
        submitForTIMSInvite: function(url, returnUrl, button, requestVerificationToken) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);

            $.ajax({
                url: url,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    window.location.replace(returnUrl);
                }
            });
        },
    }
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, undefined) {
    "use strict";

    Elerium.TwitchNurture = {
        initialize: function () {
            //Intialize google analytics
            (function (i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function () {
                    (i[r].q = i[r].q || []).push(arguments);
                }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                    m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m);
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

            ga('create', 'UA-23719667-9', 'auto', { 'name': 'nutureTracking' });

            var createExtensionButton = $('[data-action="create-extension"]');
            createExtensionButton.on('mousedown', function (event) {
                Elerium.TwitchNurture.sendButtonClick('Register Extension', event);
                Elerium.TwitchNurture.sendButtonClick('user_clicked_create_extension_button', event);
            });

            var startOnboardingButton = $('[data-action="signup-for-extensions"]');
            startOnboardingButton.on('mousedown', function (event) {
                Elerium.TwitchNurture.sendButtonClick('Start TIMS Onboarding Process', event);
            });

            var configureDropsButton = $('[data-action="configure-drops-settings"]');
            configureDropsButton.on('mousedown', function (event) {
                Elerium.TwitchNurture.sendButtonClick('Configure Drops Settings', event);
            });

            var createDropsButton = $('[data-action="create-drops-campaign"]');
            createDropsButton.on('mousedown', function (event) {
                Elerium.TwitchNurture.sendButtonClick('Create Drops Process Start', event);
            });

            var submitDropsButton = $('[data-action="submit-drops-campaign"]');
            submitDropsButton.on('mousedown', function (event) {
                Elerium.TwitchNurture.sendButtonClick('Create Drops Process Complete', event);
            });

            var registerGameButton = $('[data-action="register-game"]');
            registerGameButton.on('mousedown', function (event) {
                Elerium.TwitchNurture.sendButtonClick('Registered Game', event);
            });

            var uploadBoxArtButton = $('[data-action="upload-box-art"]');
            uploadBoxArtButton.on('mousedown', function (event) {
                Elerium.TwitchNurture.sendButtonClick('Uploaded Box Art', event);
            });

            var twitchNurtureButtons = $('[data-action="nurture"]');
            twitchNurtureButtons.on('mousedown', function (event) {
                //Since span is auto injected into buttons created via Form, we need to check for the parent to get the data elements
                var target = event.target;
                if ((target.dataset.title == undefined || target.dataset.title == null) && target.parentElement.dataset.title != null && target.parentElement.dataset.title != undefined) {
                    target = target.parentElement;
                }

                if (target.dataset.name == null && target.dataset.id == null) {
                    Elerium.TwitchNurture.sendButtonClick(target.dataset.title, event);
                }
                else
                {
                    if (target.dataset.name != null && target.dataset.id != null)
                    {
                        Elerium.TwitchNurture.sendButtonClickWithData(target.dataset.title, event, { name: target.dataset.name, dataid: target.dataset.id });
                    }
                    else if (target.dataset.name != null)
                    {
                        Elerium.TwitchNurture.sendButtonClickWithData(target.dataset.title, event, { name: target.dataset.name });
                    }
                    else
                    {
                        Elerium.TwitchNurture.sendButtonClickWithData(target.dataset.title, event, { dataid: target.dataset.id });
                    }
                }
            });

            // Nurture V2, with less conflicting names
            // data-nurture is the title of the button click
            // data-nurture-data is a json blob to send along
            var twitchNurtureButtonsv2 = $('[data-nurture]');
            twitchNurtureButtonsv2.on('mousedown', function (event) {
                //Since span is auto injected into buttons created via Form, we need to check for the parent to get the data elements
                var target = event.target;
                if ((target.dataset.nurture == undefined || target.dataset.nurture == null) && target.parentElement.dataset.nurture != null && target.parentElement.dataset.nurture != undefined) {
                    target = target.parentElement;
                }

                if (target.dataset.nurtureData == null) {
                    Elerium.TwitchNurture.sendButtonClick(target.dataset.nurture, event);
                }
                else {
                    Elerium.TwitchNurture.sendButtonClickWithData(target.dataset.nurture, event, { name: JSON.parse(target.dataset.nurtureData) });
                }
            });

            var twitchNurtureButtons = $('[data-action="nurture-event"]');
            twitchNurtureButtons.on('mousedown', function (event) {
                //Since span is auto injected into buttons created via Form, we need to check for the parent to get the data elements
                var target = event.target;
                if ((target.dataset.title == undefined || target.dataset.title == null) && target.parentElement.dataset.title != null && target.parentElement.dataset.title != undefined) {
                    target = target.parentElement;
                }

                Elerium.TwitchNurture.sendSpadeEleriumEvent(target.dataset.title, target.dataset.detail, target.dataset.data);
            });

            var roleDialog = $(".ui-dialog");
            roleDialog.on("dialogbeforeclose", function (event, ui) {
                Elerium.TwitchNurture.sendButtonClick("Cancelled RBAC Modal", null);
            });

        },
        sendButtonClickWithData: function (buttonName, event, data) {
            if (event == null || event.which <= 2) {
                ga('nutureTracking.send', 'event', buttonName, 'click');
                Cobalt.Utils.sendSpadeEvent(buttonName, null, data);
            }
        },
        sendButtonClick: function (buttonName, event) {
            Elerium.TwitchNurture.sendButtonClickWithData(buttonName, event, null);
        },

        sendSpadeEleriumEvent: function (eventName, eventDetail, eventData) {
            ga('nutureTracking.send', 'event', eventName, 'elerium-event');
            Cobalt.Core.withRequestVerificationToken(function (requestVerificationToken) {
                Elerium.TwitchNurture.sendSpadeEleriumEventCallback(requestVerificationToken, eventName, eventDetail, eventData);
            });
        },
        sendSpadeEleriumEventCallback: function (requestVerificationToken, eventName, eventDetail, eventData) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);
            myFormData.append("event-name", eventName);
           
            if (eventDetail != null) {
                myFormData.append("event-detail", eventDetail);
            }

            if (eventData != null) {
                myFormData.append("event-data", eventData);
            }

            $.ajax({
                url: Elerium.Routes.Instance.EleriumSpadeReportingReportEleriumEvent(),
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                global: false, //Disable 'handleAjaxError' handler so that we do not pop up errors to the end user.
                success: function (data) {
                    //NOP
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    //NOP
                }
            })
        }
    }
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.DataTransfer = {
        rewardCookieName: "Elerium.AwardStoreAlert",
        priority: 3,
        initialize: function () {
            //NOOP
        }
    };
})(jQuery, Cobalt, Elerium);


;
(function ($, Cobalt, undefined) {
    "use strict";

    Elerium.Analytics = {
        initialize: function () {
            //Intialize google analytics
            (function (i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function () {
                    (i[r].q = i[r].q || []).push(arguments);
                }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                    m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m);
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

            ga('create', 'UA-389142-3', 'auto');
            ga('create', Cobalt.Analytics.trackingId, 'auto', { 'name': 'siteSpecificEventStats' });

            // Download Twitch Button
            var downloadTwitchButton = $('[data-action="download-twitch"]');
            downloadTwitchButton.on('click', function () {
                ga('send', 'event', 'Twitch App Download', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Twitch App Download', 'click');
                Cobalt.Utils.sendSpadeEvent('Twitch App Download');
            });

            // Start Project Button on home pages
            var startProjectButton = $('[data-target="project-start"]');
            startProjectButton.on('click', function () {
                ga('send', 'event', 'Start Your Project', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Start Your Project', 'click');
                Cobalt.Utils.sendSpadeEvent('Start Your Project');
            });

            // Browse Project Button on home pages
            var browseProjectsButton = $('[data-action="browse-projects"]');
            browseProjectsButton.on('click', function () {
                ga('send', 'event', 'Browse Projects', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Browse Projects', 'click');
                Cobalt.Utils.sendSpadeEvent('Browse Projects');
            });

            // Download Project Button
            var downloadButton = $('[data-action="download-project"]');
            downloadButton.on('click', function () {
                var values = $(this).data('action-value');
                ga('send', 'event', 'Initiated Project Download', 'click', values.ProjectName, values.ProjectID);
                ga('siteSpecificEventStats.send', 'event', 'Initiated Project Download', 'click', values.ProjectName, values.ProjectID);
                Cobalt.Utils.sendSpadeEvent('Initiated Project Download', null, values);
            });

            // Install Project BUtton
            var installButton = $('[data-action="install-project"]');
            installButton.on('click', function () {
                var values = $(this).data('action-value');
                ga('send', 'event', 'Initiated Project Install', 'click', values.ProjectName, values.ProjectID);
                ga('siteSpecificEventStats.send', 'event', 'Initiated Project Install', 'click', values.ProjectName, values.ProjectID);
                Cobalt.Utils.sendSpadeEvent('Initiated Project Install', null, values);
            });

            // Download File Button
            var downloadFileButton = $('[data-action="download-file"]');
            downloadFileButton.on('click', function () {
                var values = $(this).data('action-value');
                ga('send', 'event', 'Initiated File Download', 'click', values.ProjectName, values.ProjectFileID);
                ga('siteSpecificEventStats.send', 'event', 'Initiated File Download', 'click', values.ProjectName, values.ProjectFileID);
                Cobalt.Utils.sendSpadeEvent('Initiated File Download', null, values);
            });

            // Install File Button
            var installFileButton = $('[data-action="install-file"]');
            installFileButton.on('click', function () {
                var values = $(this).data('action-value');
                ga('send', 'event', 'Initiated File Install', 'click', values.ProjectName, values.ProjectFileID);
                ga('siteSpecificEventStats.send', 'event', 'Initiated File Install', 'click', values.ProjectName, values.ProjectFileID);
                Cobalt.Utils.sendSpadeEvent('Initiated File Install', null, values);
            });

            // Clicked on Game Card
            var gameBoxartCard = $('[data-action="click-game-card"]');
            gameBoxartCard.on('click', function (e) {
                var values = $(this).data('action-value');
                ga('send', 'event', 'Clicked Box Art', 'click', values.Name, values.DataID);
                ga('siteSpecificEventStats.send', 'event', 'Clicked Box Art', 'click', values.Name, values.DataID);
                Cobalt.Utils.sendSpadeEvent("Clicked Box Art", null, values);
            });

            // Clicked on Sign up for CurseForge
            var signupForCurseForgeButton = $('[data-action="signup-curseforge-homepage-button"]');
            signupForCurseForgeButton.on('click', function (e) {
                ga('send', 'event', 'Signup For CurseForge Button', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Signup For CurseForge Button', 'click');
                Cobalt.Utils.sendSpadeEvent("Signup For CurseForge Button", null, null);
            });

            // Clicked on Join Rewards Program
            var joinRewardsProgramButton = $('[data-action="joined-rewards-program"]');
            joinRewardsProgramButton.on('click', function (e) {
                ga('send', 'event', 'Join Rewards Program', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Join Rewards Program', 'click');
                Cobalt.Utils.sendSpadeEvent("Join Rewards Program", null, null);
            });

            // Clicked on Become An Author
            var becomeAuthorNav = $('[data-action="become-author-nav"]');
            becomeAuthorNav.on('click', function (e) {
                ga('send', 'event', 'Become An Atuhor Nav Link', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Become An Atuhor Nav Link', 'click');
                Cobalt.Utils.sendSpadeEvent("Become An Atuhor Nav Link", null, null);
            });

            // Clicked on Author Portal
            var authorPortalNav = $('[data-action="author-portal-nav"]');
            authorPortalNav.on('click', function (e) {
                ga('send', 'event', 'Author Portal Nav Link', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Author Portal Nav Link', 'click');
                Cobalt.Utils.sendSpadeEvent("Author Portal Nav Link", null, null);
            });

            // Clicked on Signup for CurseForge Ad
            var signupAdbox = $('[data-action="signup-curseforge-adbox"]');
            signupAdbox.on('click', function (e) {
                ga('send', 'event', 'Clicked Signup Ad', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Clicked Signup Ad', 'click');
                Cobalt.Utils.sendSpadeEvent("Clicked Signup Ad", null, null);
            });

            // Clicked on License Help Link
            var needHelpLicenseLink = $('[data-action="need-license-help"]');
            needHelpLicenseLink.on('click', function (e) {
                ga('send', 'event', 'Need License Help', 'click');
                ga('siteSpecificEventStats.send', 'event', 'Need License Help', 'click');
                Cobalt.Utils.sendSpadeEvent("Need License Help", null, null);
            });
        }

    }
})(jQuery, Cobalt, Elerium);
;
(function ($, Cobalt, undefined) {
    "use strict";

    Elerium.AdResize = {
        initialize: function () {
            var windowWidth = window.innerWidth;
			if (windowWidth < 1024) {
                var atfAd = $("#cdm-zone-02");
                var btfAd = $("#cdm-zone-03");
			    var skinAd = $("#cdm-zone-skin");
				if (atfAd) {
                    atfAd.attr('id', "cdm-zone-00");
				}
				if (btfAd) {
                    btfAd.attr('id', 'cdm-zone-00');
                }

                if (skinAd) {
                    skinAd.attr('id', 'cdm-zone-00');
                }
			}
        }
    }
})(jQuery, Cobalt, Elerium);
;

(function ($, Cobalt, Elerium, global, undefined) {
    "use strict";
    Elerium.Navbar = {
        initialize: function() {
            Elerium.Navbar.slideout = new global.Slideout({
                panel: document.getElementById('site'),
                menu: document.getElementsByClassName('curseforge--slideout')[0],
                padding: 256,
                tolerance: 70,
                side: 'right'
            });
            Elerium.Navbar.slideout
                .on('open',
                    function() {
                        this.panel.addEventListener('click', Elerium.Navbar.close);
                        $('body').addClass('slideout-open--right');
                    })
                .on('beforeclose',
                    function() {
                        this.panel.removeEventListener('click', Elerium.Navbar.close);
                    })
                .on('close',
                    function() {
                        $('body').removeClass('slideout-open--right');
                    });
            $('.curseforge--nav .menu-icon').on('click', Elerium.Navbar.open);
            $('[data-navbar-dropdown-button]').on('click', Elerium.Navbar.toggleDropdown);
        },
        open: function(e) {
            Elerium.Navbar.slideout.toggle();
        },
        close: function(e) {
            event.preventDefault();
            Elerium.Navbar.slideout.close();
        },
        toggleDropdown: function (e) {
            var cardContainer = $("[data-user-card-container]");
            var navbar = $(".curseforge--nav");
            var button = $("[data-navbar-dropdown-button]");

            var dropdownState = cardContainer.data('user-card-container');
            if (dropdownState === "open") {
                cardContainer.removeClass("top_nav-dropdown--open");
                cardContainer.addClass("top-nav-dropdown--closed");
                cardContainer.data('user-card-container', 'closed');
                button.removeClass("open");
                button.addClass('closed');
                navbar.off('mouseleave');
            } else {
                cardContainer.addClass("top_nav-dropdown--open");
                cardContainer.removeClass("top-nav-dropdown--closed");
                cardContainer.data('user-card-container', 'open');
                button.removeClass("closed");
                button.addClass('open');
                navbar.on('mouseleave', Elerium.Navbar.toggleDropdown);

            }
        },
        slideout: undefined
};


})(jQuery, Cobalt, Elerium, window || this);;
(function ($, Cobalt, Elerium, global) {
  Elerium.Notifications = {
    notificationsOpen: false,
    initialize: function() {
      Elerium.Notifications.setupNotificationBell();
      $(document).on('click', '[data-target="notification-item"]', function() {
        var url = $(this).attr('data-mark-as-read-url');
        Elerium.Notifications.acknowledgeNotification(url);
      });
      $(document).on('click', '[data-target="notification-mark-as-read"]', function() {
        var url = $(this).attr('data-mark-as-read-url');
        Elerium.Notifications.acknowledgeNotification(url);
      });
    },
    setupNotificationBell: function() {
      $('[data-target="notification-bell"]').on('click', function(ev) {
        if (Elerium.Notifications.notificationsOpen) {
          Elerium.Notifications.closeNotifications();
        } else {
          Elerium.Notifications.loadNotifications();
        }
      });
    },
    loadNotifications: function() {
      var notificationURL = $('[data-target="notification-bell"]').attr('data-notification-list-url');
      $.get(notificationURL, function(results) {
        var container = document.createElement("div");
        container.className = "absolute z-20 notification__list box";
        container.innerHTML = results;
        $('[data-target="notification-list"]').html(container);
        Elerium.Notifications.notificationsOpen = true;
      });
    },
    closeNotifications: function() {
      $('[data-target="notification-list').empty();
      Elerium.Notifications.notificationsOpen = false;
    },
    acknowledgeNotification: function(acknowledgeURL) {
      var requestVerificationToken = $.cookie("RequestVerificationToken");
      if (requestVerificationToken) {
        $.post(acknowledgeURL, { 'request-verification-token': requestVerificationToken }, function() { $('[data-target="notification-count"]').remove(); });
      } else {
          $.ajax({
              url: "/refresh-request-verification-token",
              type: 'POST',
              dataType: 'json',
              success: function() {
                  $.post(acknowledgeURL, { 'request-verification-token': $.cookie("RequestVerificationToken") }, function () { $('[data-target="notification-count"]').remove(); });
              }
          });
      }
    }
  }
})(jQuery, Cobalt, Elerium, window || this);;

(function ($, Cobalt, Elerium, global, undefined) {
    "use strict";

    Elerium.ListingSlideout = {
        initialize: function() {
            Elerium.ListingSlideout.slideout = new global.Slideout({
                panel: document.getElementById('site'),
                menu: document.getElementsByClassName('slideout--listing')[0],
                padding: 256,
                tolerance: 70,
                side: 'left',
                touch: false
            });
            Elerium.ListingSlideout.slideout
                .on('open',
                    function() {
                        this.panel.addEventListener('click', Elerium.ListingSlideout.close);
                        $('body').addClass('slideout-open--left');
                    })
                .on('beforeclose',
                    function() {
                        this.panel.removeEventListener('click', Elerium.ListingSlideout.close);
                    })
                .on('close',
                    function() {
                        $('body').removeClass('slideout-open--left');
                    });
            $('.listing-header__menu-button').on('click', Elerium.ListingSlideout.open);
        },
        open: function(e) {
            Elerium.ListingSlideout.slideout.toggle();
        },
        close: function(e) {
            event.preventDefault();
            Elerium.ListingSlideout.slideout.close();
        },
        slideout: undefined,
}

})(jQuery, Cobalt, Elerium, window || this);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.CategoryList = {
        initialize: function () {
            $(".game-category-listing .category__item").on('click', Elerium.CategoryList.openCategory);
            $(".category__triangle").on('click', Elerium.CategoryList.toggleCategory);
        },
        openCategory: function (e) {
            if ($(this).data('root') === 'True' && !$(this).data('category-open')) {
                e.preventDefault();
                var categoryName = $(this).data('category');
                var child = $('.tier-holder[data-category="' + categoryName + '"');
                $(child).removeClass('hidden');
                $(this).addClass('category--open');
                $(this).data('category-open', 'true');
            }
        },

        toggleCategory: function (e) {
            var categoryParent = $(this).closest('.category__item');
            if (categoryParent.data('root') === 'True') {
                e.preventDefault();
                var categoryName = categoryParent.data('category');
                var child = $('.tier-holder[data-category="' + categoryName + '"');
                if (categoryParent.data('category-open') == 'false' || !categoryParent.data('category-open')) 
                {
                    $(child).removeClass('hidden');
                    categoryParent.addClass('category--open');
                    categoryParent.data('category-open', 'true');
                }
                else
                {
                    $(child).addClass('hidden');
                    categoryParent.removeClass('category--open');
                    categoryParent.data('category-open', 'false');
                }
            }
        }
    }
})(jQuery, Cobalt, Elerium);;
(function($, Cobalt, Elerium, undefined) {
    Elerium.CategoryListV2 = {
        initialize: function () {
            $(".category-list-item[data-has-child='true']").on('mouseenter', Elerium.CategoryListV2.toggleCategory);
            $(".category-list-item[data-has-child='true']").on('mouseleave', Elerium.CategoryListV2.toggleCategory);
            $("[data-value='category-link']").on('click', Elerium.CategoryListV2.appendVersionFilter);
        },
        toggleCategory: function (e) {
            var menu = $(this).find('.category-list-item__submenu');
            if ($(menu).hasClass('hidden')) {
	            $(menu).removeClass('hidden');
            } else {
	            $(menu).addClass('hidden');
            }
        },
        appendVersionFilter: function (e) {
            var version = Elerium.CategoryListV2.getUrlVars()["filter-game-version"];
            if (version) {
                var link = $(this);
                var _href = link.attr("href");
                link.attr("href", _href + '?filter-game-version=' + version);

                var filter = Elerium.CategoryListV2.getUrlVars()["filter-sort"];
                if (filter) {
                    _href = link.attr("href");
                    link.attr("href", _href + '&filter-sort=' + filter);
                }

            }
        },
        getUrlVars: function () {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
    }
})(jQuery, Cobalt, Elerium);;
(function($, Cobalt, Elerium, undefined) {
    Elerium.Dropdown = {
        initialize: function() {
	        $(".dropdown").on('click', Elerium.Dropdown.toggle);
        },
        toggle: function(e) {
            var tail = $(this).siblings('.dropdown-tail');
            if ($(tail).hasClass('hidden')) {
	            $(tail).removeClass('hidden');
            } else {
	            $(tail).addClass('hidden');
            }
            $(document).click(function (event) {
                $target = $(event.target);
                if (!$target.closest('.dropdown').length &&
                    !$(tail).hasClass('hidden')) {
                    $(tail).addClass('hidden');
                }
            });
        }
    }
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    Elerium.SearchV2 = {
        initialize: function() {
            $('[data-target="category-select"]').on('change', Elerium.SearchV2.SelectListingChange)
        },
        SelectListingChange: function (event) {
            var value = event.currentTarget.value;
            var params = new URLSearchParams(window.location.search);
            console.log(params);
            $('[data-target="category-form"]').submit();
        }
    }
})(jQuery, Cobalt, Elerium);;
(function (jQuery, Cobalt, Elerium, undefined) {
    Elerium.CreateProject = {
        firstLoad: true,
        noInitialLoad: false,
        initialize: function () {
            $('[data-target="category-container"]').addClass('hidden');
            var $gameSelector = $('[data-target="search-game"]');
            var $categorySearch = $('[data-target="search-category"]');

            $gameSelector.select2({
                placeholder: Elerium.Localization.Elerium.Project.PleaseSelectAGame(),
            });
            $gameSelector.on('change', (ev) => {
                Elerium.CreateProject.fetchCategories(ev.currentTarget.value);
            });
            $categorySearch.on('change', function (ev) {
                Elerium.CreateProject.fetchCreateForm(ev.currentTarget.value);
            });

            Elerium.CreateProject.selectionMessage(Elerium.Localization.Elerium.Project.PleaseSelectAGame);

            if (Elerium.CreateProject.GameID) {
                $gameSelector.select2("val", Elerium.CreateProject.GameID).trigger('change');          
                Elerium.CreateProject.selectionMessage(Elerium.Localization.Elerium.Project.LoadingCategories);
            }
        },
        fetchCategories: function (gameID) {
            Elerium.CreateProject.selectionMessage(Elerium.Localization.Elerium.Project.LoadingCategories);
            if (!Elerium.CreateProject.noInitialLoad) {
                $('[data-target="create-form-container"]').mask();
            }
            $.ajax({
                url: Elerium.Routes.GamesRootCategoriesForGame(gameID),
                success: (data) => {
                    Elerium.CreateProject.hydrateCategorySelection(data.results);
                }
            })
        },
        hydrateCategorySelection: function (categories) {
            if (categories.length) {
                if (categories.length > 1) {
                    Elerium.CreateProject.selectionMessage(Elerium.Localization.Elerium.Project.PleaseSelectACategory);
                    $('[data-target="create-form-container"]').unmask();
                    $categorySearch = $('[data-target="search-category"]');
                    $('[data-target="category-container"]').removeClass('hidden');
                    $categorySearch.select2({
                        placeholder: Elerium.Localization.Elerium.Project.SelectCategory(),
                        data: categories
                    });


                    if (Elerium.CreateProject.CategoryID && Elerium.CreateProject.firstLoad) {
                        if (categories.some(c => String(c.id) === Elerium.CreateProject.CategoryID)) {
                            if (!Elerium.CreateProject.noInitialLoad) {
                                $categorySearch.select2('val', Elerium.CreateProject.CategoryID).trigger('change');
                            } else {
                                $categorySearch.select2('val', Elerium.CreateProject.CategoryID);
                            }
                        }
                    }
                } else {
                    $categorySearch = $('[data-target="search-category"]');
                    $categorySearch.select2('val', '');
                    $('[data-target="category-container"]').addClass('hidden');
                    if (!Elerium.CreateProject.noInitialLoad) {
                        Elerium.CreateProject.fetchCreateForm(categories[0].id);
                    }
                }
                Elerium.CreateProject.noInitialLoad = false;
                Elerium.CreateProject.firstLoad = false;
            }
        },
        fetchCreateForm: function (categoryId) {   
            $('[data-target="create-form-container"]').mask();
            Cobalt.TinyMCE.removeEditor($('[data-target="project-description"]'));
            Cobalt.TinyMCE.removeEditor($('[data-project-license-body="custom"]'));
            Elerium.CreateProject.selectionMessage(Elerium.Localization.Elerium.Project.LoadingProjectCreation);
            $.ajax({
                url: Elerium.Routes.HomeSiteProjectGetCreateForm(categoryId),
                timeout: 60000,

            }).done((data) => {
                if (data.success) {
                    $('[data-target="create-form"]').html(data.html);
                    Cobalt.triggerHtmlInsert($('[data-target="create-form"]'));
                    Elerium.ProjectEdit.initialize();
                    Elerium.ChunkedFileUpload.initialize();
                    Elerium.ProjectFile.initialize();
                }
                Elerium.CreateProject.firstLoad = false;
                $('[data-target="create-form-container"]').unmask();
            });
        },
        selectionMessage: function (text) {
            if (!Elerium.CreateProject.noInitialLoad) {
                var textArea = $('[data-target="selection-message"]');

                if (textArea.length === 0) {
                    $('[data-target="create-form"]').html('<p data-target="selection-message" class="text-xl font-bold text-center"></p>');
                    textArea = $('[data-target="selection-message"]');
                }

                textArea.text(text);
            }
        }
    }
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
    "use strict";

    Elerium.PublicProjectDownload = {
        initialize: function() {
            Elerium.PublicProjectDownload.downloadText = $("p[data-countdown-timer]");
            Elerium.PublicProjectDownload.downloadSeconds = $("span[data-countdown-seconds]");

            Elerium.PublicProjectDownload.downloadSeconds.data('countdown-seconds',
                Elerium.PublicProjectDownload.downloadInterval);
        },

        downloadFile: function(url) {
            window.setTimeout(function() {
                    window.location = url;
            }, 500);
        },
        countdown: function (url) {
            Elerium.PublicProjectDownload.downloadUrl = url;

            var interval = setInterval(function () {
                var current = parseInt(Elerium.PublicProjectDownload.downloadSeconds.data('countdown-seconds'));
                current--;
                Elerium.PublicProjectDownload.downloadSeconds.text(current);
                Elerium.PublicProjectDownload.downloadSeconds.data('countdown-seconds', current);
                if (current <= 0) {
                    clearInterval(interval);
                    Elerium.PublicProjectDownload.downloadText.text('Downloading now...');
                    Elerium.PublicProjectDownload.downloadFile(url);
                }               
            }, 1000);           
        },
        downloadInterval: 5,
        downloadText: undefined,
        downloadSeconds: undefined,
        downloadUrl: ''
};
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, undefined) {
    "use strict";

    Elerium.CPClientIntegrationGameManage = {
        initialize: function () {
            
            var assetDeleteButton = $('.remove-button');
            assetDeleteButton.on('click', function (event) {
                Elerium.CPClientIntegrationGameManage.handleDelete(event, event.target.parentElement.parentElement.dataset["name"]);
            });

            var gameFileDeleteButton = $('.game-file-delete');
            gameFileDeleteButton.on('click', function (event) {
                Elerium.CPClientIntegrationGameManage.handleDelete(event, "this game file");
            });

            var gameHintDeleteButton = $('.game-hint-delete');
            gameHintDeleteButton.on('click', function (event) {
                Elerium.CPClientIntegrationGameManage.handleDelete(event, "this hint");
            });
        },
        handleDelete: function (event, name) {
            event.preventDefault();

            if (confirm(Elerium.Localization.Elerium.ControlPanel.AreYouSureYouWantToDeleteName(name))) {

                Cobalt.Utils.getRequestVerificationToken().done(function (requestVerificationToken) {
                    Elerium.CPClientIntegrationGameManage.submitDelete(event.target, requestVerificationToken);
                });
            }
        },
        submitDelete: function (userElement, requestVerificationToken) {
            var myFormData = new FormData();
            myFormData.append("request-verification-token", requestVerificationToken);

            $.ajax({
                url: userElement.href || userElement.parentElement.href,
                type: 'POST',
                processData: false,
                contentType: false,
                dataType: 'json',
                data: myFormData,
                success: function (data) {
                    if (data.RedirectUrl && Cobalt.Utils.isUrlCurrentSite(data.RedirectUrl)) {
                        document.location = data.RedirectUrl;
                    }
                    else
                    {
                        $.error(data.Message, "color:red;");
                    }
                }
            });
        }
    }
})(jQuery, Cobalt, Elerium);;
(function ($, Cobalt, Elerium, undefined) {
  Elerium.Upsell = {
    initialize: function() {
      $('[data-target="close-upsell"]').on('click', function() {
        $(this).closest('[data-target="author-upsell"]').hide();
        $.cookie("CurseForge.AuthorUpSell", "true", { expires: 90 });
      });
    }
  }
})(jQuery, Cobalt, Elerium, undefined);;
function atvImg(){function e(e,t,a,r,n,s){var i=l.scrollTop,o=l.scrollLeft,d=t?e.touches[0].pageX:e.pageX,c=t?e.touches[0].pageY:e.pageY,v=a.getBoundingClientRect(),m=a.clientWidth||a.offsetWidth||a.scrollWidth,f=a.clientHeight||a.offsetHeight||a.scrollHeight,h=320/m,g=.52-(d-v.left-o)/m,u=.52-(c-v.top-i)/f,p=c-v.top-i-f/2,y=d-v.left-o-m/2,C=(g-y)*(.07*h),E=(p-u)*(.1*h),I="rotateX("+E+"deg) rotateY("+C+"deg)",N=Math.atan2(p,y),x=180*N/Math.PI-90;0>x&&(x+=360),-1!=a.firstChild.className.indexOf(" over")&&(I+=" scale3d(1.07,1.07,1.07)"),a.firstChild.style.transform=I,s.style.background="linear-gradient("+x+"deg, rgba(255,255,255,"+(c-v.top-i)/f*.4+") 0%,rgba(255,255,255,0) 80%)",s.style.transform="translateX("+g*n-.1+"px) translateY("+u*n-.1+"px)";for(var b=n,L=0;n>L;L++)r[L].style.transform="translateX("+g*b*(2.5*L/h)+"px) translateY("+u*n*(2.5*L/h)+"px)",b--}function t(e,t){t.firstChild.className+=" over"}function a(e,t,a,r,n){var l=t.firstChild;l.className=l.className.replace(" over",""),l.style.transform="",n.style.cssText="";for(var s=0;r>s;s++)a[s].style.transform=""}var r=document,n=r.documentElement,l=r.getElementsByTagName("body")[0],s=window,i=r.querySelectorAll(".atvImg"),o=i.length,d="ontouchstart"in s||navigator.msMaxTouchPoints;if(!(0>=o))for(var c=0;o>c;c++){var v=i[c],m=v.querySelectorAll(".atvImg-layer"),f=m.length;if(!(0>=f)){for(;v.firstChild;)v.removeChild(v.firstChild);var h=r.createElement("div"),g=r.createElement("div"),u=r.createElement("div"),p=r.createElement("div"),y=[];v.id="atvImg__"+c,h.className="atvImg-container",g.className="atvImg-shine",u.className="atvImg-shadow",p.className="atvImg-layers";for(var C=0;f>C;C++){var E=r.createElement("div"),I=m[C].getAttribute("data-img");E.className="atvImg-rendered-layer",E.setAttribute("data-layer",C),E.style.backgroundImage="url("+I+")",p.appendChild(E),y.push(E)}h.appendChild(u),h.appendChild(p),h.appendChild(g),v.appendChild(h);var N=v.clientWidth||v.offsetWidth||v.scrollWidth;v.style.transform="perspective("+3*N+"px)",d?(s.preventScroll=!1,function(r,n,l,i){v.addEventListener("touchmove",function(t){s.preventScroll&&t.preventDefault(),e(t,!0,r,n,l,i)}),v.addEventListener("touchstart",function(e){s.preventScroll=!0,t(e,r)}),v.addEventListener("touchend",function(e){s.preventScroll=!1,a(e,r,n,l,i)})}(v,y,f,g)):!function(r,n,l,s){v.addEventListener("mousemove",function(t){e(t,!1,r,n,l,s)}),v.addEventListener("mouseenter",function(e){t(e,r)}),v.addEventListener("mouseleave",function(e){a(e,r,n,l,s)})}(v,y,f,g)}}};
/*!

 handlebars v1.3.0

Copyright (C) 2011 by Yehuda Katz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

@license
*/
/* exported Handlebars */
var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
  "use strict";
  var __exports__;
  // Build out our basic SafeString type
  function SafeString(string) {
    this.string = string;
  }

  SafeString.prototype.toString = function() {
    return "" + this.string;
  };

  __exports__ = SafeString;
  return __exports__;
})();

// handlebars/utils.js
var __module3__ = (function(__dependency1__) {
  "use strict";
  var __exports__ = {};
  /*jshint -W004 */
  var SafeString = __dependency1__;

  var escape = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;",
    "'": "&#x27;",
    "`": "&#x60;"
  };

  var badChars = /[&<>"'`]/g;
  var possible = /[&<>"'`]/;

  function escapeChar(chr) {
    return escape[chr] || "&amp;";
  }

  function extend(obj, value) {
    for(var key in value) {
      if(Object.prototype.hasOwnProperty.call(value, key)) {
        obj[key] = value[key];
      }
    }
  }

  __exports__.extend = extend;var toString = Object.prototype.toString;
  __exports__.toString = toString;
  // Sourced from lodash
  // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
  var isFunction = function(value) {
    return typeof value === 'function';
  };
  // fallback for older versions of Chrome and Safari
  if (isFunction(/x/)) {
    isFunction = function(value) {
      return typeof value === 'function' && toString.call(value) === '[object Function]';
    };
  }
  var isFunction;
  __exports__.isFunction = isFunction;
  var isArray = Array.isArray || function(value) {
    return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;
  };
  __exports__.isArray = isArray;

  function escapeExpression(string) {
    // don't escape SafeStrings, since they're already safe
    if (string instanceof SafeString) {
      return string.toString();
    } else if (!string && string !== 0) {
      return "";
    }

    // Force a string conversion as this will be done by the append regardless and
    // the regex test will do this transparently behind the scenes, causing issues if
    // an object's to string has escaped characters in it.
    string = "" + string;

    if(!possible.test(string)) { return string; }
    return string.replace(badChars, escapeChar);
  }

  __exports__.escapeExpression = escapeExpression;function isEmpty(value) {
    if (!value && value !== 0) {
      return true;
    } else if (isArray(value) && value.length === 0) {
      return true;
    } else {
      return false;
    }
  }

  __exports__.isEmpty = isEmpty;
  return __exports__;
})(__module4__);

// handlebars/exception.js
var __module5__ = (function() {
  "use strict";
  var __exports__;

  var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];

  function Exception(message, node) {
    var line;
    if (node && node.firstLine) {
      line = node.firstLine;

      message += ' - ' + line + ':' + node.firstColumn;
    }

    var tmp = Error.prototype.constructor.call(this, message);

    // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
    for (var idx = 0; idx < errorProps.length; idx++) {
      this[errorProps[idx]] = tmp[errorProps[idx]];
    }

    if (line) {
      this.lineNumber = line;
      this.column = node.firstColumn;
    }
  }

  Exception.prototype = new Error();

  __exports__ = Exception;
  return __exports__;
})();

// handlebars/base.js
var __module2__ = (function(__dependency1__, __dependency2__) {
  "use strict";
  var __exports__ = {};
  var Utils = __dependency1__;
  var Exception = __dependency2__;

  var VERSION = "1.3.0";
  __exports__.VERSION = VERSION;var COMPILER_REVISION = 4;
  __exports__.COMPILER_REVISION = COMPILER_REVISION;
  var REVISION_CHANGES = {
    1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
    2: '== 1.0.0-rc.3',
    3: '== 1.0.0-rc.4',
    4: '>= 1.0.0'
  };
  __exports__.REVISION_CHANGES = REVISION_CHANGES;
  var isArray = Utils.isArray,
      isFunction = Utils.isFunction,
      toString = Utils.toString,
      objectType = '[object Object]';

  function HandlebarsEnvironment(helpers, partials) {
    this.helpers = helpers || {};
    this.partials = partials || {};

    registerDefaultHelpers(this);
  }

  __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {
    constructor: HandlebarsEnvironment,

    logger: logger,
    log: log,

    registerHelper: function(name, fn, inverse) {
      if (toString.call(name) === objectType) {
        if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); }
        Utils.extend(this.helpers, name);
      } else {
        if (inverse) { fn.not = inverse; }
        this.helpers[name] = fn;
      }
    },

    registerPartial: function(name, str) {
      if (toString.call(name) === objectType) {
        Utils.extend(this.partials,  name);
      } else {
        this.partials[name] = str;
      }
    }
  };

  function registerDefaultHelpers(instance) {
    instance.registerHelper('helperMissing', function(arg) {
      if(arguments.length === 2) {
        return undefined;
      } else {
        throw new Exception("Missing helper: '" + arg + "'");
      }
    });

    instance.registerHelper('blockHelperMissing', function(context, options) {
      var inverse = options.inverse || function() {}, fn = options.fn;

      if (isFunction(context)) { context = context.call(this); }

      if(context === true) {
        return fn(this);
      } else if(context === false || context == null) {
        return inverse(this);
      } else if (isArray(context)) {
        if(context.length > 0) {
          return instance.helpers.each(context, options);
        } else {
          return inverse(this);
        }
      } else {
        return fn(context);
      }
    });

    instance.registerHelper('each', function(context, options) {
      var fn = options.fn, inverse = options.inverse;
      var i = 0, ret = "", data;

      if (isFunction(context)) { context = context.call(this); }

      if (options.data) {
        data = createFrame(options.data);
      }

      if(context && typeof context === 'object') {
        if (isArray(context)) {
          for(var j = context.length; i<j; i++) {
            if (data) {
              data.index = i;
              data.first = (i === 0);
              data.last  = (i === (context.length-1));
            }
            ret = ret + fn(context[i], { data: data });
          }
        } else {
          for(var key in context) {
            if(context.hasOwnProperty(key)) {
              if(data) { 
                data.key = key; 
                data.index = i;
                data.first = (i === 0);
              }
              ret = ret + fn(context[key], {data: data});
              i++;
            }
          }
        }
      }

      if(i === 0){
        ret = inverse(this);
      }

      return ret;
    });

    instance.registerHelper('if', function(conditional, options) {
      if (isFunction(conditional)) { conditional = conditional.call(this); }

      // Default behavior is to render the positive path if the value is truthy and not empty.
      // The `includeZero` option may be set to treat the condtional as purely not empty based on the
      // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
      if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) {
        return options.inverse(this);
      } else {
        return options.fn(this);
      }
    });

    instance.registerHelper('unless', function(conditional, options) {
      return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash});
    });

    instance.registerHelper('with', function(context, options) {
      if (isFunction(context)) { context = context.call(this); }

      if (!Utils.isEmpty(context)) return options.fn(context);
    });

    instance.registerHelper('log', function(context, options) {
      var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
      instance.log(level, context);
    });
  }

  var logger = {
    methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },

    // State enum
    DEBUG: 0,
    INFO: 1,
    WARN: 2,
    ERROR: 3,
    level: 3,

    // can be overridden in the host environment
    log: function(level, obj) {
      if (logger.level <= level) {
        var method = logger.methodMap[level];
        if (typeof console !== 'undefined' && console[method]) {
          console[method].call(console, obj);
        }
      }
    }
  };
  __exports__.logger = logger;
  function log(level, obj) { logger.log(level, obj); }

  __exports__.log = log;var createFrame = function(object) {
    var obj = {};
    Utils.extend(obj, object);
    return obj;
  };
  __exports__.createFrame = createFrame;
  return __exports__;
})(__module3__, __module5__);

// handlebars/runtime.js
var __module6__ = (function(__dependency1__, __dependency2__, __dependency3__) {
  "use strict";
  var __exports__ = {};
  var Utils = __dependency1__;
  var Exception = __dependency2__;
  var COMPILER_REVISION = __dependency3__.COMPILER_REVISION;
  var REVISION_CHANGES = __dependency3__.REVISION_CHANGES;

  function checkRevision(compilerInfo) {
    var compilerRevision = compilerInfo && compilerInfo[0] || 1,
        currentRevision = COMPILER_REVISION;

    if (compilerRevision !== currentRevision) {
      if (compilerRevision < currentRevision) {
        var runtimeVersions = REVISION_CHANGES[currentRevision],
            compilerVersions = REVISION_CHANGES[compilerRevision];
        throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. "+
              "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").");
      } else {
        // Use the embedded version info since the runtime doesn't know about this revision yet
        throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. "+
              "Please update your runtime to a newer version ("+compilerInfo[1]+").");
      }
    }
  }

  __exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial

  function template(templateSpec, env) {
    if (!env) {
      throw new Exception("No environment passed to template");
    }

    // Note: Using env.VM references rather than local var references throughout this section to allow
    // for external users to override these as psuedo-supported APIs.
    var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {
      var result = env.VM.invokePartial.apply(this, arguments);
      if (result != null) { return result; }

      if (env.compile) {
        var options = { helpers: helpers, partials: partials, data: data };
        partials[name] = env.compile(partial, { data: data !== undefined }, env);
        return partials[name](context, options);
      } else {
        throw new Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
      }
    };

    // Just add water
    var container = {
      escapeExpression: Utils.escapeExpression,
      invokePartial: invokePartialWrapper,
      programs: [],
      program: function(i, fn, data) {
        var programWrapper = this.programs[i];
        if(data) {
          programWrapper = program(i, fn, data);
        } else if (!programWrapper) {
          programWrapper = this.programs[i] = program(i, fn);
        }
        return programWrapper;
      },
      merge: function(param, common) {
        var ret = param || common;

        if (param && common && (param !== common)) {
          ret = {};
          Utils.extend(ret, common);
          Utils.extend(ret, param);
        }
        return ret;
      },
      programWithDepth: env.VM.programWithDepth,
      noop: env.VM.noop,
      compilerInfo: null
    };

    return function(context, options) {
      options = options || {};
      var namespace = options.partial ? options : env,
          helpers,
          partials;

      if (!options.partial) {
        helpers = options.helpers;
        partials = options.partials;
      }
      var result = templateSpec.call(
            container,
            namespace, context,
            helpers,
            partials,
            options.data);

      if (!options.partial) {
        env.VM.checkRevision(container.compilerInfo);
      }

      return result;
    };
  }

  __exports__.template = template;function programWithDepth(i, fn, data /*, $depth */) {
    var args = Array.prototype.slice.call(arguments, 3);

    var prog = function(context, options) {
      options = options || {};

      return fn.apply(this, [context, options.data || data].concat(args));
    };
    prog.program = i;
    prog.depth = args.length;
    return prog;
  }

  __exports__.programWithDepth = programWithDepth;function program(i, fn, data) {
    var prog = function(context, options) {
      options = options || {};

      return fn(context, options.data || data);
    };
    prog.program = i;
    prog.depth = 0;
    return prog;
  }

  __exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
    var options = { partial: true, helpers: helpers, partials: partials, data: data };

    if(partial === undefined) {
      throw new Exception("The partial " + name + " could not be found");
    } else if(partial instanceof Function) {
      return partial(context, options);
    }
  }

  __exports__.invokePartial = invokePartial;function noop() { return ""; }

  __exports__.noop = noop;
  return __exports__;
})(__module3__, __module5__, __module2__);

// handlebars.runtime.js
var __module1__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
  "use strict";
  var __exports__;
  /*globals Handlebars: true */
  var base = __dependency1__;

  // Each of these augment the Handlebars object. No need to setup here.
  // (This is done to easily share code between commonjs and browse envs)
  var SafeString = __dependency2__;
  var Exception = __dependency3__;
  var Utils = __dependency4__;
  var runtime = __dependency5__;

  // For compatibility and usage outside of module systems, make the Handlebars object a namespace
  var create = function() {
    var hb = new base.HandlebarsEnvironment();

    Utils.extend(hb, base);
    hb.SafeString = SafeString;
    hb.Exception = Exception;
    hb.Utils = Utils;

    hb.VM = runtime;
    hb.template = function(spec) {
      return runtime.template(spec, hb);
    };

    return hb;
  };

  var Handlebars = create();
  Handlebars.create = create;

  __exports__ = Handlebars;
  return __exports__;
})(__module2__, __module4__, __module5__, __module3__, __module6__);

// handlebars/compiler/ast.js
var __module7__ = (function(__dependency1__) {
  "use strict";
  var __exports__;
  var Exception = __dependency1__;

  function LocationInfo(locInfo){
    locInfo = locInfo || {};
    this.firstLine   = locInfo.first_line;
    this.firstColumn = locInfo.first_column;
    this.lastColumn  = locInfo.last_column;
    this.lastLine    = locInfo.last_line;
  }

  var AST = {
    ProgramNode: function(statements, inverseStrip, inverse, locInfo) {
      var inverseLocationInfo, firstInverseNode;
      if (arguments.length === 3) {
        locInfo = inverse;
        inverse = null;
      } else if (arguments.length === 2) {
        locInfo = inverseStrip;
        inverseStrip = null;
      }

      LocationInfo.call(this, locInfo);
      this.type = "program";
      this.statements = statements;
      this.strip = {};

      if(inverse) {
        firstInverseNode = inverse[0];
        if (firstInverseNode) {
          inverseLocationInfo = {
            first_line: firstInverseNode.firstLine,
            last_line: firstInverseNode.lastLine,
            last_column: firstInverseNode.lastColumn,
            first_column: firstInverseNode.firstColumn
          };
          this.inverse = new AST.ProgramNode(inverse, inverseStrip, inverseLocationInfo);
        } else {
          this.inverse = new AST.ProgramNode(inverse, inverseStrip);
        }
        this.strip.right = inverseStrip.left;
      } else if (inverseStrip) {
        this.strip.left = inverseStrip.right;
      }
    },

    MustacheNode: function(rawParams, hash, open, strip, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "mustache";
      this.strip = strip;

      // Open may be a string parsed from the parser or a passed boolean flag
      if (open != null && open.charAt) {
        // Must use charAt to support IE pre-10
        var escapeFlag = open.charAt(3) || open.charAt(2);
        this.escaped = escapeFlag !== '{' && escapeFlag !== '&';
      } else {
        this.escaped = !!open;
      }

      if (rawParams instanceof AST.SexprNode) {
        this.sexpr = rawParams;
      } else {
        // Support old AST API
        this.sexpr = new AST.SexprNode(rawParams, hash);
      }

      this.sexpr.isRoot = true;

      // Support old AST API that stored this info in MustacheNode
      this.id = this.sexpr.id;
      this.params = this.sexpr.params;
      this.hash = this.sexpr.hash;
      this.eligibleHelper = this.sexpr.eligibleHelper;
      this.isHelper = this.sexpr.isHelper;
    },

    SexprNode: function(rawParams, hash, locInfo) {
      LocationInfo.call(this, locInfo);

      this.type = "sexpr";
      this.hash = hash;

      var id = this.id = rawParams[0];
      var params = this.params = rawParams.slice(1);

      // a mustache is an eligible helper if:
      // * its id is simple (a single part, not `this` or `..`)
      var eligibleHelper = this.eligibleHelper = id.isSimple;

      // a mustache is definitely a helper if:
      // * it is an eligible helper, and
      // * it has at least one parameter or hash segment
      this.isHelper = eligibleHelper && (params.length || hash);

      // if a mustache is an eligible helper but not a definite
      // helper, it is ambiguous, and will be resolved in a later
      // pass or at runtime.
    },

    PartialNode: function(partialName, context, strip, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type         = "partial";
      this.partialName  = partialName;
      this.context      = context;
      this.strip = strip;
    },

    BlockNode: function(mustache, program, inverse, close, locInfo) {
      LocationInfo.call(this, locInfo);

      if(mustache.sexpr.id.original !== close.path.original) {
        throw new Exception(mustache.sexpr.id.original + " doesn't match " + close.path.original, this);
      }

      this.type = 'block';
      this.mustache = mustache;
      this.program  = program;
      this.inverse  = inverse;

      this.strip = {
        left: mustache.strip.left,
        right: close.strip.right
      };

      (program || inverse).strip.left = mustache.strip.right;
      (inverse || program).strip.right = close.strip.left;

      if (inverse && !program) {
        this.isInverse = true;
      }
    },

    ContentNode: function(string, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "content";
      this.string = string;
    },

    HashNode: function(pairs, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "hash";
      this.pairs = pairs;
    },

    IdNode: function(parts, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "ID";

      var original = "",
          dig = [],
          depth = 0;

      for(var i=0,l=parts.length; i<l; i++) {
        var part = parts[i].part;
        original += (parts[i].separator || '') + part;

        if (part === ".." || part === "." || part === "this") {
          if (dig.length > 0) {
            throw new Exception("Invalid path: " + original, this);
          } else if (part === "..") {
            depth++;
          } else {
            this.isScoped = true;
          }
        } else {
          dig.push(part);
        }
      }

      this.original = original;
      this.parts    = dig;
      this.string   = dig.join('.');
      this.depth    = depth;

      // an ID is simple if it only has one part, and that part is not
      // `..` or `this`.
      this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;

      this.stringModeValue = this.string;
    },

    PartialNameNode: function(name, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "PARTIAL_NAME";
      this.name = name.original;
    },

    DataNode: function(id, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "DATA";
      this.id = id;
    },

    StringNode: function(string, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "STRING";
      this.original =
        this.string =
        this.stringModeValue = string;
    },

    IntegerNode: function(integer, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "INTEGER";
      this.original =
        this.integer = integer;
      this.stringModeValue = Number(integer);
    },

    BooleanNode: function(bool, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "BOOLEAN";
      this.bool = bool;
      this.stringModeValue = bool === "true";
    },

    CommentNode: function(comment, locInfo) {
      LocationInfo.call(this, locInfo);
      this.type = "comment";
      this.comment = comment;
    }
  };

  // Must be exported as an object rather than the root of the module as the jison lexer
  // most modify the object to operate properly.
  __exports__ = AST;
  return __exports__;
})(__module5__);

// handlebars/compiler/parser.js
var __module9__ = (function() {
  "use strict";
  var __exports__;
  /* jshint ignore:start */
  /* Jison generated parser */
  var handlebars = (function(){
  var parser = {trace: function trace() { },
  yy: {},
  symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"sexpr":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"sexpr_repetition0":28,"sexpr_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"OPEN_SEXPR":35,"CLOSE_SEXPR":36,"hash":37,"hash_repetition_plus0":38,"hashSegment":39,"ID":40,"EQUALS":41,"DATA":42,"pathSegments":43,"SEP":44,"$accept":0,"$end":1},
  terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},
  productions_: [0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],
  performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {

  var $0 = $$.length - 1;
  switch (yystate) {
  case 1: return new yy.ProgramNode($$[$0-1], this._$); 
  break;
  case 2: return new yy.ProgramNode([], this._$); 
  break;
  case 3:this.$ = new yy.ProgramNode([], $$[$0-1], $$[$0], this._$);
  break;
  case 4:this.$ = new yy.ProgramNode($$[$0-2], $$[$0-1], $$[$0], this._$);
  break;
  case 5:this.$ = new yy.ProgramNode($$[$0-1], $$[$0], [], this._$);
  break;
  case 6:this.$ = new yy.ProgramNode($$[$0], this._$);
  break;
  case 7:this.$ = new yy.ProgramNode([], this._$);
  break;
  case 8:this.$ = new yy.ProgramNode([], this._$);
  break;
  case 9:this.$ = [$$[$0]];
  break;
  case 10: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 
  break;
  case 11:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0], this._$);
  break;
  case 12:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0], this._$);
  break;
  case 13:this.$ = $$[$0];
  break;
  case 14:this.$ = $$[$0];
  break;
  case 15:this.$ = new yy.ContentNode($$[$0], this._$);
  break;
  case 16:this.$ = new yy.CommentNode($$[$0], this._$);
  break;
  case 17:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
  break;
  case 18:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
  break;
  case 19:this.$ = {path: $$[$0-1], strip: stripFlags($$[$0-2], $$[$0])};
  break;
  case 20:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
  break;
  case 21:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
  break;
  case 22:this.$ = new yy.PartialNode($$[$0-2], $$[$0-1], stripFlags($$[$0-3], $$[$0]), this._$);
  break;
  case 23:this.$ = stripFlags($$[$0-1], $$[$0]);
  break;
  case 24:this.$ = new yy.SexprNode([$$[$0-2]].concat($$[$0-1]), $$[$0], this._$);
  break;
  case 25:this.$ = new yy.SexprNode([$$[$0]], null, this._$);
  break;
  case 26:this.$ = $$[$0];
  break;
  case 27:this.$ = new yy.StringNode($$[$0], this._$);
  break;
  case 28:this.$ = new yy.IntegerNode($$[$0], this._$);
  break;
  case 29:this.$ = new yy.BooleanNode($$[$0], this._$);
  break;
  case 30:this.$ = $$[$0];
  break;
  case 31:$$[$0-1].isHelper = true; this.$ = $$[$0-1];
  break;
  case 32:this.$ = new yy.HashNode($$[$0], this._$);
  break;
  case 33:this.$ = [$$[$0-2], $$[$0]];
  break;
  case 34:this.$ = new yy.PartialNameNode($$[$0], this._$);
  break;
  case 35:this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0], this._$), this._$);
  break;
  case 36:this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0], this._$));
  break;
  case 37:this.$ = new yy.DataNode($$[$0], this._$);
  break;
  case 38:this.$ = new yy.IdNode($$[$0], this._$);
  break;
  case 39: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2]; 
  break;
  case 40:this.$ = [{part: $$[$0]}];
  break;
  case 43:this.$ = [];
  break;
  case 44:$$[$0-1].push($$[$0]);
  break;
  case 47:this.$ = [$$[$0]];
  break;
  case 48:$$[$0-1].push($$[$0]);
  break;
  }
  },
  table: [{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],
  defaultActions: {3:[2,2],16:[2,1],50:[2,42]},
  parseError: function parseError(str, hash) {
      throw new Error(str);
  },
  parse: function parse(input) {
      var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
      this.lexer.setInput(input);
      this.lexer.yy = this.yy;
      this.yy.lexer = this.lexer;
      this.yy.parser = this;
      if (typeof this.lexer.yylloc == "undefined")
          this.lexer.yylloc = {};
      var yyloc = this.lexer.yylloc;
      lstack.push(yyloc);
      var ranges = this.lexer.options && this.lexer.options.ranges;
      if (typeof this.yy.parseError === "function")
          this.parseError = this.yy.parseError;
      function popStack(n) {
          stack.length = stack.length - 2 * n;
          vstack.length = vstack.length - n;
          lstack.length = lstack.length - n;
      }
      function lex() {
          var token;
          token = self.lexer.lex() || 1;
          if (typeof token !== "number") {
              token = self.symbols_[token] || token;
          }
          return token;
      }
      var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
      while (true) {
          state = stack[stack.length - 1];
          if (this.defaultActions[state]) {
              action = this.defaultActions[state];
          } else {
              if (symbol === null || typeof symbol == "undefined") {
                  symbol = lex();
              }
              action = table[state] && table[state][symbol];
          }
          if (typeof action === "undefined" || !action.length || !action[0]) {
              var errStr = "";
              if (!recovering) {
                  expected = [];
                  for (p in table[state])
                      if (this.terminals_[p] && p > 2) {
                          expected.push("'" + this.terminals_[p] + "'");
                      }
                  if (this.lexer.showPosition) {
                      errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
                  } else {
                      errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
                  }
                  this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
              }
          }
          if (action[0] instanceof Array && action.length > 1) {
              throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
          }
          switch (action[0]) {
          case 1:
              stack.push(symbol);
              vstack.push(this.lexer.yytext);
              lstack.push(this.lexer.yylloc);
              stack.push(action[1]);
              symbol = null;
              if (!preErrorSymbol) {
                  yyleng = this.lexer.yyleng;
                  yytext = this.lexer.yytext;
                  yylineno = this.lexer.yylineno;
                  yyloc = this.lexer.yylloc;
                  if (recovering > 0)
                      recovering--;
              } else {
                  symbol = preErrorSymbol;
                  preErrorSymbol = null;
              }
              break;
          case 2:
              len = this.productions_[action[1]][1];
              yyval.$ = vstack[vstack.length - len];
              yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
              if (ranges) {
                  yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
              }
              r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
              if (typeof r !== "undefined") {
                  return r;
              }
              if (len) {
                  stack = stack.slice(0, -1 * len * 2);
                  vstack = vstack.slice(0, -1 * len);
                  lstack = lstack.slice(0, -1 * len);
              }
              stack.push(this.productions_[action[1]][0]);
              vstack.push(yyval.$);
              lstack.push(yyval._$);
              newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
              stack.push(newState);
              break;
          case 3:
              return true;
          }
      }
      return true;
  }
  };


  function stripFlags(open, close) {
    return {
      left: open.charAt(2) === '~',
      right: close.charAt(0) === '~' || close.charAt(1) === '~'
    };
  }

  /* Jison generated lexer */
  var lexer = (function(){
  var lexer = ({EOF:1,
  parseError:function parseError(str, hash) {
          if (this.yy.parser) {
              this.yy.parser.parseError(str, hash);
          } else {
              throw new Error(str);
          }
      },
  setInput:function (input) {
          this._input = input;
          this._more = this._less = this.done = false;
          this.yylineno = this.yyleng = 0;
          this.yytext = this.matched = this.match = '';
          this.conditionStack = ['INITIAL'];
          this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
          if (this.options.ranges) this.yylloc.range = [0,0];
          this.offset = 0;
          return this;
      },
  input:function () {
          var ch = this._input[0];
          this.yytext += ch;
          this.yyleng++;
          this.offset++;
          this.match += ch;
          this.matched += ch;
          var lines = ch.match(/(?:\r\n?|\n).*/g);
          if (lines) {
              this.yylineno++;
              this.yylloc.last_line++;
          } else {
              this.yylloc.last_column++;
          }
          if (this.options.ranges) this.yylloc.range[1]++;

          this._input = this._input.slice(1);
          return ch;
      },
  unput:function (ch) {
          var len = ch.length;
          var lines = ch.split(/(?:\r\n?|\n)/g);

          this._input = ch + this._input;
          this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
          //this.yyleng -= len;
          this.offset -= len;
          var oldLines = this.match.split(/(?:\r\n?|\n)/g);
          this.match = this.match.substr(0, this.match.length-1);
          this.matched = this.matched.substr(0, this.matched.length-1);

          if (lines.length-1) this.yylineno -= lines.length-1;
          var r = this.yylloc.range;

          this.yylloc = {first_line: this.yylloc.first_line,
            last_line: this.yylineno+1,
            first_column: this.yylloc.first_column,
            last_column: lines ?
                (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
                this.yylloc.first_column - len
            };

          if (this.options.ranges) {
              this.yylloc.range = [r[0], r[0] + this.yyleng - len];
          }
          return this;
      },
  more:function () {
          this._more = true;
          return this;
      },
  less:function (n) {
          this.unput(this.match.slice(n));
      },
  pastInput:function () {
          var past = this.matched.substr(0, this.matched.length - this.match.length);
          return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
      },
  upcomingInput:function () {
          var next = this.match;
          if (next.length < 20) {
              next += this._input.substr(0, 20-next.length);
          }
          return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
      },
  showPosition:function () {
          var pre = this.pastInput();
          var c = new Array(pre.length + 1).join("-");
          return pre + this.upcomingInput() + "\n" + c+"^";
      },
  next:function () {
          if (this.done) {
              return this.EOF;
          }
          if (!this._input) this.done = true;

          var token,
              match,
              tempMatch,
              index,
              col,
              lines;
          if (!this._more) {
              this.yytext = '';
              this.match = '';
          }
          var rules = this._currentRules();
          for (var i=0;i < rules.length; i++) {
              tempMatch = this._input.match(this.rules[rules[i]]);
              if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
                  match = tempMatch;
                  index = i;
                  if (!this.options.flex) break;
              }
          }
          if (match) {
              lines = match[0].match(/(?:\r\n?|\n).*/g);
              if (lines) this.yylineno += lines.length;
              this.yylloc = {first_line: this.yylloc.last_line,
                             last_line: this.yylineno+1,
                             first_column: this.yylloc.last_column,
                             last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
              this.yytext += match[0];
              this.match += match[0];
              this.matches = match;
              this.yyleng = this.yytext.length;
              if (this.options.ranges) {
                  this.yylloc.range = [this.offset, this.offset += this.yyleng];
              }
              this._more = false;
              this._input = this._input.slice(match[0].length);
              this.matched += match[0];
              token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
              if (this.done && this._input) this.done = false;
              if (token) return token;
              else return;
          }
          if (this._input === "") {
              return this.EOF;
          } else {
              return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
                      {text: "", token: null, line: this.yylineno});
          }
      },
  lex:function lex() {
          var r = this.next();
          if (typeof r !== 'undefined') {
              return r;
          } else {
              return this.lex();
          }
      },
  begin:function begin(condition) {
          this.conditionStack.push(condition);
      },
  popState:function popState() {
          return this.conditionStack.pop();
      },
  _currentRules:function _currentRules() {
          return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
      },
  topState:function () {
          return this.conditionStack[this.conditionStack.length-2];
      },
  pushState:function begin(condition) {
          this.begin(condition);
      }});
  lexer.options = {};
  lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {


  function strip(start, end) {
    return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng-end);
  }


  var YYSTATE=YY_START
  switch($avoiding_name_collisions) {
  case 0:
                                     if(yy_.yytext.slice(-2) === "\\\\") {
                                       strip(0,1);
                                       this.begin("mu");
                                     } else if(yy_.yytext.slice(-1) === "\\") {
                                       strip(0,1);
                                       this.begin("emu");
                                     } else {
                                       this.begin("mu");
                                     }
                                     if(yy_.yytext) return 14;
                                   
  break;
  case 1:return 14;
  break;
  case 2:
                                     this.popState();
                                     return 14;
                                   
  break;
  case 3:strip(0,4); this.popState(); return 15;
  break;
  case 4:return 35;
  break;
  case 5:return 36;
  break;
  case 6:return 25;
  break;
  case 7:return 16;
  break;
  case 8:return 20;
  break;
  case 9:return 19;
  break;
  case 10:return 19;
  break;
  case 11:return 23;
  break;
  case 12:return 22;
  break;
  case 13:this.popState(); this.begin('com');
  break;
  case 14:strip(3,5); this.popState(); return 15;
  break;
  case 15:return 22;
  break;
  case 16:return 41;
  break;
  case 17:return 40;
  break;
  case 18:return 40;
  break;
  case 19:return 44;
  break;
  case 20:// ignore whitespace
  break;
  case 21:this.popState(); return 24;
  break;
  case 22:this.popState(); return 18;
  break;
  case 23:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 32;
  break;
  case 24:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 32;
  break;
  case 25:return 42;
  break;
  case 26:return 34;
  break;
  case 27:return 34;
  break;
  case 28:return 33;
  break;
  case 29:return 40;
  break;
  case 30:yy_.yytext = strip(1,2); return 40;
  break;
  case 31:return 'INVALID';
  break;
  case 32:return 5;
  break;
  }
  };
  lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];
  lexer.conditions = {"mu":{"rules":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[3],"inclusive":false},"INITIAL":{"rules":[0,1,32],"inclusive":true}};
  return lexer;})()
  parser.lexer = lexer;
  function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
  return new Parser;
  })();__exports__ = handlebars;
  /* jshint ignore:end */
  return __exports__;
})();

// handlebars/compiler/base.js
var __module8__ = (function(__dependency1__, __dependency2__) {
  "use strict";
  var __exports__ = {};
  var parser = __dependency1__;
  var AST = __dependency2__;

  __exports__.parser = parser;

  function parse(input) {
    // Just return if an already-compile AST was passed in.
    if(input.constructor === AST.ProgramNode) { return input; }

    parser.yy = AST;
    return parser.parse(input);
  }

  __exports__.parse = parse;
  return __exports__;
})(__module9__, __module7__);

// handlebars/compiler/compiler.js
var __module10__ = (function(__dependency1__) {
  "use strict";
  var __exports__ = {};
  var Exception = __dependency1__;

  function Compiler() {}

  __exports__.Compiler = Compiler;// the foundHelper register will disambiguate helper lookup from finding a
  // function in a context. This is necessary for mustache compatibility, which
  // requires that context functions in blocks are evaluated by blockHelperMissing,
  // and then proceed as if the resulting value was provided to blockHelperMissing.

  Compiler.prototype = {
    compiler: Compiler,

    disassemble: function() {
      var opcodes = this.opcodes, opcode, out = [], params, param;

      for (var i=0, l=opcodes.length; i<l; i++) {
        opcode = opcodes[i];

        if (opcode.opcode === 'DECLARE') {
          out.push("DECLARE " + opcode.name + "=" + opcode.value);
        } else {
          params = [];
          for (var j=0; j<opcode.args.length; j++) {
            param = opcode.args[j];
            if (typeof param === "string") {
              param = "\"" + param.replace("\n", "\\n") + "\"";
            }
            params.push(param);
          }
          out.push(opcode.opcode + " " + params.join(" "));
        }
      }

      return out.join("\n");
    },

    equals: function(other) {
      var len = this.opcodes.length;
      if (other.opcodes.length !== len) {
        return false;
      }

      for (var i = 0; i < len; i++) {
        var opcode = this.opcodes[i],
            otherOpcode = other.opcodes[i];
        if (opcode.opcode !== otherOpcode.opcode || opcode.args.length !== otherOpcode.args.length) {
          return false;
        }
        for (var j = 0; j < opcode.args.length; j++) {
          if (opcode.args[j] !== otherOpcode.args[j]) {
            return false;
          }
        }
      }

      len = this.children.length;
      if (other.children.length !== len) {
        return false;
      }
      for (i = 0; i < len; i++) {
        if (!this.children[i].equals(other.children[i])) {
          return false;
        }
      }

      return true;
    },

    guid: 0,

    compile: function(program, options) {
      this.opcodes = [];
      this.children = [];
      this.depths = {list: []};
      this.options = options;

      // These changes will propagate to the other compiler components
      var knownHelpers = this.options.knownHelpers;
      this.options.knownHelpers = {
        'helperMissing': true,
        'blockHelperMissing': true,
        'each': true,
        'if': true,
        'unless': true,
        'with': true,
        'log': true
      };
      if (knownHelpers) {
        for (var name in knownHelpers) {
          this.options.knownHelpers[name] = knownHelpers[name];
        }
      }

      return this.accept(program);
    },

    accept: function(node) {
      var strip = node.strip || {},
          ret;
      if (strip.left) {
        this.opcode('strip');
      }

      ret = this[node.type](node);

      if (strip.right) {
        this.opcode('strip');
      }

      return ret;
    },

    program: function(program) {
      var statements = program.statements;

      for(var i=0, l=statements.length; i<l; i++) {
        this.accept(statements[i]);
      }
      this.isSimple = l === 1;

      this.depths.list = this.depths.list.sort(function(a, b) {
        return a - b;
      });

      return this;
    },

    compileProgram: function(program) {
      var result = new this.compiler().compile(program, this.options);
      var guid = this.guid++, depth;

      this.usePartial = this.usePartial || result.usePartial;

      this.children[guid] = result;

      for(var i=0, l=result.depths.list.length; i<l; i++) {
        depth = result.depths.list[i];

        if(depth < 2) { continue; }
        else { this.addDepth(depth - 1); }
      }

      return guid;
    },

    block: function(block) {
      var mustache = block.mustache,
          program = block.program,
          inverse = block.inverse;

      if (program) {
        program = this.compileProgram(program);
      }

      if (inverse) {
        inverse = this.compileProgram(inverse);
      }

      var sexpr = mustache.sexpr;
      var type = this.classifySexpr(sexpr);

      if (type === "helper") {
        this.helperSexpr(sexpr, program, inverse);
      } else if (type === "simple") {
        this.simpleSexpr(sexpr);

        // now that the simple mustache is resolved, we need to
        // evaluate it by executing `blockHelperMissing`
        this.opcode('pushProgram', program);
        this.opcode('pushProgram', inverse);
        this.opcode('emptyHash');
        this.opcode('blockValue');
      } else {
        this.ambiguousSexpr(sexpr, program, inverse);

        // now that the simple mustache is resolved, we need to
        // evaluate it by executing `blockHelperMissing`
        this.opcode('pushProgram', program);
        this.opcode('pushProgram', inverse);
        this.opcode('emptyHash');
        this.opcode('ambiguousBlockValue');
      }

      this.opcode('append');
    },

    hash: function(hash) {
      var pairs = hash.pairs, pair, val;

      this.opcode('pushHash');

      for(var i=0, l=pairs.length; i<l; i++) {
        pair = pairs[i];
        val  = pair[1];

        if (this.options.stringParams) {
          if(val.depth) {
            this.addDepth(val.depth);
          }
          this.opcode('getContext', val.depth || 0);
          this.opcode('pushStringParam', val.stringModeValue, val.type);

          if (val.type === 'sexpr') {
            // Subexpressions get evaluated and passed in
            // in string params mode.
            this.sexpr(val);
          }
        } else {
          this.accept(val);
        }

        this.opcode('assignToHash', pair[0]);
      }
      this.opcode('popHash');
    },

    partial: function(partial) {
      var partialName = partial.partialName;
      this.usePartial = true;

      if(partial.context) {
        this.ID(partial.context);
      } else {
        this.opcode('push', 'depth0');
      }

      this.opcode('invokePartial', partialName.name);
      this.opcode('append');
    },

    content: function(content) {
      this.opcode('appendContent', content.string);
    },

    mustache: function(mustache) {
      this.sexpr(mustache.sexpr);

      if(mustache.escaped && !this.options.noEscape) {
        this.opcode('appendEscaped');
      } else {
        this.opcode('append');
      }
    },

    ambiguousSexpr: function(sexpr, program, inverse) {
      var id = sexpr.id,
          name = id.parts[0],
          isBlock = program != null || inverse != null;

      this.opcode('getContext', id.depth);

      this.opcode('pushProgram', program);
      this.opcode('pushProgram', inverse);

      this.opcode('invokeAmbiguous', name, isBlock);
    },

    simpleSexpr: function(sexpr) {
      var id = sexpr.id;

      if (id.type === 'DATA') {
        this.DATA(id);
      } else if (id.parts.length) {
        this.ID(id);
      } else {
        // Simplified ID for `this`
        this.addDepth(id.depth);
        this.opcode('getContext', id.depth);
        this.opcode('pushContext');
      }

      this.opcode('resolvePossibleLambda');
    },

    helperSexpr: function(sexpr, program, inverse) {
      var params = this.setupFullMustacheParams(sexpr, program, inverse),
          name = sexpr.id.parts[0];

      if (this.options.knownHelpers[name]) {
        this.opcode('invokeKnownHelper', params.length, name);
      } else if (this.options.knownHelpersOnly) {
        throw new Exception("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
      } else {
        this.opcode('invokeHelper', params.length, name, sexpr.isRoot);
      }
    },

    sexpr: function(sexpr) {
      var type = this.classifySexpr(sexpr);

      if (type === "simple") {
        this.simpleSexpr(sexpr);
      } else if (type === "helper") {
        this.helperSexpr(sexpr);
      } else {
        this.ambiguousSexpr(sexpr);
      }
    },

    ID: function(id) {
      this.addDepth(id.depth);
      this.opcode('getContext', id.depth);

      var name = id.parts[0];
      if (!name) {
        this.opcode('pushContext');
      } else {
        this.opcode('lookupOnContext', id.parts[0]);
      }

      for(var i=1, l=id.parts.length; i<l; i++) {
        this.opcode('lookup', id.parts[i]);
      }
    },

    DATA: function(data) {
      this.options.data = true;
      if (data.id.isScoped || data.id.depth) {
        throw new Exception('Scoped data references are not supported: ' + data.original, data);
      }

      this.opcode('lookupData');
      var parts = data.id.parts;
      for(var i=0, l=parts.length; i<l; i++) {
        this.opcode('lookup', parts[i]);
      }
    },

    STRING: function(string) {
      this.opcode('pushString', string.string);
    },

    INTEGER: function(integer) {
      this.opcode('pushLiteral', integer.integer);
    },

    BOOLEAN: function(bool) {
      this.opcode('pushLiteral', bool.bool);
    },

    comment: function() {},

    // HELPERS
    opcode: function(name) {
      this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });
    },

    declare: function(name, value) {
      this.opcodes.push({ opcode: 'DECLARE', name: name, value: value });
    },

    addDepth: function(depth) {
      if(depth === 0) { return; }

      if(!this.depths[depth]) {
        this.depths[depth] = true;
        this.depths.list.push(depth);
      }
    },

    classifySexpr: function(sexpr) {
      var isHelper   = sexpr.isHelper;
      var isEligible = sexpr.eligibleHelper;
      var options    = this.options;

      // if ambiguous, we can possibly resolve the ambiguity now
      if (isEligible && !isHelper) {
        var name = sexpr.id.parts[0];

        if (options.knownHelpers[name]) {
          isHelper = true;
        } else if (options.knownHelpersOnly) {
          isEligible = false;
        }
      }

      if (isHelper) { return "helper"; }
      else if (isEligible) { return "ambiguous"; }
      else { return "simple"; }
    },

    pushParams: function(params) {
      var i = params.length, param;

      while(i--) {
        param = params[i];

        if(this.options.stringParams) {
          if(param.depth) {
            this.addDepth(param.depth);
          }

          this.opcode('getContext', param.depth || 0);
          this.opcode('pushStringParam', param.stringModeValue, param.type);

          if (param.type === 'sexpr') {
            // Subexpressions get evaluated and passed in
            // in string params mode.
            this.sexpr(param);
          }
        } else {
          this[param.type](param);
        }
      }
    },

    setupFullMustacheParams: function(sexpr, program, inverse) {
      var params = sexpr.params;
      this.pushParams(params);

      this.opcode('pushProgram', program);
      this.opcode('pushProgram', inverse);

      if (sexpr.hash) {
        this.hash(sexpr.hash);
      } else {
        this.opcode('emptyHash');
      }

      return params;
    }
  };

  function precompile(input, options, env) {
    if (input == null || (typeof input !== 'string' && input.constructor !== env.AST.ProgramNode)) {
      throw new Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
    }

    options = options || {};
    if (!('data' in options)) {
      options.data = true;
    }

    var ast = env.parse(input);
    var environment = new env.Compiler().compile(ast, options);
    return new env.JavaScriptCompiler().compile(environment, options);
  }

  __exports__.precompile = precompile;function compile(input, options, env) {
    if (input == null || (typeof input !== 'string' && input.constructor !== env.AST.ProgramNode)) {
      throw new Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
    }

    options = options || {};

    if (!('data' in options)) {
      options.data = true;
    }

    var compiled;

    function compileInput() {
      var ast = env.parse(input);
      var environment = new env.Compiler().compile(ast, options);
      var templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
      return env.template(templateSpec);
    }

    // Template is only compiled on first use and cached after that point.
    return function(context, options) {
      if (!compiled) {
        compiled = compileInput();
      }
      return compiled.call(this, context, options);
    };
  }

  __exports__.compile = compile;
  return __exports__;
})(__module5__);

// handlebars/compiler/javascript-compiler.js
var __module11__ = (function(__dependency1__, __dependency2__) {
  "use strict";
  var __exports__;
  var COMPILER_REVISION = __dependency1__.COMPILER_REVISION;
  var REVISION_CHANGES = __dependency1__.REVISION_CHANGES;
  var log = __dependency1__.log;
  var Exception = __dependency2__;

  function Literal(value) {
    this.value = value;
  }

  function JavaScriptCompiler() {}

  JavaScriptCompiler.prototype = {
    // PUBLIC API: You can override these methods in a subclass to provide
    // alternative compiled forms for name lookup and buffering semantics
    nameLookup: function(parent, name /* , type*/) {
      var wrap,
          ret;
      if (parent.indexOf('depth') === 0) {
        wrap = true;
      }

      if (/^[0-9]+$/.test(name)) {
        ret = parent + "[" + name + "]";
      } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
        ret = parent + "." + name;
      }
      else {
        ret = parent + "['" + name + "']";
      }

      if (wrap) {
        return '(' + parent + ' && ' + ret + ')';
      } else {
        return ret;
      }
    },

    compilerInfo: function() {
      var revision = COMPILER_REVISION,
          versions = REVISION_CHANGES[revision];
      return "this.compilerInfo = ["+revision+",'"+versions+"'];\n";
    },

    appendToBuffer: function(string) {
      if (this.environment.isSimple) {
        return "return " + string + ";";
      } else {
        return {
          appendToBuffer: true,
          content: string,
          toString: function() { return "buffer += " + string + ";"; }
        };
      }
    },

    initializeBuffer: function() {
      return this.quotedString("");
    },

    namespace: "Handlebars",
    // END PUBLIC API

    compile: function(environment, options, context, asObject) {
      this.environment = environment;
      this.options = options || {};

      log('debug', this.environment.disassemble() + "\n\n");

      this.name = this.environment.name;
      this.isChild = !!context;
      this.context = context || {
        programs: [],
        environments: [],
        aliases: { }
      };

      this.preamble();

      this.stackSlot = 0;
      this.stackVars = [];
      this.registers = { list: [] };
      this.hashes = [];
      this.compileStack = [];
      this.inlineStack = [];

      this.compileChildren(environment, options);

      var opcodes = environment.opcodes, opcode;

      this.i = 0;

      for(var l=opcodes.length; this.i<l; this.i++) {
        opcode = opcodes[this.i];

        if(opcode.opcode === 'DECLARE') {
          this[opcode.name] = opcode.value;
        } else {
          this[opcode.opcode].apply(this, opcode.args);
        }

        // Reset the stripNext flag if it was not set by this operation.
        if (opcode.opcode !== this.stripNext) {
          this.stripNext = false;
        }
      }

      // Flush any trailing content that might be pending.
      this.pushSource('');

      if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
        throw new Exception('Compile completed with content left on stack');
      }

      return this.createFunctionContext(asObject);
    },

    preamble: function() {
      var out = [];

      if (!this.isChild) {
        var namespace = this.namespace;

        var copies = "helpers = this.merge(helpers, " + namespace + ".helpers);";
        if (this.environment.usePartial) { copies = copies + " partials = this.merge(partials, " + namespace + ".partials);"; }
        if (this.options.data) { copies = copies + " data = data || {};"; }
        out.push(copies);
      } else {
        out.push('');
      }

      if (!this.environment.isSimple) {
        out.push(", buffer = " + this.initializeBuffer());
      } else {
        out.push("");
      }

      // track the last context pushed into place to allow skipping the
      // getContext opcode when it would be a noop
      this.lastContext = 0;
      this.source = out;
    },

    createFunctionContext: function(asObject) {
      var locals = this.stackVars.concat(this.registers.list);

      if(locals.length > 0) {
        this.source[1] = this.source[1] + ", " + locals.join(", ");
      }

      // Generate minimizer alias mappings
      if (!this.isChild) {
        for (var alias in this.context.aliases) {
          if (this.context.aliases.hasOwnProperty(alias)) {
            this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
          }
        }
      }

      if (this.source[1]) {
        this.source[1] = "var " + this.source[1].substring(2) + ";";
      }

      // Merge children
      if (!this.isChild) {
        this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
      }

      if (!this.environment.isSimple) {
        this.pushSource("return buffer;");
      }

      var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];

      for(var i=0, l=this.environment.depths.list.length; i<l; i++) {
        params.push("depth" + this.environment.depths.list[i]);
      }

      // Perform a second pass over the output to merge content when possible
      var source = this.mergeSource();

      if (!this.isChild) {
        source = this.compilerInfo()+source;
      }

      if (asObject) {
        params.push(source);

        return Function.apply(this, params);
      } else {
        var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n  ' + source + '}';
        log('debug', functionSource + "\n\n");
        return functionSource;
      }
    },
    mergeSource: function() {
      // WARN: We are not handling the case where buffer is still populated as the source should
      // not have buffer append operations as their final action.
      var source = '',
          buffer;
      for (var i = 0, len = this.source.length; i < len; i++) {
        var line = this.source[i];
        if (line.appendToBuffer) {
          if (buffer) {
            buffer = buffer + '\n    + ' + line.content;
          } else {
            buffer = line.content;
          }
        } else {
          if (buffer) {
            source += 'buffer += ' + buffer + ';\n  ';
            buffer = undefined;
          }
          source += line + '\n  ';
        }
      }
      return source;
    },

    // [blockValue]
    //
    // On stack, before: hash, inverse, program, value
    // On stack, after: return value of blockHelperMissing
    //
    // The purpose of this opcode is to take a block of the form
    // `{{#foo}}...{{/foo}}`, resolve the value of `foo`, and
    // replace it on the stack with the result of properly
    // invoking blockHelperMissing.
    blockValue: function() {
      this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';

      var params = ["depth0"];
      this.setupParams(0, params);

      this.replaceStack(function(current) {
        params.splice(1, 0, current);
        return "blockHelperMissing.call(" + params.join(", ") + ")";
      });
    },

    // [ambiguousBlockValue]
    //
    // On stack, before: hash, inverse, program, value
    // Compiler value, before: lastHelper=value of last found helper, if any
    // On stack, after, if no lastHelper: same as [blockValue]
    // On stack, after, if lastHelper: value
    ambiguousBlockValue: function() {
      this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';

      var params = ["depth0"];
      this.setupParams(0, params);

      var current = this.topStack();
      params.splice(1, 0, current);

      this.pushSource("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");
    },

    // [appendContent]
    //
    // On stack, before: ...
    // On stack, after: ...
    //
    // Appends the string value of `content` to the current buffer
    appendContent: function(content) {
      if (this.pendingContent) {
        content = this.pendingContent + content;
      }
      if (this.stripNext) {
        content = content.replace(/^\s+/, '');
      }

      this.pendingContent = content;
    },

    // [strip]
    //
    // On stack, before: ...
    // On stack, after: ...
    //
    // Removes any trailing whitespace from the prior content node and flags
    // the next operation for stripping if it is a content node.
    strip: function() {
      if (this.pendingContent) {
        this.pendingContent = this.pendingContent.replace(/\s+$/, '');
      }
      this.stripNext = 'strip';
    },

    // [append]
    //
    // On stack, before: value, ...
    // On stack, after: ...
    //
    // Coerces `value` to a String and appends it to the current buffer.
    //
    // If `value` is truthy, or 0, it is coerced into a string and appended
    // Otherwise, the empty string is appended
    append: function() {
      // Force anything that is inlined onto the stack so we don't have duplication
      // when we examine local
      this.flushInline();
      var local = this.popStack();
      this.pushSource("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
      if (this.environment.isSimple) {
        this.pushSource("else { " + this.appendToBuffer("''") + " }");
      }
    },

    // [appendEscaped]
    //
    // On stack, before: value, ...
    // On stack, after: ...
    //
    // Escape `value` and append it to the buffer
    appendEscaped: function() {
      this.context.aliases.escapeExpression = 'this.escapeExpression';

      this.pushSource(this.appendToBuffer("escapeExpression(" + this.popStack() + ")"));
    },

    // [getContext]
    //
    // On stack, before: ...
    // On stack, after: ...
    // Compiler value, after: lastContext=depth
    //
    // Set the value of the `lastContext` compiler value to the depth
    getContext: function(depth) {
      if(this.lastContext !== depth) {
        this.lastContext = depth;
      }
    },

    // [lookupOnContext]
    //
    // On stack, before: ...
    // On stack, after: currentContext[name], ...
    //
    // Looks up the value of `name` on the current context and pushes
    // it onto the stack.
    lookupOnContext: function(name) {
      this.push(this.nameLookup('depth' + this.lastContext, name, 'context'));
    },

    // [pushContext]
    //
    // On stack, before: ...
    // On stack, after: currentContext, ...
    //
    // Pushes the value of the current context onto the stack.
    pushContext: function() {
      this.pushStackLiteral('depth' + this.lastContext);
    },

    // [resolvePossibleLambda]
    //
    // On stack, before: value, ...
    // On stack, after: resolved value, ...
    //
    // If the `value` is a lambda, replace it on the stack by
    // the return value of the lambda
    resolvePossibleLambda: function() {
      this.context.aliases.functionType = '"function"';

      this.replaceStack(function(current) {
        return "typeof " + current + " === functionType ? " + current + ".apply(depth0) : " + current;
      });
    },

    // [lookup]
    //
    // On stack, before: value, ...
    // On stack, after: value[name], ...
    //
    // Replace the value on the stack with the result of looking
    // up `name` on `value`
    lookup: function(name) {
      this.replaceStack(function(current) {
        return current + " == null || " + current + " === false ? " + current + " : " + this.nameLookup(current, name, 'context');
      });
    },

    // [lookupData]
    //
    // On stack, before: ...
    // On stack, after: data, ...
    //
    // Push the data lookup operator
    lookupData: function() {
      this.pushStackLiteral('data');
    },

    // [pushStringParam]
    //
    // On stack, before: ...
    // On stack, after: string, currentContext, ...
    //
    // This opcode is designed for use in string mode, which
    // provides the string value of a parameter along with its
    // depth rather than resolving it immediately.
    pushStringParam: function(string, type) {
      this.pushStackLiteral('depth' + this.lastContext);

      this.pushString(type);

      // If it's a subexpression, the string result
      // will be pushed after this opcode.
      if (type !== 'sexpr') {
        if (typeof string === 'string') {
          this.pushString(string);
        } else {
          this.pushStackLiteral(string);
        }
      }
    },

    emptyHash: function() {
      this.pushStackLiteral('{}');

      if (this.options.stringParams) {
        this.push('{}'); // hashContexts
        this.push('{}'); // hashTypes
      }
    },
    pushHash: function() {
      if (this.hash) {
        this.hashes.push(this.hash);
      }
      this.hash = {values: [], types: [], contexts: []};
    },
    popHash: function() {
      var hash = this.hash;
      this.hash = this.hashes.pop();

      if (this.options.stringParams) {
        this.push('{' + hash.contexts.join(',') + '}');
        this.push('{' + hash.types.join(',') + '}');
      }

      this.push('{\n    ' + hash.values.join(',\n    ') + '\n  }');
    },

    // [pushString]
    //
    // On stack, before: ...
    // On stack, after: quotedString(string), ...
    //
    // Push a quoted version of `string` onto the stack
    pushString: function(string) {
      this.pushStackLiteral(this.quotedString(string));
    },

    // [push]
    //
    // On stack, before: ...
    // On stack, after: expr, ...
    //
    // Push an expression onto the stack
    push: function(expr) {
      this.inlineStack.push(expr);
      return expr;
    },

    // [pushLiteral]
    //
    // On stack, before: ...
    // On stack, after: value, ...
    //
    // Pushes a value onto the stack. This operation prevents
    // the compiler from creating a temporary variable to hold
    // it.
    pushLiteral: function(value) {
      this.pushStackLiteral(value);
    },

    // [pushProgram]
    //
    // On stack, before: ...
    // On stack, after: program(guid), ...
    //
    // Push a program expression onto the stack. This takes
    // a compile-time guid and converts it into a runtime-accessible
    // expression.
    pushProgram: function(guid) {
      if (guid != null) {
        this.pushStackLiteral(this.programExpression(guid));
      } else {
        this.pushStackLiteral(null);
      }
    },

    // [invokeHelper]
    //
    // On stack, before: hash, inverse, program, params..., ...
    // On stack, after: result of helper invocation
    //
    // Pops off the helper's parameters, invokes the helper,
    // and pushes the helper's return value onto the stack.
    //
    // If the helper is not found, `helperMissing` is called.
    invokeHelper: function(paramSize, name, isRoot) {
      this.context.aliases.helperMissing = 'helpers.helperMissing';
      this.useRegister('helper');

      var helper = this.lastHelper = this.setupHelper(paramSize, name, true);
      var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');

      var lookup = 'helper = ' + helper.name + ' || ' + nonHelper;
      if (helper.paramsInit) {
        lookup += ',' + helper.paramsInit;
      }

      this.push(
        '('
          + lookup
          + ',helper '
            + '? helper.call(' + helper.callParams + ') '
            + ': helperMissing.call(' + helper.helperMissingParams + '))');

      // Always flush subexpressions. This is both to prevent the compounding size issue that
      // occurs when the code has to be duplicated for inlining and also to prevent errors
      // due to the incorrect options object being passed due to the shared register.
      if (!isRoot) {
        this.flushInline();
      }
    },

    // [invokeKnownHelper]
    //
    // On stack, before: hash, inverse, program, params..., ...
    // On stack, after: result of helper invocation
    //
    // This operation is used when the helper is known to exist,
    // so a `helperMissing` fallback is not required.
    invokeKnownHelper: function(paramSize, name) {
      var helper = this.setupHelper(paramSize, name);
      this.push(helper.name + ".call(" + helper.callParams + ")");
    },

    // [invokeAmbiguous]
    //
    // On stack, before: hash, inverse, program, params..., ...
    // On stack, after: result of disambiguation
    //
    // This operation is used when an expression like `{{foo}}`
    // is provided, but we don't know at compile-time whether it
    // is a helper or a path.
    //
    // This operation emits more code than the other options,
    // and can be avoided by passing the `knownHelpers` and
    // `knownHelpersOnly` flags at compile-time.
    invokeAmbiguous: function(name, helperCall) {
      this.context.aliases.functionType = '"function"';
      this.useRegister('helper');

      this.emptyHash();
      var helper = this.setupHelper(0, name, helperCall);

      var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');

      var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');
      var nextStack = this.nextStack();

      if (helper.paramsInit) {
        this.pushSource(helper.paramsInit);
      }
      this.pushSource('if (helper = ' + helperName + ') { ' + nextStack + ' = helper.call(' + helper.callParams + '); }');
      this.pushSource('else { helper = ' + nonHelper + '; ' + nextStack + ' = typeof helper === functionType ? helper.call(' + helper.callParams + ') : helper; }');
    },

    // [invokePartial]
    //
    // On stack, before: context, ...
    // On stack after: result of partial invocation
    //
    // This operation pops off a context, invokes a partial with that context,
    // and pushes the result of the invocation back.
    invokePartial: function(name) {
      var params = [this.nameLookup('partials', name, 'partial'), "'" + name + "'", this.popStack(), "helpers", "partials"];

      if (this.options.data) {
        params.push("data");
      }

      this.context.aliases.self = "this";
      this.push("self.invokePartial(" + params.join(", ") + ")");
    },

    // [assignToHash]
    //
    // On stack, before: value, hash, ...
    // On stack, after: hash, ...
    //
    // Pops a value and hash off the stack, assigns `hash[key] = value`
    // and pushes the hash back onto the stack.
    assignToHash: function(key) {
      var value = this.popStack(),
          context,
          type;

      if (this.options.stringParams) {
        type = this.popStack();
        context = this.popStack();
      }

      var hash = this.hash;
      if (context) {
        hash.contexts.push("'" + key + "': " + context);
      }
      if (type) {
        hash.types.push("'" + key + "': " + type);
      }
      hash.values.push("'" + key + "': (" + value + ")");
    },

    // HELPERS

    compiler: JavaScriptCompiler,

    compileChildren: function(environment, options) {
      var children = environment.children, child, compiler;

      for(var i=0, l=children.length; i<l; i++) {
        child = children[i];
        compiler = new this.compiler();

        var index = this.matchExistingProgram(child);

        if (index == null) {
          this.context.programs.push('');     // Placeholder to prevent name conflicts for nested children
          index = this.context.programs.length;
          child.index = index;
          child.name = 'program' + index;
          this.context.programs[index] = compiler.compile(child, options, this.context);
          this.context.environments[index] = child;
        } else {
          child.index = index;
          child.name = 'program' + index;
        }
      }
    },
    matchExistingProgram: function(child) {
      for (var i = 0, len = this.context.environments.length; i < len; i++) {
        var environment = this.context.environments[i];
        if (environment && environment.equals(child)) {
          return i;
        }
      }
    },

    programExpression: function(guid) {
      this.context.aliases.self = "this";

      if(guid == null) {
        return "self.noop";
      }

      var child = this.environment.children[guid],
          depths = child.depths.list, depth;

      var programParams = [child.index, child.name, "data"];

      for(var i=0, l = depths.length; i<l; i++) {
        depth = depths[i];

        if(depth === 1) { programParams.push("depth0"); }
        else { programParams.push("depth" + (depth - 1)); }
      }

      return (depths.length === 0 ? "self.program(" : "self.programWithDepth(") + programParams.join(", ") + ")";
    },

    register: function(name, val) {
      this.useRegister(name);
      this.pushSource(name + " = " + val + ";");
    },

    useRegister: function(name) {
      if(!this.registers[name]) {
        this.registers[name] = true;
        this.registers.list.push(name);
      }
    },

    pushStackLiteral: function(item) {
      return this.push(new Literal(item));
    },

    pushSource: function(source) {
      if (this.pendingContent) {
        this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent)));
        this.pendingContent = undefined;
      }

      if (source) {
        this.source.push(source);
      }
    },

    pushStack: function(item) {
      this.flushInline();

      var stack = this.incrStack();
      if (item) {
        this.pushSource(stack + " = " + item + ";");
      }
      this.compileStack.push(stack);
      return stack;
    },

    replaceStack: function(callback) {
      var prefix = '',
          inline = this.isInline(),
          stack,
          createdStack,
          usedLiteral;

      // If we are currently inline then we want to merge the inline statement into the
      // replacement statement via ','
      if (inline) {
        var top = this.popStack(true);

        if (top instanceof Literal) {
          // Literals do not need to be inlined
          stack = top.value;
          usedLiteral = true;
        } else {
          // Get or create the current stack name for use by the inline
          createdStack = !this.stackSlot;
          var name = !createdStack ? this.topStackName() : this.incrStack();

          prefix = '(' + this.push(name) + ' = ' + top + '),';
          stack = this.topStack();
        }
      } else {
        stack = this.topStack();
      }

      var item = callback.call(this, stack);

      if (inline) {
        if (!usedLiteral) {
          this.popStack();
        }
        if (createdStack) {
          this.stackSlot--;
        }
        this.push('(' + prefix + item + ')');
      } else {
        // Prevent modification of the context depth variable. Through replaceStack
        if (!/^stack/.test(stack)) {
          stack = this.nextStack();
        }

        this.pushSource(stack + " = (" + prefix + item + ");");
      }
      return stack;
    },

    nextStack: function() {
      return this.pushStack();
    },

    incrStack: function() {
      this.stackSlot++;
      if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
      return this.topStackName();
    },
    topStackName: function() {
      return "stack" + this.stackSlot;
    },
    flushInline: function() {
      var inlineStack = this.inlineStack;
      if (inlineStack.length) {
        this.inlineStack = [];
        for (var i = 0, len = inlineStack.length; i < len; i++) {
          var entry = inlineStack[i];
          if (entry instanceof Literal) {
            this.compileStack.push(entry);
          } else {
            this.pushStack(entry);
          }
        }
      }
    },
    isInline: function() {
      return this.inlineStack.length;
    },

    popStack: function(wrapped) {
      var inline = this.isInline(),
          item = (inline ? this.inlineStack : this.compileStack).pop();

      if (!wrapped && (item instanceof Literal)) {
        return item.value;
      } else {
        if (!inline) {
          if (!this.stackSlot) {
            throw new Exception('Invalid stack pop');
          }
          this.stackSlot--;
        }
        return item;
      }
    },

    topStack: function(wrapped) {
      var stack = (this.isInline() ? this.inlineStack : this.compileStack),
          item = stack[stack.length - 1];

      if (!wrapped && (item instanceof Literal)) {
        return item.value;
      } else {
        return item;
      }
    },

    quotedString: function(str) {
      return '"' + str
        .replace(/\\/g, '\\\\')
        .replace(/"/g, '\\"')
        .replace(/\n/g, '\\n')
        .replace(/\r/g, '\\r')
        .replace(/\u2028/g, '\\u2028')   // Per Ecma-262 7.3 + 7.8.4
        .replace(/\u2029/g, '\\u2029') + '"';
    },

    setupHelper: function(paramSize, name, missingParams) {
      var params = [],
          paramsInit = this.setupParams(paramSize, params, missingParams);
      var foundHelper = this.nameLookup('helpers', name, 'helper');

      return {
        params: params,
        paramsInit: paramsInit,
        name: foundHelper,
        callParams: ["depth0"].concat(params).join(", "),
        helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ")
      };
    },

    setupOptions: function(paramSize, params) {
      var options = [], contexts = [], types = [], param, inverse, program;

      options.push("hash:" + this.popStack());

      if (this.options.stringParams) {
        options.push("hashTypes:" + this.popStack());
        options.push("hashContexts:" + this.popStack());
      }

      inverse = this.popStack();
      program = this.popStack();

      // Avoid setting fn and inverse if neither are set. This allows
      // helpers to do a check for `if (options.fn)`
      if (program || inverse) {
        if (!program) {
          this.context.aliases.self = "this";
          program = "self.noop";
        }

        if (!inverse) {
          this.context.aliases.self = "this";
          inverse = "self.noop";
        }

        options.push("inverse:" + inverse);
        options.push("fn:" + program);
      }

      for(var i=0; i<paramSize; i++) {
        param = this.popStack();
        params.push(param);

        if(this.options.stringParams) {
          types.push(this.popStack());
          contexts.push(this.popStack());
        }
      }

      if (this.options.stringParams) {
        options.push("contexts:[" + contexts.join(",") + "]");
        options.push("types:[" + types.join(",") + "]");
      }

      if(this.options.data) {
        options.push("data:data");
      }

      return options;
    },

    // the params and contexts arguments are passed in arrays
    // to fill in
    setupParams: function(paramSize, params, useRegister) {
      var options = '{' + this.setupOptions(paramSize, params).join(',') + '}';

      if (useRegister) {
        this.useRegister('options');
        params.push('options');
        return 'options=' + options;
      } else {
        params.push(options);
        return '';
      }
    }
  };

  var reservedWords = (
    "break else new var" +
    " case finally return void" +
    " catch for switch while" +
    " continue function this with" +
    " default if throw" +
    " delete in try" +
    " do instanceof typeof" +
    " abstract enum int short" +
    " boolean export interface static" +
    " byte extends long super" +
    " char final native synchronized" +
    " class float package throws" +
    " const goto private transient" +
    " debugger implements protected volatile" +
    " double import public let yield"
  ).split(" ");

  var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};

  for(var i=0, l=reservedWords.length; i<l; i++) {
    compilerWords[reservedWords[i]] = true;
  }

  JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
    if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name)) {
      return true;
    }
    return false;
  };

  __exports__ = JavaScriptCompiler;
  return __exports__;
})(__module2__, __module5__);

// handlebars.js
var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
  "use strict";
  var __exports__;
  /*globals Handlebars: true */
  var Handlebars = __dependency1__;

  // Compiler imports
  var AST = __dependency2__;
  var Parser = __dependency3__.parser;
  var parse = __dependency3__.parse;
  var Compiler = __dependency4__.Compiler;
  var compile = __dependency4__.compile;
  var precompile = __dependency4__.precompile;
  var JavaScriptCompiler = __dependency5__;

  var _create = Handlebars.create;
  var create = function() {
    var hb = _create();

    hb.compile = function(input, options) {
      return compile(input, options, hb);
    };
    hb.precompile = function (input, options) {
      return precompile(input, options, hb);
    };

    hb.AST = AST;
    hb.Compiler = Compiler;
    hb.JavaScriptCompiler = JavaScriptCompiler;
    hb.Parser = Parser;
    hb.parse = parse;

    return hb;
  };

  Handlebars = create();
  Handlebars.create = create;

  __exports__ = Handlebars;
  return __exports__;
})(__module1__, __module7__, __module8__, __module10__, __module11__);

  return __module0__;
})();
;
!function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return w(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(w(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset<r[0].offset?e:r:"start"==r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}f+="<"+t(e)+Array.prototype.map.call(e.attributes,r).join("")+">"}function u(e){f+="</"+t(e)+">"}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,f="",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else"start"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t<n.c.length;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":E.classPrefix,i='<span class="'+a,o=t?"":"</span>";return i+=e+'">',i+n+o}function p(){if(!L.k)return n(y);var e="",t=0;L.lR.lastIndex=0;for(var r=L.lR.exec(y);r;){e+=n(y.substr(t,r.index-t));var a=g(L,r);a?(B+=a[1],e+=h(a[0],n(r[0]))):e+=n(r[0]),t=L.lR.lastIndex,r=L.lR.exec(y)}return e+n(y.substr(t))}function d(){var e="string"==typeof L.sL;if(e&&!x[L.sL])return n(y);var t=e?f(L.sL,y,!0,M[L.sL]):l(y,L.sL.length?L.sL:void 0);return L.r>0&&(B+=t.r),e&&(M[L.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){return void 0!==L.sL?d():p()}function v(e,t){var r=e.cN?h(e.cN,"",!0):"";e.rB?(k+=r,y=""):e.eB?(k+=n(t)+r,y=""):(k+=r,y=t),L=Object.create(e,{parent:{value:L}})}function m(e,t){if(y+=e,void 0===t)return k+=b(),0;var r=o(t,L);if(r)return k+=b(),v(r,t),r.rB?0:t.length;var a=u(L,t);if(a){var i=L;i.rE||i.eE||(y+=t),k+=b();do L.cN&&(k+="</span>"),B+=L.r,L=L.parent;while(L!=a.parent);return i.eE&&(k+=n(t)),y="",a.starts&&v(a.starts,""),i.rE?0:t.length}if(c(t,L))throw new Error('Illegal lexeme "'+t+'" for mode "'+(L.cN||"<unnamed>")+'"');return y+=t,t.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,L=i||N,M={},k="";for(R=L;R!=N;R=R.parent)R.cN&&(k=h(R.cN,"",!0)+k);var y="",B=0;try{for(var C,j,I=0;;){if(L.t.lastIndex=I,C=L.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),R=L;R.parent;R=R.parent)R.cN&&(k+="</span>");return{r:B,value:k,language:e,top:L}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||E.languages||Object.keys(x);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(w(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\n/g,"<br>")),e}function h(e,n,t){var r=n?R[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n=i(e);if(!a(n)){var t;E.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(s,u(p),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=h(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){R[e]=n})}function N(){return Object.keys(x)}function w(e){return e=e.toLowerCase(),x[e]||x[R[e]]}var E={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},x={},R={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|	)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link_url",e:"$"}}]}]}});hljs.registerLanguage("lua",function(e){var t="\\[=*\\[",a="\\]=*\\]",r={b:t,e:a,c:["self"]},n=[e.C("--(?!"+t+")","$"),e.C("--"+t,a,{c:[r],r:10})];return{l:e.UIR,k:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},c:n.concat([{cN:"function",bK:"function",e:"\\)",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:!0,c:n}].concat(n)},e.CNM,e.ASM,e.QSM,{cN:"string",b:t,e:a,c:[r],r:5}])}});hljs.registerLanguage("scala",function(e){var t={cN:"annotation",b:"@[A-Za-z]+"},a={cN:"string",b:'u?r?"""',e:'"""',r:10},r={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"},c={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},i={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0},l={cN:"class",bK:"class object trait type",e:/[:={\[(\n;]/,c:[{cN:"keyword",bK:"extends with",r:10},i]},n={cN:"function",bK:"def val",e:/[:={\[(\n;]/,c:[i]};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[e.CLCM,e.CBCM,a,e.QSM,r,c,n,l,e.CNM,t]}});hljs.registerLanguage("ruby",function(e){var c="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",b={cN:"doctag",b:"@[A-Za-z]+"},a={cN:"value",b:"#<",e:">"},n=[e.C("#","$",{c:[b]}),e.C("^\\=begin","^\\=end",{c:[b],r:10}),e.C("^__END__","\\n$")],s={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={cN:"params",b:"\\(",e:"\\)",k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]}].concat(n)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:c}),i].concat(n)},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[t,{b:c}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(n),r:0}].concat(n);s.c=d,i.c=d;var o="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",N=[{b:/^\s*=>/,cN:"status",starts:{e:"$",c:d}},{cN:"prompt",b:"^("+o+"|"+l+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,c:n.concat(N).concat(d)}});hljs.registerLanguage("typescript",function(e){var r={keyword:"in if for while finally var new function|0 do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private get set super static implements enum export import declare type protected",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],k:r,c:[{cN:"pi",b:/^\s*['"]use strict['"]/,r:0},e.ASM,e.QSM,e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM],r:0},{cN:"function",b:"function",e:/[\{;]/,eE:!0,k:r,c:["self",e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/\[|%/,r:0},{cN:"constructor",bK:"constructor",e:/\{/,eE:!0,r:10},{cN:"module",bK:"module",e:/\{/,eE:!0},{cN:"interface",bK:"interface",e:/\{/,eE:!0,k:"interface extends"},{b:/\$[(.]/},{b:"\\."+e.IR,r:0}]}});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],l={cN:"value",e:",",eW:!0,eE:!0,c:i,k:t},c={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:l}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(l,{cN:null})],i:"\\S"};return i.splice(i.length,0,c,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("powershell",function(e){var t={b:"`[\\s\\S]",r:0},r={cN:"variable",v:[{b:/\$[\w\d][\w\d_:]*/}]},o={cN:"string",b:/"/,e:/"/,c:[t,r,{cN:"variable",b:/\$[A-z]/,e:/[^A-z]/}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["ps"],l:/-?[A-z\.\-]+/,cI:!0,k:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",literal:"$null $true $false",built_in:"Add-Content Add-History Add-Member Add-PSSnapin Clear-Content Clear-Item Clear-Item Property Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ConvertTo-Html ConvertTo-SecureString Copy-Item Copy-ItemProperty Export-Alias Export-Clixml Export-Console Export-Csv ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item Join-Path Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug Set-Service Set-TraceSource Set-Variable Sort-Object Split-Path Start-Service Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where-Object Write-Debug Write-Error Write-Host Write-Output Write-Progress Write-Verbose Write-Warning",operator:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},c:[e.HCM,e.NM,o,a,r]}});hljs.registerLanguage("xml",function(t){var s="[A-Za-z0-9\\._:-]+",c={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},e={eW:!0,i:/</,r:0,c:[c,{cN:"attribute",b:s,r:0},{b:"=",r:0,c:[{cN:"value",c:[c],v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},t.C("<!--","-->",{r:10}),{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[e],starts:{e:"</style>",rE:!0,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[e],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars"]}},c,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},e]}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",a={cN:"function",b:c+"\\(",rB:!0,eE:!0,e:"\\("},r={cN:"rule",b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{cN:"value",eW:!0,eE:!0,c:[a,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,r,{cN:"id",b:/\#[A-Za-z0-9_-]+/},{cN:"class",b:/\.[A-Za-z0-9_-]+/},{cN:"attr_selector",b:/\[/,e:/\]/,i:"$"},{cN:"pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[a,e.ASM,e.QSM,e.CSSNM]}]},{cN:"tag",b:c,r:0},{cN:"rules",b:"{",e:"}",i:/\S/,c:[e.CBCM,r]}]}});hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",i={cN:"variable",b:"(\\$"+t+")\\b"},r={cN:"function",b:t+"\\(",rB:!0,eE:!0,e:"\\("},o={cN:"hexcolor",b:"#[0-9A-Fa-f]+"};({cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[r,o,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"important",b:"!important"}]}});return{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,r,{cN:"id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{cN:"pseudo",b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{cN:"pseudo",b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},i,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{cN:"value",b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{cN:"value",b:":",e:";",c:[r,i,o,e.CSSNM,e.QSM,e.ASM,{cN:"important",b:"!important"}]},{cN:"at_rule",b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[r,i,e.QSM,e.ASM,o,e.CSSNM,{cN:"preprocessor",b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}});hljs.registerLanguage("cs",function(e){var r="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",t=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:r,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"xmlDocTag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]}),e.CLCM,e.CBCM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[{cN:"title",b:"[a-zA-Z](\\.?\\w)*",r:0},e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("python",function(e){var r={cN:"prompt",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l]},{cN:"decorator",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("java",function(e){var a=e.UIR+"(<"+e.UIR+">)?",t="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",c="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",r={cN:"number",b:c,r:0};return{aliases:["jsp"],k:t,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+a+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},r,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,s,a,t]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[t.inherit(t.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:t.CNR}]},i={cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line pragma ifdef ifndef",c:[{b:/\\\n/,r:0},{bK:"include",e:"$",c:[r,{cN:"string",b:"<",e:">",i:"\\n"}]},r,s,t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"</",c:[e,t.CLCM,t.CBCM,s,r,i,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",e]},{b:t.IR+"::",k:c},{bK:"new throw return else",r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s]},t.CLCM,t.CBCM,i]}]}});hljs.registerLanguage("php",function(e){var c={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},a={cN:"preprocessor",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},t={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"},a]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},a,c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,i,t]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,t]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"pi",r:10,b:/^\s*['"]use (strict|asm)['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/>\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{bK:"import",e:"[;$]",k:"import from as",c:[e.ASM,e.QSM]},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]}],i:/#/}});hljs.registerLanguage("less",function(e){var r="[\\w-]+",t="("+r+"|@{"+r+"})",a=[],c=[],n=function(e){return{cN:"string",b:"~?"+e+".*?"+e}},i=function(e,r,t){return{cN:e,b:r,r:t}},s=function(r,t,a){return e.inherit({cN:r,b:t+"\\(",e:"\\(",rB:!0,eE:!0,r:0},a)},b={b:"\\(",e:"\\)",c:c,r:0};c.push(e.CLCM,e.CBCM,n("'"),n('"'),e.CSSNM,i("hexcolor","#[0-9A-Fa-f]+\\b"),s("function","(url|data-uri)",{starts:{cN:"string",e:"[\\)\\n]",eE:!0}}),s("function",r),b,i("variable","@@?"+r,10),i("variable","@{"+r+"}"),i("built_in","~?`[^`]*?`"),{cN:"attribute",b:r+"\\s*:",e:":",rB:!0,eE:!0});var o=c.concat({b:"{",e:"}",c:a}),u={bK:"when",eW:!0,c:[{bK:"and not"}].concat(c)},C={cN:"attribute",b:t,e:":",eE:!0,c:[e.CLCM,e.CBCM],i:/\S/,starts:{e:"[;}]",rE:!0,c:c,i:"[<=$]"}},l={cN:"at_rule",b:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{e:"[;{}]",rE:!0,c:c,r:0}},d={cN:"variable",v:[{b:"@"+r+"\\s*:",r:15},{b:"@"+r}],starts:{e:"[;}]",rE:!0,c:o}},p={v:[{b:"[\\.#:&\\[]",e:"[;{}]"},{b:t+"[^;]*{",e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",c:[e.CLCM,e.CBCM,u,i("keyword","all\\b"),i("variable","@{"+r+"}"),i("tag",t+"%?",0),i("id","#"+t),i("class","\\."+t,0),i("keyword","&",0),s("pseudo",":not"),s("keyword",":extend"),i("pseudo","::?"+t),{cN:"attr_selector",b:"\\[",e:"\\]"},{b:"\\(",e:"\\)",c:o},{b:"!important"}]};return a.push(e.CLCM,e.CBCM,l,d,p,C),{cI:!0,i:"[=>'/<($\"]",c:a}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"chunk",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("dos",function(e){var r=e.C(/@?rem\b/,/$/,{r:10}),t={cN:"label",b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",r:0};return{aliases:["bat","cmd"],cI:!0,k:{flow:"if else goto for in do call exit not exist errorlevel defined",operator:"equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del",built_in:"append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol"},c:[{cN:"envvar",b:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{cN:"function",b:t.b,e:"goto:eof",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),r]},{cN:"number",b:"\\b\\d+",r:0},r]}});hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"</",c:[e.CLCM,e.CBCM,e.QSM,{cN:"string",b:"'",e:"[^\\\\]'"},{cN:"string",b:"`",e:"`"},{cN:"number",b:e.CNR+"[dflsi]?",r:0},e.CNM]}});;
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Slideout=t()}}(function(){var t,e,n;return function i(t,e,n){function o(r,a){if(!e[r]){if(!t[r]){var u=typeof require=="function"&&require;if(!a&&u)return u(r,!0);if(s)return s(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var h=e[r]={exports:{}};t[r][0].call(h.exports,function(e){var n=t[r][1][e];return o(n?n:e)},h,h.exports,i,t,e,n)}return e[r].exports}var s=typeof require=="function"&&require;for(var r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,n){"use strict";var i=t("decouple");var o=t("emitter");var s;var r=false;var a=window.document;var u=a.documentElement;var l=window.navigator.msPointerEnabled;var h={start:l?"MSPointerDown":"touchstart",move:l?"MSPointerMove":"touchmove",end:l?"MSPointerUp":"touchend"};var f=function v(){var t=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/;var e=a.getElementsByTagName("script")[0].style;for(var n in e){if(t.test(n)){return"-"+n.match(t)[0].toLowerCase()+"-"}}if("WebkitOpacity"in e){return"-webkit-"}if("KhtmlOpacity"in e){return"-khtml-"}return""}();function c(t,e){for(var n in e){if(e[n]){t[n]=e[n]}}return t}function p(t,e){t.prototype=c(t.prototype||{},e.prototype)}function d(t){while(t.parentNode){if(t.getAttribute("data-slideout-ignore")!==null){return t}t=t.parentNode}return null}function _(t){t=t||{};this._startOffsetX=0;this._currentOffsetX=0;this._opening=false;this._moved=false;this._opened=false;this._preventOpen=false;this.panel=t.panel;this.menu=t.menu;this._touch=t.touch===undefined?true:t.touch&&true;this._side=t.side||"left";this._easing=t.fx||t.easing||"ease";this._duration=parseInt(t.duration,10)||300;this._tolerance=parseInt(t.tolerance,10)||70;this._padding=this._translateTo=parseInt(t.padding,10)||256;this._orientation=this._side==="right"?-1:1;this._translateTo*=this._orientation;if(!this.panel.classList.contains("slideout-panel")){this.panel.classList.add("slideout-panel")}if(!this.panel.classList.contains("slideout-panel-"+this._side)){this.panel.classList.add("slideout-panel-"+this._side)}if(!this.menu.classList.contains("slideout-menu")){this.menu.classList.add("slideout-menu")}if(!this.menu.classList.contains("slideout-menu-"+this._side)){this.menu.classList.add("slideout-menu-"+this._side)}if(this._touch){this._initTouchEvents()}}p(_,o);_.prototype.open=function(){var t=this;this.emit("beforeopen");if(!u.classList.contains("slideout-open")){u.classList.add("slideout-open")}this._setTransition();this._translateXTo(this._translateTo);this._opened=true;setTimeout(function(){t.panel.style.transition=t.panel.style["-webkit-transition"]="";t.emit("open")},this._duration+50);return this};_.prototype.close=function(){var t=this;if(!this.isOpen()&&!this._opening){return this}this.emit("beforeclose");this._setTransition();this._translateXTo(0);this._opened=false;setTimeout(function(){u.classList.remove("slideout-open");t.panel.style.transition=t.panel.style["-webkit-transition"]=t.panel.style[f+"transform"]=t.panel.style.transform="";t.emit("close")},this._duration+50);return this};_.prototype.toggle=function(){return this.isOpen()?this.close():this.open()};_.prototype.isOpen=function(){return this._opened};_.prototype._translateXTo=function(t){this._currentOffsetX=t;this.panel.style[f+"transform"]=this.panel.style.transform="translateX("+t+"px)";return this};_.prototype._setTransition=function(){this.panel.style[f+"transition"]=this.panel.style.transition=f+"transform "+this._duration+"ms "+this._easing;return this};_.prototype._initTouchEvents=function(){var t=this;this._onScrollFn=i(a,"scroll",function(){if(!t._moved){clearTimeout(s);r=true;s=setTimeout(function(){r=false},250)}});this._preventMove=function(e){if(t._moved){e.preventDefault()}};a.addEventListener(h.move,this._preventMove);this._resetTouchFn=function(e){if(typeof e.touches==="undefined"){return}t._moved=false;t._opening=false;t._startOffsetX=e.touches[0].pageX;t._preventOpen=!t._touch||!t.isOpen()&&t.menu.clientWidth!==0};this.panel.addEventListener(h.start,this._resetTouchFn);this._onTouchCancelFn=function(){t._moved=false;t._opening=false};this.panel.addEventListener("touchcancel",this._onTouchCancelFn);this._onTouchEndFn=function(){if(t._moved){t.emit("translateend");t._opening&&Math.abs(t._currentOffsetX)>t._tolerance?t.open():t.close()}t._moved=false};this.panel.addEventListener(h.end,this._onTouchEndFn);this._onTouchMoveFn=function(e){if(r||t._preventOpen||typeof e.touches==="undefined"||d(e.target)){return}var n=e.touches[0].clientX-t._startOffsetX;var i=t._currentOffsetX=n;if(Math.abs(i)>t._padding){return}if(Math.abs(n)>20){t._opening=true;var o=n*t._orientation;if(t._opened&&o>0||!t._opened&&o<0){return}if(!t._moved){t.emit("translatestart")}if(o<=0){i=n+t._padding*t._orientation;t._opening=false}if(!(t._moved&&u.classList.contains("slideout-open"))){u.classList.add("slideout-open")}t.panel.style[f+"transform"]=t.panel.style.transform="translateX("+i+"px)";t.emit("translate",i);t._moved=true}};this.panel.addEventListener(h.move,this._onTouchMoveFn);return this};_.prototype.enableTouch=function(){this._touch=true;return this};_.prototype.disableTouch=function(){this._touch=false;return this};_.prototype.destroy=function(){this.close();a.removeEventListener(h.move,this._preventMove);this.panel.removeEventListener(h.start,this._resetTouchFn);this.panel.removeEventListener("touchcancel",this._onTouchCancelFn);this.panel.removeEventListener(h.end,this._onTouchEndFn);this.panel.removeEventListener(h.move,this._onTouchMoveFn);a.removeEventListener("scroll",this._onScrollFn);this.open=this.close=function(){};return this};e.exports=_},{decouple:2,emitter:3}],2:[function(t,e,n){"use strict";var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t,e,n){var o,s=false;function r(t){o=t;a()}function a(){if(!s){i(u);s=true}}function u(){n.call(t,o);s=false}t.addEventListener(e,r,false);return r}e.exports=o},{}],3:[function(t,e,n){"use strict";var i=function(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}};n.__esModule=true;var o=function(){function t(){i(this,t)}t.prototype.on=function e(t,n){this._eventCollection=this._eventCollection||{};this._eventCollection[t]=this._eventCollection[t]||[];this._eventCollection[t].push(n);return this};t.prototype.once=function n(t,e){var n=this;function i(){n.off(t,i);e.apply(this,arguments)}i.listener=e;this.on(t,i);return this};t.prototype.off=function o(t,e){var n=undefined;if(!this._eventCollection||!(n=this._eventCollection[t])){return this}n.forEach(function(t,i){if(t===e||t.listener===e){n.splice(i,1)}});if(n.length===0){delete this._eventCollection[t]}return this};t.prototype.emit=function s(t){var e=this;for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++){i[o-1]=arguments[o]}var s=undefined;if(!this._eventCollection||!(s=this._eventCollection[t])){return this}s=s.slice(0);s.forEach(function(t){return t.apply(e,i)});return this};return t}();n["default"]=o;e.exports=n["default"]},{}]},{},[1])(1)});;
/**
 * Featherlight - ultra slim jQuery lightbox
 * Version 1.7.13 - http://noelboss.github.io/featherlight/
 *
 * Copyright 2018, Noël Raoul Bossart (http://www.noelboss.com)
 * MIT Licensed.
**/
!function (a) { "use strict"; function b(a, c) { if (!(this instanceof b)) { var d = new b(a, c); return d.open(), d } this.id = b.id++ , this.setup(a, c), this.chainCallbacks(b._callbackChain) } function c(a, b) { var c = {}; for (var d in a) d in b && (c[d] = a[d], delete a[d]); return c } function d(a, b) { var c = {}, d = new RegExp("^" + b + "([A-Z])(.*)"); for (var e in a) { var f = e.match(d); if (f) { var g = (f[1] + f[2].replace(/([A-Z])/g, "-$1")).toLowerCase(); c[g] = a[e] } } return c } if ("undefined" == typeof a) return void ("console" in window && window.console.info("Too much lightness, Featherlight needs jQuery.")); if (a.fn.jquery.match(/-ajax/)) return void ("console" in window && window.console.info("Featherlight needs regular jQuery, not the slim version.")); var e = [], f = function (b) { return e = a.grep(e, function (a) { return a !== b && a.$instance.closest("body").length > 0 }) }, g = { allow: 1, allowfullscreen: 1, frameborder: 1, height: 1, longdesc: 1, marginheight: 1, marginwidth: 1, mozallowfullscreen: 1, name: 1, referrerpolicy: 1, sandbox: 1, scrolling: 1, src: 1, srcdoc: 1, style: 1, webkitallowfullscreen: 1, width: 1 }, h = { keyup: "onKeyUp", resize: "onResize" }, i = function (c) { a.each(b.opened().reverse(), function () { return c.isDefaultPrevented() || !1 !== this[h[c.type]](c) ? void 0 : (c.preventDefault(), c.stopPropagation(), !1) }) }, j = function (c) { if (c !== b._globalHandlerInstalled) { b._globalHandlerInstalled = c; var d = a.map(h, function (a, c) { return c + "." + b.prototype.namespace }).join(" "); a(window)[c ? "on" : "off"](d, i) } }; b.prototype = { constructor: b, namespace: "featherlight", targetAttr: "data-featherlight", variant: null, resetCss: !1, background: null, openTrigger: "click", closeTrigger: "click", filter: null, root: "body", openSpeed: 250, closeSpeed: 250, closeOnClick: "background", closeOnEsc: !0, closeIcon: "&#10005;", loading: "", persist: !1, otherClose: null, beforeOpen: a.noop, beforeContent: a.noop, beforeClose: a.noop, afterOpen: a.noop, afterContent: a.noop, afterClose: a.noop, onKeyUp: a.noop, onResize: a.noop, type: null, contentFilters: ["jquery", "image", "html", "ajax", "iframe", "text"], setup: function (b, c) { "object" != typeof b || b instanceof a != !1 || c || (c = b, b = void 0); var d = a.extend(this, c, { target: b }), e = d.resetCss ? d.namespace + "-reset" : d.namespace, f = a(d.background || ['<div class="' + e + "-loading " + e + '">', '<div class="' + e + '-content">', '<button class="' + e + "-close-icon " + d.namespace + '-close" aria-label="Close">', d.closeIcon, "</button>", '<div class="' + d.namespace + '-inner">' + d.loading + "</div>", "</div>", "</div>"].join("")), g = "." + d.namespace + "-close" + (d.otherClose ? "," + d.otherClose : ""); return d.$instance = f.clone().addClass(d.variant), d.$instance.on(d.closeTrigger + "." + d.namespace, function (b) { if (!b.isDefaultPrevented()) { var c = a(b.target); ("background" === d.closeOnClick && c.is("." + d.namespace) || "anywhere" === d.closeOnClick || c.closest(g).length) && (d.close(b), b.preventDefault()) } }), this }, getContent: function () { if (this.persist !== !1 && this.$content) return this.$content; var b = this, c = this.constructor.contentFilters, d = function (a) { return b.$currentTarget && b.$currentTarget.attr(a) }, e = d(b.targetAttr), f = b.target || e || "", g = c[b.type]; if (!g && f in c && (g = c[f], f = b.target && e), f = f || d("href") || "", !g) for (var h in c) b[h] && (g = c[h], f = b[h]); if (!g) { var i = f; if (f = null, a.each(b.contentFilters, function () { return g = c[this], g.test && (f = g.test(i)), !f && g.regex && i.match && i.match(g.regex) && (f = i), !f }), !f) return "console" in window && window.console.error("Featherlight: no content filter found " + (i ? ' for "' + i + '"' : " (no target specified)")), !1 } return g.process.call(b, f) }, setContent: function (b) { return this.$instance.removeClass(this.namespace + "-loading"), this.$instance.toggleClass(this.namespace + "-iframe", b.is("iframe")), this.$instance.find("." + this.namespace + "-inner").not(b).slice(1).remove().end().replaceWith(a.contains(this.$instance[0], b[0]) ? "" : b), this.$content = b.addClass(this.namespace + "-inner"), this }, open: function (b) { var c = this; if (c.$instance.hide().appendTo(c.root), !(b && b.isDefaultPrevented() || c.beforeOpen(b) === !1)) { b && b.preventDefault(); var d = c.getContent(); if (d) return e.push(c), j(!0), c.$instance.fadeIn(c.openSpeed), c.beforeContent(b), a.when(d).always(function (a) { c.setContent(a), c.afterContent(b) }).then(c.$instance.promise()).done(function () { c.afterOpen(b) }) } return c.$instance.detach(), a.Deferred().reject().promise() }, close: function (b) { var c = this, d = a.Deferred(); return c.beforeClose(b) === !1 ? d.reject() : (0 === f(c).length && j(!1), c.$instance.fadeOut(c.closeSpeed, function () { c.$instance.detach(), c.afterClose(b), d.resolve() })), d.promise() }, resize: function (a, b) { if (a && b) { this.$content.css("width", "").css("height", ""); var c = Math.max(a / (this.$content.parent().width() - 1), b / (this.$content.parent().height() - 1)); c > 1 && (c = b / Math.floor(b / c), this.$content.css("width", "" + a / c + "px").css("height", "" + b / c + "px")) } }, chainCallbacks: function (b) { for (var c in b) this[c] = a.proxy(b[c], this, a.proxy(this[c], this)) } }, a.extend(b, { id: 0, autoBind: "[data-featherlight]", defaults: b.prototype, contentFilters: { jquery: { regex: /^[#.]\w/, test: function (b) { return b instanceof a && b }, process: function (b) { return this.persist !== !1 ? a(b) : a(b).clone(!0) } }, image: { regex: /\.(png|jpg|jpeg|gif|tiff?|bmp|svg)(\?\S*)?$/i, process: function (b) { var c = this, d = a.Deferred(), e = new Image, f = a('<img src="' + b + '" alt="" class="' + c.namespace + '-image" />'); return e.onload = function () { f.naturalWidth = e.width, f.naturalHeight = e.height, d.resolve(f) }, e.onerror = function () { d.reject(f) }, e.src = b, d.promise() } }, html: { regex: /^\s*<[\w!][^<]*>/, process: function (b) { return a(b) } }, ajax: { regex: /./, process: function (b) { var c = a.Deferred(), d = a("<div></div>").load(b, function (a, b) { "error" !== b && c.resolve(d.contents()), c.fail() }); return c.promise() } }, iframe: { process: function (b) { var e = new a.Deferred, f = a("<iframe/>"), h = d(this, "iframe"), i = c(h, g); return f.hide().attr("src", b).attr(i).css(h).on("load", function () { e.resolve(f.show()) }).appendTo(this.$instance.find("." + this.namespace + "-content")), e.promise() } }, text: { process: function (b) { return a("<div>", { text: b }) } } }, functionAttributes: ["beforeOpen", "afterOpen", "beforeContent", "afterContent", "beforeClose", "afterClose"], readElementConfig: function (b, c) { var d = this, e = new RegExp("^data-" + c + "-(.*)"), f = {}; return b && b.attributes && a.each(b.attributes, function () { var b = this.name.match(e); if (b) { var c = this.value, g = a.camelCase(b[1]); if (a.inArray(g, d.functionAttributes) >= 0) c = new Function(c); else try { c = JSON.parse(c) } catch (h) { } f[g] = c } }), f }, extend: function (b, c) { var d = function () { this.constructor = b }; return d.prototype = this.prototype, b.prototype = new d, b.__super__ = this.prototype, a.extend(b, this, c), b.defaults = b.prototype, b }, attach: function (b, c, d) { var e = this; "object" != typeof c || c instanceof a != !1 || d || (d = c, c = void 0), d = a.extend({}, d); var f, g = d.namespace || e.defaults.namespace, h = a.extend({}, e.defaults, e.readElementConfig(b[0], g), d), i = function (g) { var i = a(g.currentTarget), j = a.extend({ $source: b, $currentTarget: i }, e.readElementConfig(b[0], h.namespace), e.readElementConfig(g.currentTarget, h.namespace), d), k = f || i.data("featherlight-persisted") || new e(c, j); "shared" === k.persist ? f = k : k.persist !== !1 && i.data("featherlight-persisted", k), j.$currentTarget.blur && j.$currentTarget.blur(), k.open(g) }; return b.on(h.openTrigger + "." + h.namespace, h.filter, i), { filter: h.filter, handler: i } }, current: function () { var a = this.opened(); return a[a.length - 1] || null }, opened: function () { var b = this; return f(), a.grep(e, function (a) { return a instanceof b }) }, close: function (a) { var b = this.current(); return b ? b.close(a) : void 0 }, _onReady: function () { var b = this; if (b.autoBind) { var c = a(b.autoBind); c.each(function () { b.attach(a(this)) }), a(document).on("click", b.autoBind, function (d) { if (!d.isDefaultPrevented()) { var e = a(d.currentTarget), f = c.length; if (c = c.add(e), f !== c.length) { var g = b.attach(e); (!g.filter || a(d.target).parentsUntil(e, g.filter).length > 0) && g.handler(d) } } }) } }, _callbackChain: { onKeyUp: function (b, c) { return 27 === c.keyCode ? (this.closeOnEsc && a.featherlight.close(c), !1) : b(c) }, beforeOpen: function (b, c) { return a(document.documentElement).addClass("with-featherlight"), this._previouslyActive = document.activeElement, this._$previouslyTabbable = a("a, input, select, textarea, iframe, button, iframe, [contentEditable=true]").not("[tabindex]").not(this.$instance.find("button")), this._$previouslyWithTabIndex = a("[tabindex]").not('[tabindex="-1"]'), this._previousWithTabIndices = this._$previouslyWithTabIndex.map(function (b, c) { return a(c).attr("tabindex") }), this._$previouslyWithTabIndex.add(this._$previouslyTabbable).attr("tabindex", -1), document.activeElement.blur && document.activeElement.blur(), b(c) }, afterClose: function (c, d) { var e = c(d), f = this; return this._$previouslyTabbable.removeAttr("tabindex"), this._$previouslyWithTabIndex.each(function (b, c) { a(c).attr("tabindex", f._previousWithTabIndices[b]) }), this._previouslyActive.focus(), 0 === b.opened().length && a(document.documentElement).removeClass("with-featherlight"), e }, onResize: function (a, b) { return this.resize(this.$content.naturalWidth, this.$content.naturalHeight), a(b) }, afterContent: function (a, b) { var c = a(b); return this.$instance.find("[autofocus]:not([disabled])").focus(), this.onResize(b), c } } }), a.featherlight = b, a.fn.featherlight = function (a, c) { return b.attach(this, a, c), this }, a(document).ready(function () { b._onReady() }) }(jQuery);;
Elerium.Localization.setLanguages([{"id":1,"name":"English","pluralForm":1,"phraseID":315,"localizedName":"English","code":"en"},{"id":2,"name":"Français (French)","pluralForm":2,"phraseID":316,"localizedName":"Français","code":"fr"},{"id":3,"name":"Deutsch (German)","pluralForm":1,"phraseID":317,"localizedName":"Deutsch","code":"de"},{"id":4,"name":"Español (Spanish)","pluralForm":1,"phraseID":318,"localizedName":"Español","code":"es"},{"id":5,"name":"Pусский (Russian)","pluralForm":7,"phraseID":319,"localizedName":"Русский","code":"ru"},{"id":7,"name":"汉语 (Simplified Chinese)","pluralForm":0,"phraseID":320,"localizedName":"简体中文","code":"zh"},{"id":8,"name":"日本語 (Japanese)","pluralForm":0,"phraseID":321,"localizedName":"日本語","code":"ja"},{"id":9,"name":"한국어 (Korean)","pluralForm":0,"phraseID":322,"localizedName":"한국어","code":"ko"},{"id":10,"name":"Svenska (Swedish)","pluralForm":1,"phraseID":323,"localizedName":"Svenska","code":"sv"},{"id":11,"name":"Bahasa Indonesia (Indonesian)","pluralForm":0,"phraseID":324,"localizedName":"Bahasa Indonesia","code":"id"},{"id":13,"name":"Ελληνικά (Greek)","pluralForm":1,"phraseID":325,"localizedName":"Ελληνικά","code":"el"},{"id":14,"name":"Polski (Polish)","pluralForm":9,"phraseID":326,"localizedName":"Polski","code":"pl"},{"id":15,"name":"Italiano (Italian)","pluralForm":1,"phraseID":966,"localizedName":"Italiano","code":"it"},{"id":16,"name":"繁體中文 (Traditional Chinese)","pluralForm":0,"phraseID":1189,"localizedName":"繁體中文","code":"tw"}]);
;
Elerium.Localization.Elerium = {
	ControlPanel: {
	                  ByValue: {},
		AreYouSureYouWantToDeleteName: function(filename) {
			/// <summary>
			/// Gets the localized text for the phrase AreYouSureYouWantToDeleteName with text like "Are you sure you want to delete {filename}?"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Developer: {
	                  ByValue: {},
		AreYouSureRemoveRole: function(name) {
			/// <summary>
			/// Gets the localized text for the phrase AreYouSureRemoveRole with text like "Are you sure you would like to delete {name} from the company?"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Extension: {
	                  ByValue: {},
		DeveloperWritableChannelSegmentVersion: function() {
			/// <summary>
			/// Gets the localized text for the phrase DeveloperWritableChannelSegmentVersion with text like "Developer Writable Channel Segment Version"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		DeveloperWritableChannelSegmentVersionDesc: function() {
			/// <summary>
			/// Gets the localized text for the phrase DeveloperWritableChannelSegmentVersionDesc with text like "If present - the extension will be inactive unless the version string in the channel\u0027s developer segment matches this value"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MobileConfirmDisableHeader: function() {
			/// <summary>
			/// Gets the localized text for the phrase MobileConfirmDisableHeader with text like "Are you sure you want to disable mobile support?"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MobileConfirmDisableMessage: function() {
			/// <summary>
			/// Gets the localized text for the phrase MobileConfirmDisableMessage with text like "When this version is released users will no longer be able access your extension from mobile."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RequestIdentityLinkRequired: function() {
			/// <summary>
			/// Gets the localized text for the phrase RequestIdentityLinkRequired with text like "Add Tooltip Copy"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RequestIdentityLinkRequiredWithPurchases: function() {
			/// <summary>
			/// Gets the localized text for the phrase RequestIdentityLinkRequiredWithPurchases with text like "Request Identity Link required with In-Extension Purchases"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RequiredPerChannelConfigurations: function() {
			/// <summary>
			/// Gets the localized text for the phrase RequiredPerChannelConfigurations with text like "Required Per Channel Configuration"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RequiredPerChannelConfigurationsDesc: function() {
			/// <summary>
			/// Gets the localized text for the phrase RequiredPerChannelConfigurationsDesc with text like "If present - this must match the per channel configuration string, for activation to proceed. See the \u0026lt;a href=\"https://dev.twitch.tv/docs/extensions/reference/#set-extension-required-configuration\" target=\"_blank\"\u0026gt;Set Extension Required Configuration\u0026lt;/a\u0026gt; Endpoint."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Global: {
	                  ByValue: {},
		Favorite: function() {
			/// <summary>
			/// Gets the localized text for the phrase Favorite with text like "Favorite"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Unfavorite: function() {
			/// <summary>
			/// Gets the localized text for the phrase Unfavorite with text like "Unfavorite"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Project: {
	                  ByValue: {},
		LoadingCategories: function() {
			/// <summary>
			/// Gets the localized text for the phrase LoadingCategories with text like "Loading Categories"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LoadingProjectCreation: function() {
			/// <summary>
			/// Gets the localized text for the phrase LoadingProjectCreation with text like "Loading Project Creation"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PleaseSelectACategory: function() {
			/// <summary>
			/// Gets the localized text for the phrase PleaseSelectACategory with text like "Please select a category"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PleaseSelectAGame: function() {
			/// <summary>
			/// Gets the localized text for the phrase PleaseSelectAGame with text like "Please select a game"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SelectCategory: function() {
			/// <summary>
			/// Gets the localized text for the phrase SelectCategory with text like "Select Category"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	ProjectFile: {
	                  ByValue: {},
		SelectArchivalType: function() {
			/// <summary>
			/// Gets the localized text for the phrase SelectArchivalType with text like "Select Archival Type"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	ProjectIssues: {
	                  ByValue: {},
		UnableToListTags: function() {
			/// <summary>
			/// Gets the localized text for the phrase UnableToListTags with text like "Unable to List Tags"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	}
};
Elerium.Localization.Global = {
	Buttons: {
	                  ByValue: {},
		Cancel: function() {
			/// <summary>
			/// Gets the localized text for the phrase Cancel with text like "Cancel"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Create: function() {
			/// <summary>
			/// Gets the localized text for the phrase Create with text like "Create"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Delete: function() {
			/// <summary>
			/// Gets the localized text for the phrase Delete with text like "Delete"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Edit: function() {
			/// <summary>
			/// Gets the localized text for the phrase Edit with text like "Edit"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Push: function() {
			/// <summary>
			/// Gets the localized text for the phrase Push with text like "Push"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Update: function() {
			/// <summary>
			/// Gets the localized text for the phrase Update with text like "Update"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Calendar: {
	                  ByValue: {},
		Month: function() {
			/// <summary>
			/// Gets the localized text for the phrase Month with text like "Month"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Today: function() {
			/// <summary>
			/// Gets the localized text for the phrase Today with text like "Today"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Week: function() {
			/// <summary>
			/// Gets the localized text for the phrase Week with text like "Week"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Common: {
	                  ByValue: {},
		Add: function() {
			/// <summary>
			/// Gets the localized text for the phrase Add with text like "Add"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		AddCharacter: function() {
			/// <summary>
			/// Gets the localized text for the phrase AddCharacter with text like "Add a character"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		AdvancedSearch: function() {
			/// <summary>
			/// Gets the localized text for the phrase AdvancedSearch with text like "Advanced Search"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Apply: function() {
			/// <summary>
			/// Gets the localized text for the phrase Apply with text like "Apply"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Ascending: function() {
			/// <summary>
			/// Gets the localized text for the phrase Ascending with text like "Ascending"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ClickHere: function() {
			/// <summary>
			/// Gets the localized text for the phrase ClickHere with text like "click here"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ColonConnector: function() {
			/// <summary>
			/// Gets the localized text for the phrase ColonConnector with text like ": "
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Comments: function() {
			/// <summary>
			/// Gets the localized text for the phrase Comments with text like "Comments"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Confirm: function() {
			/// <summary>
			/// Gets the localized text for the phrase Confirm with text like "Confirm"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ConfirmDelete: function(prompt) {
			/// <summary>
			/// Gets the localized text for the phrase ConfirmDelete with text like "Are you sure you want to delete {prompt}?"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Descending: function() {
			/// <summary>
			/// Gets the localized text for the phrase Descending with text like "Descending"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Description: function() {
			/// <summary>
			/// Gets the localized text for the phrase Description with text like "Description"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		EditMyAccount: function() {
			/// <summary>
			/// Gets the localized text for the phrase EditMyAccount with text like "Edit My Account"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		EmailErrorMessage: function() {
			/// <summary>
			/// Gets the localized text for the phrase EmailErrorMessage with text like "Must be an e-mail address."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		EqualErrorMessage: function(actual, expected) {
			/// <summary>
			/// Gets the localized text for the phrase EqualErrorMessage with text like "{actual} must be equal to {expected}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ErrorOccured: function() {
			/// <summary>
			/// Gets the localized text for the phrase ErrorOccured with text like "Sorry, an error occurred while processing your request."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		FileContainsVirus: function() {
			/// <summary>
			/// Gets the localized text for the phrase FileContainsVirus with text like "File is contaminated with a virus."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		IntegerValueErrorMessageMaximum: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase IntegerValueErrorMessageMaximum with text like "Must be at most {num}."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		IntegerValueErrorMessageMinimum: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase IntegerValueErrorMessageMinimum with text like "Must be at least {num}."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LengthErrorMessageMaximum: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase LengthErrorMessageMaximum with text like "Must be at most {num} PLURAL[{num};character;characters] long."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LengthErrorMessageMinimum: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase LengthErrorMessageMinimum with text like "Must be at least {num} PLURAL[{num};character;characters] long."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Logout: function() {
			/// <summary>
			/// Gets the localized text for the phrase Logout with text like "Sign Out"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Milliseconds: function(numMilliseconds) {
			/// <summary>
			/// Gets the localized text for the phrase Milliseconds with text like "{numMilliseconds} PLURAL[{numMilliseconds};millisecond;milliseconds]"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		More: function() {
			/// <summary>
			/// Gets the localized text for the phrase More with text like "More"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MyCharacters: function() {
			/// <summary>
			/// Gets the localized text for the phrase MyCharacters with text like "My Characters"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Name: function() {
			/// <summary>
			/// Gets the localized text for the phrase Name with text like "Name"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		New: function() {
			/// <summary>
			/// Gets the localized text for the phrase New with text like "New"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Normal: function() {
			/// <summary>
			/// Gets the localized text for the phrase Normal with text like "Normal"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		NumberOfPrivateMessagesAbbr: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase NumberOfPrivateMessagesAbbr with text like "{num} PLURAL[{num};PM;PMs]"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PageOf: function(currentPage, pageCount) {
			/// <summary>
			/// Gets the localized text for the phrase PageOf with text like "Page {currentPage} of {pageCount}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PageXOfY: function(current, total) {
			/// <summary>
			/// Gets the localized text for the phrase PageXOfY with text like "Page {current} of {total}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PleaseLogIn: function() {
			/// <summary>
			/// Gets the localized text for the phrase PleaseLogIn with text like "Please log in."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PleaseWaitProcessing: function() {
			/// <summary>
			/// Gets the localized text for the phrase PleaseWaitProcessing with text like "Please wait, processing ..."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PrivateMessagesAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase PrivateMessagesAbbr with text like "PMs"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		QuoteFrom: function(quotee) {
			/// <summary>
			/// Gets the localized text for the phrase QuoteFrom with text like "Quote from {quotee}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Remove: function() {
			/// <summary>
			/// Gets the localized text for the phrase Remove with text like "Remove"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RequiredErrorMessage: function() {
			/// <summary>
			/// Gets the localized text for the phrase RequiredErrorMessage with text like "This field is required."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RestoreContent: function() {
			/// <summary>
			/// Gets the localized text for the phrase RestoreContent with text like "Restore Content"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SelectCharacter: function() {
			/// <summary>
			/// Gets the localized text for the phrase SelectCharacter with text like "Select a Character"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ShowMore: function() {
			/// <summary>
			/// Gets the localized text for the phrase ShowMore with text like "Show More"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SimpleSearch: function() {
			/// <summary>
			/// Gets the localized text for the phrase SimpleSearch with text like "Simple search"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Submit: function() {
			/// <summary>
			/// Gets the localized text for the phrase Submit with text like "Submit"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		TestStuff: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase TestStuff with text like "This is just a test. {num} PLURAL[{num};bird;birds]."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Title: function() {
			/// <summary>
			/// Gets the localized text for the phrase Title with text like "Title"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		UserAsCharacter: function(username) {
			/// <summary>
			/// Gets the localized text for the phrase UserAsCharacter with text like "{username} as "
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		UserAvatar: function(username) {
			/// <summary>
			/// Gets the localized text for the phrase UserAvatar with text like "{username}\u0027s avatar"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Username: function() {
			/// <summary>
			/// Gets the localized text for the phrase Username with text like "Username"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		WelcomeUser: function(username) {
			/// <summary>
			/// Gets the localized text for the phrase WelcomeUser with text like "Welcome, {username}!"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	ContentManagement: {
	                  ByValue: {},
		AddMediaGallery: function() {
			/// <summary>
			/// Gets the localized text for the phrase AddMediaGallery with text like "Add Media Gallery"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ExistingFolders: function() {
			/// <summary>
			/// Gets the localized text for the phrase ExistingFolders with text like "Existing Folders"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		HideAddGallery: function() {
			/// <summary>
			/// Gets the localized text for the phrase HideAddGallery with text like "Don\u0027t Add Media Gallery"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Insert: function() {
			/// <summary>
			/// Gets the localized text for the phrase Insert with text like "Insert"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		InsertAnImage: function() {
			/// <summary>
			/// Gets the localized text for the phrase InsertAnImage with text like "Insert an Image"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		OnSelectedTemplate: function(numberSelected) {
			/// <summary>
			/// Gets the localized text for the phrase OnSelectedTemplate with text like "Apply to Selected ({numberSelected})"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PageFormDoNotSetDate: function() {
			/// <summary>
			/// Gets the localized text for the phrase PageFormDoNotSetDate with text like "Don\u0027t Set Date"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PageFormSetDate: function() {
			/// <summary>
			/// Gets the localized text for the phrase PageFormSetDate with text like "Set Date"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PublishOnTemplate: function(when) {
			/// <summary>
			/// Gets the localized text for the phrase PublishOnTemplate with text like "Publish {when}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SelectImage: function() {
			/// <summary>
			/// Gets the localized text for the phrase SelectImage with text like "Select an Image"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Contests: {
	                  ByValue: {},
		ContestPrizeItemAwardSubject: function(PrizeType) {
			/// <summary>
			/// Gets the localized text for the phrase ContestPrizeItemAwardSubject with text like "You Have Been Awarded {PrizeType}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ContestPrizeItemHtmlBody: function(PrizeLinkText, PrizeType, PrizeUrl) {
			/// <summary>
			/// Gets the localized text for the phrase ContestPrizeItemHtmlBody with text like "You have been awarded {PrizeType}.\u0026lt;a href=\"{PrizeUrl}\" target=_blank\u0026gt;{PrizeLinkText}\u0026lt;/a\u0026gt;"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ContestPrizeItemTextBody: function(PrizeType, PrizeUrl) {
			/// <summary>
			/// Gets the localized text for the phrase ContestPrizeItemTextBody with text like "You have been awarded {PrizeType}.Visit {PrizeUrl} to claim your prize."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		YouAreDisqualified: function() {
			/// <summary>
			/// Gets the localized text for the phrase YouAreDisqualified with text like "You have been disqualified!"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	ControlPanel: {
	                  ByValue: {},
		AddNewHeader: function() {
			/// <summary>
			/// Gets the localized text for the phrase AddNewHeader with text like "Add New Header"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		AddSubNavigationLink: function() {
			/// <summary>
			/// Gets the localized text for the phrase AddSubNavigationLink with text like "\u0026lt;div class=\"header\"\u0026gt;Add Sub-Navigation\u0026lt;/div\u0026gt;Add a Sub-Navigation Link"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		BulkConfirm: function(Action) {
			/// <summary>
			/// Gets the localized text for the phrase BulkConfirm with text like "Are you sure you want to {Action} these items?"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		CompLegacySubscription: function() {
			/// <summary>
			/// Gets the localized text for the phrase CompLegacySubscription with text like "Issue Comp"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Contactology_Campaigns: function() {
			/// <summary>
			/// Gets the localized text for the phrase Contactology Campaigns with text like "Contactology Campaigns"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		EntitySubscriptionTypes: function() {
			/// <summary>
			/// Gets the localized text for the phrase EntitySubscriptionTypes with text like "Entity Subscription Types"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LegacySubscriptions: function() {
			/// <summary>
			/// Gets the localized text for the phrase LegacySubscriptions with text like "Legacy Subscriptions"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LegacySubscriptionSearch: function() {
			/// <summary>
			/// Gets the localized text for the phrase LegacySubscriptionSearch with text like "Search Legacy Subscriptions"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MenuLegacySubscriptions: function() {
			/// <summary>
			/// Gets the localized text for the phrase MenuLegacySubscriptions with text like "Legacy Subscriptions"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MinimumPostCount: function() {
			/// <summary>
			/// Gets the localized text for the phrase MinimumPostCount with text like "Minimum Post Count"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MovePrivateMessagesPrompt: function(actionSelect) {
			/// <summary>
			/// Gets the localized text for the phrase MovePrivateMessagesPrompt with text like "Are you sure you want to move these private message(s) into the \"{actionSelect}\" folder?"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PushNotification: function() {
			/// <summary>
			/// Gets the localized text for the phrase PushNotification with text like "Push Notification"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RemoveLinkTooltip: function() {
			/// <summary>
			/// Gets the localized text for the phrase RemoveLinkTooltip with text like "\u0026lt;div class=\"header\"\u0026gt;Remove Link\u0026lt;/div\u0026gt;Remove this link from your web site navigation."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SubscriptionID: function() {
			/// <summary>
			/// Gets the localized text for the phrase SubscriptionID with text like "Subscription ID"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SubscriptionTypeEdit: function() {
			/// <summary>
			/// Gets the localized text for the phrase SubscriptionTypeEdit with text like "Subscription Type Edit"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SubscriptionTypePush: function() {
			/// <summary>
			/// Gets the localized text for the phrase SubscriptionTypePush with text like "Push Subscription Type Notification"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SubscriptionTypes: function() {
			/// <summary>
			/// Gets the localized text for the phrase SubscriptionTypes with text like "Subscription Types"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SimpleSearch: function() {
			/// <summary>
			/// Gets the localized text for the phrase SimpleSearch with text like "Simple Search"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue1 : function() { return Elerium.Localization.Global.ControlPanel.SimpleSearch; }
                                	},
	Dates: {
	                  ByValue: {},
		AprilAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase AprilAbbr with text like "Apr"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		AugustAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase AugustAbbr with text like "Aug"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Days: function(numDays) {
			/// <summary>
			/// Gets the localized text for the phrase Days with text like "{numDays} PLURAL[{numDays};day;days]"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		DecemberAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase DecemberAbbr with text like "Dec"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		FebruaryAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase FebruaryAbbr with text like "Feb"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		FridayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase FridayAbbr with text like "Fri"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		FutureFormat: function(time) {
			/// <summary>
			/// Gets the localized text for the phrase FutureFormat with text like "{time} from now"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Hours: function(numHours) {
			/// <summary>
			/// Gets the localized text for the phrase Hours with text like "{numHours} PLURAL[{numHours};hour;hours]"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		JanuaryAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase JanuaryAbbr with text like "Jan"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		JulyAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase JulyAbbr with text like "Jul"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		JuneAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase JuneAbbr with text like "Jun"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LessThanOneMinute: function() {
			/// <summary>
			/// Gets the localized text for the phrase LessThanOneMinute with text like "\u0026lt;1 min"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MarchAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase MarchAbbr with text like "Mar"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase MayAbbr with text like "May"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Minutes: function(numMinutes) {
			/// <summary>
			/// Gets the localized text for the phrase Minutes with text like "{numMinutes} PLURAL[{numMinutes};min;mins]"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MondayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase MondayAbbr with text like "Mon"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		NovemberAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase NovemberAbbr with text like "Nov"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		OctoberAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase OctoberAbbr with text like "Oct"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		OneMinute: function() {
			/// <summary>
			/// Gets the localized text for the phrase OneMinute with text like "1 min"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		PastFormat: function(time) {
			/// <summary>
			/// Gets the localized text for the phrase PastFormat with text like "{time} ago"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SaturdayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase SaturdayAbbr with text like "Sat"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Seconds: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase Seconds with text like "{num} sec"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SeptemberAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase SeptemberAbbr with text like "Sep"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		StandardDateFormat: function(date, month, year) {
			/// <summary>
			/// Gets the localized text for the phrase StandardDateFormat with text like "{month} {date}, {year}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		StandardDateTimeFormat: function(date, dayName, hour, minute, month, second, year) {
			/// <summary>
			/// Gets the localized text for the phrase StandardDateTimeFormat with text like "{dayName}, {month}, {date} {year} {hour}:{minute}:{second}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SundayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase SundayAbbr with text like "Sun"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ThursdayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase ThursdayAbbr with text like "Thu"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		TuesdayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase TuesdayAbbr with text like "Tue"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		WednesdayAbbr: function() {
			/// <summary>
			/// Gets the localized text for the phrase WednesdayAbbr with text like "Wed"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	ErrorMessages: {
	                  ByValue: {},
		NumericPrecisionDecimalDigitCountErrorMessageTemplate: function(providedDigitCount, requiredDigitCount) {
			/// <summary>
			/// Gets the localized text for the phrase NumericPrecisionDecimalDigitCountErrorMessageTemplate with text like "The value you provided has {providedDigitCount} decimal digits and the decimal digit limit is {requiredDigitCount} digits."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		TagEmpty: function() {
			/// <summary>
			/// Gets the localized text for the phrase TagEmpty with text like "You cannot add an empty tag."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Files: {
	                  ByValue: {},
		AddAttachment: function() {
			/// <summary>
			/// Gets the localized text for the phrase AddAttachment with text like "Add this attachment back."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ChangeDescription: function() {
			/// <summary>
			/// Gets the localized text for the phrase ChangeDescription with text like "Change this attachment\u0027s description"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		DeleteAttachment: function() {
			/// <summary>
			/// Gets the localized text for the phrase DeleteAttachment with text like "Delete this attachment"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		FileTooLarge: function(friendlySize) {
			/// <summary>
			/// Gets the localized text for the phrase FileTooLarge with text like "The file provided is too large. Please provide a file less than {friendlySize}."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Forums: {
	                  ByValue: {},
		Add: function() {
			/// <summary>
			/// Gets the localized text for the phrase Add with text like "Add"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		CreateForum: function() {
			/// <summary>
			/// Gets the localized text for the phrase CreateForum with text like "Create Forum"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Delete: function() {
			/// <summary>
			/// Gets the localized text for the phrase Delete with text like "Delete"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		EditForum: function() {
			/// <summary>
			/// Gets the localized text for the phrase EditForum with text like "Edit Forum"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		GoToFirstUnreadPost: function() {
			/// <summary>
			/// Gets the localized text for the phrase GoToFirstUnreadPost with text like "Go to first unread post"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		JumpToPage: function() {
			/// <summary>
			/// Gets the localized text for the phrase JumpToPage with text like "Jump to page"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LockThread: function() {
			/// <summary>
			/// Gets the localized text for the phrase LockThread with text like "Lock this thread"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		MarkForumRead: function() {
			/// <summary>
			/// Gets the localized text for the phrase MarkForumRead with text like "Mark Forum as Read"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Moderator: function() {
			/// <summary>
			/// Gets the localized text for the phrase Moderator with text like "Moderator"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Move: function() {
			/// <summary>
			/// Gets the localized text for the phrase Move with text like "Move"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		OnSelected: function(numberSelected) {
			/// <summary>
			/// Gets the localized text for the phrase OnSelected with text like "On Selected ({numberSelected})"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RestoreContentDescription: function() {
			/// <summary>
			/// Gets the localized text for the phrase RestoreContentDescription with text like "Click to restore your last entered text, in case of an error with your last attempt"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SearchForums: function() {
			/// <summary>
			/// Gets the localized text for the phrase SearchForums with text like "Search Forums"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SelectAll: function() {
			/// <summary>
			/// Gets the localized text for the phrase SelectAll with text like "Select All"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SendMessage: function() {
			/// <summary>
			/// Gets the localized text for the phrase SendMessage with text like "Send a Message"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Unread: function() {
			/// <summary>
			/// Gets the localized text for the phrase Unread with text like "Unread"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ViewPosts: function() {
			/// <summary>
			/// Gets the localized text for the phrase ViewPosts with text like "View Posts"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ViewProfile: function() {
			/// <summary>
			/// Gets the localized text for the phrase ViewProfile with text like "View User Profile"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Languages: {
	                  ByValue: {},
		Arabic: function() {
			/// <summary>
			/// Gets the localized text for the phrase Arabic with text like "Arabic"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Brazillian_Portugese: function() {
			/// <summary>
			/// Gets the localized text for the phrase Brazillian Portugese with text like "Brazillian Portugese"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		BritishEnglish: function() {
			/// <summary>
			/// Gets the localized text for the phrase BritishEnglish with text like "British English"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		English: function() {
			/// <summary>
			/// Gets the localized text for the phrase English with text like "English"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		French: function() {
			/// <summary>
			/// Gets the localized text for the phrase French with text like "French"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		German: function() {
			/// <summary>
			/// Gets the localized text for the phrase German with text like "German"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Greek: function() {
			/// <summary>
			/// Gets the localized text for the phrase Greek with text like "Greek"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Indonesian: function() {
			/// <summary>
			/// Gets the localized text for the phrase Indonesian with text like "Indonesian"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Italian: function() {
			/// <summary>
			/// Gets the localized text for the phrase Italian with text like "Italian"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Japanese: function() {
			/// <summary>
			/// Gets the localized text for the phrase Japanese with text like "Japanese"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Korean: function() {
			/// <summary>
			/// Gets the localized text for the phrase Korean with text like "Korean"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		LatinAmericanSpanish: function() {
			/// <summary>
			/// Gets the localized text for the phrase LatinAmericanSpanish with text like "Latin American Spanish"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Polish: function() {
			/// <summary>
			/// Gets the localized text for the phrase Polish with text like "Polish"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Russian: function() {
			/// <summary>
			/// Gets the localized text for the phrase Russian with text like "Russian"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		SimplifiedChinese: function() {
			/// <summary>
			/// Gets the localized text for the phrase SimplifiedChinese with text like "Simplified Chinese"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Spanish: function() {
			/// <summary>
			/// Gets the localized text for the phrase Spanish with text like "Spanish"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Swedish: function() {
			/// <summary>
			/// Gets the localized text for the phrase Swedish with text like "Swedish"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		TraditionalChinese: function() {
			/// <summary>
			/// Gets the localized text for the phrase TraditionalChinese with text like "Traditional Chinese"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Uzbec: function() {
			/// <summary>
			/// Gets the localized text for the phrase Uzbec with text like "Uzbec"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Vietnamese: function() {
			/// <summary>
			/// Gets the localized text for the phrase Vietnamese with text like "Vietnamese"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	MailTemplates: {
	                  ByValue: {},
		ReportBody: function(nickName, notificationPageUrl, reason, reportedContent, reportedContentUrl, reportedUserLink, reportingUserName, reportPageUrl, siteTitle, userCustomNote, userName) {
			/// <summary>
			/// Gets the localized text for the phrase ReportBody with text like "Hello {nickName},\u0026lt;p\u0026gt;{reportingUserName} has reported this \u0026lt;a href=\"{reportedContentUrl}\"\u0026gt;content\u0026lt;/a\u0026gt; on \u0026lt;a href=\"{reportPageUrl}\"\u0026gt;{siteTitle}\u0026lt;/a\u0026gt; for the reason {reason}.\u0026lt;/p\u0026gt;\u0026lt;p\u0026gt;{userCustomNote}\u0026lt;/p\u0026gt;\u0026lt;p\u0026gt;You can view the report by \u0026lt;a href=\"{reportPageUrl}\"\u0026gt;visiting the report page\u0026lt;/a\u0026gt;.\u0026lt;/p\u0026gt;\u0026lt;p\u0026gt;Reported content:\u0026lt;blockquote\u0026gt;Posted by \u0026lt;a href=\"{reportedUserLink}\"\u0026gt;{userName}\u0026lt;/a\u0026gt;\u0026lt;p\u0026gt;{reportedContent}\u0026lt;/p\u0026gt;\u0026lt;/blockquote\u0026gt;\u0026lt;/p\u0026gt;__\u0026lt;p style=\"font-size:11px\"\u0026gt;To unsubscribe from these email notifications, go to \u0026lt;a href=\"{notificationPageUrl}\"\u0026gt;your notifications page.\u0026lt;/a\u0026gt;\u0026lt;/p\u0026gt;"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Polls: {
	                  ByValue: {},
		AddChoice: function() {
			/// <summary>
			/// Gets the localized text for the phrase AddChoice with text like "Add Choice"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		AddPoll: function() {
			/// <summary>
			/// Gets the localized text for the phrase AddPoll with text like "Add a poll"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ChoiceNumberTemplate: function(num) {
			/// <summary>
			/// Gets the localized text for the phrase ChoiceNumberTemplate with text like "Choice #{num}"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		HideResults: function() {
			/// <summary>
			/// Gets the localized text for the phrase HideResults with text like "Hide Results"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RemoveChoice: function() {
			/// <summary>
			/// Gets the localized text for the phrase RemoveChoice with text like "Remove Choice"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RemovePoll: function() {
			/// <summary>
			/// Gets the localized text for the phrase RemovePoll with text like "Don\u0027t add a poll"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ViewResults: function() {
			/// <summary>
			/// Gets the localized text for the phrase ViewResults with text like "View Results"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Ratings: {
	                  ByValue: {},
		YouRatedThis: function(rating, ratingAverage, ratingCount) {
			/// <summary>
			/// Gets the localized text for the phrase YouRatedThis with text like "You rated this {rating} PLURAL[{rating};star;stars]. {ratingCount} PLURAL[{ratingCount};user;users] rated it for a total average of {ratingAverage} PLURAL[{ratingAverage};star;stars]."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Reporting: {
	                  ByValue: {},
		Report: function() {
			/// <summary>
			/// Gets the localized text for the phrase Report with text like "Report"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	TinyMCE: {
	                  ByValue: {},
		XenonMediaPluginDesc: function() {
			/// <summary>
			/// Gets the localized text for the phrase XenonMediaPluginDesc with text like "Add a file from a Folder"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Translator: {
	                  ByValue: {},
		ReportATranslation: function() {
			/// <summary>
			/// Gets the localized text for the phrase ReportATranslation with text like "Report a Translation"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		ReportTranslationInstructions: function() {
			/// <summary>
			/// Gets the localized text for the phrase ReportTranslationInstructions with text like "To report a translation, click on text that has a dotted underline."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Upsells: {
	                  ByValue: {},
		SubscriptionRequiresLogin: function() {
			/// <summary>
			/// Gets the localized text for the phrase SubscriptionRequiresLogin with text like "You must be logged in to Subscribe."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	UserRegistration: {
	                  ByValue: {},
		ConfirmPassword: function() {
			/// <summary>
			/// Gets the localized text for the phrase ConfirmPassword with text like "Confirm Password"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Password: function() {
			/// <summary>
			/// Gets the localized text for the phrase Password with text like "Password"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		RecoverAccountStep2Info2: function() {
			/// <summary>
			/// Gets the localized text for the phrase RecoverAccountStep2Info2 with text like "Enter a new password for your account, and click the \u0027Change Password\u0027 button."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		Username: function() {
			/// <summary>
			/// Gets the localized text for the phrase Username with text like "Username"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
		UsernameIsTaken: function() {
			/// <summary>
			/// Gets the localized text for the phrase UsernameIsTaken with text like "That username is taken."
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		}
		
	},
	Widgets: {
	                  ByValue: {},
		LatestPosts: function() {
			/// <summary>
			/// Gets the localized text for the phrase LatestPosts with text like "Latest Posts"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue2 : function() { return Elerium.Localization.Global.Widgets.LatestPosts; },
                                		LatestNews: function() {
			/// <summary>
			/// Gets the localized text for the phrase LatestNews with text like "Latest News"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue4 : function() { return Elerium.Localization.Global.Widgets.LatestNews; },
                                		Poll: function() {
			/// <summary>
			/// Gets the localized text for the phrase Poll with text like "Poll"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue5 : function() { return Elerium.Localization.Global.Widgets.Poll; },
                                		WhosOnline: function() {
			/// <summary>
			/// Gets the localized text for the phrase WhosOnline with text like "Who\u0027s Online"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue6 : function() { return Elerium.Localization.Global.Widgets.WhosOnline; },
                                		RandomPicture: function() {
			/// <summary>
			/// Gets the localized text for the phrase RandomPicture with text like "Random Picture"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue7 : function() { return Elerium.Localization.Global.Widgets.RandomPicture; },
                                		Calendar: function() {
			/// <summary>
			/// Gets the localized text for the phrase Calendar with text like "Calendar"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue8 : function() { return Elerium.Localization.Global.Widgets.Calendar; },
                                		Recruitment: function() {
			/// <summary>
			/// Gets the localized text for the phrase Recruitment with text like "Recruitment"
			/// </summary>
			/// <returns>A localized string.</returns>
			return Elerium.Localization.localize(arguments);
		},
		
                                ByValue9 : function() { return Elerium.Localization.Global.Widgets.Recruitment; }
                                	}
};
Elerium.Localization[1] = Elerium.Localization.Global.Buttons.Create;
Elerium.Localization[2] = Elerium.Localization.Global.Buttons.Edit;
Elerium.Localization[3] = Elerium.Localization.Global.Buttons.Update;
Elerium.Localization[4] = Elerium.Localization.Global.Buttons.Delete;
Elerium.Localization[32] = Elerium.Localization.Global.Common.ErrorOccured;
Elerium.Localization[96] = Elerium.Localization.Global.Common.Logout;
Elerium.Localization[104] = Elerium.Localization.Global.Common.EditMyAccount;
Elerium.Localization[106] = Elerium.Localization.Global.Common.WelcomeUser;
Elerium.Localization[107] = Elerium.Localization.Global.Forums.SearchForums;
Elerium.Localization[115] = Elerium.Localization.Global.Dates.FutureFormat;
Elerium.Localization[116] = Elerium.Localization.Global.Dates.PastFormat;
Elerium.Localization[117] = Elerium.Localization.Global.Dates.LessThanOneMinute;
Elerium.Localization[118] = Elerium.Localization.Global.Dates.OneMinute;
Elerium.Localization[119] = Elerium.Localization.Global.Dates.Minutes;
Elerium.Localization[120] = Elerium.Localization.Global.Dates.Hours;
Elerium.Localization[121] = Elerium.Localization.Global.Dates.Days;
Elerium.Localization[122] = Elerium.Localization.Global.Dates.StandardDateFormat;
Elerium.Localization[123] = Elerium.Localization.Global.Dates.StandardDateTimeFormat;
Elerium.Localization[126] = Elerium.Localization.Global.Dates.SundayAbbr;
Elerium.Localization[127] = Elerium.Localization.Global.Dates.MondayAbbr;
Elerium.Localization[128] = Elerium.Localization.Global.Dates.TuesdayAbbr;
Elerium.Localization[129] = Elerium.Localization.Global.Dates.WednesdayAbbr;
Elerium.Localization[130] = Elerium.Localization.Global.Dates.ThursdayAbbr;
Elerium.Localization[131] = Elerium.Localization.Global.Dates.FridayAbbr;
Elerium.Localization[132] = Elerium.Localization.Global.Dates.SaturdayAbbr;
Elerium.Localization[133] = Elerium.Localization.Global.Dates.JanuaryAbbr;
Elerium.Localization[134] = Elerium.Localization.Global.Dates.FebruaryAbbr;
Elerium.Localization[135] = Elerium.Localization.Global.Dates.MarchAbbr;
Elerium.Localization[136] = Elerium.Localization.Global.Dates.AprilAbbr;
Elerium.Localization[137] = Elerium.Localization.Global.Dates.MayAbbr;
Elerium.Localization[138] = Elerium.Localization.Global.Dates.JuneAbbr;
Elerium.Localization[139] = Elerium.Localization.Global.Dates.JulyAbbr;
Elerium.Localization[140] = Elerium.Localization.Global.Dates.AugustAbbr;
Elerium.Localization[141] = Elerium.Localization.Global.Dates.SeptemberAbbr;
Elerium.Localization[142] = Elerium.Localization.Global.Dates.OctoberAbbr;
Elerium.Localization[143] = Elerium.Localization.Global.Dates.NovemberAbbr;
Elerium.Localization[144] = Elerium.Localization.Global.Dates.DecemberAbbr;
Elerium.Localization[147] = Elerium.Localization.Global.Forums.LockThread;
Elerium.Localization[151] = Elerium.Localization.Global.Common.Title;
Elerium.Localization[154] = Elerium.Localization.Global.Forums.JumpToPage;
Elerium.Localization[155] = Elerium.Localization.Global.Forums.ViewProfile;
Elerium.Localization[156] = Elerium.Localization.Global.Forums.ViewPosts;
Elerium.Localization[157] = Elerium.Localization.Global.Forums.SendMessage;
Elerium.Localization[158] = Elerium.Localization.Global.Common.Submit;
Elerium.Localization[177] = Elerium.Localization.Global.Common.Add;
Elerium.Localization[181] = Elerium.Localization.Global.Common.Description;
Elerium.Localization[187] = Elerium.Localization.Global.Buttons.Cancel;
Elerium.Localization[193] = Elerium.Localization.Global.Forums.Delete;
Elerium.Localization[194] = Elerium.Localization.Global.Forums.Add;
Elerium.Localization[195] = Elerium.Localization.Global.Forums.SelectAll;
Elerium.Localization[196] = Elerium.Localization.Global.Forums.OnSelected;
Elerium.Localization[218] = Elerium.Localization.Global.Forums.Move;
Elerium.Localization[219] = Elerium.Localization.Global.Common.Name;
Elerium.Localization[221] = Elerium.Localization.Global.Common.Username;
Elerium.Localization[225] = Elerium.Localization.Global.Forums.Moderator;
Elerium.Localization[230] = Elerium.Localization.Global.Common.UserAvatar;
Elerium.Localization[266] = Elerium.Localization.Global.Common.MyCharacters;
Elerium.Localization[283] = Elerium.Localization.Global.UserRegistration.Username;
Elerium.Localization[284] = Elerium.Localization.Global.UserRegistration.Password;
Elerium.Localization[285] = Elerium.Localization.Global.UserRegistration.ConfirmPassword;
Elerium.Localization[314] = Elerium.Localization.Global.Forums.GoToFirstUnreadPost;
Elerium.Localization[315] = Elerium.Localization.Global.Languages.English;
Elerium.Localization[316] = Elerium.Localization.Global.Languages.French;
Elerium.Localization[317] = Elerium.Localization.Global.Languages.German;
Elerium.Localization[318] = Elerium.Localization.Global.Languages.Spanish;
Elerium.Localization[319] = Elerium.Localization.Global.Languages.Russian;
Elerium.Localization[320] = Elerium.Localization.Global.Languages.SimplifiedChinese;
Elerium.Localization[321] = Elerium.Localization.Global.Languages.Japanese;
Elerium.Localization[322] = Elerium.Localization.Global.Languages.Korean;
Elerium.Localization[323] = Elerium.Localization.Global.Languages.Swedish;
Elerium.Localization[324] = Elerium.Localization.Global.Languages.Indonesian;
Elerium.Localization[325] = Elerium.Localization.Global.Languages.Greek;
Elerium.Localization[326] = Elerium.Localization.Global.Languages.Polish;
Elerium.Localization[361] = Elerium.Localization.Global.Common.PageXOfY;
Elerium.Localization[378] = Elerium.Localization.Global.Common.RequiredErrorMessage;
Elerium.Localization[379] = Elerium.Localization.Global.Common.LengthErrorMessageMaximum;
Elerium.Localization[380] = Elerium.Localization.Global.Common.LengthErrorMessageMinimum;
Elerium.Localization[382] = Elerium.Localization.Global.Common.EmailErrorMessage;
Elerium.Localization[393] = Elerium.Localization.Global.Forums.CreateForum;
Elerium.Localization[394] = Elerium.Localization.Global.Forums.EditForum;
Elerium.Localization[395] = Elerium.Localization.Global.Forums.MarkForumRead;
Elerium.Localization[441] = Elerium.Localization.Global.Common.UserAsCharacter;
Elerium.Localization[444] = Elerium.Localization.Global.Files.FileTooLarge;
Elerium.Localization[445] = Elerium.Localization.Global.Common.SelectCharacter;
Elerium.Localization[446] = Elerium.Localization.Global.Common.AddCharacter;
Elerium.Localization[447] = Elerium.Localization.Global.Common.QuoteFrom;
Elerium.Localization[451] = Elerium.Localization.Global.Common.More;
Elerium.Localization[461] = Elerium.Localization.Global.Dates.Seconds;
Elerium.Localization[463] = Elerium.Localization.Global.Files.DeleteAttachment;
Elerium.Localization[464] = Elerium.Localization.Global.Files.AddAttachment;
Elerium.Localization[465] = Elerium.Localization.Global.Files.ChangeDescription;
Elerium.Localization[466] = Elerium.Localization.Global.Common.Comments;
Elerium.Localization[469] = Elerium.Localization.Global.Polls.ChoiceNumberTemplate;
Elerium.Localization[475] = Elerium.Localization.Global.Polls.AddPoll;
Elerium.Localization[476] = Elerium.Localization.Global.Polls.RemovePoll;
Elerium.Localization[490] = Elerium.Localization.Global.Common.Normal;
Elerium.Localization[493] = Elerium.Localization.Global.Polls.AddChoice;
Elerium.Localization[494] = Elerium.Localization.Global.Polls.RemoveChoice;
Elerium.Localization[502] = Elerium.Localization.Global.Common.Milliseconds;
Elerium.Localization[513] = Elerium.Localization.Global.Common.IntegerValueErrorMessageMaximum;
Elerium.Localization[514] = Elerium.Localization.Global.Common.IntegerValueErrorMessageMinimum;
Elerium.Localization[516] = Elerium.Localization.Global.Polls.ViewResults;
Elerium.Localization[517] = Elerium.Localization.Global.Polls.HideResults;
Elerium.Localization[521] = Elerium.Localization.Global.Common.EqualErrorMessage;
Elerium.Localization[536] = Elerium.Localization.Global.ContentManagement.OnSelectedTemplate;
Elerium.Localization[544] = Elerium.Localization.Global.ContentManagement.AddMediaGallery;
Elerium.Localization[569] = Elerium.Localization.Global.ContentManagement.HideAddGallery;
Elerium.Localization[571] = Elerium.Localization.Global.ContentManagement.PublishOnTemplate;
Elerium.Localization[588] = Elerium.Localization.Global.ContentManagement.PageFormSetDate;
Elerium.Localization[589] = Elerium.Localization.Global.ContentManagement.PageFormDoNotSetDate;
Elerium.Localization[593] = Elerium.Localization.Global.TinyMCE.XenonMediaPluginDesc;
Elerium.Localization[617] = Elerium.Localization.Global.Common.PleaseWaitProcessing;
Elerium.Localization[628] = Elerium.Localization.Global.Common.PrivateMessagesAbbr;
Elerium.Localization[629] = Elerium.Localization.Global.Common.NumberOfPrivateMessagesAbbr;
Elerium.Localization[642] = Elerium.Localization.Global.ContentManagement.SelectImage;
Elerium.Localization[644] = Elerium.Localization.Global.ContentManagement.Insert;
Elerium.Localization[800] = Elerium.Localization.Global.Common.SimpleSearch;
Elerium.Localization[802] = Elerium.Localization.Global.Common.AdvancedSearch;
Elerium.Localization[806] = Elerium.Localization.Global.Common.Ascending;
Elerium.Localization[807] = Elerium.Localization.Global.Common.Descending;
Elerium.Localization[825] = Elerium.Localization.Global.UserRegistration.UsernameIsTaken;
Elerium.Localization[961] = Elerium.Localization.Global.Widgets.LatestNews;
Elerium.Localization[966] = Elerium.Localization.Global.Languages.Italian;
Elerium.Localization[967] = Elerium.Localization.Global.Widgets.Poll;
Elerium.Localization[971] = Elerium.Localization.Global.Widgets.WhosOnline;
Elerium.Localization[976] = Elerium.Localization.Global.Widgets.RandomPicture;
Elerium.Localization[1027] = Elerium.Localization.Global.Common.Remove;
Elerium.Localization[1053] = Elerium.Localization.Global.Widgets.Calendar;
Elerium.Localization[1054] = Elerium.Localization.Global.Widgets.LatestPosts;
Elerium.Localization[1055] = Elerium.Localization.Global.Widgets.Recruitment;
Elerium.Localization[1158] = Elerium.Localization.Global.UserRegistration.RecoverAccountStep2Info2;
Elerium.Localization[1189] = Elerium.Localization.Global.Languages.TraditionalChinese;
Elerium.Localization[1190] = Elerium.Localization.Global.Languages.LatinAmericanSpanish;
Elerium.Localization[1191] = Elerium.Localization.Global.Languages.BritishEnglish;
Elerium.Localization[1258] = Elerium.Localization.Global.Common.ConfirmDelete;
Elerium.Localization[2057] = Elerium.Localization.Global.ControlPanel.AddNewHeader;
Elerium.Localization[2104] = Elerium.Localization.Global.Common.Apply;
Elerium.Localization[2114] = Elerium.Localization.Global.ControlPanel.MinimumPostCount;
Elerium.Localization[2255] = Elerium.Localization.Global.Common.ClickHere;
Elerium.Localization[2337] = Elerium.Localization.Global.Common.ColonConnector;
Elerium.Localization[2673] = Elerium.Localization.Global.Common.PageOf;
Elerium.Localization[2794] = Elerium.Localization.Global.ErrorMessages.TagEmpty;
Elerium.Localization[3897] = Elerium.Localization.Global.ContentManagement.ExistingFolders;
Elerium.Localization[3900] = Elerium.Localization.Global.Ratings.YouRatedThis;
Elerium.Localization[3915] = Elerium.Localization.Global.Common.PleaseLogIn;
Elerium.Localization[3952] = Elerium.Localization.Global.ControlPanel.RemoveLinkTooltip;
Elerium.Localization[3958] = Elerium.Localization.Global.Reporting.Report;
Elerium.Localization[3978] = Elerium.Localization.Global.ContentManagement.InsertAnImage;
Elerium.Localization[4014] = Elerium.Localization.Global.ControlPanel.BulkConfirm;
Elerium.Localization[4218] = Elerium.Localization.Global.ControlPanel.AddSubNavigationLink;
Elerium.Localization[4244] = Elerium.Localization.Global.Forums.RestoreContentDescription;
Elerium.Localization[4245] = Elerium.Localization.Global.Common.RestoreContent;
Elerium.Localization[4251] = Elerium.Localization.Global.ErrorMessages.NumericPrecisionDecimalDigitCountErrorMessageTemplate;
Elerium.Localization[4348] = Elerium.Localization.Global.Common.Confirm;
Elerium.Localization[4412] = Elerium.Localization.Global.Common.TestStuff;
Elerium.Localization[4446] = Elerium.Localization.Global.Common.New;
Elerium.Localization[5450] = Elerium.Localization.Global.Languages.Uzbec;
Elerium.Localization[5463] = Elerium.Localization.Global.Languages.Vietnamese;
Elerium.Localization[5519] = Elerium.Localization.Global.Languages.Brazillian_Portugese;
Elerium.Localization[5543] = Elerium.Localization.Global.ControlPanel.CompLegacySubscription;
Elerium.Localization[5544] = Elerium.Localization.Global.ControlPanel.Contactology_Campaigns;
Elerium.Localization[5554] = Elerium.Localization.Global.ControlPanel.EntitySubscriptionTypes;
Elerium.Localization[5555] = Elerium.Localization.Global.Common.FileContainsVirus;
Elerium.Localization[5560] = Elerium.Localization.Global.ControlPanel.LegacySubscriptionSearch;
Elerium.Localization[5576] = Elerium.Localization.Global.ControlPanel.MenuLegacySubscriptions;
Elerium.Localization[5583] = Elerium.Localization.Global.Buttons.Push;
Elerium.Localization[5584] = Elerium.Localization.Global.ControlPanel.PushNotification;
Elerium.Localization[5590] = Elerium.Localization.Global.Upsells.SubscriptionRequiresLogin;
Elerium.Localization[5591] = Elerium.Localization.Global.ControlPanel.SubscriptionTypeEdit;
Elerium.Localization[5592] = Elerium.Localization.Global.ControlPanel.SubscriptionTypePush;
Elerium.Localization[5593] = Elerium.Localization.Global.ControlPanel.SubscriptionTypes;
Elerium.Localization[5609] = Elerium.Localization.Global.ControlPanel.LegacySubscriptions;
Elerium.Localization[5610] = Elerium.Localization.Global.ControlPanel.SubscriptionID;
Elerium.Localization[5612] = Elerium.Localization.Global.ControlPanel.SimpleSearch;
Elerium.Localization[5818] = Elerium.Localization.Global.Forums.Unread;
Elerium.Localization[5980] = Elerium.Localization.Global.Languages.Arabic;
Elerium.Localization[6002] = Elerium.Localization.Global.MailTemplates.ReportBody;
Elerium.Localization[6097] = Elerium.Localization.Global.ControlPanel.MovePrivateMessagesPrompt;
Elerium.Localization[6919] = Elerium.Localization.Global.Common.ShowMore;
Elerium.Localization[7320] = Elerium.Localization.Elerium.Developer.AreYouSureRemoveRole;
Elerium.Localization[7427] = Elerium.Localization.Elerium.Extension.RequestIdentityLinkRequiredWithPurchases;
Elerium.Localization[7451] = Elerium.Localization.Elerium.Extension.RequestIdentityLinkRequired;
Elerium.Localization[7474] = Elerium.Localization.Elerium.Global.Favorite;
Elerium.Localization[7475] = Elerium.Localization.Elerium.Global.Unfavorite;
Elerium.Localization[7549] = Elerium.Localization.Elerium.Extension.MobileConfirmDisableHeader;
Elerium.Localization[7550] = Elerium.Localization.Elerium.Extension.MobileConfirmDisableMessage;
Elerium.Localization[7559] = Elerium.Localization.Elerium.ControlPanel.AreYouSureYouWantToDeleteName;
Elerium.Localization[7980] = Elerium.Localization.Elerium.Extension.RequiredPerChannelConfigurations;
Elerium.Localization[7981] = Elerium.Localization.Elerium.Extension.RequiredPerChannelConfigurationsDesc;
Elerium.Localization[7997] = Elerium.Localization.Elerium.Extension.DeveloperWritableChannelSegmentVersion;
Elerium.Localization[7998] = Elerium.Localization.Elerium.Extension.DeveloperWritableChannelSegmentVersionDesc;
Elerium.Localization[8055] = Elerium.Localization.Global.Contests.ContestPrizeItemAwardSubject;
Elerium.Localization[8056] = Elerium.Localization.Global.Contests.ContestPrizeItemHtmlBody;
Elerium.Localization[8057] = Elerium.Localization.Global.Contests.ContestPrizeItemTextBody;
Elerium.Localization[8114] = Elerium.Localization.Global.Calendar.Month;
Elerium.Localization[8140] = Elerium.Localization.Global.Translator.ReportATranslation;
Elerium.Localization[8149] = Elerium.Localization.Global.Translator.ReportTranslationInstructions;
Elerium.Localization[8171] = Elerium.Localization.Global.Calendar.Today;
Elerium.Localization[8185] = Elerium.Localization.Global.Calendar.Week;
Elerium.Localization[8188] = Elerium.Localization.Global.Contests.YouAreDisqualified;
Elerium.Localization[8230] = Elerium.Localization.Elerium.ProjectIssues.UnableToListTags;
Elerium.Localization[8276] = Elerium.Localization.Elerium.Project.PleaseSelectAGame;
Elerium.Localization[8277] = Elerium.Localization.Elerium.Project.LoadingCategories;
Elerium.Localization[8278] = Elerium.Localization.Elerium.Project.PleaseSelectACategory;
Elerium.Localization[8279] = Elerium.Localization.Elerium.Project.SelectCategory;
Elerium.Localization[8280] = Elerium.Localization.Elerium.Project.LoadingProjectCreation;
Elerium.Localization[8306] = Elerium.Localization.Elerium.ProjectFile.SelectArchivalType;
;
// English
Elerium.Localization.populate(1, {"Elerium":{"ControlPanel":{"AreYouSureYouWantToDeleteName":"Are you sure you want to delete {0}?"},"Developer":{"AreYouSureRemoveRole":"Are you sure you would like to delete {0} from the company?"},"Extension":{"DeveloperWritableChannelSegmentVersion":"Developer Writable Channel Segment Version","DeveloperWritableChannelSegmentVersionDesc":"If present - the extension will be inactive unless the version string in the channel\u0027s developer segment matches this value","MobileConfirmDisableHeader":"Are you sure you want to disable mobile support?","MobileConfirmDisableMessage":"When this version is released users will no longer be able access your extension from mobile.","RequestIdentityLinkRequired":"Add Tooltip Copy","RequestIdentityLinkRequiredWithPurchases":"Request Identity Link required with In-Extension Purchases","RequiredPerChannelConfigurations":"Required Per Channel Configuration","RequiredPerChannelConfigurationsDesc":"If present - this must match the per channel configuration string, for activation to proceed. See the \u003ca href=\"https://dev.twitch.tv/docs/extensions/reference/#set-extension-required-configuration\" target=\"_blank\"\u003eSet Extension Required Configuration\u003c/a\u003e Endpoint."},"Global":{"Favorite":"Favorite","Unfavorite":"Unfavorite"},"Project":{"LoadingCategories":"Loading Categories","LoadingProjectCreation":"Loading Project Creation","PleaseSelectACategory":"Please select a category","PleaseSelectAGame":"Please select a game","SelectCategory":"Select Category"},"ProjectFile":{"SelectArchivalType":"Select Archival Type"},"ProjectIssues":{"UnableToListTags":"Unable to List Tags"}},"Global":{"Buttons":{"Cancel":"Cancel","Create":"Create","Delete":"Delete","Edit":"Edit","Push":"Push","Update":"Update"},"Calendar":{"Month":"Month","Today":"Today","Week":"Week"},"Common":{"Add":"Add","AddCharacter":"Add a character","AdvancedSearch":"Advanced Search","Apply":"Apply","Ascending":"Ascending","ClickHere":"click here","ColonConnector":": ","Comments":"Comments","Confirm":"Confirm","ConfirmDelete":"Are you sure you want to delete {0}?","Descending":"Descending","Description":"Description","EditMyAccount":"Edit My Account","EmailErrorMessage":"Must be an e-mail address.","EqualErrorMessage":"{0} must be equal to {1}","ErrorOccured":"Sorry, an error occurred while processing your request.","FileContainsVirus":"File is contaminated with a virus.","IntegerValueErrorMessageMaximum":"Must be at most {0}.","IntegerValueErrorMessageMinimum":"Must be at least {0}.","LengthErrorMessageMaximum":"Must be at most {0} PLURAL[{0};character;characters] long.","LengthErrorMessageMinimum":"Must be at least {0} PLURAL[{0};character;characters] long.","Logout":"Sign Out","Milliseconds":"{0} PLURAL[{0};millisecond;milliseconds]","More":"More","MyCharacters":"My Characters","Name":"Name","New":"New","Normal":"Normal","NumberOfPrivateMessagesAbbr":"{0} PLURAL[{0};PM;PMs]","PageOf":"Page {0} of {1}","PageXOfY":"Page {0} of {1}","PleaseLogIn":"Please log in.","PleaseWaitProcessing":"Please wait, processing ...","PrivateMessagesAbbr":"PMs","QuoteFrom":"Quote from {0}","Remove":"Remove","RequiredErrorMessage":"This field is required.","RestoreContent":"Restore Content","SelectCharacter":"Select a Character","ShowMore":"Show More","SimpleSearch":"Simple search","Submit":"Submit","TestStuff":"This is just a test. {0} PLURAL[{0};bird;birds].","Title":"Title","UserAsCharacter":"{0} as ","UserAvatar":"{0}\u0027s avatar","Username":"Username","WelcomeUser":"Welcome, {0}!"},"ContentManagement":{"AddMediaGallery":"Add Media Gallery","ExistingFolders":"Existing Folders","HideAddGallery":"Don\u0027t Add Media Gallery","Insert":"Insert","InsertAnImage":"Insert an Image","OnSelectedTemplate":"Apply to Selected ({0})","PageFormDoNotSetDate":"Don\u0027t Set Date","PageFormSetDate":"Set Date","PublishOnTemplate":"Publish {0}","SelectImage":"Select an Image"},"Contests":{"ContestPrizeItemAwardSubject":"You Have Been Awarded {0}","ContestPrizeItemHtmlBody":"You have been awarded {1}.\r\n\r\n\u003ca href=\"{2}\" target=_blank\u003e{0}\u003c/a\u003e","ContestPrizeItemTextBody":"You have been awarded {0}.\r\n\r\nVisit {1} to claim your prize.","YouAreDisqualified":"You have been disqualified!"},"ControlPanel":{"AddNewHeader":"Add New Header","AddSubNavigationLink":"\u003cdiv class=\"header\"\u003eAdd Sub-Navigation\u003c/div\u003e\r\nAdd a Sub-Navigation Link","BulkConfirm":"Are you sure you want to {0} these items?","CompLegacySubscription":"Issue Comp","Contactology Campaigns":"Contactology Campaigns","EntitySubscriptionTypes":"Entity Subscription Types","LegacySubscriptions":"Legacy Subscriptions","LegacySubscriptionSearch":"Search Legacy Subscriptions","MenuLegacySubscriptions":"Legacy Subscriptions","MinimumPostCount":"Minimum Post Count","MovePrivateMessagesPrompt":"Are you sure you want to move these private message(s) into the \"{0}\" folder?","PushNotification":"Push Notification","RemoveLinkTooltip":"\u003cdiv class=\"header\"\u003eRemove Link\u003c/div\u003e\r\nRemove this link from your web site navigation.","SubscriptionID":"Subscription ID","SubscriptionTypeEdit":"Subscription Type Edit","SubscriptionTypePush":"Push Subscription Type Notification","SubscriptionTypes":"Subscription Types","SimpleSearch":"Simple Search"},"Dates":{"AprilAbbr":"Apr","AugustAbbr":"Aug","Days":"{0} PLURAL[{0};day;days]","DecemberAbbr":"Dec","FebruaryAbbr":"Feb","FridayAbbr":"Fri","FutureFormat":"{0} from now","Hours":"{0} PLURAL[{0};hour;hours]","JanuaryAbbr":"Jan","JulyAbbr":"Jul","JuneAbbr":"Jun","LessThanOneMinute":"\u003c1 min","MarchAbbr":"Mar","MayAbbr":"May","Minutes":"{0} PLURAL[{0};min;mins]","MondayAbbr":"Mon","NovemberAbbr":"Nov","OctoberAbbr":"Oct","OneMinute":"1 min","PastFormat":"{0} ago","SaturdayAbbr":"Sat","Seconds":"{0} sec","SeptemberAbbr":"Sep","StandardDateFormat":"{1} {0}, {2}","StandardDateTimeFormat":"{1}, {4}, {0} {6} {2}:{3}:{5}","SundayAbbr":"Sun","ThursdayAbbr":"Thu","TuesdayAbbr":"Tue","WednesdayAbbr":"Wed"},"ErrorMessages":{"NumericPrecisionDecimalDigitCountErrorMessageTemplate":"The value you provided has {0} decimal digits and the decimal digit limit is {1} digits.","TagEmpty":"You cannot add an empty tag."},"Files":{"AddAttachment":"Add this attachment back.","ChangeDescription":"Change this attachment\u0027s description","DeleteAttachment":"Delete this attachment","FileTooLarge":"The file provided is too large. Please provide a file less than {0}."},"Forums":{"Add":"Add","CreateForum":"Create Forum","Delete":"Delete","EditForum":"Edit Forum","GoToFirstUnreadPost":"Go to first unread post","JumpToPage":"Jump to page","LockThread":"Lock this thread","MarkForumRead":"Mark Forum as Read","Moderator":"Moderator","Move":"Move","OnSelected":"On Selected ({0})","RestoreContentDescription":"Click to restore your last entered text, in case of an error with your last attempt","SearchForums":"Search Forums","SelectAll":"Select All","SendMessage":"Send a Message","Unread":"Unread","ViewPosts":"View Posts","ViewProfile":"View User Profile"},"Languages":{"Arabic":"Arabic","Brazillian Portugese":"Brazillian Portugese","BritishEnglish":"British English","English":"English","French":"French","German":"German","Greek":"Greek","Indonesian":"Indonesian","Italian":"Italian","Japanese":"Japanese","Korean":"Korean","LatinAmericanSpanish":"Latin American Spanish","Polish":"Polish","Russian":"Russian","SimplifiedChinese":"Simplified Chinese","Spanish":"Spanish","Swedish":"Swedish","TraditionalChinese":"Traditional Chinese","Uzbec":"Uzbec","Vietnamese":"Vietnamese"},"MailTemplates":{"ReportBody":"Hello {0},\r\n\r\n\u003cp\u003e{6} has reported this \u003ca href=\"{4}\"\u003econtent\u003c/a\u003e on \u003ca href=\"{7}\"\u003e{8}\u003c/a\u003e for the reason {2}.\u003c/p\u003e\r\n\u003cp\u003e{9}\u003c/p\u003e\r\n\u003cp\u003eYou can view the report by \u003ca href=\"{7}\"\u003evisiting the report page\u003c/a\u003e.\u003c/p\u003e\r\n\r\n\u003cp\u003eReported content:\r\n\u003cblockquote\u003e\r\nPosted by \u003ca href=\"{5}\"\u003e{10}\u003c/a\u003e\r\n\u003cp\u003e\r\n{3}\r\n\u003c/p\u003e\r\n\u003c/blockquote\u003e\u003c/p\u003e\r\n\r\n__\r\n\u003cp style=\"font-size:11px\"\u003eTo unsubscribe from these email notifications, go to \u003ca href=\"{1}\"\u003eyour notifications page.\u003c/a\u003e\u003c/p\u003e"},"Polls":{"AddChoice":"Add Choice","AddPoll":"Add a poll","ChoiceNumberTemplate":"Choice #{0}","HideResults":"Hide Results","RemoveChoice":"Remove Choice","RemovePoll":"Don\u0027t add a poll","ViewResults":"View Results"},"Ratings":{"YouRatedThis":"You rated this {0} PLURAL[{0};star;stars]. {2} PLURAL[{2};user;users] rated it for a total average of {1} PLURAL[{1};star;stars]."},"Reporting":{"Report":"Report"},"TinyMCE":{"XenonMediaPluginDesc":"Add a file from a Folder"},"Translator":{"ReportATranslation":"Report a Translation","ReportTranslationInstructions":"To report a translation, click on text that has a dotted underline."},"Upsells":{"SubscriptionRequiresLogin":"You must be logged in to Subscribe."},"UserRegistration":{"ConfirmPassword":"Confirm Password","Password":"Password","RecoverAccountStep2Info2":"Enter a new password for your account, and click the \u0027Change Password\u0027 button.","Username":"Username","UsernameIsTaken":"That username is taken."},"Widgets":{"LatestPosts":"Latest Posts","LatestNews":"Latest News","Poll":"Poll","WhosOnline":"Who\u0027s Online","RandomPicture":"Random Picture","Calendar":"Calendar","Recruitment":"Recruitment"}}});
;
Elerium.Routes.AttachmentAdd = function(attachmentID, routeValues) {
    return Elerium.Routes.buildRoute("/attachment/{0}/add".format(attachmentID), routeValues);
};
Elerium.Routes.AttachmentDelete = function(attachmentID, routeValues) {
    return Elerium.Routes.buildRoute("/attachment/{0}/delete".format(attachmentID), routeValues);
};
Elerium.Routes.AttachmentDeleteAttachment = function(modelTypeID, id, routeValues) {
    return Elerium.Routes.buildRoute("/attachment/delete-attachment/{0}-{1}".format(modelTypeID, id), routeValues);
};
Elerium.Routes.AttachmentRename = function(attachmentID, routeValues) {
    return Elerium.Routes.buildRoute("/attachment/{0}/rename".format(attachmentID), routeValues);
};
Elerium.Routes.AudioRename = function(audioID, routeValues) {
    return Elerium.Routes.buildRoute("/audio/{0}/rename".format(audioID), routeValues);
};
Elerium.Routes.AuthenticationAjaxCheckAvailableEmail = function(routeValues) {
    return Elerium.Routes.buildRoute("/user/email/available", routeValues);
};
Elerium.Routes.AuthenticationAjaxUserNameIsAvilableCheck = function(routeValues) {
    return Elerium.Routes.buildRoute("/user/available", routeValues);
};
Elerium.Routes.AvatarActivateAvatar = function(routeValues) {
    return Elerium.Routes.buildRoute("/ajax-activate-avatar", routeValues);
};
Elerium.Routes.AvatarDeleteAvatar = function(routeValues) {
    return Elerium.Routes.buildRoute("/ajax-delete-avatar", routeValues);
};
Elerium.Routes.AvatarDisableAvatar = function(routeValues) {
    return Elerium.Routes.buildRoute("/ajax-disable-avatar", routeValues);
};
Elerium.Routes.AvatarUploadAvatar = function(entityTypeID, entityID, routeValues) {
    return Elerium.Routes.buildRoute("/avatar/{0}-{1}/upload".format(entityTypeID, entityID), routeValues);
};
Elerium.Routes.CategoryPostGetData = function(postID, routeValues) {
    return Elerium.Routes.buildRoute("/ajax/posts/{0}/get-data".format(postID), routeValues);
};
Elerium.Routes.CommentGetCommentRevision = function(commentID, revisionNumber, routeValues) {
    return Elerium.Routes.buildRoute("/comments/{0}/revisions/{1}/get.json".format(commentID, revisionNumber), routeValues);
};
Elerium.Routes.CommentGetCommentRevisions = function(commentID, routeValues) {
    return Elerium.Routes.buildRoute("/comments/{0}/revisions".format(commentID), routeValues);
};
Elerium.Routes.CommentRatingModal = function(entityTypeID, entityID, routeValues) {
    return Elerium.Routes.buildRoute("/comments/rating-modal/{0}-{1}".format(entityTypeID, entityID), routeValues);
};
Elerium.Routes.CommentRevisionRollback = function(commentID, revisionNumber, routeValues) {
    return Elerium.Routes.buildRoute("/comments/{0}/revisions/{1}/rollback".format(commentID, revisionNumber), routeValues);
};
Elerium.Routes.CommonStorePreferences = function(routeValues) {
    return Elerium.Routes.buildRoute("/ajax/store-preferences", routeValues);
};
Elerium.Routes.CPAchievementDelete = function(id, routeValues) {
    return Elerium.Routes.buildRoute("/cp/achievements/delete/{0}".format(id), routeValues);
};
Elerium.Routes.CPAjaxAutoCompleteRouteName = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/ajaxautocompleteroutename", routeValues);
};
Elerium.Routes.CPAjaxAutoCompleteSiteName = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/ajaxautocompletesitename", routeValues);
};
Elerium.Routes.CPAjaxAutoCompleteTitle = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/ajaxautocompletetitle", routeValues);
};
Elerium.Routes.CPAnnouncementDelete = function(announcementID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/announcements/{0}/delete".format(announcementID), routeValues);
};
Elerium.Routes.CPAnnouncementUnDelete = function(announcementID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/announcement/{0}/undelete".format(announcementID), routeValues);
};
Elerium.Routes.CPCacheManagerInvalidateDataKey = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/cache-manager/invalidate-data-key", routeValues);
};
Elerium.Routes.CPCategoryContentBulkModeration = function(categoryID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/cms/folders/{0}/bulk-content-moderation".format(categoryID), routeValues);
};
Elerium.Routes.CPClientIntegrationGamesManageDeleteAsset = function(clientGameID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/client-integration/games/{0}/asset/delete".format(clientGameID), routeValues);
};
Elerium.Routes.CPClientIntegrationGamesManageDeleteGameFile = function(clientGameID, gameFileID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/client-integration/games/{0}/file/{1}/delete".format(clientGameID, gameFileID), routeValues);
};
Elerium.Routes.CPClientIntegrationGamesManageDeleteGameHint = function(clientGameID, gameHintID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/client-integration/games/{0}/hint/{1}/delete".format(clientGameID, gameHintID), routeValues);
};
Elerium.Routes.CPClientIntegrationGamesManageDeleteGameSectionMapping = function(clientGameID, gameMapID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/client-integration/games/{0}/map/{1}/delete".format(clientGameID, gameMapID), routeValues);
};
Elerium.Routes.CPDomainPolicyDelete = function(domainPolicyID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/domain-policy/{0}/delete".format(domainPolicyID), routeValues);
};
Elerium.Routes.CPFeaturedProjectFiles = function(projectID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/featured-projects/find-project-files/{0}".format(projectID), routeValues);
};
Elerium.Routes.CPForumForm = function(parentForumID, displayOrder, routeValues) {
    return Elerium.Routes.buildRoute("/cp/ajax-forum-form/{0}/{1}".format(parentForumID, displayOrder), routeValues);
};
Elerium.Routes.CPGameStatus = function(mappingID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/twitch-dev/companies/game-status/{0}".format(mappingID), routeValues);
};
Elerium.Routes.CPGetNameForSite = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/getnameforsite", routeValues);
};
Elerium.Routes.CPGetSubNamespaces = function(namespaceID, routeValues) {
    return Elerium.Routes.buildRoute("/ajax/localization/getsubnamespaces/{0}".format(namespaceID), routeValues);
};
Elerium.Routes.CPGetWarningMessageTemplate = function(warningMessageID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/warning-messages/{0}/get-template.json".format(warningMessageID), routeValues);
};
Elerium.Routes.CPLocalizationIndex = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/localization", routeValues);
};
Elerium.Routes.CPLocalizationPhraseEdit = function(phraseID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/localization/phrase/{0}".format(phraseID), routeValues);
};
Elerium.Routes.CPPageGetUrl = function(parentFolderID, routeValues) {
    return Elerium.Routes.buildRoute("/ajax/get-page-url/{0}".format(parentFolderID), routeValues);
};
Elerium.Routes.CPPostGetUrl = function(categoryID, routeValues) {
    return Elerium.Routes.buildRoute("/ajax/get-post-url/{0}".format(categoryID), routeValues);
};
Elerium.Routes.CPPostRestoreRevision = function(postID, routeValues) {
    return Elerium.Routes.buildRoute("/ajax/posts/{0}/restore-revision".format(postID), routeValues);
};
Elerium.Routes.CPProfileFieldChangeGroup = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/profile-fields/update-group", routeValues);
};
Elerium.Routes.CPProfileFieldGroupUpdateDisplayOrder = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/profile-fields-groups/update-display-order", routeValues);
};
Elerium.Routes.CPProfileFieldUpdateDisplayOrder = function(routeValues) {
    return Elerium.Routes.buildRoute("/cp/profile-fields/update-display-order", routeValues);
};
Elerium.Routes.CPProjectFileModeationWhitelistUserJson = function(userID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/project-moderation-whitelist/{0}/json".format(userID), routeValues);
};
Elerium.Routes.CPProjectFileReasonChoicesAjax = function(projectFileStatus, routeValues) {
    return Elerium.Routes.buildRoute("/cp/project-moderation-queue/file-reason-choices/{0}".format(projectFileStatus), routeValues);
};
Elerium.Routes.CPProjectReasonChoicesAjax = function(projectStatus, routeValues) {
    return Elerium.Routes.buildRoute("/cp/project-moderation-queue/project-reason-choices/{0}".format(projectStatus), routeValues);
};
Elerium.Routes.CPProjectRootGameCategoryAjax = function(projectID, rootGameCategoryID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/projects/{0}/root-game-category/{1}/edit-categories".format(projectID, rootGameCategoryID), routeValues);
};
Elerium.Routes.CPRoleDelete = function(entityTypeID, entityID, roleID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/user-groups/{0}-{1}/{2}/delete".format(entityTypeID, entityID, roleID), routeValues);
};
Elerium.Routes.CPUserNonceBillingTransactions = function(userID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/users/{0}/nonce-billing-transactions".format(userID), routeValues);
};
Elerium.Routes.DashboardDeveloperAppResetSecret = function(appId, routeValues) {
    return Elerium.Routes.buildRoute("/dashboard/apps/{0}/resetsecret".format(appId), routeValues);
};
Elerium.Routes.DashboardExtensionResetSecret = function(appId, routeValues) {
    return Elerium.Routes.buildRoute("/dashboard/extensions/{0}/resetsecret".format(appId), routeValues);
};
Elerium.Routes.DashboardSignUpForTIMS = function(routeValues) {
    return Elerium.Routes.buildRoute("/dashboard/extensions/signup", routeValues);
};
Elerium.Routes.DeveloperCompanyDeleteUserPermission = function(userID, routeValues) {
    return Elerium.Routes.buildRoute("/company-permissions/del-user/{0}".format(userID), routeValues);
};
Elerium.Routes.EleriumSpadeReportingReportEleriumEvent = function(routeValues) {
    return Elerium.Routes.buildRoute("/spade-event", routeValues);
};
Elerium.Routes.ExperimentExperimentStatus = function(expName, routeValues) {
    return Elerium.Routes.buildRoute("/experiments/api/get-status/{0}".format(expName), routeValues);
};
Elerium.Routes.FeedbackSend = function(routeValues) {
    return Elerium.Routes.buildRoute("/send-feedback", routeValues);
};
Elerium.Routes.ForumForumTopicsFilter = function(id, routeValues) {
    return Elerium.Routes.buildRoute("/page-block/forum-filters/{0}".format(id), routeValues);
};
Elerium.Routes.ForumGetAllForumSeenInfo = function(routeValues) {
    return Elerium.Routes.buildRoute("/new-content/seeninfo", routeValues);
};
Elerium.Routes.ForumGetForumLatestThreads = function(routeValues) {
    return Elerium.Routes.buildRoute("/page-block/forum-filters/get-threads.json", routeValues);
};
Elerium.Routes.ForumSetAllForumSeen = function(routeValues) {
    return Elerium.Routes.buildRoute("/forums/set-all-forum-seen", routeValues);
};
Elerium.Routes.ForumSetAllForumThreadSeen = function(forumID, routeValues) {
    return Elerium.Routes.buildRoute("/forums/{0}/set-all-forum-thread-seen".format(forumID), routeValues);
};
Elerium.Routes.ForumSetForumSeen = function(forumID, routeValues) {
    return Elerium.Routes.buildRoute("/forums/{0}/set-forum-seen".format(forumID), routeValues);
};
Elerium.Routes.GamesRootCategoriesForGame = function(gameID, routeValues) {
    return Elerium.Routes.buildRoute("/games/{0}/root-categories".format(gameID), routeValues);
};
Elerium.Routes.GamesSearchGame = function(routeValues) {
    return Elerium.Routes.buildRoute("/games/search", routeValues);
};
Elerium.Routes.HomeFeaturedSiteJson = function(siteSlug, routeValues) {
    return Elerium.Routes.buildRoute("/featured-site/{0}/json".format(siteSlug), routeValues);
};
Elerium.Routes.HomeSiteProjectFileArchive = function(projectID, routeValues) {
    return Elerium.Routes.buildRoute("/project/{0}/files/archive".format(projectID), routeValues);
};
Elerium.Routes.HomeSiteProjectFileRelationEdit = function(projectID, relatedProjectID, routeValues) {
    return Elerium.Routes.buildRoute("/project-file-relations/{0}/{1}".format(projectID, relatedProjectID), routeValues);
};
Elerium.Routes.HomeSiteProjectFileRelationProjectAvatarUrl = function(projectID, routeValues) {
    return Elerium.Routes.buildRoute("/project-file-relations/avatar-url/{0}".format(projectID), routeValues);
};
Elerium.Routes.HomeSiteProjectGetCreateForm = function(gameCategoryID, routeValues) {
    return Elerium.Routes.buildRoute("/project/create/{0}".format(gameCategoryID), routeValues);
};
Elerium.Routes.HomeSiteProjectIssueActionComment = function(gameSlug, categorySlug, projectSlug, projectIssueScopedID, projectIssueActionID, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/issues/{3}/{4}".format(gameSlug, categorySlug, projectSlug, projectIssueScopedID, projectIssueActionID), routeValues);
};
Elerium.Routes.HomeSiteProjectIssueActionCommentDelete = function(gameSlug, categorySlug, projectSlug, projectIssueScopedID, projectIssueActionID, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/issues/{3}/{4}/delete".format(gameSlug, categorySlug, projectSlug, projectIssueScopedID, projectIssueActionID), routeValues);
};
Elerium.Routes.HomeSiteProjectIssueActionCommentUndelete = function(gameSlug, categorySlug, projectSlug, projectIssueScopedID, projectIssueActionID, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/issues/{3}/{4}/undelete".format(gameSlug, categorySlug, projectSlug, projectIssueScopedID, projectIssueActionID), routeValues);
};
Elerium.Routes.HomeSiteProjectIssueEdit = function(gameSlug, categorySlug, projectSlug, projectIssueScopedID, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/issues/{3}/edit".format(gameSlug, categorySlug, projectSlug, projectIssueScopedID), routeValues);
};
Elerium.Routes.HomeSiteProjectIssueUnassignSelf = function(gameSlug, categorySlug, projectSlug, projectIssueScopedID, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/issues/{3}/unassign".format(gameSlug, categorySlug, projectSlug, projectIssueScopedID), routeValues);
};
Elerium.Routes.HomeSiteProjectProjectLicenseAjax = function(projectLicenseID, routeValues) {
    return Elerium.Routes.buildRoute("/project-licenses/{0}".format(projectLicenseID), routeValues);
};
Elerium.Routes.InfractionsGetWarningDefinitionDescription = function(userID, points, routeValues) {
    return Elerium.Routes.buildRoute("/user/{0}/warning/{1}/description.json".format(userID, points), routeValues);
};
Elerium.Routes.InfractionsGetWarningDefinitionDescriptionByComment = function(userID, commentID, points, routeValues) {
    return Elerium.Routes.buildRoute("/user/{0}/{1}/warning/{2}/description.json".format(userID, commentID, points), routeValues);
};
Elerium.Routes.PollDelete = function(parentTypeID, parentID, pollID, routeValues) {
    return Elerium.Routes.buildRoute("/polls/{0}-{1}/{2}/delete".format(parentTypeID, parentID, pollID), routeValues);
};
Elerium.Routes.PollGetPollForm = function(forumID, index, routeValues) {
    return Elerium.Routes.buildRoute("/polls/{0}/get-poll-form/{1}".format(forumID, index), routeValues);
};
Elerium.Routes.PollHasUserVoted = function(pollID, routeValues) {
    return Elerium.Routes.buildRoute("/polls/{0}/has-user-voted".format(pollID), routeValues);
};
Elerium.Routes.PrivateMessageAjaxAutoCompleteContact = function(routeValues) {
    return Elerium.Routes.buildRoute("/ajax/private-message-auto-complete", routeValues);
};
Elerium.Routes.PrivateMessageCreateConversationFolder = function(conversationID, routeValues) {
    return Elerium.Routes.buildRoute("/private-messages/{0}/create-folder".format(conversationID), routeValues);
};
Elerium.Routes.PrivateMessageDeleteConversationFolder = function(conversationFolderID, routeValues) {
    return Elerium.Routes.buildRoute("/private-messages/delete-folder/{0}".format(conversationFolderID), routeValues);
};
Elerium.Routes.PrivateMessageIndex = function(routeValues) {
    return Elerium.Routes.buildRoute("/private-messages", routeValues);
};
Elerium.Routes.PrivateMessageInvite = function(conversationID, routeValues) {
    return Elerium.Routes.buildRoute("/private-messages/{0}/invite".format(conversationID), routeValues);
};
Elerium.Routes.PrivateMessageMoveToConversationFolder = function(conversationID, conversationFolderID, routeValues) {
    return Elerium.Routes.buildRoute("/private-messages/{0}/move-to/{1}".format(conversationID, conversationFolderID), routeValues);
};
Elerium.Routes.ProjectFeaturedDetailsAjax = function(projectSlug, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/ajax/featured-details".format(projectSlug), routeValues);
};
Elerium.Routes.ProjectFileArchive = function(projectSlug, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/files/archive".format(projectSlug), routeValues);
};
Elerium.Routes.ProjectIssueActionComment = function(projectSlug, projectIssueScopedID, projectIssueActionID, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/issues/{1}/{2}".format(projectSlug, projectIssueScopedID, projectIssueActionID), routeValues);
};
Elerium.Routes.ProjectIssueActionCommentDelete = function(projectSlug, projectIssueScopedID, projectIssueActionID, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/issues/{1}/{2}/delete".format(projectSlug, projectIssueScopedID, projectIssueActionID), routeValues);
};
Elerium.Routes.ProjectIssueActionCommentUndelete = function(projectSlug, projectIssueScopedID, projectIssueActionID, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/issues/{1}/{2}/undelete".format(projectSlug, projectIssueScopedID, projectIssueActionID), routeValues);
};
Elerium.Routes.ProjectIssueEdit = function(projectSlug, projectIssueScopedID, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/issues/{1}/edit".format(projectSlug, projectIssueScopedID), routeValues);
};
Elerium.Routes.ProjectIssueUnassignSelf = function(projectSlug, projectIssueScopedID, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/issues/{1}/unassign".format(projectSlug, projectIssueScopedID), routeValues);
};
Elerium.Routes.ProjectLocalizationPhraseCreate = function(projectSlug, gameLanguageID, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/localization/phrases/{1}/create".format(projectSlug, gameLanguageID), routeValues);
};
Elerium.Routes.ProjectLocalizationPhraseCreateV2 = function(projectID, gameLanguageID, routeValues) {
    return Elerium.Routes.buildRoute("/v2/projects/{0}/localization/phrases/{1}/create".format(projectID, gameLanguageID), routeValues);
};
Elerium.Routes.ProjectSettingsCreateIssuesTag = function(projectSlug, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/settings/tag/create".format(projectSlug), routeValues);
};
Elerium.Routes.ProjectSettingsDeleteIssuesTag = function(projectSlug, tagSlug, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/settings/tag/delete/{1}".format(projectSlug, tagSlug), routeValues);
};
Elerium.Routes.ProjectSettingsIssuesTagList = function(projectSlug, routeValues) {
    return Elerium.Routes.buildRoute("/projects/{0}/tag/list".format(projectSlug), routeValues);
};
Elerium.Routes.PublicProjectSettingsCreateIssuesTag = function(gameSlug, categorySlug, projectSlug, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/settings/tag/create".format(gameSlug, categorySlug, projectSlug), routeValues);
};
Elerium.Routes.PublicProjectSettingsDeleteIssuesTag = function(gameSlug, categorySlug, projectSlug, tagSlug, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/settings/tag/delete/{3}".format(gameSlug, categorySlug, projectSlug, tagSlug), routeValues);
};
Elerium.Routes.PublicProjectSettingsIssuesTagList = function(gameSlug, categorySlug, projectSlug, routeValues) {
    return Elerium.Routes.buildRoute("/{0}/{1}/{2}/tag/list".format(gameSlug, categorySlug, projectSlug), routeValues);
};
Elerium.Routes.PublicProjectSettingsProjectLicenseAjax = function(projectLicenseID, routeValues) {
    return Elerium.Routes.buildRoute("/project-licenses/{0}".format(projectLicenseID), routeValues);
};
Elerium.Routes.RatingGetUserRatings = function(routeValues) {
    return Elerium.Routes.buildRoute("/get-user-ratings", routeValues);
};
Elerium.Routes.ShoutboxAddMessage = function(commentID, routeValues) {
    return Elerium.Routes.buildRoute("/shoutbox/{0}/add-message".format(commentID), routeValues);
};
Elerium.Routes.ShoutboxDeleteMessage = function(commentID, routeValues) {
    return Elerium.Routes.buildRoute("/shoutbox/{0}/delete-message".format(commentID), routeValues);
};
Elerium.Routes.ShoutboxGetNewComments = function(routeValues) {
    return Elerium.Routes.buildRoute("/shoutbox/get-new-comments", routeValues);
};
Elerium.Routes.ShoutboxGetShowShoutboxPreference = function(routeValues) {
    return Elerium.Routes.buildRoute("/shoutbox/get-show-shoutbox-preference", routeValues);
};
Elerium.Routes.ShoutboxSaveShowShoutboxPreference = function(showShoutbox, routeValues) {
    return Elerium.Routes.buildRoute("/shoutbox/save-show-shoutbox-preference/{0}".format(showShoutbox), routeValues);
};
Elerium.Routes.SmileyGetSmilies = function(routeValues) {
    return Elerium.Routes.buildRoute("/smilies/get-all", routeValues);
};
Elerium.Routes.SpadeReportingReportClickEvent = function(routeValues) {
    return Elerium.Routes.buildRoute("/report-click-event", routeValues);
};
Elerium.Routes.SpamReportNotSpam = function(entityTypeID, entityID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/spam/{0}-{1}/report-not-spam".format(entityTypeID, entityID), routeValues);
};
Elerium.Routes.SpamReportSpam = function(entityTypeID, entityID, routeValues) {
    return Elerium.Routes.buildRoute("/cp/spam/{0}-{1}/report-spam".format(entityTypeID, entityID), routeValues);
};
Elerium.Routes.StoreCheckoutModal = function(itemID, quantity, routeValues) {
    return Elerium.Routes.buildRoute("/store/checkout-modal/{0}/{1}".format(itemID, quantity), routeValues);
};
Elerium.Routes.StoreTransactionListingAjax = function(skipCount, fetchQuantity, rewardTransactionGroup, routeValues) {
    return Elerium.Routes.buildRoute("/store/transactions-ajax/{0}-{1}-{2}".format(skipCount, fetchQuantity, rewardTransactionGroup), routeValues);
};
Elerium.Routes.TagAjaxGetTags = function(routeValues) {
    return Elerium.Routes.buildRoute("/ajax-get-tags", routeValues);
};
Elerium.Routes.UserAjaxAutoCompleteUsername = function(routeValues) {
    return Elerium.Routes.buildRoute("/autocomplete-username", routeValues);
};
Elerium.Routes.UserDataTransferAcknowledgementChoice = function(choiceValue, routeValues) {
    return Elerium.Routes.buildRoute("/data-transfer-acknowledgement/choice/{0}".format(choiceValue), routeValues);
};
Elerium.Routes.UserGetUserSurrogateShortDetails = function(routeValues) {
    return Elerium.Routes.buildRoute("/ajax-get-surrogate-details", routeValues);
};
Elerium.Routes.UserWarningAcknowledgementChoice = function(choiceValue, routeValues) {
    return Elerium.Routes.buildRoute("/warning-acknowledgement/choice/{0}".format(choiceValue), routeValues);
};
Elerium.Routes.UserWarningAcknowledgementModal = function(routeValues) {
    return Elerium.Routes.buildRoute("/warning-acknowledgement/get.json", routeValues);
};
Elerium.Routes.UserContentBulkModeration = function(routeValues) {
    return Elerium.Routes.buildRoute("/my-content/bulk-moderation", routeValues);
};
Elerium.Routes.UserContentCreateFolder = function(routeValues) {
    return Elerium.Routes.buildRoute("/my-content/create-folder", routeValues);
};
Elerium.Routes.UserContentPostRestoreRevision = function(postID, revisionNumber, routeValues) {
    return Elerium.Routes.buildRoute("/ajax/my-content/{0}/restore-revision/{1}".format(postID, revisionNumber), routeValues);
};
;
