CoreFiles by mySites.guru
plugin.js723 lines, 28,295 bytes, from Joomla_6.2.0-rc2-Release_Candidate-Full_Package.zip
Raw History Compare with 6.2.0-rc1
md5
41ab931959c6fa1d6f8490d7ebc7fdd9
sha1
ef2456d896ba17e16a10042a4aabb0dd8d2f065b
sha256
f77dc878d04beed3dac79163ff8e35f711fd369c5158f3318081b1af8dd73486
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
/**
 * TinyMCE version 8.9.1 (2026-09-09)
 */

(function () {
    'use strict';

    /* eslint-disable @typescript-eslint/no-wrapper-object-types */
    const hasProto = (v, constructor, predicate) => {
        if (predicate(v, constructor.prototype)) {
            return true;
        }
        else {
            // String-based fallback time
            return v.constructor?.name === constructor.name;
        }
    };
    const typeOf = (x) => {
        const t = typeof x;
        if (x === null) {
            return 'null';
        }
        else if (t === 'object' && Array.isArray(x)) {
            return 'array';
        }
        else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
            return 'string';
        }
        else {
            return t;
        }
    };
    const isType = (type) => (value) => typeOf(value) === type;
    const isSimpleType = (type) => (value) => typeof value === type;
    const isString = isType('string');
    const isObject = isType('object');
    const isNullable = (a) => a === null || a === undefined;
    const isNonNullable = (a) => !isNullable(a);
    const isFunction = isSimpleType('function');

    /**
     * The `Optional` type represents a value (of any type) that potentially does
     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the
     * value does exist) or a `None` (in which case the value does not exist). This
     * module defines a whole lot of FP-inspired utility functions for dealing with
     * `Optional` objects.
     *
     * Comparison with null or undefined:
     * - We don't get fancy null coalescing operators with `Optional`
     * - We do get fancy helper functions with `Optional`
     * - `Optional` support nesting, and allow for the type to still be nullable (or
     * another `Optional`)
     * - There is no option to turn off strict-optional-checks like there is for
     * strict-null-checks
     */
    class Optional {
        tag;
        value;
        // Sneaky optimisation: every instance of Optional.none is identical, so just
        // reuse the same object
        static singletonNone = new Optional(false);
        // The internal representation has a `tag` and a `value`, but both are
        // private: able to be console.logged, but not able to be accessed by code
        constructor(tag, value) {
            this.tag = tag;
            this.value = value;
        }
        // --- Identities ---
        /**
         * Creates a new `Optional<T>` that **does** contain a value.
         */
        static some(value) {
            return new Optional(true, value);
        }
        /**
         * Create a new `Optional<T>` that **does not** contain a value. `T` can be
         * any type because we don't actually have a `T`.
         */
        static none() {
            return Optional.singletonNone;
        }
        /**
         * Perform a transform on an `Optional` type. Regardless of whether this
         * `Optional` contains a value or not, `fold` will return a value of type `U`.
         * If this `Optional` does not contain a value, the `U` will be created by
         * calling `onNone`. If this `Optional` does contain a value, the `U` will be
         * created by calling `onSome`.
         *
         * For the FP enthusiasts in the room, this function:
         * 1. Could be used to implement all of the functions below
         * 2. Forms a catamorphism
         */
        fold(onNone, onSome) {
            if (this.tag) {
                return onSome(this.value);
            }
            else {
                return onNone();
            }
        }
        /**
         * Determine if this `Optional` object contains a value.
         */
        isSome() {
            return this.tag;
        }
        /**
         * Determine if this `Optional` object **does not** contain a value.
         */
        isNone() {
            return !this.tag;
        }
        // --- Functor (name stolen from Haskell / maths) ---
        /**
         * Perform a transform on an `Optional` object, **if** there is a value. If
         * you provide a function to turn a T into a U, this is the function you use
         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain
         * a value then the output will also contain a value (that value being the
         * output of `mapper(this.value)`), and if this **does not** contain a value
         * then neither will the output.
         */
        map(mapper) {
            if (this.tag) {
                return Optional.some(mapper(this.value));
            }
            else {
                return Optional.none();
            }
        }
        // --- Monad (name stolen from Haskell / maths) ---
        /**
         * Perform a transform on an `Optional` object, **if** there is a value.
         * Unlike `map`, here the transform itself also returns an `Optional`.
         */
        bind(binder) {
            if (this.tag) {
                return binder(this.value);
            }
            else {
                return Optional.none();
            }
        }
        // --- Traversable (name stolen from Haskell / maths) ---
        /**
         * For a given predicate, this function finds out if there **exists** a value
         * inside this `Optional` object that meets the predicate. In practice, this
         * means that for `Optional`s that do not contain a value it returns false (as
         * no predicate-meeting value exists).
         */
        exists(predicate) {
            return this.tag && predicate(this.value);
        }
        /**
         * For a given predicate, this function finds out if **all** the values inside
         * this `Optional` object meet the predicate. In practice, this means that
         * for `Optional`s that do not contain a value it returns true (as all 0
         * objects do meet the predicate).
         */
        forall(predicate) {
            return !this.tag || predicate(this.value);
        }
        filter(predicate) {
            if (!this.tag || predicate(this.value)) {
                return this;
            }
            else {
                return Optional.none();
            }
        }
        // --- Getters ---
        /**
         * Get the value out of the inside of the `Optional` object, using a default
         * `replacement` value if the provided `Optional` object does not contain a
         * value.
         */
        getOr(replacement) {
            return this.tag ? this.value : replacement;
        }
        /**
         * Get the value out of the inside of the `Optional` object, using a default
         * `replacement` value if the provided `Optional` object does not contain a
         * value.  Unlike `getOr`, in this method the `replacement` object is also
         * `Optional` - meaning that this method will always return an `Optional`.
         */
        or(replacement) {
            return this.tag ? this : replacement;
        }
        /**
         * Get the value out of the inside of the `Optional` object, using a default
         * `replacement` value if the provided `Optional` object does not contain a
         * value. Unlike `getOr`, in this method the `replacement` value is
         * "thunked" - that is to say that you don't pass a value to `getOrThunk`, you
         * pass a function which (if called) will **return** the `value` you want to
         * use.
         */
        getOrThunk(thunk) {
            return this.tag ? this.value : thunk();
        }
        /**
         * Get the value out of the inside of the `Optional` object, using a default
         * `replacement` value if the provided Optional object does not contain a
         * value.
         *
         * Unlike `or`, in this method the `replacement` value is "thunked" - that is
         * to say that you don't pass a value to `orThunk`, you pass a function which
         * (if called) will **return** the `value` you want to use.
         *
         * Unlike `getOrThunk`, in this method the `replacement` value is also
         * `Optional`, meaning that this method will always return an `Optional`.
         */
        orThunk(thunk) {
            return this.tag ? this : thunk();
        }
        /**
         * Get the value out of the inside of the `Optional` object, throwing an
         * exception if the provided `Optional` object does not contain a value.
         *
         * WARNING:
         * You should only be using this function if you know that the `Optional`
         * object **is not** empty (otherwise you're throwing exceptions in production
         * code, which is bad).
         *
         * In tests this is more acceptable.
         *
         * Prefer other methods to this, such as `.each`.
         */
        getOrDie(message) {
            if (!this.tag) {
                throw new Error(message ?? 'Called getOrDie on None');
            }
            else {
                return this.value;
            }
        }
        // --- Interop with null and undefined ---
        /**
         * Creates an `Optional` value from a nullable (or undefined-able) input.
         * Null, or undefined, is converted to `None`, and anything else is converted
         * to `Some`.
         */
        static from(value) {
            return isNonNullable(value) ? Optional.some(value) : Optional.none();
        }
        /**
         * Converts an `Optional` to a nullable type, by getting the value if it
         * exists, or returning `null` if it does not.
         */
        getOrNull() {
            return this.tag ? this.value : null;
        }
        /**
         * Converts an `Optional` to an undefined-able type, by getting the value if
         * it exists, or returning `undefined` if it does not.
         */
        getOrUndefined() {
            return this.value;
        }
        // --- Utilities ---
        /**
         * If the `Optional` contains a value, perform an action on that value.
         * Unlike the rest of the methods on this type, `.each` has side-effects. If
         * you want to transform an `Optional<T>` **into** something, then this is not
         * the method for you. If you want to use an `Optional<T>` to **do**
         * something, then this is the method for you - provided you're okay with not
         * doing anything in the case where the `Optional` doesn't have a value inside
         * it. If you're not sure whether your use-case fits into transforming
         * **into** something or **doing** something, check whether it has a return
         * value. If it does, you should be performing a transform.
         */
        each(worker) {
            if (this.tag) {
                worker(this.value);
            }
        }
        /**
         * Turn the `Optional` object into an array that contains all of the values
         * stored inside the `Optional`. In practice, this means the output will have
         * either 0 or 1 elements.
         */
        toArray() {
            return this.tag ? [this.value] : [];
        }
        /**
         * Turn the `Optional` object into a string for debugging or printing. Not
         * recommended for production code, but good for debugging. Also note that
         * these days an `Optional` object can be logged to the console directly, and
         * its inner value (if it exists) will be visible.
         */
        toString() {
            return this.tag ? `some(${this.value})` : 'none()';
        }
    }

    const nativeSlice = Array.prototype.slice;
    const nativeIndexOf = Array.prototype.indexOf;
    const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
    const contains = (xs, x) => rawIndexOf(xs, x) > -1;
    const map = (xs, f) => {
        // pre-allocating array size when it's guaranteed to be known
        // http://jsperf.com/push-allocated-vs-dynamic/22
        const len = xs.length;
        const r = new Array(len);
        for (let i = 0; i < len; i++) {
            const x = xs[i];
            r[i] = f(x, i);
        }
        return r;
    };
    const filter = (xs, pred) => {
        const r = [];
        for (let i = 0, len = xs.length; i < len; i++) {
            const x = xs[i];
            if (pred(x, i)) {
                r.push(x);
            }
        }
        return r;
    };
    const sort = (xs, comparator) => {
        const copy = nativeSlice.call(xs, 0);
        copy.sort(comparator);
        return copy;
    };
    isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);

    // There are many variations of Object iteration that are faster than the 'for-in' style:
    // http://jsperf.com/object-keys-iteration/107
    //
    // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
    const keys = Object.keys;
    const hasOwnProperty = Object.hasOwnProperty;
    const get$1 = (obj, key) => {
        return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
    };
    const has = (obj, key) => hasOwnProperty.call(obj, key);

    const Cell = (initial) => {
        let value = initial;
        const get = () => {
            return value;
        };
        const set = (v) => {
            value = v;
        };
        return {
            get,
            set
        };
    };

    /**
     * Adds two numbers, and wrap to a range.
     * If the result overflows to the right, snap to the left.
     * If the result overflows to the left, snap to the right.
     */
    // the division is meant to get a number between 0 and 1 for more information check this discussion: https://stackoverflow.com/questions/58285941/how-to-replace-math-random-with-crypto-getrandomvalues-and-keep-same-result
    const random = () => window.crypto.getRandomValues(new Uint32Array(1))[0] / 4294967295;

    /**
     * Generate a unique identifier.
     *
     * The unique portion of the identifier only contains an underscore
     * and digits, so that it may safely be used within HTML attributes.
     *
     * The chance of generating a non-unique identifier has been minimized
     * by combining the current time, a random number and a one-up counter.
     *
     * generate :: String -> String
     */
    let unique = 0;
    const generate = (prefix) => {
        const date = new Date();
        const time = date.getTime();
        const random$1 = Math.floor(random() * 1000000000);
        unique++;
        return prefix + '_' + random$1 + unique + String(time);
    };

    const cat = (arr) => {
        const r = [];
        const push = (x) => {
            r.push(x);
        };
        for (let i = 0; i < arr.length; i++) {
            arr[i].each(push);
        }
        return r;
    };

    var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');

    const get = (customTabs) => {
        const addTab = (spec) => {
            const name = spec.name ?? generate('tab-name');
            const currentCustomTabs = customTabs.get();
            currentCustomTabs[name] = spec;
            customTabs.set(currentCustomTabs);
        };
        return {
            addTab
        };
    };

    const register$2 = (editor, dialogOpener) => {
        editor.addCommand('mceHelp', dialogOpener);
    };

    const option = (name) => (editor) => editor.options.get(name);
    const register$1 = (editor) => {
        const registerOption = editor.options.register;
        registerOption('help_tabs', {
            processor: 'array'
        });
    };
    const getHelpTabs = option('help_tabs');
    const getForcedPlugins = option('forced_plugins');

    const register = (editor, dialogOpener) => {
        editor.ui.registry.addButton('help', {
            icon: 'help',
            tooltip: 'Help',
            onAction: dialogOpener,
            context: 'any'
        });
        editor.ui.registry.addMenuItem('help', {
            text: 'Help',
            icon: 'help',
            shortcut: 'Alt+0',
            onAction: dialogOpener,
            context: 'any'
        });
    };

    var global$3 = tinymce.util.Tools.resolve('tinymce.Resource');

    var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');

    const pLoadHtmlByLangCode = (baseUrl, langCode) => global$3.load(`tinymce.html-i18n.help-keynav.${langCode}`, `${baseUrl}/js/i18n/keynav/${langCode}.js`);
    const pLoadI18nHtml = (baseUrl) => 
    // TINY-9928: Load language file for the current language, or English if the file is not available
    pLoadHtmlByLangCode(baseUrl, global$2.getCode()).catch(() => pLoadHtmlByLangCode(baseUrl, 'en'));
    const initI18nLoad = (editor, baseUrl) => {
        editor.on('init', () => {
            // eslint-disable-next-line @typescript-eslint/no-floating-promises
            pLoadI18nHtml(baseUrl);
        });
    };

    const pTab = async (pluginUrl) => {
        const body = {
            type: 'htmlpanel',
            presets: 'document',
            html: await pLoadI18nHtml(pluginUrl)
        };
        return {
            name: 'keyboardnav',
            title: 'Keyboard Navigation',
            items: [body]
        };
    };

    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');

    // Converts shortcut format to Mac/PC variants
    const convertText = (source) => {
        const isMac = global$1.os.isMacOS() || global$1.os.isiOS();
        const mac = {
            alt: '&#x2325;',
            ctrl: '&#x2303;',
            shift: '&#x21E7;',
            meta: '&#x2318;',
            access: '&#x2303;&#x2325;'
        };
        const other = {
            meta: 'Ctrl ',
            access: 'Shift + Alt '
        };
        const replace = isMac ? mac : other;
        const shortcut = source.split('+');
        const updated = map(shortcut, (segment) => {
            // search lowercase, but if not found use the original
            const search = segment.toLowerCase().trim();
            return has(replace, search) ? replace[search] : segment;
        });
        return isMac ? (updated.join('')).replace(/\s/, '') : updated.join('+');
    };

    const shortcuts = [
        { shortcuts: ['Meta + B'], action: 'Bold' },
        { shortcuts: ['Meta + I'], action: 'Italic' },
        { shortcuts: ['Meta + U'], action: 'Underline' },
        { shortcuts: ['Meta + A'], action: 'Select all' },
        { shortcuts: ['Meta + Y', 'Meta + Shift + Z'], action: 'Redo' },
        { shortcuts: ['Meta + Z'], action: 'Undo' },
        { shortcuts: ['Access + 1'], action: 'Heading 1' },
        { shortcuts: ['Access + 2'], action: 'Heading 2' },
        { shortcuts: ['Access + 3'], action: 'Heading 3' },
        { shortcuts: ['Access + 4'], action: 'Heading 4' },
        { shortcuts: ['Access + 5'], action: 'Heading 5' },
        { shortcuts: ['Access + 6'], action: 'Heading 6' },
        { shortcuts: ['Access + 7'], action: 'Paragraph' },
        { shortcuts: ['Access + 8'], action: 'Div' },
        { shortcuts: ['Access + 9'], action: 'Address' },
        { shortcuts: ['Alt + 0'], action: 'Open help dialog' },
        { shortcuts: ['Alt + F9'], action: 'Focus to menubar' },
        { shortcuts: ['Alt + F10'], action: 'Focus to toolbar' },
        { shortcuts: ['Alt + F11'], action: 'Focus to element path' },
        { shortcuts: ['Alt + F12'], action: 'Focus to notification' },
        { shortcuts: ['Ctrl + F9'], action: 'Focus to contextual toolbar' },
        { shortcuts: ['Shift + Enter'], action: 'Open popup menu for split buttons' },
        { shortcuts: ['Meta + K'], action: 'Insert link (if link plugin activated)' },
        { shortcuts: ['Meta + S'], action: 'Save (if save plugin activated)' },
        { shortcuts: ['Meta + F'], action: 'Find (if searchreplace plugin activated)' },
        { shortcuts: ['Meta + Shift + F'], action: 'Switch to or from fullscreen mode' }
    ];

    const tab$2 = () => {
        const shortcutList = map(shortcuts, (shortcut) => {
            const shortcutText = map(shortcut.shortcuts, convertText).join(' or ');
            return [shortcut.action, shortcutText];
        });
        const tablePanel = {
            type: 'table',
            // TODO: Fix table styles #TINY-2909
            header: ['Action', 'Shortcut'],
            cells: shortcutList
        };
        return {
            name: 'shortcuts',
            title: 'Handy Shortcuts',
            items: [
                tablePanel
            ]
        };
    };

    const pricingUrl = 'https://www.tiny.cloud/pricing/?utm_campaign=help_dialog_plugin_tab&utm_source=tiny&utm_medium=referral&utm_term=read_more&utm_content=premium_plugin_heading';
    const withPremiumMarker = (name) => `${name}<sup>*</sup>`;
    const buildLink = (name, url) => `<a data-alloy-tabstop="true" tabindex="-1" href="${url}" target="_blank" rel="noopener">${name}</a>`;
    const buildDocsUrl = (slug) => `https://www.tiny.cloud/docs/tinymce/${tinymce.majorVersion}/${slug}/`;
    const isUsableMetadata = (metadata) => isObject(metadata) && 'name' in metadata && isString(metadata.name);
    const getUsableMetadata = (getMetadata) => {
        try {
            return Optional.from(getMetadata()).filter(isUsableMetadata);
        }
        catch {
            return Optional.none();
        }
    };
    const readPluginMetadata = (editor, key) => get$1(editor.plugins, key)
        .bind((plugin) => Optional.from(plugin.getMetadata))
        .filter(isFunction)
        .bind(getUsableMetadata);
    const isTypedMetadata = (metadata) => 'slug' in metadata &&
        isString(metadata.slug) &&
        (metadata.type === 'premium' || metadata.type === 'opensource');
    const isUrlMetadata = (metadata) => 'url' in metadata && isString(metadata.url);
    const toEntry = (metadata) => {
        const name = metadata.name;
        if (isTypedMetadata(metadata)) {
            const displayName = metadata.type === 'premium' ? withPremiumMarker(name) : name;
            return { name, html: buildLink(displayName, buildDocsUrl(metadata.slug)) };
        }
        else if (isUrlMetadata(metadata)) {
            return { name, html: buildLink(name, metadata.url) };
        }
        else {
            return { name, html: name };
        }
    };
    const buildPluginEntry = (editor, key) => readPluginMetadata(editor, key).fold(() => Optional.some({ name: key, html: key }), (metadata) => metadata.hidden === true ? Optional.none() : Optional.some(toEntry(metadata)));
    const getVisiblePluginKeys = (editor) => {
        const keys$1 = keys(editor.plugins);
        const forced = Optional.from(getForcedPlugins(editor)).getOr([]);
        return filter(keys$1, (k) => !contains(forced, k));
    };
    const renderPremiumFooter = () => {
        const learnMoreLink = `<a href="${pricingUrl}" rel="noopener" target="_blank" data-alloy-tabstop="true" tabindex="-1">` +
            global$2.translate('Learn more...') +
            '</a>';
        return '<p class="tox-help__more-link">' +
            global$2.translate(['* indicates a premium plugin. {0}', learnMoreLink]) +
            '</p>';
    };
    const renderPluginList = (editor) => {
        const keys = getVisiblePluginKeys(editor);
        const entries = cat(map(keys, (k) => buildPluginEntry(editor, k)));
        const sorted = sort(entries, (a, b) => a.name.localeCompare(b.name));
        const pluginLis = map(sorted, (entry) => '<li>' + entry.html + '</li>').join('');
        const heading = '<h1>' + global$2.translate(['Plugins installed ({0}):', sorted.length]) + '</h1>';
        return heading + '<ul>' + pluginLis + '</ul>' + renderPremiumFooter();
    };
    const tab$1 = (editor) => {
        const htmlPanel = {
            type: 'htmlpanel',
            presets: 'document',
            html: editor == null ? '' : '<div>' + renderPluginList(editor) + '</div>'
        };
        return {
            name: 'plugins',
            title: 'Plugins',
            items: [
                htmlPanel
            ]
        };
    };

    var global = tinymce.util.Tools.resolve('tinymce.EditorManager');

    const tab = () => {
        const getVersion = (major, minor) => major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
        const version = getVersion(global.majorVersion, global.minorVersion);
        const changeLogLink = '<a data-alloy-tabstop="true" tabindex="-1" href="https://www.tiny.cloud/docs/tinymce/8/changelog/?utm_campaign=help_dialog_version_tab&utm_source=tiny&utm_medium=referral" rel="noopener" target="_blank">TinyMCE ' + version + '</a>';
        const htmlPanel = {
            type: 'htmlpanel',
            html: '<p>' + global$2.translate(['You are using {0}', changeLogLink]) + '</p>',
            presets: 'document'
        };
        return {
            name: 'versions',
            title: 'Version',
            items: [
                htmlPanel
            ]
        };
    };

    const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
        const newTabs = {};
        const names = map(tabsFromSettings, (t) => {
            if (isString(t)) {
                // Code below shouldn't care if a tab name doesn't have a spec.
                // If we find it does, we'll need to make this smarter.
                // CustomTabsTest has a case for this.
                if (has(tabs, t)) {
                    newTabs[t] = tabs[t];
                }
                return t;
            }
            else {
                const name = t.name ?? generate('tab-name');
                newTabs[name] = t;
                return name;
            }
        });
        return { tabs: newTabs, names };
    };
    const getNamesFromTabs = (tabs) => {
        const names = keys(tabs);
        // Move the versions tab to the end if it exists
        const idx = names.indexOf('versions');
        if (idx !== -1) {
            names.splice(idx, 1);
            names.push('versions');
        }
        return { tabs, names };
    };
    const pParseCustomTabs = async (editor, customTabs, pluginUrl) => {
        const shortcuts = tab$2();
        const nav = await pTab(pluginUrl);
        const plugins = tab$1(editor);
        const versions = tab();
        const tabs = {
            [shortcuts.name]: shortcuts,
            [nav.name]: nav,
            [plugins.name]: plugins,
            [versions.name]: versions,
            ...customTabs.get()
        };
        return Optional.from(getHelpTabs(editor)).fold(() => getNamesFromTabs(tabs), (tabsFromSettings) => parseHelpTabsSetting(tabsFromSettings, tabs));
    };
    const init = (editor, customTabs, pluginUrl) => () => {
        // eslint-disable-next-line @typescript-eslint/no-floating-promises
        pParseCustomTabs(editor, customTabs, pluginUrl).then(({ tabs, names }) => {
            const foundTabs = map(names, (name) => get$1(tabs, name));
            const dialogTabs = cat(foundTabs);
            const body = {
                type: 'tabpanel',
                tabs: dialogTabs
            };
            editor.windowManager.open({
                title: 'Help',
                size: 'medium',
                body,
                buttons: [
                    {
                        type: 'cancel',
                        name: 'close',
                        text: 'Close',
                        primary: true
                    }
                ],
                initialData: {}
            });
        });
    };

    const PLUGIN_CODE = 'help';
    var Plugin = () => {
        global$4.add(PLUGIN_CODE, (editor, pluginUrl) => {
            const customTabs = Cell({});
            const api = get(customTabs);
            register$1(editor);
            const dialogOpener = init(editor, customTabs, pluginUrl);
            register(editor, dialogOpener);
            register$2(editor, dialogOpener);
            editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
            initI18nLoad(editor, pluginUrl);
            return {
                ...api,
                getMetadata: () => ({ name: 'Help', type: 'opensource', slug: PLUGIN_CODE })
            };
        });
    };

    Plugin();
    /** *****
     * DO NOT EXPORT ANYTHING
     *
     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
     *******/

})();

The same content is in 4 releases, Joomla 6.2.0-beta3 to 6.2.0. See them all, or every version of this file.