<commit_before>/*
 * Copyright https://github.com/divio/django-cms
 */

// #############################################################################
// NAMESPACES
/**
 * @module CMS
 */
var CMS = window.CMS || {};

// #############################################################################
// MODAL
(function ($) {
    'use strict';

    // shorthand for jQuery(document).ready();
    $(function () {
        /**
         * Displays a message underneath the toolbar
         *
         * @class Messages
         * @namespace CMS
         */
        CMS.Messages = new CMS.Class({

            options: {
                messageDuration: 300,
                messageDelay: 3000
            },

            initialize: function initialize(options) {
                this.options = $.extend(true, {}, this.options, options);
                this.config = CMS.config;
                this.settings = CMS.settings;

                // elements
                this._setupUI();
            },

            /**
             * Stores all jQuery references within `this.ui`.
             *
             * @method _setupUI
             * @private
             */
            _setupUI: function _setupUI() {
                var container = $('#cms-toolbar');
                this.ui = {
                    container: container,
                    body: $('html'),
                    toolbar: container.find('.cms-toolbar'),
                    messages: container.find('.cms-messages')
                };
            },

            /**
             * Opens a message window underneath the toolbar.
             *
             * @method open
             * @param opts
             * @param opts.message {String|HTMLNode} message to be displayed
             * @param [opts.dir='center'] {String} direction to be displayed `center` `left` or `right`
             * @param [opts.delay=this.options.messageDelay] {Number} delay until message is closed
             * @param [opts.error] {Boolean} if true sets the style to `.cms-messages-error`
             */
            open: function open(opts) {
                if (!(opts && opts.message)) {<commit_msg>fix comments [ci skip]<commit_after>/*
 * Copyright https://github.com/divio/django-cms
 */

// #############################################################################
// NAMESPACES
/**
 * @module CMS
 */
var CMS = window.CMS || {};

// #############################################################################
// MODAL
(function ($) {
    'use strict';

    // shorthand for jQuery(document).ready();
    $(function () {
        /**
         * Displays a message underneath the toolbar.
         *
         * @class Messages
         * @namespace CMS
         */
        CMS.Messages = new CMS.Class({

            options: {
                messageDuration: 300,
                messageDelay: 3000
            },

            initialize: function initialize(options) {
                this.options = $.extend(true, {}, this.options, options);
                this.config = CMS.config;
                this.settings = CMS.settings;

                // elements
                this._setupUI();
            },

            /**
             * Stores all jQuery references within `this.ui`.
             *
             * @method _setupUI
             * @private
             */
            _setupUI: function _setupUI() {
                var container = $('#cms-toolbar');
                this.ui = {
                    container: container,
                    body: $('html'),
                    toolbar: container.find('.cms-toolbar'),
                    messages: container.find('.cms-messages')
                };
            },

            /**
             * Opens a message window underneath the toolbar.
             *
             * @method open
             * @param opts
             * @param opts.message {String|HTMLNode} message to be displayed
             * @param [opts.dir='center'] {String} direction to be displayed `center` `left` or `right`
             * @param [opts.delay=this.options.messageDelay] {Number} delay until message is closed, 0 leaves it open
             * @param [opts.error] {Boolean} if true sets the style to `.cms-messages-error`
             */
            open: function open(opts) {
                if (!(opts && opts.message)) {
{'fraction_non_alphanumeric': 0.18399264029438822, 'fraction_numerical': 0.0034498620055197792, 'mean_word_length': 1.4696195343554799, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6634091', 'n_tokens_mistral': 1090, 'n_tokens_neox': 984, 'n_words': 257}