@tabler/core 1.0.0-beta11 → 1.0.0-beta13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -10
- package/dist/css/demo.css +43 -231
- package/dist/css/demo.min.css +3 -3
- package/dist/css/demo.rtl.css +43 -231
- package/dist/css/demo.rtl.min.css +3 -3
- package/dist/css/tabler-flags.css +4 -4
- package/dist/css/tabler-flags.min.css +3 -3
- package/dist/css/tabler-flags.rtl.css +4 -4
- package/dist/css/tabler-flags.rtl.min.css +3 -3
- package/dist/css/tabler-payments.css +2 -2
- package/dist/css/tabler-payments.min.css +2 -2
- package/dist/css/tabler-payments.rtl.css +2 -2
- package/dist/css/tabler-payments.rtl.min.css +2 -2
- package/dist/css/tabler-vendors.css +138 -67
- package/dist/css/tabler-vendors.min.css +3 -3
- package/dist/css/tabler-vendors.rtl.css +138 -67
- package/dist/css/tabler-vendors.rtl.min.css +3 -3
- package/dist/css/tabler.css +3234 -2860
- package/dist/css/tabler.min.css +4 -4
- package/dist/css/tabler.rtl.css +3234 -2860
- package/dist/css/tabler.rtl.min.css +4 -4
- package/dist/js/demo-theme.js +32 -0
- package/dist/js/demo-theme.min.js +9 -0
- package/dist/js/demo.js +2 -12
- package/dist/js/demo.min.js +3 -3
- package/dist/js/tabler.esm.js +219 -129
- package/dist/js/tabler.esm.min.js +9 -3
- package/dist/js/tabler.js +242 -130
- package/dist/js/tabler.min.js +9 -3
- package/dist/libs/apexcharts/dist/apexcharts.amd.js +1 -1
- package/dist/libs/apexcharts/dist/apexcharts.common.js +3 -3
- package/dist/libs/apexcharts/dist/apexcharts.esm.js +3 -3
- package/dist/libs/apexcharts/dist/apexcharts.js +27 -8
- package/dist/libs/apexcharts/dist/apexcharts.min.js +3 -3
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js +162 -144
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js +2 -2
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.js +101 -94
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js +2 -2
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.js +102 -95
- package/dist/libs/bootstrap/dist/js/bootstrap.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.min.js +2 -2
- package/dist/libs/bootstrap/dist/js/bootstrap.min.js.map +1 -1
- package/dist/libs/jsvectormap/dist/js/jsvectormap.js +1061 -1066
- package/dist/libs/jsvectormap/dist/js/jsvectormap.min.js +1 -1
- package/dist/libs/nouislider/dist/nouislider.d.ts +1 -1
- package/dist/libs/tinymce/CHANGELOG.md +45 -0
- package/dist/libs/tinymce/composer.json +1 -1
- package/dist/libs/tinymce/icons/default/icons.js +2 -0
- package/dist/libs/tinymce/icons/default/icons.min.js +1 -1
- package/dist/libs/tinymce/models/dom/model.js +14 -10
- package/dist/libs/tinymce/models/dom/model.min.js +2 -2
- package/dist/libs/tinymce/package.json +1 -1
- package/dist/libs/tinymce/plugins/advlist/plugin.js +16 -9
- package/dist/libs/tinymce/plugins/advlist/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/anchor/plugin.js +7 -6
- package/dist/libs/tinymce/plugins/anchor/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/autolink/plugin.js +93 -97
- package/dist/libs/tinymce/plugins/autolink/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/autoresize/plugin.js +3 -2
- package/dist/libs/tinymce/plugins/autoresize/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/autosave/plugin.js +11 -10
- package/dist/libs/tinymce/plugins/autosave/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/charmap/plugin.js +17 -7
- package/dist/libs/tinymce/plugins/charmap/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/code/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/code/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/codesample/plugin.js +4 -6
- package/dist/libs/tinymce/plugins/codesample/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/directionality/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/directionality/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/emoticons/plugin.js +10 -4
- package/dist/libs/tinymce/plugins/emoticons/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/fullscreen/plugin.js +11 -5
- package/dist/libs/tinymce/plugins/fullscreen/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/help/plugin.js +92 -19
- package/dist/libs/tinymce/plugins/help/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/image/plugin.js +50 -37
- package/dist/libs/tinymce/plugins/image/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/importcss/plugin.js +8 -6
- package/dist/libs/tinymce/plugins/importcss/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/insertdatetime/plugin.js +2 -3
- package/dist/libs/tinymce/plugins/insertdatetime/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/link/plugin.js +57 -43
- package/dist/libs/tinymce/plugins/link/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/lists/plugin.js +120 -74
- package/dist/libs/tinymce/plugins/lists/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/media/plugin.js +39 -24
- package/dist/libs/tinymce/plugins/media/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/nonbreaking/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/pagebreak/plugin.js +2 -2
- package/dist/libs/tinymce/plugins/pagebreak/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/preview/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/preview/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/quickbars/plugin.js +3 -2
- package/dist/libs/tinymce/plugins/quickbars/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/save/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/save/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/searchreplace/plugin.js +13 -13
- package/dist/libs/tinymce/plugins/searchreplace/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/table/plugin.js +42 -37
- package/dist/libs/tinymce/plugins/table/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/template/plugin.js +7 -4
- package/dist/libs/tinymce/plugins/template/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/visualblocks/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/visualblocks/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/visualchars/plugin.js +9 -6
- package/dist/libs/tinymce/plugins/visualchars/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/wordcount/plugin.js +6 -5
- package/dist/libs/tinymce/plugins/wordcount/plugin.min.js +2 -2
- package/dist/libs/tinymce/skins/ui/oxide/content.css +28 -0
- package/dist/libs/tinymce/skins/ui/oxide/content.inline.css +28 -0
- package/dist/libs/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide/skin.css +39 -4
- package/dist/libs/tinymce/skins/ui/oxide/skin.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.css +28 -0
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.css +28 -0
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide-dark/skin.css +39 -4
- package/dist/libs/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.css +28 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.css +28 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5/skin.css +45 -4
- package/dist/libs/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.css +28 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.css +28 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.css +44 -3
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/dist/libs/tinymce/themes/silver/theme.js +2494 -1999
- package/dist/libs/tinymce/themes/silver/theme.min.js +2 -2
- package/dist/libs/tinymce/tinymce.d.ts +345 -169
- package/dist/libs/tinymce/tinymce.js +2988 -2392
- package/dist/libs/tinymce/tinymce.min.js +2 -2
- package/dist/libs/tom-select/dist/js/plugins/caret_position.js +164 -160
- package/dist/libs/tom-select/dist/js/plugins/caret_position.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/change_listener.js +1 -1
- package/dist/libs/tom-select/dist/js/plugins/change_listener.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/checkbox_options.js +12 -7
- package/dist/libs/tom-select/dist/js/plugins/checkbox_options.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/clear_button.js +94 -89
- package/dist/libs/tom-select/dist/js/plugins/clear_button.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/drag_drop.js +1 -1
- package/dist/libs/tom-select/dist/js/plugins/drag_drop.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/dropdown_header.js +121 -116
- package/dist/libs/tom-select/dist/js/plugins/dropdown_header.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/dropdown_input.js +234 -230
- package/dist/libs/tom-select/dist/js/plugins/dropdown_input.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/input_autogrow.js +1 -1
- package/dist/libs/tom-select/dist/js/plugins/input_autogrow.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/no_active_items.js +1 -1
- package/dist/libs/tom-select/dist/js/plugins/no_active_items.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/no_backspace_delete.js +1 -1
- package/dist/libs/tom-select/dist/js/plugins/no_backspace_delete.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/optgroup_columns.js +112 -107
- package/dist/libs/tom-select/dist/js/plugins/optgroup_columns.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/remove_button.js +149 -144
- package/dist/libs/tom-select/dist/js/plugins/remove_button.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/restore_on_backspace.js +1 -1
- package/dist/libs/tom-select/dist/js/plugins/restore_on_backspace.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/virtual_scroll.js +277 -269
- package/dist/libs/tom-select/dist/js/plugins/virtual_scroll.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.base.js +756 -272
- package/dist/libs/tom-select/dist/js/tom-select.base.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.base.min.js +329 -272
- package/dist/libs/tom-select/dist/js/tom-select.base.min.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.complete.js +761 -273
- package/dist/libs/tom-select/dist/js/tom-select.complete.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.complete.min.js +268 -209
- package/dist/libs/tom-select/dist/js/tom-select.complete.min.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.popular.js +753 -269
- package/dist/libs/tom-select/dist/js/tom-select.popular.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.popular.min.js +348 -291
- package/dist/libs/tom-select/dist/js/tom-select.popular.min.js.map +1 -1
- package/package.json +78 -34
- package/src/js/demo-theme.js +25 -0
- package/src/js/demo.js +0 -17
- package/src/js/src/dropdown.js +5 -2
- package/src/js/src/tabler.js +17 -0
- package/src/js/tabler.js +3 -1
- package/src/scss/_core.scss +2 -0
- package/src/scss/_mixins-override.scss +26 -26
- package/src/scss/_utilities.scss +2 -4
- package/src/scss/_variables.scss +311 -168
- package/src/scss/demo/_examples.scss +2 -2
- package/src/scss/demo/_highlight.scss +14 -278
- package/src/scss/demo.scss +4 -4
- package/src/scss/fonts/_webfonts.scss +0 -50
- package/src/scss/layout/_core.scss +2 -23
- package/src/scss/layout/_dark.scss +27 -38
- package/src/scss/layout/_footer.scss +2 -2
- package/src/scss/layout/_navbar.scss +23 -19
- package/src/scss/layout/_page.scss +9 -7
- package/src/scss/layout/_root.scss +48 -0
- package/src/scss/mixins/_functions.scss +2 -2
- package/src/scss/mixins/_mixins.scss +10 -8
- package/src/scss/ui/_accordion.scss +1 -1
- package/src/scss/ui/_alerts.scss +3 -3
- package/src/scss/ui/_avatars.scss +7 -7
- package/src/scss/ui/_badges.scss +3 -3
- package/src/scss/ui/_buttons.scss +35 -22
- package/src/scss/ui/_calendars.scss +10 -10
- package/src/scss/ui/_cards.scss +45 -63
- package/src/scss/ui/_carousel.scss +5 -5
- package/src/scss/ui/_chips.scss +0 -0
- package/src/scss/ui/_dropdowns.scss +2 -1
- package/src/scss/ui/_empty.scss +3 -3
- package/src/scss/ui/_flags.scss +2 -2
- package/src/scss/ui/_forms.scss +8 -8
- package/src/scss/ui/_grid.scss +8 -9
- package/src/scss/ui/_icons.scss +64 -4
- package/src/scss/ui/_legend.scss +8 -4
- package/src/scss/ui/_lists.scss +16 -13
- package/src/scss/ui/_markdown.scss +2 -3
- package/src/scss/ui/_modals.scss +1 -1
- package/src/scss/ui/_nav.scss +9 -9
- package/src/scss/ui/_offcanvas.scss +2 -6
- package/src/scss/ui/_pagination.scss +10 -6
- package/src/scss/ui/_placeholder.scss +1 -1
- package/src/scss/ui/_progress.scss +45 -6
- package/src/scss/ui/_ribbons.scss +17 -12
- package/src/scss/ui/_status.scss +3 -3
- package/src/scss/ui/_steps.scss +4 -4
- package/src/scss/ui/_tables.scss +27 -6
- package/src/scss/ui/_toasts.scss +1 -2
- package/src/scss/ui/_tracking.scss +29 -0
- package/src/scss/ui/_type.scss +43 -40
- package/src/scss/ui/forms/_form-check.scss +26 -1
- package/src/scss/ui/forms/_form-colorinput.scss +2 -2
- package/src/scss/ui/forms/_form-icon.scss +1 -1
- package/src/scss/ui/forms/_form-imagecheck.scss +14 -6
- package/src/scss/ui/forms/_form-selectgroup.scss +8 -8
- package/src/scss/ui/typo/_hr.scss +2 -3
- package/src/scss/utils/_colors.scss +17 -6
- package/src/scss/vendor/_apexcharts.scss +26 -0
- package/src/scss/vendor/_dropzone.scss +1 -1
- package/src/scss/vendor/_jsvectormap.scss +7 -7
- package/src/scss/vendor/_litepicker.scss +14 -13
- package/src/scss/vendor/_plyr.scss +1 -1
- package/src/scss/vendor/_tinymce.scss +14 -3
- package/src/scss/vendor/_tom-select.scss +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version 6.
|
|
2
|
+
* TinyMCE version 6.2.0 (2022-09-08)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
const isArray = isType$1('array');
|
|
51
51
|
const isNull = eq$1(null);
|
|
52
52
|
const isBoolean = isSimpleType('boolean');
|
|
53
|
+
const isUndefined = eq$1(undefined);
|
|
53
54
|
const isNullable = a => a === null || a === undefined;
|
|
54
55
|
const isNonNullable = a => !isNullable(a);
|
|
55
56
|
const isFunction = isSimpleType('function');
|
|
@@ -295,8 +296,13 @@
|
|
|
295
296
|
}
|
|
296
297
|
};
|
|
297
298
|
|
|
298
|
-
const contains = (str, substr) => {
|
|
299
|
-
|
|
299
|
+
const contains = (str, substr, start = 0, end) => {
|
|
300
|
+
const idx = str.indexOf(substr, start);
|
|
301
|
+
if (idx !== -1) {
|
|
302
|
+
return isUndefined(end) ? true : idx + substr.length <= end;
|
|
303
|
+
} else {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
300
306
|
};
|
|
301
307
|
|
|
302
308
|
const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
@@ -1008,7 +1014,7 @@
|
|
|
1008
1014
|
const clobberedEls = all('[' + attr + ']');
|
|
1009
1015
|
each$1(clobberedEls, element => {
|
|
1010
1016
|
const restore = get$3(element, attr);
|
|
1011
|
-
if (restore !== 'no-styles') {
|
|
1017
|
+
if (restore && restore !== 'no-styles') {
|
|
1012
1018
|
setAll(element, dom.parseStyle(restore));
|
|
1013
1019
|
} else {
|
|
1014
1020
|
remove(element, 'style');
|
|
@@ -1074,7 +1080,7 @@
|
|
|
1074
1080
|
const isTouch = global.deviceType.isTouch();
|
|
1075
1081
|
const editorContainerStyle = editorContainer.style;
|
|
1076
1082
|
const iframe = editor.iframeElement;
|
|
1077
|
-
const iframeStyle = iframe.style;
|
|
1083
|
+
const iframeStyle = iframe === null || iframe === void 0 ? void 0 : iframe.style;
|
|
1078
1084
|
const handleClasses = handler => {
|
|
1079
1085
|
handler(body, 'tox-fullscreen');
|
|
1080
1086
|
handler(documentElement, 'tox-fullscreen');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version 6.
|
|
2
|
+
* TinyMCE version 6.2.0 (2022-09-08)
|
|
3
3
|
*/
|
|
4
|
-
!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var n,r,o,s})(t)===e,r=e=>t=>typeof t===e,o=n("string"),s=n("array"),i=(null,e=>null===e);const l=r("boolean"),a=e=>!(e=>null==e)(e),c=r("function"),u=r("number"),d=()=>{},m=e=>()=>e;function h(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const g=m(!1),p=m(!0);class f{constructor(e,t){this.tag=e,this.value=t}static some(e){return new f(!0,e)}static none(){return f.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?f.some(e(this.value)):f.none()}bind(e){return this.tag?e(this.value):f.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:f.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?f.some(e):f.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}f.singletonNone=new f(!1);const v=t=>{const n=e(f.none()),r=()=>n.get().each(t);return{clear:()=>{r(),n.set(f.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{r(),n.set(f.some(e))}}},w=()=>v((e=>e.unbind())),y=Array.prototype.push,b=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},S=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},x=(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=e[r];t(o,r)&&n.push(o)}return n},E=(e,t)=>((e,t,n)=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if(t(o,r))return f.some(o);if(n(o,r))break}return f.none()})(e,t,g),F=Object.keys,O=(e,t)=>-1!==e.indexOf(t),T=e=>void 0!==e.style&&c(e.style.getPropertyValue),k=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},C=k;"undefined"!=typeof window?window:Function("return this;")();const A=e=>t=>(e=>e.dom.nodeType)(t)===e,R=A(1),L=A(3),M=A(9),N=A(11),P=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},D=e=>C(e.dom.ownerDocument),W=e=>b(e.dom.childNodes,C),q=c(Element.prototype.attachShadow)&&c(Node.prototype.getRootNode),H=m(q),I=q?e=>C(e.dom.getRootNode()):e=>M(e)?e:D(e),B=e=>{const t=I(e);return N(n=t)&&a(n.dom.host)?f.some(t):f.none();var n},V=e=>C(e.dom.host),_=e=>{const t=L(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return B(C(t)).fold((()=>n.body.contains(t)),(r=_,o=V,e=>r(o(e))));var r,o},j=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},z=(e,t)=>{e.dom.removeAttribute(t)},$=(e,t)=>{const n=e.dom;((e,t)=>{const n=F(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}})(t,((e,t)=>{((e,t,n)=>{if(!o(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);T(e)&&e.style.setProperty(t,n)})(n,t,e)}))},U=e=>{const t=C((e=>{if(H()&&a(e.target)){const t=C(e.target);if(R(t)&&a(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return((e,t)=>0<e.length?f.some(e[0]):f.none())(t)}}return f.from(e.target)})(e).getOr(e.target)),n=()=>e.stopPropagation(),r=()=>e.preventDefault(),o=(s=r,i=n,(...e)=>s(i.apply(null,e)));var s,i;return((e,t,n,r,o,s,i)=>({target:e,x:t,y:n,stop:r,prevent:o,kill:s,raw:i}))(t,e.clientX,e.clientY,n,r,o,e)},K=(e,t,n,r)=>{e.dom.removeEventListener(t,n,r)},X=p,Y=(e,t,n)=>((e,t,n,r)=>((e,t,n,r,o)=>{const s=((e,t)=>n=>{e(n)&&t(U(n))})(n,r);return e.dom.addEventListener(t,s,o),{unbind:h(K,e,t,s,o)}})(e,t,n,r,!1))(e,t,X,n),G=()=>J(0,0),J=(e,t)=>({major:e,minor:t}),Q={nu:J,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?G():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.test(t))return r}})(e,t);if(!n)return{major:0,minor:0};const r=e=>Number(t.replace(n,"$"+e));return J(r(1),r(2))})(e,n)},unknown:G},Z=(e,t)=>{const n=String(t).toLowerCase();return E(e,(e=>e.search(n)))},ee=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,te=e=>t=>O(t,e),ne=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>O(e,"edge/")&&O(e,"chrome")&&O(e,"safari")&&O(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ee],search:e=>O(e,"chrome")&&!O(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>O(e,"msie")||O(e,"trident")},{name:"Opera",versionRegexes:[ee,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:te("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:te("firefox")},{name:"Safari",versionRegexes:[ee,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(O(e,"safari")||O(e,"mobile/"))&&O(e,"applewebkit")}],re=[{name:"Windows",search:te("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>O(e,"iphone")||O(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:te("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:te("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:te("linux"),versionRegexes:[]},{name:"Solaris",search:te("sunos"),versionRegexes:[]},{name:"FreeBSD",search:te("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:te("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],oe={browsers:m(ne),oses:m(re)},se="Edge",ie="Chromium",le="Opera",ae="Firefox",ce="Safari",ue=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isEdge:r(se),isChromium:r(ie),isIE:r("IE"),isOpera:r(le),isFirefox:r(ae),isSafari:r(ce)}},de=()=>ue({current:void 0,version:Q.unknown()}),me=ue,he=(m(se),m(ie),m("IE"),m(le),m(ae),m(ce),"Windows"),ge="Android",pe="Linux",fe="macOS",ve="Solaris",we="FreeBSD",ye="ChromeOS",be=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isWindows:r(he),isiOS:r("iOS"),isAndroid:r(ge),isMacOS:r(fe),isLinux:r(pe),isSolaris:r(ve),isFreeBSD:r(we),isChromeOS:r(ye)}},Se=()=>be({current:void 0,version:Q.unknown()}),xe=be,Ee=(m(he),m("iOS"),m(ge),m(pe),m(fe),m(ve),m(we),m(ye),(e,t,n)=>{const r=oe.browsers(),o=oe.oses(),s=t.bind((e=>((e,t)=>((e,t)=>{for(let n=0;n<e.length;n++){const r=t(e[n]);if(r.isSome())return r}return f.none()})(t.brands,(t=>{const n=t.brand.toLowerCase();return E(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Q.nu(parseInt(t.version,10),0)})))})))(r,e))).orThunk((()=>((e,t)=>Z(e,t).map((e=>{const n=Q.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e))).fold(de,me),i=((e,t)=>Z(e,t).map((e=>{const n=Q.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e).fold(Se,xe),l=((e,t,n,r)=>{const o=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!o,i=e.isiOS()||e.isAndroid(),l=i||r("(pointer:coarse)"),a=o||!s&&i&&r("(min-device-width:768px)"),c=s||i&&!a,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!a&&!u;return{isiPad:m(o),isiPhone:m(s),isTablet:m(a),isPhone:m(c),isTouch:m(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:m(u),isDesktop:m(d)}})(i,s,e,n);return{browser:s,os:i,deviceType:l}}),Fe=e=>window.matchMedia(e).matches;let Oe=(e=>{let t,n=!1;return(...r)=>(n||(n=!0,t=e.apply(null,r)),t)})((()=>Ee(navigator.userAgent,f.from(navigator.userAgentData),Fe)));const Te=(e,t)=>({left:e,top:t,translate:(n,r)=>Te(e+n,t+r)}),ke=Te,Ce=e=>{const t=void 0===e?window:e;return Oe().browser.isFirefox()?f.none():f.from(t.visualViewport)},Ae=(e,t,n,r)=>({x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}),Re=e=>{const t=void 0===e?window:e,n=t.document,r=(e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return ke(n,r)})(C(n));return Ce(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return Ae(r.left,r.top,n,o)}),(e=>Ae(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)))},Le=(e,t,n)=>Ce(n).map((n=>{const r=e=>t(U(e));return n.addEventListener(e,r),{unbind:()=>n.removeEventListener(e,r)}})).getOrThunk((()=>({unbind:d})));var Me=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Ne=tinymce.util.Tools.resolve("tinymce.Env");const Pe=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t}),e.dispatch("ResizeEditor")},De=("fullscreen_native",e=>e.options.get("fullscreen_native"));const We=e=>{return e.dom===(void 0!==(t=D(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},qe=(e,t,n)=>((e,t,n)=>x(((e,t)=>{const n=c(t)?t:g;let r=e.dom;const o=[];for(;null!==r.parentNode&&void 0!==r.parentNode;){const e=r.parentNode,t=C(e);if(o.push(t),!0===n(t))break;r=e}return o})(e,n),t))(e,(e=>P(e,t)),n),He=(e,t)=>((e,n)=>{return x((e=>f.from(e.dom.parentNode).map(C))(r=e).map(W).map((e=>x(e,(e=>{return t=e,!(r.dom===t.dom);var t})))).getOr([]),(e=>P(e,t)));var r})(e),Ie="data-ephox-mobile-fullscreen-style",Be="position:absolute!important;",Ve="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",_e=Ne.os.isAndroid(),je=e=>{const t=((e,t)=>{const n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||_(e)?r:((e,t)=>T(e)?e.style.getPropertyValue(t):"")(n,t)})(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"},ze=Me.DOM,$e=Ce().fold((()=>({bind:d,unbind:d})),(e=>{const t=(()=>{const e=v(d);return{...e,on:t=>e.get().each(t)}})(),n=w(),r=w(),o=((e,t)=>{let n=null;return{cancel:()=>{i(n)||(clearTimeout(n),n=null)},throttle:(...t)=>{i(n)&&(n=setTimeout((()=>{n=null,e.apply(null,t)}),50))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>$(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}));return{bind:e=>{t.set(e),o.throttle(),n.set(Le("resize",o.throttle)),r.set(Le("scroll",o.throttle))},unbind:()=>{t.on((()=>{n.clear(),r.clear()})),t.clear()}}})),Ue=(e,t)=>{const n=document.body,r=document.documentElement,i=e.getContainer(),a=C(i),c=(e=>{const t=C(e.getElement());return B(t).map(V).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return C(t)})(D(t))))})(e),d=t.get(),m=C(e.getBody()),h=Ne.deviceType.isTouch(),g=i.style,p=e.iframeElement.style,v=e=>{e(n,"tox-fullscreen"),e(r,"tox-fullscreen"),e(i,"tox-fullscreen"),B(a).map((e=>V(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},w=()=>{h&&(e=>{const t=((e,t)=>{const n=document;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:b(n.querySelectorAll(e),C);var r})("["+Ie+"]");S(t,(t=>{const n=j(t,Ie);"no-styles"!==n?$(t,e.parseStyle(n)):z(t,"style"),z(t,Ie)}))})(e.dom),v(ze.removeClass),$e.unbind(),f.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(d)d.fullscreenChangeHandler.unbind(),De(e)&&We(c)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(D(c)),p.width=d.iframeWidth,p.height=d.iframeHeight,g.width=d.containerWidth,g.height=d.containerHeight,g.top=d.containerTop,g.left=d.containerLeft,w(),x=d.scrollPos,window.scrollTo(x.x,x.y),t.set(null),Pe(e,!1),e.off("remove",w);else{const n=Y(D(c),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(n=>{De(e)&&(We(c)||null===t.get()||Ue(e,t))})),r={scrollPos:Re(window),containerWidth:g.width,containerHeight:g.height,containerTop:g.top,containerLeft:g.left,iframeWidth:p.width,iframeHeight:p.height,fullscreenChangeHandler:n};h&&((e,t,n)=>{const r=t=>n=>{const r=j(n,"style"),s=void 0===r?"no-styles":r.trim();s!==t&&(((e,t,n)=>{((e,t,n)=>{if(!(o(n)||l(n)||u(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)})(n,Ie,s),$(n,e.parseStyle(t)))},i=qe(t,"*"),a=(e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);y.apply(t,e[n])}return t})(b(i,(e=>He(e,"*:not(.tox-silver-sink)")))),c=je(n);S(a,r("display:none!important;")),S(i,r(Be+Ve+c)),r((!0===_e?"":Be)+Ve+c)(t)})(e.dom,a,m),p.width=p.height="100%",g.width=g.height="",v(ze.addClass),$e.bind(a),e.on("remove",w),t.set(r),De(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(c),Pe(e,!0)}var x},Ke=(e,t)=>n=>{n.setActive(null!==t.get());const r=e=>n.setActive(e.state);return e.on("FullscreenStateChanged",r),()=>e.off("FullscreenStateChanged",r)};t.add("fullscreen",(t=>{const n=e(null);return t.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(t),((e,t)=>{e.addCommand("mceFullScreen",(()=>{Ue(e,t)}))})(t,n),((e,t)=>{const n=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:Ke(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:Ke(e,t)})})(t,n),t.addShortcut("Meta+Shift+F","","mceFullScreen")),(e=>({isFullscreen:()=>null!==e.get()}))(n)}))}();
|
|
4
|
+
!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var n,r,o,s})(t)===e,r=e=>t=>typeof t===e,o=e=>t=>e===t,s=n("string"),i=n("array"),l=o(null),a=r("boolean"),c=o(void 0),u=e=>!(e=>null==e)(e),d=r("function"),m=r("number"),h=()=>{},g=e=>()=>e;function p(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const f=g(!1),v=g(!0);class w{constructor(e,t){this.tag=e,this.value=t}static some(e){return new w(!0,e)}static none(){return w.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?w.some(e(this.value)):w.none()}bind(e){return this.tag?e(this.value):w.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:w.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return u(e)?w.some(e):w.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}w.singletonNone=new w(!1);const y=t=>{const n=e(w.none()),r=()=>n.get().each(t);return{clear:()=>{r(),n.set(w.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{r(),n.set(w.some(e))}}},b=()=>y((e=>e.unbind())),S=Array.prototype.push,x=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},E=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},F=(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=e[r];t(o,r)&&n.push(o)}return n},O=(e,t)=>((e,t,n)=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if(t(o,r))return w.some(o);if(n(o,r))break}return w.none()})(e,t,f),T=Object.keys,k=(e,t,n=0,r)=>{const o=e.indexOf(t,n);return-1!==o&&(!!c(r)||o+t.length<=r)},C=e=>void 0!==e.style&&d(e.style.getPropertyValue),A=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},R=A;"undefined"!=typeof window?window:Function("return this;")();const L=e=>t=>(e=>e.dom.nodeType)(t)===e,M=L(1),N=L(3),P=L(9),D=L(11),W=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},q=e=>R(e.dom.ownerDocument),H=e=>x(e.dom.childNodes,R),I=d(Element.prototype.attachShadow)&&d(Node.prototype.getRootNode),B=g(I),V=I?e=>R(e.dom.getRootNode()):e=>P(e)?e:q(e),_=e=>{const t=V(e);return D(n=t)&&u(n.dom.host)?w.some(t):w.none();var n},j=e=>R(e.dom.host),z=e=>{const t=N(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return _(R(t)).fold((()=>n.body.contains(t)),(r=z,o=j,e=>r(o(e))));var r,o},$=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},U=(e,t)=>{e.dom.removeAttribute(t)},K=(e,t)=>{const n=e.dom;((e,t)=>{const n=T(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}})(t,((e,t)=>{((e,t,n)=>{if(!s(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);C(e)&&e.style.setProperty(t,n)})(n,t,e)}))},X=e=>{const t=R((e=>{if(B()&&u(e.target)){const t=R(e.target);if(M(t)&&u(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return((e,t)=>0<e.length?w.some(e[0]):w.none())(t)}}return w.from(e.target)})(e).getOr(e.target)),n=()=>e.stopPropagation(),r=()=>e.preventDefault(),o=(s=r,i=n,(...e)=>s(i.apply(null,e)));var s,i;return((e,t,n,r,o,s,i)=>({target:e,x:t,y:n,stop:r,prevent:o,kill:s,raw:i}))(t,e.clientX,e.clientY,n,r,o,e)},Y=(e,t,n,r)=>{e.dom.removeEventListener(t,n,r)},G=v,J=(e,t,n)=>((e,t,n,r)=>((e,t,n,r,o)=>{const s=((e,t)=>n=>{e(n)&&t(X(n))})(n,r);return e.dom.addEventListener(t,s,o),{unbind:p(Y,e,t,s,o)}})(e,t,n,r,!1))(e,t,G,n),Q=()=>Z(0,0),Z=(e,t)=>({major:e,minor:t}),ee={nu:Z,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?Q():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.test(t))return r}})(e,t);if(!n)return{major:0,minor:0};const r=e=>Number(t.replace(n,"$"+e));return Z(r(1),r(2))})(e,n)},unknown:Q},te=(e,t)=>{const n=String(t).toLowerCase();return O(e,(e=>e.search(n)))},ne=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,re=e=>t=>k(t,e),oe=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>k(e,"edge/")&&k(e,"chrome")&&k(e,"safari")&&k(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ne],search:e=>k(e,"chrome")&&!k(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>k(e,"msie")||k(e,"trident")},{name:"Opera",versionRegexes:[ne,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:re("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:re("firefox")},{name:"Safari",versionRegexes:[ne,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(k(e,"safari")||k(e,"mobile/"))&&k(e,"applewebkit")}],se=[{name:"Windows",search:re("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>k(e,"iphone")||k(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:re("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:re("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:re("linux"),versionRegexes:[]},{name:"Solaris",search:re("sunos"),versionRegexes:[]},{name:"FreeBSD",search:re("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:re("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ie={browsers:g(oe),oses:g(se)},le="Edge",ae="Chromium",ce="Opera",ue="Firefox",de="Safari",me=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isEdge:r(le),isChromium:r(ae),isIE:r("IE"),isOpera:r(ce),isFirefox:r(ue),isSafari:r(de)}},he=()=>me({current:void 0,version:ee.unknown()}),ge=me,pe=(g(le),g(ae),g("IE"),g(ce),g(ue),g(de),"Windows"),fe="Android",ve="Linux",we="macOS",ye="Solaris",be="FreeBSD",Se="ChromeOS",xe=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isWindows:r(pe),isiOS:r("iOS"),isAndroid:r(fe),isMacOS:r(we),isLinux:r(ve),isSolaris:r(ye),isFreeBSD:r(be),isChromeOS:r(Se)}},Ee=()=>xe({current:void 0,version:ee.unknown()}),Fe=xe,Oe=(g(pe),g("iOS"),g(fe),g(ve),g(we),g(ye),g(be),g(Se),(e,t,n)=>{const r=ie.browsers(),o=ie.oses(),s=t.bind((e=>((e,t)=>((e,t)=>{for(let n=0;n<e.length;n++){const r=t(e[n]);if(r.isSome())return r}return w.none()})(t.brands,(t=>{const n=t.brand.toLowerCase();return O(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:ee.nu(parseInt(t.version,10),0)})))})))(r,e))).orThunk((()=>((e,t)=>te(e,t).map((e=>{const n=ee.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e))).fold(he,ge),i=((e,t)=>te(e,t).map((e=>{const n=ee.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e).fold(Ee,Fe),l=((e,t,n,r)=>{const o=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!o,i=e.isiOS()||e.isAndroid(),l=i||r("(pointer:coarse)"),a=o||!s&&i&&r("(min-device-width:768px)"),c=s||i&&!a,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!a&&!u;return{isiPad:g(o),isiPhone:g(s),isTablet:g(a),isPhone:g(c),isTouch:g(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:g(u),isDesktop:g(d)}})(i,s,e,n);return{browser:s,os:i,deviceType:l}}),Te=e=>window.matchMedia(e).matches;let ke=(e=>{let t,n=!1;return(...r)=>(n||(n=!0,t=e.apply(null,r)),t)})((()=>Oe(navigator.userAgent,w.from(navigator.userAgentData),Te)));const Ce=(e,t)=>({left:e,top:t,translate:(n,r)=>Ce(e+n,t+r)}),Ae=Ce,Re=e=>{const t=void 0===e?window:e;return ke().browser.isFirefox()?w.none():w.from(t.visualViewport)},Le=(e,t,n,r)=>({x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}),Me=e=>{const t=void 0===e?window:e,n=t.document,r=(e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Ae(n,r)})(R(n));return Re(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return Le(r.left,r.top,n,o)}),(e=>Le(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)))},Ne=(e,t,n)=>Re(n).map((n=>{const r=e=>t(X(e));return n.addEventListener(e,r),{unbind:()=>n.removeEventListener(e,r)}})).getOrThunk((()=>({unbind:h})));var Pe=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),De=tinymce.util.Tools.resolve("tinymce.Env");const We=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t}),e.dispatch("ResizeEditor")},qe=("fullscreen_native",e=>e.options.get("fullscreen_native"));const He=e=>{return e.dom===(void 0!==(t=q(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},Ie=(e,t,n)=>((e,t,n)=>F(((e,t)=>{const n=d(t)?t:f;let r=e.dom;const o=[];for(;null!==r.parentNode&&void 0!==r.parentNode;){const e=r.parentNode,t=R(e);if(o.push(t),!0===n(t))break;r=e}return o})(e,n),t))(e,(e=>W(e,t)),n),Be=(e,t)=>((e,n)=>{return F((e=>w.from(e.dom.parentNode).map(R))(r=e).map(H).map((e=>F(e,(e=>{return t=e,!(r.dom===t.dom);var t})))).getOr([]),(e=>W(e,t)));var r})(e),Ve="data-ephox-mobile-fullscreen-style",_e="position:absolute!important;",je="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",ze=De.os.isAndroid(),$e=e=>{const t=((e,t)=>{const n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||z(e)?r:((e,t)=>C(e)?e.style.getPropertyValue(t):"")(n,t)})(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"},Ue=Pe.DOM,Ke=Re().fold((()=>({bind:h,unbind:h})),(e=>{const t=(()=>{const e=y(h);return{...e,on:t=>e.get().each(t)}})(),n=b(),r=b(),o=((e,t)=>{let n=null;return{cancel:()=>{l(n)||(clearTimeout(n),n=null)},throttle:(...t)=>{l(n)&&(n=setTimeout((()=>{n=null,e.apply(null,t)}),50))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>K(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}));return{bind:e=>{t.set(e),o.throttle(),n.set(Ne("resize",o.throttle)),r.set(Ne("scroll",o.throttle))},unbind:()=>{t.on((()=>{n.clear(),r.clear()})),t.clear()}}})),Xe=(e,t)=>{const n=document.body,r=document.documentElement,o=e.getContainer(),l=R(o),c=(e=>{const t=R(e.getElement());return _(t).map(j).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return R(t)})(q(t))))})(e),u=t.get(),d=R(e.getBody()),h=De.deviceType.isTouch(),g=o.style,p=e.iframeElement,f=null==p?void 0:p.style,v=e=>{e(n,"tox-fullscreen"),e(r,"tox-fullscreen"),e(o,"tox-fullscreen"),_(l).map((e=>j(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},y=()=>{h&&(e=>{const t=((e,t)=>{const n=document;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:x(n.querySelectorAll(e),R);var r})("["+Ve+"]");E(t,(t=>{const n=$(t,Ve);n&&"no-styles"!==n?K(t,e.parseStyle(n)):U(t,"style"),U(t,Ve)}))})(e.dom),v(Ue.removeClass),Ke.unbind(),w.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(u)u.fullscreenChangeHandler.unbind(),qe(e)&&He(c)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(q(c)),f.width=u.iframeWidth,f.height=u.iframeHeight,g.width=u.containerWidth,g.height=u.containerHeight,g.top=u.containerTop,g.left=u.containerLeft,y(),b=u.scrollPos,window.scrollTo(b.x,b.y),t.set(null),We(e,!1),e.off("remove",y);else{const n=J(q(c),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(n=>{qe(e)&&(He(c)||null===t.get()||Xe(e,t))})),r={scrollPos:Me(window),containerWidth:g.width,containerHeight:g.height,containerTop:g.top,containerLeft:g.left,iframeWidth:f.width,iframeHeight:f.height,fullscreenChangeHandler:n};h&&((e,t,n)=>{const r=t=>n=>{const r=$(n,"style"),o=void 0===r?"no-styles":r.trim();o!==t&&(((e,t,n)=>{((e,t,n)=>{if(!(s(n)||a(n)||m(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)})(n,Ve,o),K(n,e.parseStyle(t)))},o=Ie(t,"*"),l=(e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!i(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);S.apply(t,e[n])}return t})(x(o,(e=>Be(e,"*:not(.tox-silver-sink)")))),c=$e(n);E(l,r("display:none!important;")),E(o,r(_e+je+c)),r((!0===ze?"":_e)+je+c)(t)})(e.dom,l,d),f.width=f.height="100%",g.width=g.height="",v(Ue.addClass),Ke.bind(l),e.on("remove",y),t.set(r),qe(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(c),We(e,!0)}var b},Ye=(e,t)=>n=>{n.setActive(null!==t.get());const r=e=>n.setActive(e.state);return e.on("FullscreenStateChanged",r),()=>e.off("FullscreenStateChanged",r)};t.add("fullscreen",(t=>{const n=e(null);return t.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(t),((e,t)=>{e.addCommand("mceFullScreen",(()=>{Xe(e,t)}))})(t,n),((e,t)=>{const n=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:Ye(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:Ye(e,t)})})(t,n),t.addShortcut("Meta+Shift+F","","mceFullScreen")),(e=>({isFullscreen:()=>null!==e.get()}))(n)}))}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version 6.
|
|
2
|
+
* TinyMCE version 6.2.0 (2022-09-08)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -21,10 +21,21 @@
|
|
|
21
21
|
|
|
22
22
|
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
23
23
|
|
|
24
|
+
let unique = 0;
|
|
25
|
+
const generate = prefix => {
|
|
26
|
+
const date = new Date();
|
|
27
|
+
const time = date.getTime();
|
|
28
|
+
const random = Math.floor(Math.random() * 1000000000);
|
|
29
|
+
unique++;
|
|
30
|
+
return prefix + '_' + random + unique + String(time);
|
|
31
|
+
};
|
|
32
|
+
|
|
24
33
|
const get$1 = customTabs => {
|
|
25
34
|
const addTab = spec => {
|
|
35
|
+
var _a;
|
|
36
|
+
const name = (_a = spec.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
|
26
37
|
const currentCustomTabs = customTabs.get();
|
|
27
|
-
currentCustomTabs[
|
|
38
|
+
currentCustomTabs[name] = spec;
|
|
28
39
|
customTabs.set(currentCustomTabs);
|
|
29
40
|
};
|
|
30
41
|
return { addTab };
|
|
@@ -56,10 +67,34 @@
|
|
|
56
67
|
});
|
|
57
68
|
};
|
|
58
69
|
|
|
70
|
+
const hasProto = (v, constructor, predicate) => {
|
|
71
|
+
var _a;
|
|
72
|
+
if (predicate(v, constructor.prototype)) {
|
|
73
|
+
return true;
|
|
74
|
+
} else {
|
|
75
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const typeOf = x => {
|
|
79
|
+
const t = typeof x;
|
|
80
|
+
if (x === null) {
|
|
81
|
+
return 'null';
|
|
82
|
+
} else if (t === 'object' && Array.isArray(x)) {
|
|
83
|
+
return 'array';
|
|
84
|
+
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
85
|
+
return 'string';
|
|
86
|
+
} else {
|
|
87
|
+
return t;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const isType = type => value => typeOf(value) === type;
|
|
91
|
+
const isSimpleType = type => value => typeof value === type;
|
|
59
92
|
const eq = t => a => t === a;
|
|
93
|
+
const isString = isType('string');
|
|
60
94
|
const isUndefined = eq(undefined);
|
|
61
95
|
const isNullable = a => a === null || a === undefined;
|
|
62
96
|
const isNonNullable = a => !isNullable(a);
|
|
97
|
+
const isFunction = isSimpleType('function');
|
|
63
98
|
|
|
64
99
|
const constant = value => {
|
|
65
100
|
return () => {
|
|
@@ -161,6 +196,7 @@
|
|
|
161
196
|
}
|
|
162
197
|
Optional.singletonNone = new Optional(false);
|
|
163
198
|
|
|
199
|
+
const nativeSlice = Array.prototype.slice;
|
|
164
200
|
const nativeIndexOf = Array.prototype.indexOf;
|
|
165
201
|
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
|
166
202
|
const contains = (xs, x) => rawIndexOf(xs, x) > -1;
|
|
@@ -197,6 +233,11 @@
|
|
|
197
233
|
const find = (xs, pred) => {
|
|
198
234
|
return findUntil(xs, pred, never);
|
|
199
235
|
};
|
|
236
|
+
const sort = (xs, comparator) => {
|
|
237
|
+
const copy = nativeSlice.call(xs, 0);
|
|
238
|
+
copy.sort(comparator);
|
|
239
|
+
return copy;
|
|
240
|
+
};
|
|
200
241
|
|
|
201
242
|
const keys = Object.keys;
|
|
202
243
|
const hasOwnProperty = Object.hasOwnProperty;
|
|
@@ -586,11 +627,6 @@
|
|
|
586
627
|
name: 'Advanced Tables',
|
|
587
628
|
type: 'premium'
|
|
588
629
|
},
|
|
589
|
-
{
|
|
590
|
-
key: 'autocorrect',
|
|
591
|
-
name: 'Autocorrect',
|
|
592
|
-
type: 'premium'
|
|
593
|
-
},
|
|
594
630
|
{
|
|
595
631
|
key: 'casechange',
|
|
596
632
|
name: 'Case Change',
|
|
@@ -606,6 +642,11 @@
|
|
|
606
642
|
name: 'Enhanced Image Editing',
|
|
607
643
|
type: 'premium'
|
|
608
644
|
},
|
|
645
|
+
{
|
|
646
|
+
key: 'footnotes',
|
|
647
|
+
name: 'Footnotes',
|
|
648
|
+
type: 'premium'
|
|
649
|
+
},
|
|
609
650
|
{
|
|
610
651
|
key: 'mediaembed',
|
|
611
652
|
name: 'Enhanced Media Embed',
|
|
@@ -632,6 +673,11 @@
|
|
|
632
673
|
name: 'Mentions',
|
|
633
674
|
type: 'premium'
|
|
634
675
|
},
|
|
676
|
+
{
|
|
677
|
+
key: 'mergetags',
|
|
678
|
+
name: 'Merge Tags',
|
|
679
|
+
type: 'premium'
|
|
680
|
+
},
|
|
635
681
|
{
|
|
636
682
|
key: 'pageembed',
|
|
637
683
|
name: 'Page Embed',
|
|
@@ -660,6 +706,11 @@
|
|
|
660
706
|
type: 'premium',
|
|
661
707
|
slug: 'introduction-to-tiny-spellchecker'
|
|
662
708
|
},
|
|
709
|
+
{
|
|
710
|
+
key: 'autocorrect',
|
|
711
|
+
name: 'Spelling Autocorrect',
|
|
712
|
+
type: 'premium'
|
|
713
|
+
},
|
|
663
714
|
{
|
|
664
715
|
key: 'tinycomments',
|
|
665
716
|
name: 'Tiny Comments',
|
|
@@ -685,24 +736,43 @@
|
|
|
685
736
|
|
|
686
737
|
const tab$1 = editor => {
|
|
687
738
|
const availablePlugins = () => {
|
|
688
|
-
const premiumPlugins = filter(urls, ({
|
|
689
|
-
return
|
|
739
|
+
const premiumPlugins = filter(urls, ({type}) => {
|
|
740
|
+
return type === 'premium';
|
|
690
741
|
});
|
|
691
|
-
const
|
|
742
|
+
const sortedPremiumPlugins = sort(map(premiumPlugins, p => p.name), (s1, s2) => s1.localeCompare(s2));
|
|
743
|
+
const premiumPluginList = map(sortedPremiumPlugins, pluginName => `<li>${ pluginName }</li>`).join('');
|
|
692
744
|
return '<div data-mce-tabstop="1" tabindex="-1">' + '<p><b>' + global$1.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">' + global$1.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
|
|
693
745
|
};
|
|
694
746
|
const makeLink = p => `<a href="${ p.url }" target="_blank" rel="noopener">${ p.name }</a>`;
|
|
695
|
-
const
|
|
747
|
+
const identifyUnknownPlugin = (editor, key) => {
|
|
748
|
+
const getMetadata = editor.plugins[key].getMetadata;
|
|
749
|
+
if (isFunction(getMetadata)) {
|
|
750
|
+
const metadata = getMetadata();
|
|
751
|
+
return {
|
|
752
|
+
name: metadata.name,
|
|
753
|
+
html: makeLink(metadata)
|
|
754
|
+
};
|
|
755
|
+
} else {
|
|
756
|
+
return {
|
|
757
|
+
name: key,
|
|
758
|
+
html: key
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
const getPluginData = (editor, key) => find(urls, x => {
|
|
696
763
|
return x.key === key;
|
|
697
764
|
}).fold(() => {
|
|
698
|
-
|
|
699
|
-
return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
|
|
765
|
+
return identifyUnknownPlugin(editor, key);
|
|
700
766
|
}, x => {
|
|
701
767
|
const name = x.type === 'premium' ? `${ x.name }*` : x.name;
|
|
702
|
-
|
|
768
|
+
const html = makeLink({
|
|
703
769
|
name,
|
|
704
770
|
url: `https://www.tiny.cloud/docs/tinymce/6/${ x.slug }/`
|
|
705
771
|
});
|
|
772
|
+
return {
|
|
773
|
+
name,
|
|
774
|
+
html
|
|
775
|
+
};
|
|
706
776
|
});
|
|
707
777
|
const getPluginKeys = editor => {
|
|
708
778
|
const keys$1 = keys(editor.plugins);
|
|
@@ -711,8 +781,9 @@
|
|
|
711
781
|
};
|
|
712
782
|
const pluginLister = editor => {
|
|
713
783
|
const pluginKeys = getPluginKeys(editor);
|
|
714
|
-
const
|
|
715
|
-
|
|
784
|
+
const sortedPluginData = sort(map(pluginKeys, k => getPluginData(editor, k)), (pd1, pd2) => pd1.name.localeCompare(pd2.name));
|
|
785
|
+
const pluginLis = map(sortedPluginData, key => {
|
|
786
|
+
return '<li>' + key.html + '</li>';
|
|
716
787
|
});
|
|
717
788
|
const count = pluginLis.length;
|
|
718
789
|
const pluginsString = pluginLis.join('');
|
|
@@ -767,14 +838,16 @@
|
|
|
767
838
|
const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
|
|
768
839
|
const newTabs = {};
|
|
769
840
|
const names = map(tabsFromSettings, t => {
|
|
770
|
-
|
|
841
|
+
var _a;
|
|
842
|
+
if (isString(t)) {
|
|
771
843
|
if (has(tabs, t)) {
|
|
772
844
|
newTabs[t] = tabs[t];
|
|
773
845
|
}
|
|
774
846
|
return t;
|
|
775
847
|
} else {
|
|
776
|
-
|
|
777
|
-
|
|
848
|
+
const name = (_a = t.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
|
849
|
+
newTabs[name] = t;
|
|
850
|
+
return name;
|
|
778
851
|
}
|
|
779
852
|
});
|
|
780
853
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version 6.
|
|
2
|
+
* TinyMCE version 6.2.0 (2022-09-08)
|
|
3
3
|
*/
|
|
4
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("help_tabs"),a=t("forced_plugins"),o=(void 0,e=>undefined===e);const i=(!1,()=>false);class r{constructor(e,t){this.tag=e,this.value=t}static some(e){return new r(!0,e)}static none(){return r.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?r.some(e(this.value)):r.none()}bind(e){return this.tag?e(this.value):r.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:r.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?r.none():r.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}r.singletonNone=new r(!1);const s=Array.prototype.indexOf,l=(e,t)=>{const n=e.length,a=new Array(n);for(let o=0;o<n;o++){const n=e[o];a[o]=t(n,o)}return a},c=(e,t)=>{const n=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];t(o,a)&&n.push(o)}return n},u=Object.keys,h=Object.hasOwnProperty,m=(e,t)=>h.call(e,t);var p=tinymce.util.Tools.resolve("tinymce.Env");const d=e=>{const t=p.os.isMacOS()||p.os.isiOS(),n=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),o=l(a,(e=>{const t=e.toLowerCase().trim();return m(n,t)?n[t]:e}));return t?o.join("").replace(/\s/,""):o.join("+")},g=[{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:["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"}],y=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:l(g,(e=>{const t=l(e.shortcuts,d).join(" or ");return[e.action,t]}))}]});var b=tinymce.util.Tools.resolve("tinymce.util.I18n");const k=l([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"autocorrect",name:"Autocorrect",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"},{key:"tableofcontents",name:"Table of Contents",type:"premium"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),v=e=>{const t=e=>`<a href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,n=e=>{const n=(e=>{const t=u(e.plugins),n=a(e);return o(n)?t:c(t,(e=>!(((e,t)=>s.call(e,t))(n,e)>-1)))})(e),h=l(n,(n=>"<li>"+((e,n)=>{return(a=k,o=e=>e.key===n,((e,t,n)=>{for(let a=0,o=e.length;a<o;a++){const o=e[a];if(t(o,a))return r.some(o);if(n(o,a))break}return r.none()})(a,o,i)).fold((()=>{const a=e.plugins[n].getMetadata;return"function"==typeof a?t(a()):n}),(e=>{const n="premium"===e.type?`${e.name}*`:e.name;return t({name:n,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}));var a,o})(e,n)+"</li>")),m=h.length,p=h.join("");return"<p><b>"+b.translate(["Plugins installed ({0}):",m])+"</b></p><ul>"+p+"</ul>"},h={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":'<div data-mce-tabstop="1" tabindex="-1">'+n(e)+"</div>")(e),(()=>{const e=c(k,(({key:e,type:t})=>"autocorrect"!==e&&"premium"===t)),t=l(e,(e=>"<li>"+b.translate(e.name)+"</li>")).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+b.translate("Premium plugins:")+"</b></p><ul>"+t+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">'+b.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[h]}};var f=tinymce.util.Tools.resolve("tinymce.EditorManager");const w=(e,t)=>()=>{const{tabs:a,names:o}=((e,t)=>{const a=y(),o={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},i=v(e),s=(()=>{var e,t;const n='<a href="https://www.tiny.cloud/docs/tinymce/6/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">TinyMCE '+(e=f.majorVersion,t=f.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+b.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),c={[a.name]:a,[o.name]:o,[i.name]:i,[s.name]:s,...t.get()};return r.from(n(e)).fold((()=>(e=>{const t=u(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const n={},a=l(e,(e=>"string"==typeof e?(m(t,e)&&(n[e]=t[e]),e):(n[e.name]=e,e.name)));return{tabs:n,names:a}})(e,c)))})(e,t),i={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(l(o,(e=>{return m(t=a,n=e)?r.from(t[n]):r.none();var t,n})))};e.windowManager.open({title:"Help",size:"medium",body:i,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),n=(e=>({addTab:t=>{const n=e.get();n[t.name]=t,e.set(n)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const a=w(e,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,a),((e,t)=>{e.addCommand("mceHelp",t)})(e,a),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),n}))}();
|
|
4
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");let t=0;const n=e=>{const n=(new Date).getTime(),o=Math.floor(1e9*Math.random());return t++,e+"_"+o+t+String(n)},o=e=>t=>t.options.get(e),a=o("help_tabs"),i=o("forced_plugins"),r=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(a=String).prototype.isPrototypeOf(n)||(null===(i=o.constructor)||void 0===i?void 0:i.name)===a.name)?"string":t;var n,o,a,i})(e));const s=(void 0,e=>undefined===e);const l=e=>"function"==typeof e,c=(!1,()=>false);class u{constructor(e,t){this.tag=e,this.value=t}static some(e){return new u(!0,e)}static none(){return u.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?u.some(e(this.value)):u.none()}bind(e){return this.tag?e(this.value):u.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:u.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?u.none():u.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}u.singletonNone=new u(!1);const m=Array.prototype.slice,h=Array.prototype.indexOf,p=(e,t)=>{const n=e.length,o=new Array(n);for(let a=0;a<n;a++){const n=e[a];o[a]=t(n,a)}return o},d=(e,t)=>{const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];t(a,o)&&n.push(a)}return n},g=(e,t)=>{const n=m.call(e,0);return n.sort(t),n},y=Object.keys,b=Object.hasOwnProperty,k=(e,t)=>b.call(e,t);var v=tinymce.util.Tools.resolve("tinymce.Env");const f=e=>{const t=v.os.isMacOS()||v.os.isiOS(),n=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},o=e.split("+"),a=p(o,(e=>{const t=e.toLowerCase().trim();return k(n,t)?n[t]:e}));return t?a.join("").replace(/\s/,""):a.join("+")},w=[{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:["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"}],A=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:p(w,(e=>{const t=p(e.shortcuts,f).join(" or ");return[e.action,t]}))}]});var x=tinymce.util.Tools.resolve("tinymce.util.I18n");const T=p([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"footnotes",name:"Footnotes",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"mergetags",name:"Merge Tags",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"autocorrect",name:"Spelling Autocorrect",type:"premium"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"},{key:"tableofcontents",name:"Table of Contents",type:"premium"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),M=e=>{const t=e=>`<a href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,n=(e,n)=>{return(o=T,a=e=>e.key===n,((e,t,n)=>{for(let o=0,a=e.length;o<a;o++){const a=e[o];if(t(a,o))return u.some(a);if(n(a,o))break}return u.none()})(o,a,c)).fold((()=>((e,n)=>{const o=e.plugins[n].getMetadata;if(l(o)){const e=o();return{name:e.name,html:t(e)}}return{name:n,html:n}})(e,n)),(e=>{const n="premium"===e.type?`${e.name}*`:e.name;return{name:n,html:t({name:n,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}}));var o,a},o=e=>{const t=(e=>{const t=y(e.plugins),n=i(e);return s(n)?t:d(t,(e=>!(((e,t)=>h.call(e,t))(n,e)>-1)))})(e),o=g(p(t,(t=>n(e,t))),((e,t)=>e.name.localeCompare(t.name))),a=p(o,(e=>"<li>"+e.html+"</li>")),r=a.length,l=a.join("");return"<p><b>"+x.translate(["Plugins installed ({0}):",r])+"</b></p><ul>"+l+"</ul>"},a={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":'<div data-mce-tabstop="1" tabindex="-1">'+o(e)+"</div>")(e),(()=>{const e=d(T,(({type:e})=>"premium"===e)),t=g(p(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),n=p(t,(e=>`<li>${e}</li>`)).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+x.translate("Premium plugins:")+"</b></p><ul>"+n+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">'+x.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[a]}};var C=tinymce.util.Tools.resolve("tinymce.EditorManager");const F=(e,t)=>()=>{const{tabs:o,names:i}=((e,t)=>{const o=A(),i={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},s=M(e),l=(()=>{var e,t;const n='<a href="https://www.tiny.cloud/docs/tinymce/6/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">TinyMCE '+(e=C.majorVersion,t=C.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+x.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),c={[o.name]:o,[i.name]:i,[s.name]:s,[l.name]:l,...t.get()};return u.from(a(e)).fold((()=>(e=>{const t=y(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const o={},a=p(e,(e=>{var a;if(r(e))return k(t,e)&&(o[e]=t[e]),e;{const t=null!==(a=e.name)&&void 0!==a?a:n("tab-name");return o[t]=e,t}}));return{tabs:o,names:a}})(e,c)))})(e,t),s={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(p(i,(e=>{return k(t=o,n=e)?u.from(t[n]):u.none();var t,n})))};e.windowManager.open({title:"Help",size:"medium",body:s,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),o=(e=>({addTab:t=>{var o;const a=null!==(o=t.name)&&void 0!==o?o:n("tab-name"),i=e.get();i[a]=t,e.set(i)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const a=F(e,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,a),((e,t)=>{e.addCommand("mceHelp",t)})(e,a),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),o}))}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version 6.
|
|
2
|
+
* TinyMCE version 6.2.0 (2022-09-08)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -164,11 +164,9 @@
|
|
|
164
164
|
r[i] = x;
|
|
165
165
|
};
|
|
166
166
|
const internalFilter = (obj, pred, onTrue, onFalse) => {
|
|
167
|
-
const r = {};
|
|
168
167
|
each(obj, (x, i) => {
|
|
169
168
|
(pred(x, i) ? onTrue : onFalse)(x, i);
|
|
170
169
|
});
|
|
171
|
-
return r;
|
|
172
170
|
};
|
|
173
171
|
const filter = (obj, pred) => {
|
|
174
172
|
const t = {};
|
|
@@ -433,7 +431,8 @@
|
|
|
433
431
|
resolve(reader.result);
|
|
434
432
|
};
|
|
435
433
|
reader.onerror = () => {
|
|
436
|
-
|
|
434
|
+
var _a;
|
|
435
|
+
reject((_a = reader.error) === null || _a === void 0 ? void 0 : _a.message);
|
|
437
436
|
};
|
|
438
437
|
reader.readAsDataURL(blob);
|
|
439
438
|
});
|
|
@@ -470,16 +469,16 @@
|
|
|
470
469
|
}
|
|
471
470
|
};
|
|
472
471
|
const getAttrib = (image, name) => {
|
|
472
|
+
var _a;
|
|
473
473
|
if (image.hasAttribute(name)) {
|
|
474
|
-
return image.getAttribute(name);
|
|
474
|
+
return (_a = image.getAttribute(name)) !== null && _a !== void 0 ? _a : '';
|
|
475
475
|
} else {
|
|
476
476
|
return '';
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
const getStyle = (image, name) => image.style[name] ? image.style[name] : '';
|
|
480
479
|
const hasCaption = image => image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
|
|
481
480
|
const updateAttrib = (image, name, value) => {
|
|
482
|
-
if (value === '') {
|
|
481
|
+
if (value === '' || value === null) {
|
|
483
482
|
image.removeAttribute(name);
|
|
484
483
|
} else {
|
|
485
484
|
image.setAttribute(name, value);
|
|
@@ -494,8 +493,10 @@
|
|
|
494
493
|
};
|
|
495
494
|
const removeFigure = image => {
|
|
496
495
|
const figureElm = image.parentNode;
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
if (isNonNullable(figureElm)) {
|
|
497
|
+
DOM.insertAfter(image, figureElm);
|
|
498
|
+
DOM.remove(figureElm);
|
|
499
|
+
}
|
|
499
500
|
};
|
|
500
501
|
const toggleCaption = image => {
|
|
501
502
|
if (hasCaption(image)) {
|
|
@@ -515,8 +516,9 @@
|
|
|
515
516
|
}
|
|
516
517
|
};
|
|
517
518
|
const setSize = (name, normalizeCss) => (image, name, value) => {
|
|
518
|
-
|
|
519
|
-
|
|
519
|
+
const styles = image.style;
|
|
520
|
+
if (styles[name]) {
|
|
521
|
+
styles[name] = addPixelSuffix(value);
|
|
520
522
|
normalizeStyle(image, normalizeCss);
|
|
521
523
|
} else {
|
|
522
524
|
updateAttrib(image, name, value);
|
|
@@ -546,8 +548,11 @@
|
|
|
546
548
|
const setBorderStyle = (image, value) => {
|
|
547
549
|
image.style.borderStyle = value;
|
|
548
550
|
};
|
|
549
|
-
const getBorderStyle = image =>
|
|
550
|
-
|
|
551
|
+
const getBorderStyle = image => {
|
|
552
|
+
var _a;
|
|
553
|
+
return (_a = image.style.borderStyle) !== null && _a !== void 0 ? _a : '';
|
|
554
|
+
};
|
|
555
|
+
const isFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE';
|
|
551
556
|
const isImage = elm => elm.nodeName === 'IMG';
|
|
552
557
|
const getIsDecorative = image => DOM.getAttrib(image, 'alt').length === 0 && DOM.getAttrib(image, 'role') === 'presentation';
|
|
553
558
|
const getAlt = image => {
|
|
@@ -573,6 +578,7 @@
|
|
|
573
578
|
isDecorative: false
|
|
574
579
|
});
|
|
575
580
|
const getStyleValue = (normalizeCss, data) => {
|
|
581
|
+
var _a;
|
|
576
582
|
const image = document.createElement('img');
|
|
577
583
|
updateAttrib(image, 'style', data.style);
|
|
578
584
|
if (getHspace(image) || data.hspace !== '') {
|
|
@@ -587,7 +593,7 @@
|
|
|
587
593
|
if (getBorderStyle(image) || data.borderStyle !== '') {
|
|
588
594
|
setBorderStyle(image, data.borderStyle);
|
|
589
595
|
}
|
|
590
|
-
return normalizeCss(image.getAttribute('style'));
|
|
596
|
+
return normalizeCss((_a = image.getAttribute('style')) !== null && _a !== void 0 ? _a : '');
|
|
591
597
|
};
|
|
592
598
|
const create = (normalizeCss, data) => {
|
|
593
599
|
const image = document.createElement('img');
|
|
@@ -618,12 +624,12 @@
|
|
|
618
624
|
hspace: getHspace(image),
|
|
619
625
|
vspace: getVspace(image),
|
|
620
626
|
border: getBorder(image),
|
|
621
|
-
borderStyle:
|
|
627
|
+
borderStyle: getBorderStyle(image),
|
|
622
628
|
isDecorative: getIsDecorative(image)
|
|
623
629
|
});
|
|
624
630
|
const updateProp = (image, oldData, newData, name, set) => {
|
|
625
631
|
if (newData[name] !== oldData[name]) {
|
|
626
|
-
set(image, name, newData[name]);
|
|
632
|
+
set(image, name, String(newData[name]));
|
|
627
633
|
}
|
|
628
634
|
};
|
|
629
635
|
const setAlt = (image, alt, isDecorative) => {
|
|
@@ -687,11 +693,12 @@
|
|
|
687
693
|
return imgElm;
|
|
688
694
|
};
|
|
689
695
|
const splitTextBlock = (editor, figure) => {
|
|
696
|
+
var _a;
|
|
690
697
|
const dom = editor.dom;
|
|
691
698
|
const textBlockElements = filter(editor.schema.getTextBlockElements(), (_, parentElm) => !editor.schema.isValidChild(parentElm, 'figure'));
|
|
692
699
|
const textBlock = dom.getParent(figure.parentNode, node => hasNonNullableKey(textBlockElements, node.nodeName), editor.getBody());
|
|
693
700
|
if (textBlock) {
|
|
694
|
-
return dom.split(textBlock, figure);
|
|
701
|
+
return (_a = dom.split(textBlock, figure)) !== null && _a !== void 0 ? _a : figure;
|
|
695
702
|
} else {
|
|
696
703
|
return figure;
|
|
697
704
|
}
|
|
@@ -731,15 +738,17 @@
|
|
|
731
738
|
};
|
|
732
739
|
const writeImageDataToSelection = (editor, data) => {
|
|
733
740
|
const image = getSelectedImage(editor);
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
741
|
+
if (image) {
|
|
742
|
+
write(css => normalizeCss$1(editor, css), data, image);
|
|
743
|
+
syncSrcAttr(editor, image);
|
|
744
|
+
if (isFigure(image.parentNode)) {
|
|
745
|
+
const figure = image.parentNode;
|
|
746
|
+
splitTextBlock(editor, figure);
|
|
747
|
+
editor.selection.select(image.parentNode);
|
|
748
|
+
} else {
|
|
749
|
+
editor.selection.select(image);
|
|
750
|
+
waitLoadImage(editor, data, image);
|
|
751
|
+
}
|
|
743
752
|
}
|
|
744
753
|
};
|
|
745
754
|
const sanitizeImageData = (editor, data) => {
|
|
@@ -935,7 +944,7 @@
|
|
|
935
944
|
const AdvTab = { makeTab: makeTab$2 };
|
|
936
945
|
|
|
937
946
|
const collect = editor => {
|
|
938
|
-
const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url, 'src'));
|
|
947
|
+
const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url || '', 'src'));
|
|
939
948
|
const futureImageList = new Promise(completer => {
|
|
940
949
|
createImageList(editor, imageList => {
|
|
941
950
|
completer(urlListSanitizer(imageList).map(items => flatten([
|
|
@@ -1102,7 +1111,7 @@
|
|
|
1102
1111
|
});
|
|
1103
1112
|
const toImageData = (data, removeEmptyAlt) => ({
|
|
1104
1113
|
src: data.src.value,
|
|
1105
|
-
alt: data.alt.length === 0 && removeEmptyAlt ? null : data.alt,
|
|
1114
|
+
alt: (data.alt === null || data.alt.length === 0) && removeEmptyAlt ? null : data.alt,
|
|
1106
1115
|
title: data.title,
|
|
1107
1116
|
width: data.dimensions.width,
|
|
1108
1117
|
height: data.dimensions.height,
|
|
@@ -1346,13 +1355,16 @@
|
|
|
1346
1355
|
}));
|
|
1347
1356
|
}
|
|
1348
1357
|
};
|
|
1349
|
-
const createBlobCache = editor => (file, blobUri, dataUrl) =>
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1358
|
+
const createBlobCache = editor => (file, blobUri, dataUrl) => {
|
|
1359
|
+
var _a;
|
|
1360
|
+
return editor.editorUpload.blobCache.create({
|
|
1361
|
+
blob: file,
|
|
1362
|
+
blobUri,
|
|
1363
|
+
name: (_a = file.name) === null || _a === void 0 ? void 0 : _a.replace(/\.[^\.]+$/, ''),
|
|
1364
|
+
filename: file.name,
|
|
1365
|
+
base64: dataUrl.split(',')[1]
|
|
1366
|
+
});
|
|
1367
|
+
};
|
|
1356
1368
|
const addToBlobCache = editor => blobInfo => {
|
|
1357
1369
|
editor.editorUpload.blobCache.add(blobInfo);
|
|
1358
1370
|
};
|
|
@@ -1363,10 +1375,11 @@
|
|
|
1363
1375
|
const parseStyle = editor => cssText => editor.dom.parseStyle(cssText);
|
|
1364
1376
|
const serializeStyle = editor => (stylesArg, name) => editor.dom.serializeStyle(stylesArg, name);
|
|
1365
1377
|
const uploadImage = editor => blobInfo => global$1(editor).upload([blobInfo], false).then(results => {
|
|
1378
|
+
var _a;
|
|
1366
1379
|
if (results.length === 0) {
|
|
1367
1380
|
return Promise.reject('Failed to upload image');
|
|
1368
1381
|
} else if (results[0].status === false) {
|
|
1369
|
-
return Promise.reject(results[0].error.message);
|
|
1382
|
+
return Promise.reject((_a = results[0].error) === null || _a === void 0 ? void 0 : _a.message);
|
|
1370
1383
|
} else {
|
|
1371
1384
|
return results[0];
|
|
1372
1385
|
}
|
|
@@ -1421,7 +1434,7 @@
|
|
|
1421
1434
|
|
|
1422
1435
|
const hasImageClass = node => {
|
|
1423
1436
|
const className = node.attr('class');
|
|
1424
|
-
return className && /\bimage\b/.test(className);
|
|
1437
|
+
return isNonNullable(className) && /\bimage\b/.test(className);
|
|
1425
1438
|
};
|
|
1426
1439
|
const toggleContentEditableState = state => nodes => {
|
|
1427
1440
|
let i = nodes.length;
|