From f7cc4d67201b1fd0a08e7a67b978b78eedea14ae Mon Sep 17 00:00:00 2001 From: Carmine De Rosa Date: Sat, 10 Feb 2018 18:46:33 +0100 Subject: [PATCH] add tinymce add ADMIN/links --- ADMIN/.htaccess | 10 + ADMIN/header.php | 31 + ADMIN/index.php | 70 + ADMIN/js/scripts.js | 20 + ADMIN/links.php | 33 + node_modules/tinymce/bower.json | 21 + node_modules/tinymce/changelog.txt | 877 + node_modules/tinymce/composer.json | 42 + node_modules/tinymce/jquery.tinymce.js | 1 + node_modules/tinymce/jquery.tinymce.min.js | 1 + node_modules/tinymce/langs/it.js | 260 + node_modules/tinymce/license.txt | 504 + node_modules/tinymce/package.json | 47 + node_modules/tinymce/plugins/advlist/index.js | 7 + .../tinymce/plugins/advlist/plugin.js | 160 + .../tinymce/plugins/advlist/plugin.min.js | 1 + node_modules/tinymce/plugins/anchor/index.js | 7 + node_modules/tinymce/plugins/anchor/plugin.js | 117 + .../tinymce/plugins/anchor/plugin.min.js | 1 + .../tinymce/plugins/autolink/index.js | 7 + .../tinymce/plugins/autolink/plugin.js | 180 + .../tinymce/plugins/autolink/plugin.min.js | 1 + .../tinymce/plugins/autoresize/index.js | 7 + .../tinymce/plugins/autoresize/plugin.js | 169 + .../tinymce/plugins/autoresize/plugin.min.js | 1 + .../tinymce/plugins/autosave/index.js | 7 + .../tinymce/plugins/autosave/plugin.js | 226 + .../tinymce/plugins/autosave/plugin.min.js | 1 + node_modules/tinymce/plugins/bbcode/index.js | 7 + node_modules/tinymce/plugins/bbcode/plugin.js | 101 + .../tinymce/plugins/bbcode/plugin.min.js | 1 + node_modules/tinymce/plugins/charmap/index.js | 7 + .../tinymce/plugins/charmap/plugin.js | 1275 + .../tinymce/plugins/charmap/plugin.min.js | 1 + node_modules/tinymce/plugins/code/index.js | 7 + node_modules/tinymce/plugins/code/plugin.js | 94 + .../tinymce/plugins/code/plugin.min.js | 1 + .../tinymce/plugins/codesample/css/prism.css | 138 + .../tinymce/plugins/codesample/index.js | 7 + .../tinymce/plugins/codesample/plugin.js | 969 + .../tinymce/plugins/codesample/plugin.min.js | 1 + .../tinymce/plugins/colorpicker/index.js | 7 + .../tinymce/plugins/colorpicker/plugin.js | 126 + .../tinymce/plugins/colorpicker/plugin.min.js | 1 + .../tinymce/plugins/contextmenu/index.js | 7 + .../tinymce/plugins/contextmenu/plugin.js | 167 + .../tinymce/plugins/contextmenu/plugin.min.js | 1 + .../tinymce/plugins/directionality/index.js | 7 + .../tinymce/plugins/directionality/plugin.js | 66 + .../plugins/directionality/plugin.min.js | 1 + .../plugins/emoticons/img/smiley-cool.gif | Bin 0 -> 354 bytes .../plugins/emoticons/img/smiley-cry.gif | Bin 0 -> 329 bytes .../emoticons/img/smiley-embarassed.gif | Bin 0 -> 331 bytes .../emoticons/img/smiley-foot-in-mouth.gif | Bin 0 -> 342 bytes .../plugins/emoticons/img/smiley-frown.gif | Bin 0 -> 340 bytes .../plugins/emoticons/img/smiley-innocent.gif | Bin 0 -> 336 bytes .../plugins/emoticons/img/smiley-kiss.gif | Bin 0 -> 338 bytes .../plugins/emoticons/img/smiley-laughing.gif | Bin 0 -> 343 bytes .../emoticons/img/smiley-money-mouth.gif | Bin 0 -> 321 bytes .../plugins/emoticons/img/smiley-sealed.gif | Bin 0 -> 323 bytes .../plugins/emoticons/img/smiley-smile.gif | Bin 0 -> 344 bytes .../emoticons/img/smiley-surprised.gif | Bin 0 -> 338 bytes .../emoticons/img/smiley-tongue-out.gif | Bin 0 -> 328 bytes .../emoticons/img/smiley-undecided.gif | Bin 0 -> 337 bytes .../plugins/emoticons/img/smiley-wink.gif | Bin 0 -> 350 bytes .../plugins/emoticons/img/smiley-yell.gif | Bin 0 -> 336 bytes .../tinymce/plugins/emoticons/index.js | 7 + .../tinymce/plugins/emoticons/plugin.js | 87 + .../tinymce/plugins/emoticons/plugin.min.js | 1 + .../tinymce/plugins/fullpage/index.js | 7 + .../tinymce/plugins/fullpage/plugin.js | 519 + .../tinymce/plugins/fullpage/plugin.min.js | 1 + .../tinymce/plugins/fullscreen/index.js | 7 + .../tinymce/plugins/fullscreen/plugin.js | 174 + .../tinymce/plugins/fullscreen/plugin.min.js | 1 + .../tinymce/plugins/help/img/logo.png | Bin 0 -> 13208 bytes node_modules/tinymce/plugins/help/index.js | 7 + node_modules/tinymce/plugins/help/plugin.js | 1057 + .../tinymce/plugins/help/plugin.min.js | 1 + node_modules/tinymce/plugins/hr/index.js | 7 + node_modules/tinymce/plugins/hr/plugin.js | 39 + node_modules/tinymce/plugins/hr/plugin.min.js | 1 + node_modules/tinymce/plugins/image/index.js | 7 + node_modules/tinymce/plugins/image/plugin.js | 952 + .../tinymce/plugins/image/plugin.min.js | 1 + .../tinymce/plugins/imagetools/index.js | 7 + .../tinymce/plugins/imagetools/plugin.js | 3425 +++ .../tinymce/plugins/imagetools/plugin.min.js | 1 + .../tinymce/plugins/importcss/index.js | 7 + .../tinymce/plugins/importcss/plugin.js | 264 + .../tinymce/plugins/importcss/plugin.min.js | 1 + .../tinymce/plugins/insertdatetime/index.js | 7 + .../tinymce/plugins/insertdatetime/plugin.js | 173 + .../plugins/insertdatetime/plugin.min.js | 1 + .../tinymce/plugins/legacyoutput/index.js | 7 + .../tinymce/plugins/legacyoutput/plugin.js | 220 + .../plugins/legacyoutput/plugin.min.js | 1 + node_modules/tinymce/plugins/link/index.js | 7 + node_modules/tinymce/plugins/link/plugin.js | 706 + .../tinymce/plugins/link/plugin.min.js | 1 + node_modules/tinymce/plugins/lists/index.js | 7 + node_modules/tinymce/plugins/lists/plugin.js | 1088 + .../tinymce/plugins/lists/plugin.min.js | 1 + node_modules/tinymce/plugins/media/index.js | 7 + node_modules/tinymce/plugins/media/plugin.js | 1149 + .../tinymce/plugins/media/plugin.min.js | 1 + .../tinymce/plugins/nonbreaking/index.js | 7 + .../tinymce/plugins/nonbreaking/plugin.js | 84 + .../tinymce/plugins/nonbreaking/plugin.min.js | 1 + .../tinymce/plugins/noneditable/index.js | 7 + .../tinymce/plugins/noneditable/plugin.js | 118 + .../tinymce/plugins/noneditable/plugin.min.js | 1 + .../tinymce/plugins/pagebreak/index.js | 7 + .../tinymce/plugins/pagebreak/plugin.js | 109 + .../tinymce/plugins/pagebreak/plugin.min.js | 1 + node_modules/tinymce/plugins/paste/index.js | 7 + node_modules/tinymce/plugins/paste/plugin.js | 1552 + .../tinymce/plugins/paste/plugin.min.js | 1 + node_modules/tinymce/plugins/preview/index.js | 7 + .../tinymce/plugins/preview/plugin.js | 123 + .../tinymce/plugins/preview/plugin.min.js | 1 + node_modules/tinymce/plugins/print/index.js | 7 + node_modules/tinymce/plugins/print/plugin.js | 38 + .../tinymce/plugins/print/plugin.min.js | 1 + node_modules/tinymce/plugins/save/index.js | 7 + node_modules/tinymce/plugins/save/plugin.js | 120 + .../tinymce/plugins/save/plugin.min.js | 1 + .../tinymce/plugins/searchreplace/index.js | 7 + .../tinymce/plugins/searchreplace/plugin.js | 603 + .../plugins/searchreplace/plugin.min.js | 1 + .../tinymce/plugins/spellchecker/index.js | 7 + .../tinymce/plugins/spellchecker/plugin.js | 757 + .../plugins/spellchecker/plugin.min.js | 1 + .../tinymce/plugins/tabfocus/index.js | 7 + .../tinymce/plugins/tabfocus/plugin.js | 124 + .../tinymce/plugins/tabfocus/plugin.min.js | 1 + node_modules/tinymce/plugins/table/index.js | 7 + node_modules/tinymce/plugins/table/plugin.js | 10322 +++++++ .../tinymce/plugins/table/plugin.min.js | 1 + .../tinymce/plugins/template/index.js | 7 + .../tinymce/plugins/template/plugin.js | 393 + .../tinymce/plugins/template/plugin.min.js | 1 + .../tinymce/plugins/textcolor/index.js | 7 + .../tinymce/plugins/textcolor/plugin.js | 346 + .../tinymce/plugins/textcolor/plugin.min.js | 1 + .../tinymce/plugins/textpattern/index.js | 7 + .../tinymce/plugins/textpattern/plugin.js | 370 + .../tinymce/plugins/textpattern/plugin.min.js | 1 + node_modules/tinymce/plugins/toc/index.js | 7 + node_modules/tinymce/plugins/toc/plugin.js | 228 + .../tinymce/plugins/toc/plugin.min.js | 1 + .../plugins/visualblocks/css/visualblocks.css | 154 + .../tinymce/plugins/visualblocks/index.js | 7 + .../tinymce/plugins/visualblocks/plugin.js | 135 + .../plugins/visualblocks/plugin.min.js | 1 + .../tinymce/plugins/visualchars/index.js | 7 + .../tinymce/plugins/visualchars/plugin.js | 716 + .../tinymce/plugins/visualchars/plugin.min.js | 1 + .../tinymce/plugins/wordcount/index.js | 7 + .../tinymce/plugins/wordcount/plugin.js | 318 + .../tinymce/plugins/wordcount/plugin.min.js | 1 + node_modules/tinymce/readme.md | 99 + .../skins/lightgray/content.inline.min.css | 1 + .../tinymce/skins/lightgray/content.min.css | 1 + .../skins/lightgray/content.mobile.min.css | 1 + .../skins/lightgray/fonts/tinymce-mobile.woff | Bin 0 -> 4624 bytes .../skins/lightgray/fonts/tinymce-small.eot | Bin 0 -> 9492 bytes .../skins/lightgray/fonts/tinymce-small.svg | 63 + .../skins/lightgray/fonts/tinymce-small.ttf | Bin 0 -> 9304 bytes .../skins/lightgray/fonts/tinymce-small.woff | Bin 0 -> 9380 bytes .../tinymce/skins/lightgray/fonts/tinymce.eot | Bin 0 -> 18808 bytes .../tinymce/skins/lightgray/fonts/tinymce.svg | 131 + .../tinymce/skins/lightgray/fonts/tinymce.ttf | Bin 0 -> 18644 bytes .../skins/lightgray/fonts/tinymce.woff | Bin 0 -> 18720 bytes .../tinymce/skins/lightgray/img/anchor.gif | Bin 0 -> 53 bytes .../tinymce/skins/lightgray/img/loader.gif | Bin 0 -> 2608 bytes .../tinymce/skins/lightgray/img/object.gif | Bin 0 -> 152 bytes .../tinymce/skins/lightgray/img/trans.gif | Bin 0 -> 43 bytes .../tinymce/skins/lightgray/skin.min.css | 1 + .../skins/lightgray/skin.mobile.min.css | 2 + node_modules/tinymce/themes/inlite/index.js | 7 + node_modules/tinymce/themes/inlite/theme.js | 10519 +++++++ .../tinymce/themes/inlite/theme.min.js | 1 + node_modules/tinymce/themes/mobile/index.js | 7 + node_modules/tinymce/themes/mobile/theme.js | 14356 +++++++++ .../tinymce/themes/mobile/theme.min.js | 1 + node_modules/tinymce/themes/modern/index.js | 7 + node_modules/tinymce/themes/modern/theme.js | 10355 +++++++ .../tinymce/themes/modern/theme.min.js | 1 + node_modules/tinymce/tinymce.js | 25654 ++++++++++++++++ node_modules/tinymce/tinymce.min.js | 2 + package-lock.json | 5 + 192 files changed, 93726 insertions(+) create mode 100755 ADMIN/.htaccess create mode 100644 ADMIN/header.php create mode 100755 ADMIN/index.php create mode 100644 ADMIN/js/scripts.js create mode 100644 ADMIN/links.php create mode 100644 node_modules/tinymce/bower.json create mode 100644 node_modules/tinymce/changelog.txt create mode 100644 node_modules/tinymce/composer.json create mode 100644 node_modules/tinymce/jquery.tinymce.js create mode 100644 node_modules/tinymce/jquery.tinymce.min.js create mode 100644 node_modules/tinymce/langs/it.js create mode 100644 node_modules/tinymce/license.txt create mode 100644 node_modules/tinymce/package.json create mode 100644 node_modules/tinymce/plugins/advlist/index.js create mode 100644 node_modules/tinymce/plugins/advlist/plugin.js create mode 100644 node_modules/tinymce/plugins/advlist/plugin.min.js create mode 100644 node_modules/tinymce/plugins/anchor/index.js create mode 100644 node_modules/tinymce/plugins/anchor/plugin.js create mode 100644 node_modules/tinymce/plugins/anchor/plugin.min.js create mode 100644 node_modules/tinymce/plugins/autolink/index.js create mode 100644 node_modules/tinymce/plugins/autolink/plugin.js create mode 100644 node_modules/tinymce/plugins/autolink/plugin.min.js create mode 100644 node_modules/tinymce/plugins/autoresize/index.js create mode 100644 node_modules/tinymce/plugins/autoresize/plugin.js create mode 100644 node_modules/tinymce/plugins/autoresize/plugin.min.js create mode 100644 node_modules/tinymce/plugins/autosave/index.js create mode 100644 node_modules/tinymce/plugins/autosave/plugin.js create mode 100644 node_modules/tinymce/plugins/autosave/plugin.min.js create mode 100644 node_modules/tinymce/plugins/bbcode/index.js create mode 100644 node_modules/tinymce/plugins/bbcode/plugin.js create mode 100644 node_modules/tinymce/plugins/bbcode/plugin.min.js create mode 100644 node_modules/tinymce/plugins/charmap/index.js create mode 100644 node_modules/tinymce/plugins/charmap/plugin.js create mode 100644 node_modules/tinymce/plugins/charmap/plugin.min.js create mode 100644 node_modules/tinymce/plugins/code/index.js create mode 100644 node_modules/tinymce/plugins/code/plugin.js create mode 100644 node_modules/tinymce/plugins/code/plugin.min.js create mode 100644 node_modules/tinymce/plugins/codesample/css/prism.css create mode 100644 node_modules/tinymce/plugins/codesample/index.js create mode 100644 node_modules/tinymce/plugins/codesample/plugin.js create mode 100644 node_modules/tinymce/plugins/codesample/plugin.min.js create mode 100644 node_modules/tinymce/plugins/colorpicker/index.js create mode 100644 node_modules/tinymce/plugins/colorpicker/plugin.js create mode 100644 node_modules/tinymce/plugins/colorpicker/plugin.min.js create mode 100644 node_modules/tinymce/plugins/contextmenu/index.js create mode 100644 node_modules/tinymce/plugins/contextmenu/plugin.js create mode 100644 node_modules/tinymce/plugins/contextmenu/plugin.min.js create mode 100644 node_modules/tinymce/plugins/directionality/index.js create mode 100644 node_modules/tinymce/plugins/directionality/plugin.js create mode 100644 node_modules/tinymce/plugins/directionality/plugin.min.js create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-cool.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-cry.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-embarassed.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-frown.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-innocent.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-kiss.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-laughing.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-money-mouth.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-sealed.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-smile.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-surprised.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-tongue-out.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-undecided.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-wink.gif create mode 100644 node_modules/tinymce/plugins/emoticons/img/smiley-yell.gif create mode 100644 node_modules/tinymce/plugins/emoticons/index.js create mode 100644 node_modules/tinymce/plugins/emoticons/plugin.js create mode 100644 node_modules/tinymce/plugins/emoticons/plugin.min.js create mode 100644 node_modules/tinymce/plugins/fullpage/index.js create mode 100644 node_modules/tinymce/plugins/fullpage/plugin.js create mode 100644 node_modules/tinymce/plugins/fullpage/plugin.min.js create mode 100644 node_modules/tinymce/plugins/fullscreen/index.js create mode 100644 node_modules/tinymce/plugins/fullscreen/plugin.js create mode 100644 node_modules/tinymce/plugins/fullscreen/plugin.min.js create mode 100644 node_modules/tinymce/plugins/help/img/logo.png create mode 100644 node_modules/tinymce/plugins/help/index.js create mode 100644 node_modules/tinymce/plugins/help/plugin.js create mode 100644 node_modules/tinymce/plugins/help/plugin.min.js create mode 100644 node_modules/tinymce/plugins/hr/index.js create mode 100644 node_modules/tinymce/plugins/hr/plugin.js create mode 100644 node_modules/tinymce/plugins/hr/plugin.min.js create mode 100644 node_modules/tinymce/plugins/image/index.js create mode 100644 node_modules/tinymce/plugins/image/plugin.js create mode 100644 node_modules/tinymce/plugins/image/plugin.min.js create mode 100644 node_modules/tinymce/plugins/imagetools/index.js create mode 100644 node_modules/tinymce/plugins/imagetools/plugin.js create mode 100644 node_modules/tinymce/plugins/imagetools/plugin.min.js create mode 100644 node_modules/tinymce/plugins/importcss/index.js create mode 100644 node_modules/tinymce/plugins/importcss/plugin.js create mode 100644 node_modules/tinymce/plugins/importcss/plugin.min.js create mode 100644 node_modules/tinymce/plugins/insertdatetime/index.js create mode 100644 node_modules/tinymce/plugins/insertdatetime/plugin.js create mode 100644 node_modules/tinymce/plugins/insertdatetime/plugin.min.js create mode 100644 node_modules/tinymce/plugins/legacyoutput/index.js create mode 100644 node_modules/tinymce/plugins/legacyoutput/plugin.js create mode 100644 node_modules/tinymce/plugins/legacyoutput/plugin.min.js create mode 100644 node_modules/tinymce/plugins/link/index.js create mode 100644 node_modules/tinymce/plugins/link/plugin.js create mode 100644 node_modules/tinymce/plugins/link/plugin.min.js create mode 100644 node_modules/tinymce/plugins/lists/index.js create mode 100644 node_modules/tinymce/plugins/lists/plugin.js create mode 100644 node_modules/tinymce/plugins/lists/plugin.min.js create mode 100644 node_modules/tinymce/plugins/media/index.js create mode 100644 node_modules/tinymce/plugins/media/plugin.js create mode 100644 node_modules/tinymce/plugins/media/plugin.min.js create mode 100644 node_modules/tinymce/plugins/nonbreaking/index.js create mode 100644 node_modules/tinymce/plugins/nonbreaking/plugin.js create mode 100644 node_modules/tinymce/plugins/nonbreaking/plugin.min.js create mode 100644 node_modules/tinymce/plugins/noneditable/index.js create mode 100644 node_modules/tinymce/plugins/noneditable/plugin.js create mode 100644 node_modules/tinymce/plugins/noneditable/plugin.min.js create mode 100644 node_modules/tinymce/plugins/pagebreak/index.js create mode 100644 node_modules/tinymce/plugins/pagebreak/plugin.js create mode 100644 node_modules/tinymce/plugins/pagebreak/plugin.min.js create mode 100644 node_modules/tinymce/plugins/paste/index.js create mode 100644 node_modules/tinymce/plugins/paste/plugin.js create mode 100644 node_modules/tinymce/plugins/paste/plugin.min.js create mode 100644 node_modules/tinymce/plugins/preview/index.js create mode 100644 node_modules/tinymce/plugins/preview/plugin.js create mode 100644 node_modules/tinymce/plugins/preview/plugin.min.js create mode 100644 node_modules/tinymce/plugins/print/index.js create mode 100644 node_modules/tinymce/plugins/print/plugin.js create mode 100644 node_modules/tinymce/plugins/print/plugin.min.js create mode 100644 node_modules/tinymce/plugins/save/index.js create mode 100644 node_modules/tinymce/plugins/save/plugin.js create mode 100644 node_modules/tinymce/plugins/save/plugin.min.js create mode 100644 node_modules/tinymce/plugins/searchreplace/index.js create mode 100644 node_modules/tinymce/plugins/searchreplace/plugin.js create mode 100644 node_modules/tinymce/plugins/searchreplace/plugin.min.js create mode 100644 node_modules/tinymce/plugins/spellchecker/index.js create mode 100644 node_modules/tinymce/plugins/spellchecker/plugin.js create mode 100644 node_modules/tinymce/plugins/spellchecker/plugin.min.js create mode 100644 node_modules/tinymce/plugins/tabfocus/index.js create mode 100644 node_modules/tinymce/plugins/tabfocus/plugin.js create mode 100644 node_modules/tinymce/plugins/tabfocus/plugin.min.js create mode 100644 node_modules/tinymce/plugins/table/index.js create mode 100644 node_modules/tinymce/plugins/table/plugin.js create mode 100644 node_modules/tinymce/plugins/table/plugin.min.js create mode 100644 node_modules/tinymce/plugins/template/index.js create mode 100644 node_modules/tinymce/plugins/template/plugin.js create mode 100644 node_modules/tinymce/plugins/template/plugin.min.js create mode 100644 node_modules/tinymce/plugins/textcolor/index.js create mode 100644 node_modules/tinymce/plugins/textcolor/plugin.js create mode 100644 node_modules/tinymce/plugins/textcolor/plugin.min.js create mode 100644 node_modules/tinymce/plugins/textpattern/index.js create mode 100644 node_modules/tinymce/plugins/textpattern/plugin.js create mode 100644 node_modules/tinymce/plugins/textpattern/plugin.min.js create mode 100644 node_modules/tinymce/plugins/toc/index.js create mode 100644 node_modules/tinymce/plugins/toc/plugin.js create mode 100644 node_modules/tinymce/plugins/toc/plugin.min.js create mode 100644 node_modules/tinymce/plugins/visualblocks/css/visualblocks.css create mode 100644 node_modules/tinymce/plugins/visualblocks/index.js create mode 100644 node_modules/tinymce/plugins/visualblocks/plugin.js create mode 100644 node_modules/tinymce/plugins/visualblocks/plugin.min.js create mode 100644 node_modules/tinymce/plugins/visualchars/index.js create mode 100644 node_modules/tinymce/plugins/visualchars/plugin.js create mode 100644 node_modules/tinymce/plugins/visualchars/plugin.min.js create mode 100644 node_modules/tinymce/plugins/wordcount/index.js create mode 100644 node_modules/tinymce/plugins/wordcount/plugin.js create mode 100644 node_modules/tinymce/plugins/wordcount/plugin.min.js create mode 100644 node_modules/tinymce/readme.md create mode 100644 node_modules/tinymce/skins/lightgray/content.inline.min.css create mode 100644 node_modules/tinymce/skins/lightgray/content.min.css create mode 100644 node_modules/tinymce/skins/lightgray/content.mobile.min.css create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce-mobile.woff create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce-small.eot create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce-small.svg create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce-small.ttf create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce-small.woff create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce.eot create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce.svg create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce.ttf create mode 100644 node_modules/tinymce/skins/lightgray/fonts/tinymce.woff create mode 100644 node_modules/tinymce/skins/lightgray/img/anchor.gif create mode 100644 node_modules/tinymce/skins/lightgray/img/loader.gif create mode 100644 node_modules/tinymce/skins/lightgray/img/object.gif create mode 100644 node_modules/tinymce/skins/lightgray/img/trans.gif create mode 100644 node_modules/tinymce/skins/lightgray/skin.min.css create mode 100644 node_modules/tinymce/skins/lightgray/skin.mobile.min.css create mode 100644 node_modules/tinymce/themes/inlite/index.js create mode 100644 node_modules/tinymce/themes/inlite/theme.js create mode 100644 node_modules/tinymce/themes/inlite/theme.min.js create mode 100644 node_modules/tinymce/themes/mobile/index.js create mode 100644 node_modules/tinymce/themes/mobile/theme.js create mode 100644 node_modules/tinymce/themes/mobile/theme.min.js create mode 100644 node_modules/tinymce/themes/modern/index.js create mode 100644 node_modules/tinymce/themes/modern/theme.js create mode 100644 node_modules/tinymce/themes/modern/theme.min.js create mode 100644 node_modules/tinymce/tinymce.js create mode 100644 node_modules/tinymce/tinymce.min.js diff --git a/ADMIN/.htaccess b/ADMIN/.htaccess new file mode 100755 index 0000000..67a09b4 --- /dev/null +++ b/ADMIN/.htaccess @@ -0,0 +1,10 @@ + +RewriteEngine On + +Rewritebase /ADMIN/ + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] + + diff --git a/ADMIN/header.php b/ADMIN/header.php new file mode 100644 index 0000000..539d46e --- /dev/null +++ b/ADMIN/header.php @@ -0,0 +1,31 @@ + +
+
+
+
+ + + +
+ +
+ + + +
diff --git a/ADMIN/index.php b/ADMIN/index.php new file mode 100755 index 0000000..51bd80d --- /dev/null +++ b/ADMIN/index.php @@ -0,0 +1,70 @@ + + + + + + + + + ADMIN | Ordine dei Farmacisti della Provincia di Salerno + + + + + + + + + + + + + +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + diff --git a/ADMIN/js/scripts.js b/ADMIN/js/scripts.js new file mode 100644 index 0000000..17a5a1a --- /dev/null +++ b/ADMIN/js/scripts.js @@ -0,0 +1,20 @@ +tinymce.init({ + selector: '.mce', + height: 200, + theme: 'modern', + menubar: false, + language: 'it', + forced_root_block : '', + force_br_newlines : true, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor textcolor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table contextmenu paste code' + ], + toolbar: 'bold italic | alignleft aligncenter alignright alignjustify | link bullist numlist outdent indent | removeformat', + image_advtab: false, + content_css: [ + '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i', + '//www.tinymce.com/css/codepen.min.css' + ] + }); diff --git a/ADMIN/links.php b/ADMIN/links.php new file mode 100644 index 0000000..85e7b34 --- /dev/null +++ b/ADMIN/links.php @@ -0,0 +1,33 @@ + + +
+ +Title + +

+ +Text + +

+ +section + +

+ + + +
+ + + diff --git a/node_modules/tinymce/bower.json b/node_modules/tinymce/bower.json new file mode 100644 index 0000000..788e5d2 --- /dev/null +++ b/node_modules/tinymce/bower.json @@ -0,0 +1,21 @@ +{ + "name": "tinymce", + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "license": "LGPL-2.1", + "keywords": [ + "editor", + "wysiwyg", + "tinymce", + "richtext", + "javascript", + "html" + ], + "homepage": "http://www.tinymce.com", + "ignore": [ + "readme.md", + "composer.json", + "package.json", + ".npmignore", + "changelog.txt" + ] +} \ No newline at end of file diff --git a/node_modules/tinymce/changelog.txt b/node_modules/tinymce/changelog.txt new file mode 100644 index 0000000..7b4256f --- /dev/null +++ b/node_modules/tinymce/changelog.txt @@ -0,0 +1,877 @@ +Version 4.7.6 (2018-01-29) + Fixed a bug in the jquery integration where it threw an error saying that "global is not defined". + Fixed a bug where deleting a table cell whose previous sibling was set to contenteditable false would create a corrupted table. + Fixed a bug where highlighting text in an unfocused editor did not work correctly in IE11/Edge. + Fixed a bug where the table resize handles were not being repositioned when activating the Fullscreen Plugin. + Fixed a bug where the Imagetools Plugin dialog didn't honor editor RTL settings. + Fixed a bug where block elements weren't being merged correctly if you deleted from after a contenteditable false element to the beginning of another block element. + Fixed a bug where TinyMCE didn't work with module loaders like webpack. +Version 4.7.5 (2018-01-22) + Fixed bug with the Codesample Plugin where it wasn't possible to edit codesamples when the editor was in inline mode. + Fixed bug where focusing on the status bar broke the keyboard navigation functionality. + Fixed bug where an error would be thrown on Edge by the Table Plugin when pasting using the PowerPaste Plugin. + Fixed bug in the Table Plugin where selecting row border style from the dropdown menu in advanced row properties would throw an error. + Fixed bug with icons being rendered incorrectly on Chrome on Mac OS. + Fixed bug in the Textcolor Plugin where the font color and background color buttons wouldn't trigger an ExecCommand event. + Fixed bug in the Link Plugin where the url field wasn't forced LTR. + Fixed bug where the Nonbreaking Plugin incorrectly inserted spaces into tables. + Fixed bug with the inline theme where the toolbar wasn't repositioned on window resize. +Version 4.7.4 (2017-12-05) + Fixed bug in the Nonbreaking Plugin where the nonbreaking_force_tab setting was being ignored. + Fixed bug in the Table Plugin where changing row height incorrectly converted column widths to pixels. + Fixed bug in the Table Plugin on Edge and IE11 where resizing the last column after resizing the table would cause invalid column heights. + Fixed bug in the Table Plugin where keyboard navigation was not normalized between browsers. + Fixed bug in the Table Plugin where the colorpicker button would show even without defining the colorpicker_callback. + Fixed bug in the Table Plugin where it wasn't possible to set the cell background color. + Fixed bug where Firefox would throw an error when intialising an editor on an element that is hidden or not yet added to the DOM. + Fixed bug where Firefox would throw an error when intialising an editor inside of a hidden iframe. +Version 4.7.3 (2017-11-23) + Added functionality to open the Codesample Plugin dialog when double clicking on a codesample. Patch contributed by dakuzen. + Fixed bug where undo/redo didn't work correctly with some formats and caret positions. + Fixed bug where the color picker didn't show up in Table Plugin dialogs. + Fixed bug where it wasn't possible to change the width of a table through the Table Plugin dialog. + Fixed bug where the Charmap Plugin couldn't insert some special characters. + Fixed bug where editing a newly inserted link would not actually edit the link but insert a new link next to it. + Fixed bug where deleting all content in a table cell made it impossible to place the caret into it. + Fixed bug where the vertical alignment field in the Table Plugin cell properties dialog didn't do anything. + Fixed bug where an image with a caption showed two sets of resize handles in IE11. + Fixed bug where pressing the enter button inside of an h1 with contenteditable set to true would sometimes produce a p tag. + Fixed bug with backspace not working as expected before a noneditable element. + Fixed bug where operating on tables with invalid rowspans would cause an error to be thrown. + Fixed so a real base64 representation of the image is available on the blobInfo that the images_upload_handler gets called with. + Fixed so the image upload tab is available when the images_upload_handler is defined (and not only when the images_upload_url is defined). +Version 4.7.2 (2017-11-07) + Added newly rewritten Table Plugin. + Added support for attributes with colon in valid_elements and addValidElements. + Added support for dailymotion short url in the Media Plugin. Patch contributed by maat8. + Added support for converting to half pt when converting font size from px to pt. Patch contributed by danny6514. + Added support for location hash to the Autosave plugin to make it work better with SPAs using hash routing. + Added support for merging table cells when pasting a table into another table. + Changed so the language packs are only loaded once. Patch contributed by 0xor1. + Simplified the css for inline boundaries selection by switching to an attribute selector. + Fixed bug where an error would be thrown on editor initialization if the window.getSelection() returned null. + Fixed bug where holding down control or alt keys made the keyboard navigation inside an inline boundary not work as expected. + Fixed bug where applying formats in IE11 produced extra, empty paragraphs in the editor. + Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly. + Fixed bug where removing an inline editor removed the element that the editor had been initialized on. + Fixed bug where setting the selection to the end of an editable container caused some formatting problems. + Fixed bug where an error would be thrown sometimes when an editor was removed because of the selection bookmark was being stored asynchronously. + Fixed a bug where an editor initialized on an empty list did not contain any valid cursor positions. + Fixed a bug with the Context Menu Plugin and webkit browsers on Mac where right-clicking inside a table would produce an incorrect selection. + Fixed bug where the Image Plugin constrain proportions setting wasn't working as expected. + Fixed bug where deleting the last character in a span with decorations produced an incorrect element when typing. + Fixed bug where focusing on inline editors made the toolbar flicker when moving between elements quickly. + Fixed bug where the selection would be stored incorrectly in inline editors when the mouseup event was fired outside the editor body. + Fixed bug where toggling bold at the end of an inline boundary would toggle off the whole word. + Fixed bug where setting the skin to false would not stop the loading of some skin css files. + Fixed bug in mobile theme where pinch-to-zoom would break after exiting the editor. + Fixed bug where sublists of a fully selected list would not be switched correctly when changing list style. + Fixed bug where inserting media by source would break the UndoManager. + Fixed bug where inserting some content into the editor with a specific selection would replace some content incorrectly. + Fixed bug where selecting all content with ctrl+a in IE11 caused problems with untoggling some formatting. + Fixed bug where the Search and Replace Plugin left some marker spans in the editor when undoing and redoing after replacing some content. + Fixed bug where the editor would not get a scrollbar when using the Fullscreen and Autoresize plugins together. + Fixed bug where the font selector would stop working correctly after selecting fonts three times. + Fixed so pressing the enter key inside of an inline boundary inserts a br after the inline boundary element. + Fixed a bug where it wasn't possible to use tab navigation inside of a table that was inside of a list. + Fixed bug where end_container_on_empty_block would incorrectly remove elements. + Fixed bug where content_styles weren't added to the Preview Plugin iframe. + Fixed so the beforeSetContent/beforeGetContent events are preventable. + Fixed bug where changing height value in Table Plugin advanced tab didn't do anything. + Fixed bug where it wasn't possible to remove formatting from content in beginning of table cell. +Version 4.7.1 (2017-10-09) + Fixed bug where theme set to false on an inline editor produced an extra div element after the target element. + Fixed bug where the editor drag icon was misaligned with the branding set to false. + Fixed bug where doubled menu items were not being removed as expected with the removed_menuitems setting. + Fixed bug where the Table of contents plugin threw an error when initialized. + Fixed bug where it wasn't possible to add inline formats to text selected right to left. + Fixed bug where the paste from plain text mode did not work as expected. + Fixed so the style previews do not set color and background color when selected. + Fixed bug where the Autolink plugin didn't work as expected with some formats applied on an empty editor. + Fixed bug where the Textpattern plugin were throwing errors on some patterns. + Fixed bug where the Save plugin saved all editors instead of only the active editor. Patch contributed by dannoe. +Version 4.7.0 (2017-10-03) + Added new mobile ui that is specifically designed for mobile devices. + Updated the default skin to be more modern and white since white is preferred by most implementations. + Restructured the default menus to be more similar to common office suites like Google Docs. + Fixed so theme can be set to false on both inline and iframe editor modes. + Fixed bug where inline editor would add/remove the visualblocks css multiple times. + Fixed bug where selection wouldn't be properly restored when editor lost focus and commands where invoked. + Fixed bug where toc plugin would generate id:s for headers even though a toc wasn't inserted into the content. + Fixed bug where is wasn't possible to drag/drop contents within the editor if paste_data_images where set to true. + Fixed bug where getParam and close in WindowManager would get the first opened window instead of the last opened window. + Fixed bug where delete would delete between cells inside a table in Firefox. +Version 4.6.7 (2017-09-18) + Fixed bug where paste wasn't working in IOS. + Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly. + Fixed bug where inserting a list in a table caused the cell to expand in height. + Fixed bug where pressing enter in a list located inside of a table deleted list items instead of inserting new list item. + Fixed bug where copy and pasting table cells produced inconsistent results. + Fixed bug where initializing an editor with an ID of 'length' would throw an exception. + Fixed bug where it was possible to split a non merged table cell. + Fixed bug where copy and pasting a list with a very specific selection into another list would produce a nested list. + Fixed bug where copy and pasting ordered lists sometimes produced unordered lists. + Fixed bug where padded elements inside other elements would be treated as empty. + Added some missing translations to Image, Link and Help plugins. + Fixed so you can resize images inside a figure element. + Fixed bug where an inline TinyMCE editor initialized on a table did not set selection on load in Chrome. + Fixed the positioning of the inlite toolbar when the target element wasn't big enough to fit the toolbar. +Version 4.6.6 (2017-08-30) + Fixed so that notifications wrap long text content instead of bleeding outside the notification element. + Fixed so the content_style css is added after the skin and custom stylesheets. + Fixed bug where it wasn't possible to remove a table with the Cut button. + Fixed bug where the center format wasn't getting the same font size as the other formats in the format preview. + Fixed bug where the wordcount plugin wasn't counting hyphenated words correctly. + Fixed bug where all content pasted into the editor was added to the end of the editor. + Fixed bug where enter keydown on list item selection only deleted content and didn't create a new line. + Fixed bug where destroying the editor while the content css was still loading caused error notifications on Firefox. + Fixed bug where undoing cut operation in IE11 left some unwanted html in the editor content. + Fixed bug where enter keydown would throw an error in IE11. + Fixed bug where duplicate instances of an editor were added to the editors array when using the createEditor API. + Fixed bug where the formatter applied formats on the wrong content when spellchecker was activated. + Fixed bug where switching formats would reset font size on child nodes. + Fixed bug where the table caption element weren't always the first descendant to the table tag. + Fixed bug where pasting some content into the editor on chrome some newlines were removed. + Fixed bug where it wasn't possible to remove a list if a list item was a table element. + Fixed bug where copy/pasting partial selections of tables wouldn't produce a proper table. + Fixed bug where the searchreplace plugin could not find consecutive spaces. + Fixed bug where background color wasn't applied correctly on some partially selected contents. +Version 4.6.5 (2017-08-02) + Added new inline_boundaries_selector that allows you to specify the elements that should have boundaries. + Added new local upload feature this allows the user to upload images directly from the image dialog. + Added a new api for providing meta data for plugins. It will show up in the help dialog if it's provided. + Fixed so that the notifications created by the notification manager are more screen reader accessible. + Fixed bug where changing the list format on multiple selected lists didn't change all of the lists. + Fixed bug where the nonbreaking plugin would insert multiple undo levels when pressing the tab key. + Fixed bug where delete/backspace wouldn't render a caret when all editor contents where deleted. + Fixed bug where delete/backspace wouldn't render a caret if the deleted element was a single contentEditable false element. + Fixed bug where the wordcount plugin wouldn't count words correctly if word where typed after applying a style format. + Fixed bug where the wordcount plugin would count mathematical formulas as multiple words for example 1+1=2. + Fixed bug where formatting of triple clicked blocks on Chrome/Safari would result in styles being added outside the visual selection. + Fixed bug where paste would add the contents to the end of the editor area when inline mode was used. + Fixed bug where toggling off bold formatting on text entered in a new paragraph would add an extra line break. + Fixed bug where autolink plugin would only produce a link on every other consecutive link on Firefox. + Fixed bug where it wasn't possible to select all contents if the content only had one pre element. + Fixed bug where sizzle would produce lagging behavior on some sites due to repaints caused by feature detection. + Fixed bug where toggling off inline formats wouldn't include the space on selected contents with leading or trailing spaces. + Fixed bug where the cut operation in UI wouldn't work in Chrome. + Fixed bug where some legacy editor initialization logic would throw exceptions about editor settings not being defined. + Fixed bug where it wasn't possible to apply text color to links if they where part of a non collapsed selection. + Fixed bug where an exception would be thrown if the user selected a video element and then moved the focus outside the editor. + Fixed bug where list operations didn't work if there where block elements inside the list items. + Fixed bug where applying block formats to lists wrapped in block elements would apply to all elements in that wrapped block. +Version 4.6.4 (2017-06-13) + Fixed bug where the editor would move the caret when clicking on the scrollbar next to a content editable false block. + Fixed bug where the text color select dropdowns wasn't placed correctly when they didn't fit the width of the screen. + Fixed bug where the default editor line height wasn't working for mixed font size contents. + Fixed bug where the content css files for inline editors were loaded multiple times for multiple editor instances. + Fixed bug where the initial value of the font size/font family dropdowns wasn't displayed. + Fixed bug where the I18n api was not supporting arrays as the translation replacement values. + Fixed bug where chrome would display "The given range isn't in document." errors for invalid ranges passed to setRng. + Fixed bug where the compat3x plugin wasn't working since the global tinymce references wasn't resolved correctly. + Fixed bug where the preview plugin wasn't encoding the base url passed into the iframe contents producing a xss bug. + Fixed bug where the dom parser/serializer wasn't handling some special elements like noframes, title and xmp. + Fixed bug where the dom parser/serializer wasn't handling cdata sections with comments inside. + Fixed bug where the editor would scroll to the top of the editable area if a dialog was closed in inline mode. + Fixed bug where the link dialog would not display the right rel value if rel_list was configured. + Fixed bug where the context menu would select images on some platforms but not others. + Fixed bug where the filenames of images were not retained on dragged and drop into the editor from the desktop. + Fixed bug where the paste plugin would misrepresent newlines when pasting plain text and having forced_root_block configured. + Fixed so that the error messages for the imagetools plugin is more human readable. + Fixed so the internal validate setting for the parser/serializer can't be set from editor initialization settings. +Version 4.6.3 (2017-05-30) + Fixed bug where the arrow keys didn't work correctly when navigating on nested inline boundary elements. + Fixed bug where delete/backspace didn't work correctly on nested inline boundary elements. + Fixed bug where image editing didn't work on subsequent edits of the same image. + Fixed bug where charmap descriptions wouldn't properly wrap if they exceeded the width of the box. + Fixed bug where the default image upload handler only accepted 200 as a valid http status code. + Fixed so rel on target=_blank links gets forced with only noopener instead of both noopener and noreferrer. +Version 4.6.2 (2017-05-23) + Fixed bug where the SaxParser would run out of memory on very large documents. + Fixed bug with formatting like font size wasn't applied to del elements. + Fixed bug where various api calls would be throwing exceptions if they where invoked on a removed editor instance. + Fixed bug where the branding position would be incorrect if the editor was inside a hidden tab and then later showed. + Fixed bug where the color levels feature in the imagetools dialog wasn't working properly. + Fixed bug where imagetools dialog wouldn't pre-load images from CORS domains, before trying to prepare them for editing. + Fixed bug where the tab key would move the caret to the next table cell if being pressed inside a list inside a table. + Fixed bug where the cut/copy operations would loose parent context like the current format etc. + Fixed bug with format preview not working on invalid elements excluded by valid_elements. + Fixed bug where blocks would be merged in incorrect order on backspace/delete. + Fixed bug where zero length text nodes would cause issues with the undo logic if there where iframes present. + Fixed bug where the font size/family select lists would throw errors if the first node was a comment. + Fixed bug with csp having to allow local script evaluation since it was used to detect global scope. + Fixed bug where CSP required a relaxed option for javascript: URLs in unsupported legacy browsers. + Fixed bug where a fake caret would be rendered for td with the contenteditable=false. + Fixed bug where typing would be blocked on IE 11 when within a nested contenteditable=true/false structure. +Version 4.6.1 (2017-05-10) + Added configuration option to list plugin to disable tab indentation. + Fixed bug where format change on very specific content could cause the selection to change. + Fixed bug where TinyMCE could not be lazyloaded through jquery integration. + Fixed bug where entities in style attributes weren't decoded correctly on paste in webkit. + Fixed bug where fontsize_formats option had been renamed incorrectly. + Fixed bug with broken backspace/delete behaviour between contenteditable=false blocks. + Fixed bug where it wasn't possible to backspace to the previous line with the inline boundaries functionality turned on. + Fixed bug where is wasn't possible to move caret left and right around a linked image with the inline boundaries functionality turned on. + Fixed bug where pressing enter after/before hr element threw exception. Patch contributed bradleyke. + Fixed so the CSS in the visualblocks plugin doesn't overwrite background color. Patch contributed by Christian Rank. + Fixed bug where multibyte characters weren't encoded correctly. Patch contributed by James Tarkenton. + Fixed bug where shift-click to select within contenteditable=true fields wasn't working. +Version 4.6.0 (2017-05-04) + Dropped support for IE 8-10 due to market share and lack of support from Microsoft. See tinymce docs for details. + Added an inline boundary caret position feature that makes it easier to type at the beginning/end of links/code elements. + Added a help plugin that adds a button and a dialog showing the editor shortcuts and loaded plugins. + Added an inline_boundaries option that allows you to disable the inline boundary feature if it's not desired. + Added a new ScrollIntoView event that allows you to override the default scroll to element behavior. + Added role and aria- attributes as valid elements in the default valid elements config. + Added new internal flag for PastePreProcess/PastePostProcess this is useful to know if the paste was coming from an external source. + Added new ignore function to UndoManager this works similar to transact except that it doesn't add an undo level by default. + Fixed so that urls gets retained for images when being edited. This url is then passed on to the upload handler. + Fixed so that the editors would be initialized on readyState interactive instead of complete. + Fixed so that the init event of the editor gets fired once all contentCSS files have been properly loaded. + Fixed so that width/height of the editor gets taken from the textarea element if it's explicitly specified in styles. + Fixed so that keep_styles set to false no longer clones class/style from the previous paragraph on enter. + Fixed so that the default line-height is 1.2em to avoid zwnbsp characters from producing text rendering glitches on Windows. + Fixed so that loading errors of content css gets presented by a notification message. + Fixed so figure image elements can be linked when selected this wraps the figure image in a anchor element. + Fixed bug where it wasn't possible to copy/paste rows with colspans by using the table copy/paste feature. + Fixed bug where the protect setting wasn't properly applied to header/footer parts when using the fullpage plugin. + Fixed bug where custom formats that specified upper case element names where not applied correctly. + Fixed bug where some screen readers weren't reading buttons due to an aria specific fix for IE 8. + Fixed bug where cut wasn't working correctly on iOS due to it's clipboard API not working correctly. + Fixed bug where Edge would paste div elements instead of paragraphs when pasting plain text. + Fixed bug where the textpattern plugin wasn't dealing with trailing punctuations correctly. + Fixed bug where image editing would some times change the image format from jpg to png. + Fixed bug where some UI elements could be inserted into the toolbar even if they where not registered. + Fixed bug where it was possible to click the TD instead of the character in the character map and that caused an exception. + Fixed bug where the font size/font family dropdowns would sometimes show an incorrect value due to css not being loaded in time. + Fixed bug with the media plugin inserting undefined instead of retaining size when media_dimensions was set to false. + Fixed bug with deleting images when forced_root_blocks where set to false. + Fixed bug where input focus wasn't properly handled on nested content editable elements. + Fixed bug where Chrome/Firefox would throw an exception when selecting images due to recent change of setBaseAndExtent support. + Fixed bug where malformed blobs would throw exceptions now they are simply ignored. + Fixed bug where backspace/delete wouldn't work properly in some cases where all contents was selected in WebKit. + Fixed bug with Angular producing errors since it was expecting events objects to be patched with their custom properties. + Fixed bug where the formatter would apply formatting to spellchecker errors now all bogus elements are excluded. + Fixed bug with backspace/delete inside table caption elements wouldn't behave properly on IE 11. + Fixed bug where typing after a contenteditable false inline element could move the caret to the end of that element. + Fixed bug where backspace before/after contenteditable false blocks wouldn't properly remove the right element. + Fixed bug where backspace before/after contenteditable false inline elements wouldn't properly empty the current block element. + Fixed bug where vertical caret navigation with a custom line-height would sometimes match incorrect positions. + Fixed bug with paste on Edge where character encoding wasn't handled properly due to a browser bug. + Fixed bug with paste on Edge where extra fragment data was inserted into the contents when pasting. + Fixed bug with pasting contents when having a whole block element selected on WebKit could cause WebKit spans to appear. + Fixed bug where the visualchars plugin wasn't working correctly showing invisible nbsp characters. + Fixed bug where browsers would hang if you tried to load some malformed html contents. + Fixed bug where the init call promise wouldn't resolve if the specified selector didn't find any matching elements. + Fixed bug where the Schema isValidChild function was case sensitive. +Version 4.5.3 (2017-02-01) + Added keyboard navigation for menu buttons when the menu is in focus. + Added api to the list plugin for setting custom classes/attributes on lists. + Added validation for the anchor plugin input field according to W3C id naming specifications. + Fixed bug where media placeholders were removed after resize with the forced_root_block setting set to false. + Fixed bug where deleting selections with similar sibling nodes sometimes deleted the whole document. + Fixed bug with inlite theme where several toolbars would appear scrolling when more than one instance of the editor was in use. + Fixed bug where the editor would throw error with the fontselect plugin on hidden editor instances in Firefox. + Fixed bug where the background color would not stretch to the font size. + Fixed bug where font size would be removed when changing background color. + Fixed bug where the undomanager trimmed away whitespace between nodes on undo/redo. + Fixed bug where media_dimensions=false in media plugin caused the editor to throw an error. + Fixed bug where IE was producing font/u elements within links on paste. + Fixed bug where some button tooltips were broken when compat3x was in use. + Fixed bug where backspace/delete/typeover would remove the caption element. + Fixed bug where powerspell failed to function when compat3x was enabled. + Fixed bug where it wasn't possible to apply sub/sup on text with large font size. + Fixed bug where pre tags with spaces weren't treated as content. + Fixed bug where Meta+A would select the entire document instead of all contents in nested ce=true elements. +Version 4.5.2 (2017-01-04) + Added missing keyboard shortcut description for the underline menu item in the format menu. + Fixed bug where external blob urls wasn't properly handled by editor upload logic. Patch contributed by David Oviedo. + Fixed bug where urls wasn't treated as a single word by the wordcount plugin. + Fixed bug where nbsp characters wasn't treated as word delimiters by the wordcount plugin. + Fixed bug where editor instance wasn't properly passed to the format preview logic. Patch contributed by NullQuery. + Fixed bug where the fake caret wasn't hidden when you moved selection to a cE=false element. + Fixed bug where it wasn't possible to edit existing code sample blocks. + Fixed bug where it wasn't possible to delete editor contents if the selection included an empty block. + Fixed bug where the formatter wasn't expanding words on some international characters. Patch contributed by Martin Larochelle. + Fixed bug where the open link feature wasn't working correctly on IE 11. + Fixed bug where enter before/after a cE=false block wouldn't properly padd the paragraph with an br element. + Fixed so font size and font family select boxes always displays a value by using the runtime style as a fallback. + Fixed so missing plugins will be logged to console as warnings rather than halting the initialization of the editor. + Fixed so splitbuttons become normal buttons in advlist plugin if styles are empty. Patch contributed by RenĂ© Schleusner. + Fixed so you can multi insert rows/cols by selecting table cells and using insert rows/columns. +Version 4.5.1 (2016-12-07) + Fixed bug where the lists plugin wouldn't initialize without the advlist plugins if served from cdn. + Fixed bug where selectors with "*" would cause the style format preview to throw an error. + Fixed bug with toggling lists off on lists with empty list items would throw an error. + Fixed bug where editing images would produce non existing blob uris. + Fixed bug where the offscreen toc selection would be treated as the real toc element. + Fixed bug where the aria level attribute for element path would have an incorrect start index. + Fixed bug where the offscreen selection of cE=false that where very wide would be shown onscreen. Patch contributed by Steven Bufton. + Fixed so the default_link_target gets applied to links created by the autolink plugin. + Fixed so that the name attribute gets removed by the anchor plugin if editing anchors. +Version 4.5.0 (2016-11-23) + Added new toc plugin allows you to insert table of contents based on editor headings. + Added new auto complete menu to all url fields. Adds history, link to anchors etc. + Added new sidebar api that allows you to add custom sidebar panels and buttons to toggle these. + Added new insert menu button that allows you to have multiple insert functions under the same menu button. + Added new open link feature to ctrl+click, alt+enter and context menu. + Added new media_embed_handler option to allow the media plugin to be populated with custom embeds. + Added new support for editing transparent images using the image tools dialog. + Added new images_reuse_filename option to allow filenames of images to be retained for upload. + Added new security feature where links with target="_blank" will by default get rel="noopener noreferrer". + Added new allow_unsafe_link_target to allow you to opt-out of the target="_blank" security feature. + Added new style_formats_autohide option to automatically hide styles based on context. + Added new codesample_content_css option to specify where the code sample prism css is loaded from. + Added new support for Japanese/Chinese word count following the unicode standards on this. + Added new fragmented undo levels this dramatically reduces flicker on contents with iframes. + Added new live previews for complex elements like table or lists. + Fixed bug where it wasn't possible to properly tab between controls in a dialog with a disabled form item control. + Fixed bug where firefox would generate a rectangle on elements produced after/before a cE=false elements. + Fixed bug with advlist plugin not switching list element format properly in some edge cases. + Fixed bug where col/rowspans wasn't correctly computed by the table plugin in some cases. + Fixed bug where the table plugin would thrown an error if object_resizing was disabled. + Fixed bug where some invalid markup would cause issues when running in XHTML mode. Patch contributed by Charles Bourasseau. + Fixed bug where the fullscreen class wouldn't be removed properly when closing dialogs. + Fixed bug where the PastePlainTextToggle event wasn't fired by the paste plugin when the state changed. + Fixed bug where table the row type wasn't properly updated in table row dialog. Patch contributed by Matthias Balmer. + Fixed bug where select all and cut wouldn't place caret focus back to the editor in WebKit. Patch contributed by Daniel Jalkut. + Fixed bug where applying cell/row properties to multiple cells/rows would reset other unchanged properties. + Fixed bug where some elements in the schema would have redundant/incorrect children. + Fixed bug where selector and target options would cause issues if used together. + Fixed bug where drag/drop of images from desktop on chrome would thrown an error. + Fixed bug where cut on WebKit/Blink wouldn't add an undo level. + Fixed bug where IE 11 would scroll to the cE=false elements when they where selected. + Fixed bug where keys like F5 wouldn't work when a cE=false element was selected. + Fixed bug where the undo manager wouldn't stop the typing state when commands where executed. + Fixed bug where unlink on wrapped links wouldn't work properly. + Fixed bug with drag/drop of images on WebKit where the image would be deleted form the source editor. + Fixed bug where the visual characters mode would be disabled when contents was extracted from the editor. + Fixed bug where some browsers would toggle of formats applied to the caret when clicking in the editor toolbar. + Fixed bug where the custom theme function wasn't working correctly. + Fixed bug where image option for custom buttons required you to have icon specified as well. + Fixed bug where the context menu and contextual toolbars would be visible at the same time and sometimes overlapping. + Fixed bug where the noneditable plugin would double wrap elements when using the noneditable_regexp option. + Fixed bug where tables would get padding instead of margin when you used the indent button. + Fixed bug where the charmap plugin wouldn't properly insert non breaking spaces. + Fixed bug where the color previews in color input boxes wasn't properly updated. + Fixed bug where the list items of previous lists wasn't merged in the right order. + Fixed bug where it wasn't possible to drag/drop inline-block cE=false elements on IE 11. + Fixed bug where some table cell merges would produce incorrect rowspan/colspan. + Fixed so the font size of the editor defaults to 14px instead of 11px this can be overridden by custom css. + Fixed so wordcount is debounced to reduce cpu hogging on larger texts. + Fixed so tinymce global gets properly exported as a module when used with some module bundlers. + Fixed so it's possible to specify what css properties you want to preview on specific formats. + Fixed so anchors are contentEditable=false while within the editor. + Fixed so selected contents gets wrapped in a inline code element by the codesample plugin. + Fixed so conditional comments gets properly stripped independent of case. Patch contributed by Georgii Dolzhykov. + Fixed so some escaped css sequences gets properly handled. Patch contributed by Georgii Dolzhykov. + Fixed so notifications with the same message doesn't get displayed at the same time. + Fixed so F10 can be used as an alternative key to focus to the toolbar. + Fixed various api documentation issues and typos. + Removed layer plugin since it wasn't really ported from 3.x and there doesn't seem to be much use for it. + Removed moxieplayer.swf from the media plugin since it wasn't used by the media plugin. + Removed format state from the advlist plugin to be more consistent with common word processors. +Version 4.4.3 (2016-09-01) + Fixed bug where copy would produce an exception on Chrome. + Fixed bug where deleting lists on IE 11 would merge in correct text nodes. + Fixed bug where deleting partial lists with indentation wouldn't cause proper normalization. +Version 4.4.2 (2016-08-25) + Added new importcss_exclusive option to disable unique selectors per group. + Added new group specific selector_converter option to importcss plugin. + Added new codesample_languages option to apply custom languages to codesample plugin. + Added new codesample_dialog_width/codesample_dialog_height options. + Fixed bug where fullscreen button had an incorrect keyboard shortcut. + Fixed bug where backspace/delete wouldn't work correctly from a block to a cE=false element. + Fixed bug where smartpaste wasn't detecting links with special characters in them like tilde. + Fixed bug where the editor wouldn't get proper focus if you clicked on a cE=false element. + Fixed bug where it wasn't possible to copy/paste table rows that had merged cells. + Fixed bug where merging cells could some times produce invalid col/rowspan attibute values. + Fixed bug where getBody would sometimes thrown an exception now it just returns null if the iframe is clobbered. + Fixed bug where drag/drop of cE=false element wasn't properly constrained to viewport. + Fixed bug where contextmenu on Mac would collapse any selection to a caret. + Fixed bug where rtl mode wasn't rendered properly when loading a language pack with the rtl flag. + Fixed bug where Kamer word bounderies would be stripped from contents. + Fixed bug where lists would sometimes render two dots or numbers on the same line. + Fixed bug where the skin_url wasn't used by the inlite theme. + Fixed so data attributes are ignored when comparing formats in the formatter. + Fixed so it's possible to disable inline toolbars in the inlite theme. + Fixed so template dialog gets resized if it doesn't fit the window viewport. +Version 4.4.1 (2016-07-26) + Added smart_paste option to paste plugin to allow disabling the paste behavior if needed. + Fixed bug where png urls wasn't properly detected by the smart paste logic. + Fixed bug where the element path wasn't working properly when multiple editor instances where used. + Fixed bug with creating lists out of multiple paragraphs would just create one list item instead of multiple. + Fixed bug where scroll position wasn't properly handled by the inlite theme to place the toolbar properly. + Fixed bug where multiple instances of the editor using the inlite theme didn't render the toolbar properly. + Fixed bug where the shortcut label for fullscreen mode didn't match the actual shortcut key. + Fixed bug where it wasn't possible to select cE=false blocks using touch devices on for example iOS. + Fixed bug where it was possible to select the child image within a cE=false on IE 11. + Fixed so inserts of html containing lists doesn't merge with any existing lists unless it's a paste operation. +Version 4.4.0 (2016-06-30) + Added new inlite theme this is a more lightweight inline UI. + Added smarter paste logic that auto detects urls in the clipboard and inserts images/links based on that. + Added a better image resize algorithm for better image quality in the imagetools plugin. + Fixed bug where it wasn't possible to drag/dropping cE=false elements on FF. + Fixed bug where backspace/delete before/after a cE=false block would produce a new paragraph. + Fixed bug where list style type css property wasn't preserved when indenting lists. + Fixed bug where merging of lists where done even if the list style type was different. + Fixed bug where the image_dataimg_filter function wasn't used when pasting images. + Fixed bug where nested editable within a non editable element would cause scroll on focus in Chrome. + Fixed so invalid targets for inline mode is blocked on initialization. We only support elements that can have children. +Version 4.3.13 (2016-06-08) + Added characters with a diacritical mark to charmap plugin. Patch contributed by Dominik Schilling. + Added better error handling if the image proxy service would produce errors. + Fixed issue with pasting list items into list items would produce nested list rather than a merged list. + Fixed bug where table selection could get stuck in selection mode for inline editors. + Fixed bug where it was possible to place the caret inside the resize grid elements. + Fixed bug where it wasn't possible to place in elements horizontally adjacent cE=false blocks. + Fixed bug where multiple notifications wouldn't be properly placed on screen. + Fixed bug where multiple editor instance of the same id could be produces in some specific integrations. +Version 4.3.12 (2016-05-10) + Fixed bug where focus calls couldn't be made inside the editors PostRender event handler. + Fixed bug where some translations wouldn't work as expected due to a bug in editor.translate. + Fixed bug where the node change event could fire with a node out side the root of the editor. + Fixed bug where Chrome wouldn't properly present the keyboard paste clipboard details when paste was clicked. + Fixed bug where merged cells in tables couldn't be selected from right to left. + Fixed bug where insert row wouldn't properly update a merged cells rowspan property. + Fixed bug where the color input boxes preview field wasn't properly set on initialization. + Fixed bug where IME composition inside table cells wouldn't work as expected on IE 11. + Fixed so all shadow dom support is under and experimental flag due to flaky browser support. +Version 4.3.11 (2016-04-25) + Fixed bug where it wasn't possible to insert empty blocks though the API unless they where padded. + Fixed bug where you couldn't type the Euro character on Windows. + Fixed bug where backspace/delete from a cE=false element to a text block didn't work properly. + Fixed bug where the text color default grid would render incorrectly. + Fixed bug where the codesample plugin wouldn't load the css in the editor for multiple editors. + Fixed so the codesample plugin textarea gets focused by default. +Version 4.3.10 (2016-04-12) + Fixed bug where the key "y" on WebKit couldn't be entered due to conflict with keycode for F10 on keypress. +Version 4.3.9 (2016-04-12) + Added support for focusing the contextual toolbars using keyboard. + Added keyboard support for slider UI controls. You can no increase/decrease using arrow keys. + Added url pattern matching for Dailymotion to media plugin. Patch contributed by Bertrand Darbon. + Added body_class to template plugin preview. Patch contributed by Milen Petrinski. + Added options to better override textcolor pickers with custom colors. Patch contributed by Xavier Boubert. + Added visual arrows to inline contextual toolbars so that they point to the element being active. + Fixed so toolbars for tables or other larger elements get better positioned below the scrollable viewport. + Fixed bug where it was possible to click links inside cE=false blocks. + Fixed bug where event targets wasn't properly handled in Safari Technical Preview. + Fixed bug where drag/drop text in FF 45 would make the editor caret invisible. + Fixed bug where the remove state wasn't properly set on editor instances when detected as clobbered. + Fixed bug where offscreen selection of some cE=false elements would render onscreen. Patch contributed by Steven Bufton + Fixed bug where enter would clone styles out side the root on editors inside a span. Patch contributed by ChristophKaser. + Fixed bug where drag/drop of images into the editor didn't work correctly in FF. + Fixed so the first item in panels for the imagetools dialog gets proper keyboard focus. + Changed the Meta+Shift+F shortcut to Ctrl+Shift+F since Czech, Slovak, Polish languages used the first one for input. +Version 4.3.8 (2016-03-15) + Fixed bug where inserting HR at the end of a block element would produce an extra empty block. + Fixed bug where links would be clickable when readonly mode was enabled. + Fixed bug where the formatter would normalize to the wrong node on very specific content. + Fixed bug where some nested list items couldn't be indented properly. + Fixed bug where links where clickable in the preview dialog. + Fixed so the alt attribute doesn't get padded with an empty value by default. + Fixed so nested alignment works more correctly. You will now alter the alignment to the closest block parent. +Version 4.3.7 (2016-03-02) + Fixed bug where incorrect icons would be rendered for imagetools edit and color levels. + Fixed bug where navigation using arrow keys inside a SelectBox didn't move up/down. + Fixed bug where the visualblocks plugin would render borders round internal UI elements. +Version 4.3.6 (2016-03-01) + Added new paste_remember_plaintext_info option to allow a global disable of the plain text mode notification. + Added new PastePlainTextToggle event that fires when plain text mode toggles on/off. + Fixed bug where it wasn't possible to select media elements since the drag logic would snap it to mouse cursor. + Fixed bug where it was hard to place the caret inside nested cE=true elements when the outer cE=false element was focused. + Fixed bug where editors wouldn't properly initialize if both selector and mode where used. + Fixed bug where IME input inside table cells would switch the IME off. + Fixed bug where selection inside the first table cell would cause the whole table cell to get selected. + Fixed bug where error handling of images being uploaded wouldn't properly handle faulty statuses. + Fixed bug where inserting contents before a HR would cause an exception to be thrown. + Fixed bug where copy/paste of Excel data would be inserted as an image. + Fixed caret position issues with copy/paste of inline block cE=false elements. + Fixed issues with various menu item focus bugs in Chrome. Where the focused menu bar item wasn't properly blurred. + Fixed so the notifications have a solid background since it would be hard to read if there where text under it. + Fixed so notifications gets animated similar to the ones used by dialogs. + Fixed so larger images that gets pasted is handled better. + Fixed so the window close button is more uniform on various platform and also increased it's hit area. +Version 4.3.5 (2016-02-11) + Npm version bump due to package not being fully updated. +Version 4.3.4 (2016-02-11) + Added new OpenWindow/CloseWindow events that gets fired when windows open/close. + Added new NewCell/NewRow events that gets fired when table cells/rows are created. + Added new Promise return value to tinymce.init makes it easier to handle initialization. + Removed the jQuery version the jQuery plugin is now moved into the main package. + Removed jscs from build process since eslint can now handle code style checking. + Fixed various bugs with drag/drop of contentEditable:false elements. + Fixed bug where deleting of very specific nested list items would result in an odd list. + Fixed bug where lists would get merged with adjacent lists outside the editable inline root. + Fixed bug where MS Edge would crash when closing a dialog then clicking a menu item. + Fixed bug where table cell selection would add undo levels. + Fixed bug where table cell selection wasn't removed when inline editor where removed. + Fixed bug where table cell selection wouldn't work properly on nested tables. + Fixed bug where table merge menu would be available when merging between thead and tbody. + Fixed bug where table row/column resize wouldn't get properly removed when the editor was removed. + Fixed bug where Chrome would scroll to the editor if there where a empty hash value in document url. + Fixed bug where the cache suffix wouldn't work correctly with the importcss plugin. + Fixed bug where selection wouldn't work properly on MS Edge on Windows Phone 10. + Fixed so adjacent pre blocks gets joined into one pre block since that seems like the user intent. + Fixed so events gets properly dispatched in shadow dom. Patch provided by Nazar Mokrynskyi. +Version 4.3.3 (2016-01-14) + Added new table_resize_bars configuration setting. This setting allows you to disable the table resize bars. + Added new beforeInitialize event to tinymce.util.XHR lets you modify XHR properties before open. Patch contributed by Brent Clintel. + Added new autolink_pattern setting to autolink plugin. Enables you to override the default autolink formats. Patch contributed by Ben Tiedt. + Added new charmap option that lets you override the default charmap of the charmap plugin. + Added new charmap_append option that lets you add new characters to the default charmap of the charmap plugin. + Added new insertCustomChar event that gets fired when a character is inserted by the charmap plugin. + Fixed bug where table cells started with a superfluous   in IE10+. + Fixed bug where table plugin would retain all BR tags when cells were merged. + Fixed bug where media plugin would strip underscores from youtube urls. + Fixed bug where IME input would fail on IE 11 if you typed within a table. + Fixed bug where double click selection of a word would remove the space before the word on insert contents. + Fixed bug where table plugin would produce exceptions when hovering tables with invalid structure. + Fixed bug where fullscreen wouldn't scroll back to it's original position when untoggled. + Fixed so the template plugins templates setting can be a function that gets a callback that can provide templates. +Version 4.3.2 (2015-12-14) + Fixed bug where the resize bars for table cells were not affected by the object_resizing property. + Fixed bug where the contextual table toolbar would appear incorrectly if TinyMCE was initialized inline inside a table. + Fixed bug where resizing table cells did not fire a node change event or add an undo level. + Fixed bug where double click selection of text on IE 11 wouldn't work properly. + Fixed bug where codesample plugin would incorrectly produce br elements inside code elements. + Fixed bug where media plugin would strip dashes from youtube urls. + Fixed bug where it was possible to move the caret into the table resize bars. + Fixed bug where drag/drop into a cE=false element was possible on IE. +Version 4.3.1 (2015-11-30) + Fixed so it's possible to disable the table inline toolbar by setting it to false or an empty string. + Fixed bug where it wasn't possible to resize some tables using the drag handles. + Fixed bug where unique id:s would clash for multiple editor instances and cE=false selections. + Fixed bug where the same plugin could be initialized multiple times. + Fixed bug where the table inline toolbars would be displayed at the same time as the image toolbars. + Fixed bug where the table selection rect wouldn't be removed when selecting another control element. +Version 4.3.0 (2015-11-23) + Added new table column/row resize support. Makes it a lot more easy to resize the columns/rows in a table. + Added new table inline toolbar. Makes it easier to for example add new rows or columns to a table. + Added new notification API. Lets you display floating notifications to the end user. + Added new codesample plugin that lets you insert syntax highlighted pre elements into the editor. + Added new image_caption to images. Lets you create images with captions using a HTML5 figure/figcaption elements. + Added new live previews of embeded videos. Lets you play the video right inside the editor. + Added new setDirty method and "dirty" event to the editor. Makes it easier to track the dirty state change. + Added new setMode method to Editor instances that lets you dynamically switch between design/readonly. + Added new core support for contentEditable=false elements within the editor overrides the browsers broken behavior. + Rewrote the noneditable plugin to use the new contentEditable false core logic. + Fixed so the dirty state doesn't set to false automatically when the undo index is set to 0. + Fixed the Selection.placeCaretAt so it works better on IE when the coordinate is between paragraphs. + Fixed bug where data-mce-bogus="all" element contents where counted by the word count plugin. + Fixed bug where contentEditable=false elements would be indented by the indent buttons. + Fixed bug where images within contentEditable=false would be selected in WebKit on mouse click. + Fixed bug in DOMUntils split method where the replacement parameter wouldn't work on specific cases. + Fixed bug where the importcss plugin would import classes from the skin content css file. + Fixed so all button variants have a wrapping span for it's text to make it easier to skin. + Fixed so it's easier to exit pre block using the arrow keys. + Fixed bug where listboxes with fix widths didn't render correctly. +Version 4.2.8 (2015-11-13) + Fixed bug where it was possible to delete tables as the inline root element if all columns where selected. + Fixed bug where the UI buttons active state wasn't properly updated due to recent refactoring of that logic. +Version 4.2.7 (2015-10-27) + Fixed bug where backspace/delete would remove all formats on the last paragraph character in WebKit/Blink. + Fixed bug where backspace within a inline format element with a bogus caret container would move the caret. + Fixed bug where backspace/delete on selected table cells wouldn't add an undo level. + Fixed bug where script tags embedded within the editor could sometimes get a mce- prefix prepended to them + Fixed bug where validate: false option could produce an error to be thrown from the Serialization step. + Fixed bug where inline editing of a table as the root element could let the user delete that table. + Fixed bug where inline editing of a table as the root element wouldn't properly handle enter key. + Fixed bug where inline editing of a table as the root element would normalize the selection incorrectly. + Fixed bug where inline editing of a list as the root element could let the user delete that list. + Fixed bug where inline editing of a list as the root element could let the user split that list. + Fixed bug where resize handles would be rendered on editable root elements such as table. +Version 4.2.6 (2015-09-28) + Added capability to set request headers when using XHRs. + Added capability to upload local images automatically default delay is set to 30 seconds after editing images. + Added commands ids mceEditImage, mceAchor and mceMedia to be avaiable from execCommand. + Added Edge browser to saucelabs grunt task. Patch contributed by John-David Dalton. + Fixed bug where blob uris not produced by tinymce would produce HTML invalid markup. + Fixed bug where selection of contents of a nearly empty editor in Edge would sometimes fail. + Fixed bug where color styles woudln't be retained on copy/paste in Blink/Webkit. + Fixed bug where the table plugin would throw an error when inserting rows after a child table. + Fixed bug where the template plugin wouldn't handle functions as variable replacements. + Fixed bug where undo/redo sometimes wouldn't work properly when applying formatting collapsed ranges. + Fixed bug where shift+delete wouldn't do a cut operation on Blink/WebKit. + Fixed bug where cut action wouldn't properly store the before selection bookmark for the undo level. + Fixed bug where backspace in side an empty list element on IE would loose editor focus. + Fixed bug where the save plugin wouldn't enable the buttons when a change occurred. + Fixed bug where Edge wouldn't initialize the editor if a document.domain was specified. + Fixed bug where enter key before nested images would sometimes not properly expand the previous block. + Fixed bug where the inline toolbars wouldn't get properly hidden when blurring the editor instance. + Fixed bug where Edge would paste Chinese characters on some Windows 10 installations. + Fixed bug where IME would loose focus on IE 11 due to the double trailing br bug fix. + Fixed bug where the proxy url in imagetools was incorrect. Patch contributed by Wong Ho Wang. +Version 4.2.5 (2015-08-31) + Added fullscreen capability to embedded youtube and vimeo videos. + Fixed bug where the uploadImages call didn't work on IE 10. + Fixed bug where image place holders would be uploaded by uploadImages call. + Fixed bug where images marked with bogus would be uploaded by the uploadImages call. + Fixed bug where multiple calls to uploadImages would result in decreased performance. + Fixed bug where pagebreaks were editable to imagetools patch contributed by Rasmus Wallin. + Fixed bug where the element path could cause too much recursion exception. + Fixed bug for domains containing ".min". Patch contributed by LoĂ¯c FĂ©vrier. + Fixed so validation of external links to accept a number after www. Patch contributed by Victor Carvalho. + Fixed so the charmap is exposed though execCommand. Patch contributed by Matthew Will. + Fixed so that the image uploads are concurrent for improved performance. + Fixed various grammar problems in inline documentation. Patches provided by nikolas. +Version 4.2.4 (2015-08-17) + Added picture as a valid element to the HTML 5 schema. Patch contributed by Adam Taylor. + Fixed bug where contents would be duplicated on drag/drop within the same editor. + Fixed bug where floating/alignment of images on Edge wouldn't work properly. + Fixed bug where it wasn't possible to drag images on IE 11. + Fixed bug where image selection on Edge would sometimes fail. + Fixed bug where contextual toolbars icons wasn't rendered properly when using the toolbar_items_size. + Fixed bug where searchreplace dialog doesn't get prefilled with the selected text. + Fixed bug where fragmented matches wouldn't get properly replaced by the searchreplace plugin. + Fixed bug where enter key wouldn't place the caret if was after a trailing space within an inline element. + Fixed bug where the autolink plugin could produce multiple links for the same text on Gecko. + Fixed bug where EditorUpload could sometimes throw an exception if the blob wasn't found. + Fixed xss issues with media plugin not properly filtering out some script attributes. +Version 4.2.3 (2015-07-30) + Fixed bug where image selection wasn't possible on Edge due to incompatible setBaseAndExtend API. + Fixed bug where image blobs urls where not properly destroyed by the imagetools plugin. + Fixed bug where keyboard shortcuts wasn't working correctly on IE 8. + Fixed skin issue where the borders of panels where not visible on IE 8. +Version 4.2.2 (2015-07-22) + Fixed bug where float panels were not being hidden on inline editor blur when fixed_toolbar_container config option was in use. + Fixed bug where combobox states wasn't properly updated if contents where updated without keyboard. + Fixed bug where pasting into textbox or combobox would move the caret to the end of text. + Fixed bug where removal of bogus span elements before block elements would remove whitespace between nodes. + Fixed bug where repositioning of inline toolbars where async and producing errors if the editor was removed from DOM to early. Patch by iseulde. + Fixed bug where element path wasn't working correctly. Patch contributed by iseulde. + Fixed bug where menus wasn't rendered correctly when custom images where added to a menu. Patch contributed by Naim Hammadi. +Version 4.2.1 (2015-06-29) + Fixed bug where back/forward buttons in the browser would render blob images as broken images. + Fixed bug where Firefox would throw regexp to big error when replacing huge base64 chunks. + Fixed bug rendering issues with resize and context toolbars not being placed properly until next animation frame. + Fixed bug where the rendering of the image while cropping would some times not be centered correctly. + Fixed bug where listbox items with submenus would me selected as active. + Fixed bug where context menu where throwing an error when rendering. + Fixed bug where resize both option wasn't working due to resent addClass API change. Patch contributed by Jogai. + Fixed bug where a hideAll call for container rendered inline toolbars would throw an error. + Fixed bug where onclick event handler on combobox could cause issues if element.id was a function by some polluting libraries. + Fixed bug where listboxes wouldn't get proper selected sub menu item when using link_list or image_list. + Fixed so the UI controls are as wide as 4.1.x to avoid wrapping controls in toolbars. + Fixed so the imagetools dialog is adaptive for smaller screen sizes. +Version 4.2.0 (2015-06-25) + Added new flat default skin to make the UI more modern. + Added new imagetools plugin, lets you crop/resize and apply filters to images. + Added new contextual toolbars support to the API lets you add floating toolbars for specific CSS selectors. + Added new promise feature fill as tinymce.util.Promise. + Added new built in image upload feature lets you upload any base64 encoded image within the editor as files. + Fixed bug where resize handles would appear in the right position in the wrong editor when switching between resizable content in different inline editors. + Fixed bug where tables would not be inserted in inline mode due to previous float panel fix. + Fixed bug where floating panels would remain open when focus was lost on inline editors. + Fixed bug where cut command on Chrome would thrown a browser security exception. + Fixed bug where IE 11 sometimes would report an incorrect size for images in the image dialog. + Fixed bug where it wasn't possible to remove inline formatting at the end of block elements. + Fixed bug where it wasn't possible to delete table cell contents when cell selection was vertical. + Fixed bug where table cell wasn't emptied from block elements if delete/backspace where pressed in empty cell. + Fixed bug where cmd+shift+arrow didn't work correctly on Firefox mac when selecting to start/end of line. + Fixed bug where removal of bogus elements would sometimes remove whitespace between nodes. + Fixed bug where the resize handles wasn't updated when the main window was resized. + Fixed so script elements gets removed by default to prevent possible XSS issues in default config implementations. + Fixed so the UI doesn't need manual reflows when using non native layout managers. + Fixed so base64 encoded images doesn't slow down the editor on modern browsers while editing. + Fixed so all UI elements uses touch events to improve mobile device support. + Removed the touch click quirks patch for iOS since it did more harm than good. + Removed the non proportional resize handles since. Unproportional resize can still be done by holding the shift key. +Version 4.1.10 (2015-05-05) + Fixed bug where plugins loaded with compat3x would sometimes throw errors when loading using the jQuery version. + Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix. + Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing. + Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys. + Fixed bug where the caret wouldn't move to the next/previous line boundary on Cmd+Left/Right on Gecko. + Fixed bug where it wasn't possible to remove formats from very specific nested contents. + Fixed bug where undo levels wasn't produced when typing letters using the shift or alt+ctrl modifiers. + Fixed bug where the dirty state wasn't properly updated when typing using the shift or alt+ctrl modifiers. + Fixed bug where an error would be thrown if an autofocused editor was destroyed quickly after its initialization. Patch provided by thorn0. + Fixed issue with dirty state not being properly updated on redo operation. + Fixed issue with entity decoder not handling incorrectly written numeric entities. + Fixed issue where some PI element values wouldn't be properly encoded. +Version 4.1.9 (2015-03-10) + Fixed bug where indentation wouldn't work properly for non list elements. + Fixed bug with image plugin not pulling the image dimensions out correctly if a custom document_base_url was used. + Fixed bug where ctrl+alt+[1-9] would conflict with the AltGr+[1-9] on Windows. New shortcuts is ctrl+shift+[1-9]. + Fixed bug with removing formatting on nodes in inline mode would sometimes include nodes outside the editor body. + Fixed bug where extra nbsp:s would be inserted when you replaced a word surrounded by spaces using insertContent. + Fixed bug with pasting from Google Docs would produce extra strong elements and line feeds. +Version 4.1.8 (2015-03-05) + Added new html5 sizes attribute to img elements used together with srcset. + Added new elementpath option that makes it possible to disable the element path but keep the statusbar. + Added new option table_style_by_css for the table plugin to set table styling with css rather than table attributes. + Added new link_assume_external_targets option to prompt the user to prepend http:// prefix if the supplied link does not contain a protocol prefix. + Added new image_prepend_url option to allow a custom base path/url to be added to images. + Added new table_appearance_options option to make it possible to disable some options. + Added new image_title option to make it possible to alter the title of the image, disabled by default. + Fixed bug where selection starting from out side of the body wouldn't produce a proper selection range on IE 11. + Fixed bug where pressing enter twice before a table moves the cursor in the table and causes a javascript error. + Fixed bug where advanced image styles were not respected. + Fixed bug where the less common Shift+Delete didn't produce a proper cut operation on WebKit browsers. + Fixed bug where image/media size constrain logic would produce NaN when handling non number values. + Fixed bug where internal classes where removed by the removeformat command. + Fixed bug with creating links table cell contents with a specific selection would throw a exceptions on WebKit/Blink. + Fixed bug where valid_classes option didn't work as expected according to docs. Patch provided by thorn0. + Fixed bug where jQuery plugin would patch the internal methods multiple times. Patch provided by Drew Martin. + Fixed bug where backspace key wouldn't delete the current selection of newly formatted content. + Fixed bug where type over of inline formatting elements wouldn't properly keep the format on WebKit/Blink. + Fixed bug where selection needed to be properly normalized on modern IE versions. + Fixed bug where Command+Backspace didn't properly delete the whole line of text but the previous word. + Fixed bug where UI active states wheren't properly updated on IE if you placed caret within the current range. + Fixed bug where delete/backspace on WebKit/Blink would remove span elements created by the user. + Fixed bug where delete/backspace would produce incorrect results when deleting between two text blocks with br elements. + Fixed bug where captions where removed when pasting from MS Office. + Fixed bug where lists plugin wouldn't properly remove fully selected nested lists. + Fixed bug where the ttf font used for icons would throw an warning message on Gecko on Mac OS X. + Fixed a bug where applying a color to text did not update the undo/redo history. + Fixed so shy entities gets displayed when using the visualchars plugin. + Fixed so removeformat removes ins/del by default since these might be used for strikethough. + Fixed so multiple language packs can be loaded and added to the global I18n data structure. + Fixed so transparent color selection gets treated as a normal color selection. Patch contributed by Alexander Hofbauer. + Fixed so it's possible to disable autoresize_overflow_padding, autoresize_bottom_margin options by setting them to false. + Fixed so the charmap plugin shows the description of the character in the dialog. Patch contributed by Jelle Hissink. + Removed address from the default list of block formats since it tends to be missused. + Fixed so the pre block format is called preformatted to make it more verbose. + Fixed so it's possible to context scope translation strings this isn't needed most of the time. + Fixed so the max length of the width/height input fields of the media dialog is 5 instead of 3. + Fixed so drag/dropped contents gets properly processed by paste plugin since it's basically a paste. Patch contributed by Greg Fairbanks. + Fixed so shortcut keys for headers is ctrl+alt+[1-9] instead of ctrl+[1-9] since these are for switching tabs in the browsers. + Fixed so "u" doesn't get converted into a span element by the legacy input filter. Since this is now a valid HTML5 element. + Fixed font families in order to provide appropriate web-safe fonts. +Version 4.1.7 (2014-11-27) + Added HTML5 schema support for srcset, source and picture. Patch contributed by mattheu. + Added new cache_suffix setting to enable cache busting by producing unique urls. + Added new paste_convert_word_fake_lists option to enable users to disable the fake lists convert logic. + Fixed so advlist style changes adds undo levels for each change. + Fixed bug where WebKit would sometimes produce an exception when the autolink plugin where looking for URLs. + Fixed bug where IE 7 wouldn't be rendered properly due to aggressive css compression. + Fixed bug where DomQuery wouldn't accept window as constructor element. + Fixed bug where the color picker in 3.x dialogs wouldn't work properly. Patch contributed by Callidior. + Fixed bug where the image plugin wouldn't respect the document_base_url. + Fixed bug where the jQuery plugin would fail to append to elements named array prototype names. +Version 4.1.6 (2014-10-08) + Fixed bug with clicking on the scrollbar of the iframe would cause a JS error to be thrown. + Fixed bug where null would produce an exception if you passed it to selection.setRng. + Fixed bug where Ctrl/Cmd+Tab would indent the current list item if you switched tabs in the browser. + Fixed bug where pasting empty cells from Excel would result in a broken table. + Fixed bug where it wasn't possible to switch back to default list style type. + Fixed issue where the select all quirk fix would fire for other modifiers than Ctrl/Cmd combinations. + Replaced jake with grunt since it is more mainstream and has better plugin support. +Version 4.1.5 (2014-09-09) + Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink. + Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly. + Fixed bug where empty list elements would result in empty LI elements without it's parent container. + Fixed bug where backspace in empty caret formatted element could produce an type error exception of Gecko. + Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled. + Fixed bug where tabfocus plugin would tab out of the editor instance even if the default action was prevented. + Fixed bug where tabfocus wouldn't tab properly to other adjacent editor instances. + Fixed bug where the DOMUtils setStyles wouldn't properly removed or update the data-mce-style attribute. + Fixed bug where dialog select boxes would be placed incorrectly if document.body wasn't statically positioned. + Fixed bug where pasting would sometimes scroll to the top of page if the user was using the autoresize plugin. + Fixed bug where caret wouldn't be properly rendered by Chrome when clicking on the iframes documentElement. + Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi. + Fixed so the default action of windows closing can be prevented by blocking the default action of the close event. + Fixed so nodeChange and focus of the editor isn't automatically performed when opening sub dialogs. +Version 4.1.4 (2014-08-21) + Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element. + Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon. + Fixed bug where activate/deactivate events wasn't firing properly when switching between editors. + Fixed bug where placing the caret on iOS was difficult due to a WebKit bug with touch events. + Fixed bug where the resize helper wouldn't render properly on older IE versions. + Fixed bug where resizing images inside tables on older IE versions would sometimes fail depending mouse position. + Fixed bug where editor.insertContent would produce an exception when inserting select/option elements. + Fixed bug where extra empty paragraphs would be produced if block elements where inserted inside span elements. + Fixed bug where the spellchecker menu item wouldn't be properly checked if spell checking was started before it was rendered. + Fixed bug where the DomQuery filter function wouldn't remove non elements from collection. + Fixed bug where document with custom document.domain wouldn't properly render the editor. + Fixed bug where IE 8 would throw exception when trying to enter invalid color values into colorboxes. + Fixed bug where undo manager could incorrectly add an extra undo level when custom resize handles was removed. + Fixed bug where it wouldn't be possible to alter cell properties properly on table cells on IE 8. + Fixed so the color picker button in table dialog isn't shown unless you include the colorpicker plugin or add your own custom color picker. + Fixed so activate/deactivate events fire when windowManager opens a window since. + Fixed so the table advtab options isn't separated by an underscore to normalize naming with image_advtab option. + Fixed so the table cell dialog has proper padding when the advanced tab in disabled. +Version 4.1.3 (2014-07-29) + Added event binding logic to tinymce.util.XHR making it possible to override headers and settings before any request is made. + Fixed bug where drag events wasn't fireing properly on older IE versions since the event handlers where bound to document. + Fixed bug where drag/dropping contents within the editor on IE would force the contents into plain text mode even if it was internal content. + Fixed bug where IE 7 wouldn't open menus properly due to a resize bug in the browser auto closing them immediately. + Fixed bug where the DOMUtils getPos logic wouldn't produce a valid coordinate inside the body if the body was positioned non static. + Fixed bug where the element path and format state wasn't properly updated if you had the wordcount plugin enabled. + Fixed bug where a comment at the beginning of source would produce an exception in the formatter logic. + Fixed bug where setAttrib/getAttrib on null would throw exception together with any hooked attributes like style. + Fixed bug where table sizes wasn't properly retained when copy/pasting on WebKit/Blink. + Fixed bug where WebKit/Blink would produce colors in RGB format instead of the forced HEX format when deleting contents. + Fixed bug where the width attribute wasn't updated on tables if you changed the size inside the table dialog. + Fixed bug where control selection wasn't properly handled when the caret was placed directly after an image. + Fixed bug where selecting the contents of table cells using the selection.select method wouldn't place the caret properly. + Fixed bug where the selection state for images wasn't removed when placing the caret right after an image on WebKit/Blink. + Fixed bug where all events wasn't properly unbound when and editor instance was removed or destroyed by some external innerHTML call. + Fixed bug where it wasn't possible or very hard to select images on iOS when the onscreen keyboard was visible. + Fixed so auto_focus can take a boolean argument this will auto focus the last initialized editor might be useful for single inits. + Fixed so word auto detect lists logic works better for faked lists that doesn't have specific markup. + Fixed so nodeChange gets fired on mouseup as it used to before 4.1.1 we optimized that event to fire less often. + Removed the finish menu item from spellchecker menu since it's redundant you can stop spellchecking by toggling menu item or button. +Version 4.1.2 (2014-07-15) + Added offset/grep to DomQuery class works basically the same as it's jQuery equivalent. + Fixed bug where backspace/delete or setContent with an empty string would remove header data when using the fullpage plugin. + Fixed bug where tinymce.remove with a selector not matching any editors would remove all editors. + Fixed bug where resizing of the editor didn't work since the theme was calling setStyles instead of setStyle. + Fixed bug where IE 7 would fail to append html fragments to iframe document when using DomQuery. + Fixed bug where the getStyle DOMUtils method would produce an exception if it was called with null as it's element. + Fixed bug where the paste plugin would remove the element if the none of the paste_webkit_styles rules matched the current style. + Fixed bug where contextmenu table items wouldn't work properly on IE since it would some times fire an incorrect selection change. + Fixed bug where the padding/border values wasn't used in the size calculation for the body size when using autoresize. Patch contributed by Matt Whelan. + Fixed bug where conditional word comments wouldn't be properly removed when pasting plain text. + Fixed bug where resizing would sometime fail on IE 11 when the mouseup occurred inside the resizable element. + Fixed so the iframe gets initialized without any inline event handlers for better CSP support. Patch contributed by Matt Whelan. + Fixed so the tinymce.dom.Sizzle is the latest version of sizzle this resolves the document context bug. +Version 4.1.1 (2014-07-08) + Fixed bug where pasting plain text on some WebKit versions would result in an empty line. + Fixed bug where resizing images inside tables on IE 11 wouldn't work properly. + Fixed bug where IE 11 would sometimes throw "Invalid argument" exception when editor contents was set to an empty string. + Fixed bug where document.activeElement would throw exceptions on IE 9 when that element was hidden or removed from dom. + Fixed bug where WebKit/Blink sometimes produced br elements with the Apple-interchange-newline class. + Fixed bug where table cell selection wasn't properly removed when copy/pasting table cells. + Fixed bug where pasting nested list items from Word wouldn't produce proper semantic nested lists. + Fixed bug where right clicking using the contextmenu plugin on WebKit/Blink on Mac OS X would select the target current word or line. + Fixed bug where it wasn't possible to alter table cell properties on IE 8 using the context menu. + Fixed bug where the resize helper wouldn't be correctly positioned on older IE versions. + Fixed bug where fullpage plugin would produce an error if you didn't specify a doctype encoding. + Fixed bug where anchor plugin would get the name/id of the current element even if it wasn't anchor element. + Fixed bug where visual aids for tables wouldn't be properly disabled when changing the border size. + Fixed bug where some control selection events wasn't properly fired on older IE versions. + Fixed bug where table cell selection on older IE versions would prevent resizing of images. + Fixed bug with paste_data_images paste option not working properly on modern IE versions. + Fixed bug where custom elements with underscores in the name wasn't properly parsed/serialized. + Fixed bug where applying inline formats to nested list elements would produce an incorrect formatting result. + Fixed so it's possible to hide items from elements path by using preventDefault/stopPropagation. + Fixed so inline mode toolbar gets rendered right aligned if the editable element positioned to the documents right edge. + Fixed so empty inline elements inside empty block elements doesn't get removed if configured to be kept intact. + Fixed so DomQuery parentsUntil/prevUntil/nextUntil supports selectors/elements/filters etc. + Fixed so legacyoutput plugin overrides fontselect and fontsizeselect controls and handles font elements properly. +Version 4.1.0 (2014-06-18) + Added new file_picker_callback option to replace the old file_browser_callback the latter will still work though. + Added new custom colors to textcolor plugin will be displayed if a color picker is provided also shows the latest colors. + Added new color_picker_callback option to enable you to add custom color pickers to the editor. + Added new advanced tabs to table/cell/row dialogs to enable you to select colors for border/background. + Added new colorpicker plugin that lets you select colors from a hsv color picker. + Added new tinymce.util.Color class to handle color parsing and converting. + Added new colorpicker UI widget element lets you add a hsv color picker to any form/window. + Added new textpattern plugin that allows you to use markdown like text patterns to format contents. + Added new resize helper element that shows the current width & height while resizing. + Added new "once" method to Editor and EventDispatcher enables since callback execution events. + Added new jQuery like class under tinymce.dom.DomQuery it's exposed on editor instances (editor.$) and globally under (tinymce.$). + Fixed so the default resize method for images are proportional shift/ctrl can be used to make an unproportional size. + Fixed bug where the image_dimensions option of the image plugin would cause exceptions when it tried to update the size. + Fixed bug where table cell dialog class field wasn't properly updated when editing an a table cell with an existing class. + Fixed bug where Safari on Mac would produce webkit-fake-url for pasted images so these are now removed. + Fixed bug where the nodeChange event would get fired before the selection was changed when clicking inside the current selection range. + Fixed bug where valid_classes option would cause exception when it removed internal prefixed classes like mce-item-. + Fixed bug where backspace would cause navigation in IE 8 on an inline element and after a caret formatting was applied. + Fixed so placeholder images produced by the media plugin gets selected when inserted/edited. + Fixed so it's possible to drag in images when the paste_data_images option is enabled. Might be useful for mail clients. + Fixed so images doesn't get a width/height applied if the image_dimensions option is set to false useful for responsive contents. + Fixed so it's possible to pass in an optional arguments object for the nodeChanged function to be passed to all nodechange event listeners. + Fixed bug where media plugin embed code didn't update correctly. diff --git a/node_modules/tinymce/composer.json b/node_modules/tinymce/composer.json new file mode 100644 index 0000000..babaf71 --- /dev/null +++ b/node_modules/tinymce/composer.json @@ -0,0 +1,42 @@ +{ + "name": "tinymce/tinymce", + "version": "4.7.6", + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "license": [ + "LGPL-2.1" + ], + "keywords": [ + "editor", + "wysiwyg", + "tinymce", + "richtext", + "javascript", + "html" + ], + "homepage": "http://www.tinymce.com", + "type": "component", + "extra": { + "component": { + "scripts": [ + "tinymce.js", + "plugins/*/plugin.js", + "themes/*/theme.js" + ], + "files": [ + "tinymce.min.js", + "plugins/*/plugin.min.js", + "themes/*/theme.min.js", + "skins/**" + ] + } + }, + "archive": { + "exclude": [ + "readme.md", + "bower.js", + "package.json", + ".npmignore", + "changelog.txt" + ] + } +} \ No newline at end of file diff --git a/node_modules/tinymce/jquery.tinymce.js b/node_modules/tinymce/jquery.tinymce.js new file mode 100644 index 0000000..1f92f83 --- /dev/null +++ b/node_modules/tinymce/jquery.tinymce.js @@ -0,0 +1 @@ +!function(){var e,t,n,i,r,a=[];r="undefined"!=typeof global?global:window;var c=function(){return r.tinymce};(i=r.jQuery).fn.tinymce=function(e){var l,u,s,f=this,p="";if(!f.length)return f;if(!e)return c()?c().get(f[0].id):null;f.css("visibility","hidden");var d=function(){var t=[],r=0;n||(o(),n=!0),f.each(function(n,i){var a,o=i.id,l=e.oninit;o||(i.id=o=c().DOM.uniqueId()),c().get(o)||(a=c().createEditor(o,e),t.push(a),a.on("init",function(){var e,n=l;f.css("visibility",""),l&&++r==t.length&&("string"==typeof n&&(e=-1===n.indexOf(".")?null:c().resolve(n.replace(/\.\w+$/,"")),n=c().resolve(n)),n.apply(e||c(),t))}))}),i.each(t,function(e,t){t.render()})};if(r.tinymce||t||!(l=e.script_url))1===t?a.push(d):d();else{t=1,u=l.substring(0,l.lastIndexOf("/")),-1!=l.indexOf(".min")&&(p=".min"),r.tinymce=r.tinyMCEPreInit||{base:u,suffix:p},-1!=l.indexOf("gzip")&&(s=e.language||"en",l=l+(/\?/.test(l)?"&":"?")+"js=true&core=true&suffix="+escape(p)+"&themes="+escape(e.theme||"modern")+"&plugins="+escape(e.plugins||"")+"&languages="+(s||""),r.tinyMCE_GZ||(r.tinyMCE_GZ={start:function(){var t=function(e){c().ScriptLoader.markDone(c().baseURI.toAbsolute(e))};t("langs/"+s+".js"),t("themes/"+e.theme+"/theme"+p+".js"),t("themes/"+e.theme+"/langs/"+s+".js"),i.each(e.plugins.split(","),function(e,n){n&&(t("plugins/"+n+"/plugin"+p+".js"),t("plugins/"+n+"/langs/"+s+".js"))})},end:function(){}}));var v=document.createElement("script");v.type="text/javascript",v.onload=v.onreadystatechange=function(n){n=n||window.event,2===t||"load"!=n.type&&!/complete|loaded/.test(v.readyState)||(c().dom.Event.domLoaded=1,t=2,e.script_loaded&&e.script_loaded(),d(),i.each(a,function(e,t){t()}))},v.src=l,document.body.appendChild(v)}return f},i.extend(i.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in r&&(t=c().get(e.id))&&t.editorManager===c())}});var o=function(){var t=function(e){"remove"===e&&this.each(function(e,t){var n=a(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=c().get(t.id.replace(/_parent$/,""));n&&n.remove()})},n=function(e){var n,i=this;if(null!=e)t.call(i),i.each(function(t,n){var i;(i=c().get(n.id))&&i.setContent(e)});else if(i.length>0&&(n=c().get(i[0].id)))return n.getContent()},a=function(e){var t=null;return e&&e.id&&r.tinymce&&(t=c().get(e.id)),t},o=function(e){return!!(e&&e.length&&r.tinymce&&e.is(":tinymce"))},l={};i.each(["text","html","val"],function(t,r){var c=l[r]=i.fn[r],u="text"===r;i.fn[r]=function(t){var r=this;if(!o(r))return c.apply(r,arguments);if(t!==e)return n.call(r.filter(":tinymce"),t),c.apply(r.not(":tinymce"),arguments),r;var l="",s=arguments;return(u?r:r.eq(0)).each(function(e,t){var n=a(t);l+=n?u?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):c.apply(i(t),s)}),l}}),i.each(["append","prepend"],function(t,n){var r=l[n]=i.fn[n],c="prepend"===n;i.fn[n]=function(t){var n=this;return o(n)?t!==e?("string"==typeof t&&n.filter(":tinymce").each(function(e,n){var i=a(n);i&&i.setContent(c?t+i.getContent():i.getContent()+t)}),r.apply(n.not(":tinymce"),arguments),n):void 0:r.apply(n,arguments)}}),i.each(["remove","replaceWith","replaceAll","empty"],function(e,n){var r=l[n]=i.fn[n];i.fn[n]=function(){return t.call(this,n),r.apply(this,arguments)}}),l.attr=i.fn.attr,i.fn.attr=function(t,r){var c=this,u=arguments;if(!t||"value"!==t||!o(c))return l.attr.apply(c,u);if(r!==e)return n.call(c.filter(":tinymce"),r),l.attr.apply(c.not(":tinymce"),u),c;var s=c[0],f=a(s);return f?f.getContent({save:!0}):l.attr.apply(i(s),u)}}}(); \ No newline at end of file diff --git a/node_modules/tinymce/jquery.tinymce.min.js b/node_modules/tinymce/jquery.tinymce.min.js new file mode 100644 index 0000000..1f92f83 --- /dev/null +++ b/node_modules/tinymce/jquery.tinymce.min.js @@ -0,0 +1 @@ +!function(){var e,t,n,i,r,a=[];r="undefined"!=typeof global?global:window;var c=function(){return r.tinymce};(i=r.jQuery).fn.tinymce=function(e){var l,u,s,f=this,p="";if(!f.length)return f;if(!e)return c()?c().get(f[0].id):null;f.css("visibility","hidden");var d=function(){var t=[],r=0;n||(o(),n=!0),f.each(function(n,i){var a,o=i.id,l=e.oninit;o||(i.id=o=c().DOM.uniqueId()),c().get(o)||(a=c().createEditor(o,e),t.push(a),a.on("init",function(){var e,n=l;f.css("visibility",""),l&&++r==t.length&&("string"==typeof n&&(e=-1===n.indexOf(".")?null:c().resolve(n.replace(/\.\w+$/,"")),n=c().resolve(n)),n.apply(e||c(),t))}))}),i.each(t,function(e,t){t.render()})};if(r.tinymce||t||!(l=e.script_url))1===t?a.push(d):d();else{t=1,u=l.substring(0,l.lastIndexOf("/")),-1!=l.indexOf(".min")&&(p=".min"),r.tinymce=r.tinyMCEPreInit||{base:u,suffix:p},-1!=l.indexOf("gzip")&&(s=e.language||"en",l=l+(/\?/.test(l)?"&":"?")+"js=true&core=true&suffix="+escape(p)+"&themes="+escape(e.theme||"modern")+"&plugins="+escape(e.plugins||"")+"&languages="+(s||""),r.tinyMCE_GZ||(r.tinyMCE_GZ={start:function(){var t=function(e){c().ScriptLoader.markDone(c().baseURI.toAbsolute(e))};t("langs/"+s+".js"),t("themes/"+e.theme+"/theme"+p+".js"),t("themes/"+e.theme+"/langs/"+s+".js"),i.each(e.plugins.split(","),function(e,n){n&&(t("plugins/"+n+"/plugin"+p+".js"),t("plugins/"+n+"/langs/"+s+".js"))})},end:function(){}}));var v=document.createElement("script");v.type="text/javascript",v.onload=v.onreadystatechange=function(n){n=n||window.event,2===t||"load"!=n.type&&!/complete|loaded/.test(v.readyState)||(c().dom.Event.domLoaded=1,t=2,e.script_loaded&&e.script_loaded(),d(),i.each(a,function(e,t){t()}))},v.src=l,document.body.appendChild(v)}return f},i.extend(i.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in r&&(t=c().get(e.id))&&t.editorManager===c())}});var o=function(){var t=function(e){"remove"===e&&this.each(function(e,t){var n=a(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=c().get(t.id.replace(/_parent$/,""));n&&n.remove()})},n=function(e){var n,i=this;if(null!=e)t.call(i),i.each(function(t,n){var i;(i=c().get(n.id))&&i.setContent(e)});else if(i.length>0&&(n=c().get(i[0].id)))return n.getContent()},a=function(e){var t=null;return e&&e.id&&r.tinymce&&(t=c().get(e.id)),t},o=function(e){return!!(e&&e.length&&r.tinymce&&e.is(":tinymce"))},l={};i.each(["text","html","val"],function(t,r){var c=l[r]=i.fn[r],u="text"===r;i.fn[r]=function(t){var r=this;if(!o(r))return c.apply(r,arguments);if(t!==e)return n.call(r.filter(":tinymce"),t),c.apply(r.not(":tinymce"),arguments),r;var l="",s=arguments;return(u?r:r.eq(0)).each(function(e,t){var n=a(t);l+=n?u?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):c.apply(i(t),s)}),l}}),i.each(["append","prepend"],function(t,n){var r=l[n]=i.fn[n],c="prepend"===n;i.fn[n]=function(t){var n=this;return o(n)?t!==e?("string"==typeof t&&n.filter(":tinymce").each(function(e,n){var i=a(n);i&&i.setContent(c?t+i.getContent():i.getContent()+t)}),r.apply(n.not(":tinymce"),arguments),n):void 0:r.apply(n,arguments)}}),i.each(["remove","replaceWith","replaceAll","empty"],function(e,n){var r=l[n]=i.fn[n];i.fn[n]=function(){return t.call(this,n),r.apply(this,arguments)}}),l.attr=i.fn.attr,i.fn.attr=function(t,r){var c=this,u=arguments;if(!t||"value"!==t||!o(c))return l.attr.apply(c,u);if(r!==e)return n.call(c.filter(":tinymce"),r),l.attr.apply(c.not(":tinymce"),u),c;var s=c[0],f=a(s);return f?f.getContent({save:!0}):l.attr.apply(i(s),u)}}}(); \ No newline at end of file diff --git a/node_modules/tinymce/langs/it.js b/node_modules/tinymce/langs/it.js new file mode 100644 index 0000000..3bdf168 --- /dev/null +++ b/node_modules/tinymce/langs/it.js @@ -0,0 +1,260 @@ +tinymce.addI18n('it',{ +"Redo": "Ripeti", +"Undo": "Indietro", +"Cut": "Taglia", +"Copy": "Copia", +"Paste": "Incolla", +"Select all": "Seleziona Tutto", +"New document": "Nuovo Documento", +"Ok": "Ok", +"Cancel": "Annulla", +"Visual aids": "Elementi Visivi", +"Bold": "Grassetto", +"Italic": "Corsivo", +"Underline": "Sottolineato", +"Strikethrough": "Barrato", +"Superscript": "Apice", +"Subscript": "Pedice", +"Clear formatting": "Cancella Formattazione", +"Align left": "Allinea a Sinistra", +"Align center": "Allinea al Cento", +"Align right": "Allinea a Destra", +"Justify": "Giustifica", +"Bullet list": "Elenchi Puntati", +"Numbered list": "Elenchi Numerati", +"Decrease indent": "Riduci Rientro", +"Increase indent": "Aumenta Rientro", +"Close": "Chiudi", +"Formats": "Formattazioni", +"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appunti. Per favore usa i tasti di scelta rapida Ctrl+X\/C\/V.", +"Headers": "Intestazioni", +"Header 1": "Intestazione 1", +"Header 2": "Header 2", +"Header 3": "Intestazione 3", +"Header 4": "Intestazione 4", +"Header 5": "Intestazione 5", +"Header 6": "Intestazione 6", +"Headings": "Intestazioni", +"Heading 1": "Intestazione 1", +"Heading 2": "Intestazione 2", +"Heading 3": "Intestazione 3", +"Heading 4": "Intestazione 4", +"Heading 5": "Intestazione 5", +"Heading 6": "Intestazione 6", +"Div": "Div", +"Pre": "Pre", +"Code": "Codice", +"Paragraph": "Paragrafo", +"Blockquote": "Blockquote", +"Inline": "Inlinea", +"Blocks": "Blocchi", +"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Incolla \u00e8 in modalit\u00e0 testo normale. I contenuti sono incollati come testo normale se non disattivi l'opzione.", +"Font Family": "Famiglia font", +"Font Sizes": "Dimensioni font", +"Class": "Classe", +"Browse for an image": "Scegli un'immagine", +"OR": "o", +"Drop an image here": "Incolla un'immagine qui", +"Upload": "Carica", +"Block": "Blocco", +"Align": "Allinea", +"Default": "Default", +"Circle": "Cerchio", +"Disc": "Disco", +"Square": "Quadrato", +"Lower Alpha": "Alpha Minore", +"Lower Greek": "Greek Minore", +"Lower Roman": "Roman Minore", +"Upper Alpha": "Alpha Superiore", +"Upper Roman": "Roman Superiore", +"Anchor": "Fissa", +"Name": "Nome", +"Id": "Id", +"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "L'id dovrebbe cominciare con una lettera, seguito solo da lettere, numeri, linee, punti, virgole.", +"You have unsaved changes are you sure you want to navigate away?": "Non hai salvato delle modifiche, sei sicuro di andartene?", +"Restore last draft": "Ripristina l'ultima bozza.", +"Special character": "Carattere Speciale", +"Source code": "Codice Sorgente", +"Insert\/Edit code sample": "Inserisci\/Modifica esempio di codice", +"Language": "Lingua", +"Code sample": "Esempio di codice", +"Color": "Colore", +"R": "R", +"G": "G", +"B": "B", +"Left to right": "Da Sinistra a Destra", +"Right to left": "Da Destra a Sinistra", +"Emoticons": "Emoction", +"Document properties": "Propriet\u00e0 Documento", +"Title": "Titolo", +"Keywords": "Parola Chiave", +"Description": "Descrizione", +"Robots": "Robot", +"Author": "Autore", +"Encoding": "Codifica", +"Fullscreen": "Schermo Intero", +"Action": "Action", +"Shortcut": "Shortcut", +"Help": "Help", +"Address": "Address", +"Focus to menubar": "Focus to menubar", +"Focus to toolbar": "Focus to toolbar", +"Focus to element path": "Focus to element path", +"Focus to contextual toolbar": "Focus to contextual toolbar", +"Insert link (if link plugin activated)": "Insert link (if link plugin activated)", +"Save (if save plugin activated)": "Save (if save plugin activated)", +"Find (if searchreplace plugin activated)": "Find (if searchreplace plugin activated)", +"Plugins installed ({0}):": "Plugins installed ({0}):", +"Premium plugins:": "Premium plugins:", +"Learn more...": "Learn more...", +"You are using {0}": "You are using {0}", +"Plugins": "Plugins", +"Handy Shortcuts": "Handy Shortcuts", +"Horizontal line": "Linea Orizzontale", +"Insert\/edit image": "Aggiungi\/Modifica Immagine", +"Image description": "Descrizione Immagine", +"Source": "Fonte", +"Dimensions": "Dimenzioni", +"Constrain proportions": "Mantieni Proporzioni", +"General": "Generale", +"Advanced": "Avanzato", +"Style": "Stile", +"Vertical space": "Spazio Verticale", +"Horizontal space": "Spazio Orizzontale", +"Border": "Bordo", +"Insert image": "Inserisci immagine", +"Image": "Immagine", +"Image list": "Image list", +"Rotate counterclockwise": "Ruota in senso antiorario", +"Rotate clockwise": "Ruota in senso orario", +"Flip vertically": "Rifletti verticalmente", +"Flip horizontally": "Rifletti orizzontalmente", +"Edit image": "Modifica immagine", +"Image options": "Opzioni immagine", +"Zoom in": "Ingrandisci", +"Zoom out": "Rimpicciolisci", +"Crop": "Taglia", +"Resize": "Ridimensiona", +"Orientation": "Orientamento", +"Brightness": "Luminosit\u00e0", +"Sharpen": "Contrasta", +"Contrast": "Contrasto", +"Color levels": "Livelli colore", +"Gamma": "Gamma", +"Invert": "Inverti", +"Apply": "Applica", +"Back": "Indietro", +"Insert date\/time": "Inserisci Data\/Ora", +"Date\/time": "Data\/Ora", +"Insert link": "Inserisci il Link", +"Insert\/edit link": "Inserisci\/Modifica Link", +"Text to display": "Testo da Visualizzare", +"Url": "Url", +"Target": "Target", +"None": "No", +"New window": "Nuova Finestra", +"Remove link": "Rimuovi link", +"Anchors": "Anchors", +"Link": "Collegamento", +"Paste or type a link": "Incolla o digita un collegamento", +"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL inserito sembra essere un indirizzo email. Vuoi aggiungere il prefisso necessario mailto:?", +"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario http:\/\/?", +"Link list": "Elenco link", +"Insert video": "Inserisci Video", +"Insert\/edit video": "Inserisci\/Modifica Video", +"Insert\/edit media": "Inserisci\/Modifica Media", +"Alternative source": "Alternativo", +"Poster": "Anteprima", +"Paste your embed code below:": "Incolla il codice d'incorporamento qui:", +"Embed": "Incorporare", +"Media": "Media", +"Nonbreaking space": "Spazio unificatore", +"Page break": "Interruzione di pagina", +"Paste as text": "incolla come testo", +"Preview": "Anteprima", +"Print": "Stampa", +"Save": "Salva", +"Find": "Trova", +"Replace with": "Sostituisci Con", +"Replace": "Sostituisci", +"Replace all": "Sostituisci Tutto", +"Prev": "Precedente", +"Next": "Successivo", +"Find and replace": "Trova e Sostituisci", +"Could not find the specified string.": "Impossibile trovare la parola specifica.", +"Match case": "Maiuscole\/Minuscole ", +"Whole words": "Parole Sbagliate", +"Spellcheck": "Controllo ortografico", +"Ignore": "Ignora", +"Ignore all": "Ignora Tutto", +"Finish": "Termina", +"Add to Dictionary": "Aggiungi al Dizionario", +"Insert table": "Inserisci Tabella", +"Table properties": "Propiet\u00e0 della Tabella", +"Delete table": "Cancella Tabella", +"Cell": "Cella", +"Row": "Riga", +"Column": "Colonna", +"Cell properties": "Propiet\u00e0 della Cella", +"Merge cells": "Unisci Cella", +"Split cell": "Dividi Cella", +"Insert row before": "Inserisci una Riga Prima", +"Insert row after": "Inserisci una Riga Dopo", +"Delete row": "Cancella Riga", +"Row properties": "Propriet\u00e0 della Riga", +"Cut row": "Taglia Riga", +"Copy row": "Copia Riga", +"Paste row before": "Incolla una Riga Prima", +"Paste row after": "Incolla una Riga Dopo", +"Insert column before": "Inserisci una Colonna Prima", +"Insert column after": "Inserisci una Colonna Dopo", +"Delete column": "Cancella Colonna", +"Cols": "Colonne", +"Rows": "Righe", +"Width": "Larghezza", +"Height": "Altezza", +"Cell spacing": "Spaziatura della Cella", +"Cell padding": "Padding della Cella", +"Caption": "Didascalia", +"Left": "Sinistra", +"Center": "Centro", +"Right": "Destra", +"Cell type": "Tipo di Cella", +"Scope": "Campo", +"Alignment": "Allineamento", +"H Align": "Allineamento H", +"V Align": "Allineamento V", +"Top": "In alto", +"Middle": "In mezzo", +"Bottom": "In fondo", +"Header cell": "cella d'intestazione", +"Row group": "Gruppo di Righe", +"Column group": "Gruppo di Colonne", +"Row type": "Tipo di Riga", +"Header": "Header", +"Body": "Body", +"Footer": "Footer", +"Border color": "Colore bordo", +"Insert template": "Inserisci Template", +"Templates": "Template", +"Template": "Modello", +"Text color": "Colore Testo", +"Background color": "Colore Background", +"Custom...": "Personalizzato...", +"Custom color": "Colore personalizzato", +"No color": "Nessun colore", +"Table of Contents": "Tabella dei contenuti", +"Show blocks": "Mostra Blocchi", +"Show invisible characters": "Mostra Caratteri Invisibili", +"Words: {0}": "Parole: {0}", +"{0} words": "{0} parole", +"File": "File", +"Edit": "Modifica", +"Insert": "Inserisci", +"View": "Visualiza", +"Format": "Formato", +"Table": "Tabella", +"Tools": "Strumenti", +"Powered by {0}": "Powered by {0}", +"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Premi ALT-F9 per il men\u00f9. Premi ALT-F10 per la barra degli strumenti. Premi ALT-0 per l'aiuto." +}); \ No newline at end of file diff --git a/node_modules/tinymce/license.txt b/node_modules/tinymce/license.txt new file mode 100644 index 0000000..b17fc90 --- /dev/null +++ b/node_modules/tinymce/license.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/node_modules/tinymce/package.json b/node_modules/tinymce/package.json new file mode 100644 index 0000000..1f7ee32 --- /dev/null +++ b/node_modules/tinymce/package.json @@ -0,0 +1,47 @@ +{ + "_from": "tinymce", + "_id": "tinymce@4.7.6", + "_inBundle": false, + "_integrity": "sha512-mdbeMvCOO0ws0HXiZO9L8mDGFA9/VmDHltlt+/9qV0Fl1EWKWoPIRURHFtiFYuLKo9yjYUvYucwiZ1XfCT/91Q==", + "_location": "/tinymce", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "tinymce", + "name": "tinymce", + "escapedName": "tinymce", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/tinymce/-/tinymce-4.7.6.tgz", + "_shasum": "6c70931d3308a8ff4ba20e5ee82379b46714eb5c", + "_spec": "tinymce", + "_where": "/var/www/htdocs/ordine", + "author": { + "name": "Ephox Corporation" + }, + "bugs": { + "url": "https://github.com/tinymce/tinymce/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "keywords": [ + "editor", + "wysiwyg", + "tinymce", + "richtext", + "javascript", + "html" + ], + "license": "LGPL-2.1", + "main": "tinymce.js", + "name": "tinymce", + "version": "4.7.6" +} diff --git a/node_modules/tinymce/plugins/advlist/index.js b/node_modules/tinymce/plugins/advlist/index.js new file mode 100644 index 0000000..7428d10 --- /dev/null +++ b/node_modules/tinymce/plugins/advlist/index.js @@ -0,0 +1,7 @@ +// Exports the "advlist" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/advlist') +// ES2015: +// import 'tinymce/plugins/advlist' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/advlist/plugin.js b/node_modules/tinymce/plugins/advlist/plugin.js new file mode 100644 index 0000000..85b555f --- /dev/null +++ b/node_modules/tinymce/plugins/advlist/plugin.js @@ -0,0 +1,160 @@ +(function () { +var advlist = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var applyListFormat = function (editor, listName, styleValue) { + var cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList'; + editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue }); + }; + var $_2ukoh57fjd09evh2 = { applyListFormat: applyListFormat }; + + var register = function (editor) { + editor.addCommand('ApplyUnorderedListStyle', function (ui, value) { + $_2ukoh57fjd09evh2.applyListFormat(editor, 'UL', value['list-style-type']); + }); + editor.addCommand('ApplyOrderedListStyle', function (ui, value) { + $_2ukoh57fjd09evh2.applyListFormat(editor, 'OL', value['list-style-type']); + }); + }; + var $_8u1klp7ejd09evh1 = { register: register }; + + var getNumberStyles = function (editor) { + var styles = editor.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'); + return styles ? styles.split(/[ ,]/) : []; + }; + var getBulletStyles = function (editor) { + var styles = editor.getParam('advlist_bullet_styles', 'default,circle,disc,square'); + return styles ? styles.split(/[ ,]/) : []; + }; + var $_b1sklw7hjd09evh7 = { + getNumberStyles: getNumberStyles, + getBulletStyles: getBulletStyles + }; + + var isChildOfBody = function (editor, elm) { + return editor.$.contains(editor.getBody(), elm); + }; + var isTableCellNode = function (node) { + return node && /^(TH|TD)$/.test(node.nodeName); + }; + var isListNode = function (editor) { + return function (node) { + return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node); + }; + }; + var getSelectedStyleType = function (editor) { + var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul'); + return editor.dom.getStyle(listElm, 'listStyleType') || ''; + }; + var $_2pd0fc7ijd09evh8 = { + isTableCellNode: isTableCellNode, + isListNode: isListNode, + getSelectedStyleType: getSelectedStyleType + }; + + var styleValueToText = function (styleValue) { + return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function (chr) { + return chr.toUpperCase(); + }); + }; + var toMenuItems = function (styles) { + return Tools.map(styles, function (styleValue) { + var text = styleValueToText(styleValue); + var data = styleValue === 'default' ? '' : styleValue; + return { + text: text, + data: data + }; + }); + }; + var $_9kcql57jjd09evh9 = { toMenuItems: toMenuItems }; + + var findIndex = function (list, predicate) { + for (var index = 0; index < list.length; index++) { + var element = list[index]; + if (predicate(element)) { + return index; + } + } + return -1; + }; + var listState = function (editor, listName) { + return function (e) { + var ctrl = e.control; + editor.on('NodeChange', function (e) { + var tableCellIndex = findIndex(e.parents, $_2pd0fc7ijd09evh8.isTableCellNode); + var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents; + var lists = Tools.grep(parents, $_2pd0fc7ijd09evh8.isListNode(editor)); + ctrl.active(lists.length > 0 && lists[0].nodeName === listName); + }); + }; + }; + var updateSelection = function (editor) { + return function (e) { + var listStyleType = $_2pd0fc7ijd09evh8.getSelectedStyleType(editor); + e.control.items().each(function (ctrl) { + ctrl.active(ctrl.settings.data === listStyleType); + }); + }; + }; + var addSplitButton = function (editor, id, tooltip, cmd, nodeName, styles) { + editor.addButton(id, { + active: false, + type: 'splitbutton', + tooltip: tooltip, + menu: $_9kcql57jjd09evh9.toMenuItems(styles), + onPostRender: listState(editor, nodeName), + onshow: updateSelection(editor), + onselect: function (e) { + $_2ukoh57fjd09evh2.applyListFormat(editor, nodeName, e.control.settings.data); + }, + onclick: function () { + editor.execCommand(cmd); + } + }); + }; + var addButton = function (editor, id, tooltip, cmd, nodeName, styles) { + editor.addButton(id, { + active: false, + type: 'button', + tooltip: tooltip, + onPostRender: listState(editor, nodeName), + onclick: function () { + editor.execCommand(cmd); + } + }); + }; + var addControl = function (editor, id, tooltip, cmd, nodeName, styles) { + if (styles.length > 0) { + addSplitButton(editor, id, tooltip, cmd, nodeName, styles); + } else { + addButton(editor, id, tooltip, cmd, nodeName, styles); + } + }; + var register$1 = function (editor) { + addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', $_b1sklw7hjd09evh7.getNumberStyles(editor)); + addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', $_b1sklw7hjd09evh7.getBulletStyles(editor)); + }; + var $_5ivpfe7gjd09evh4 = { register: register$1 }; + + PluginManager.add('advlist', function (editor) { + var hasPlugin = function (editor, plugin) { + var plugins = editor.settings.plugins ? editor.settings.plugins : ''; + return Tools.inArray(plugins.split(/[ ,]/), plugin) !== -1; + }; + if (hasPlugin(editor, 'lists')) { + $_5ivpfe7gjd09evh4.register(editor); + $_8u1klp7ejd09evh1.register(editor); + } + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/advlist/plugin.min.js b/node_modules/tinymce/plugins/advlist/plugin.min.js new file mode 100644 index 0000000..c6e0a89 --- /dev/null +++ b/node_modules/tinymce/plugins/advlist/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(t,e,n){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===n?null:{"list-style-type":n})},r=function(t){t.addCommand("ApplyUnorderedListStyle",function(e,r){n(t,"UL",r["list-style-type"])}),t.addCommand("ApplyOrderedListStyle",function(e,r){n(t,"OL",r["list-style-type"])})},o=function(t){var e=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return e?e.split(/[ ,]/):[]},i=function(t){var e=t.getParam("advlist_bullet_styles","default,circle,disc,square");return e?e.split(/[ ,]/):[]},l=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},a=function(t){return function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)&&(r=e,(n=t).$.contains(n.getBody(),r));var n,r}},s=function(t){var e=t.dom.getParent(t.selection.getNode(),"ol,ul");return t.dom.getStyle(e,"listStyleType")||""},u=function(t){return e.map(t,function(t){return{text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"===t?"":t}})},c=function(t,n){return function(r){var o=r.control;t.on("NodeChange",function(r){var i=function(t,e){for(var n=0;n0&&u[0].nodeName===n)})}},d=function(t,e,r,o,i,l){var a;t.addButton(e,{active:!1,type:"splitbutton",tooltip:r,menu:u(l),onPostRender:c(t,i),onshow:(a=t,function(t){var e=s(a);t.control.items().each(function(t){t.active(t.settings.data===e)})}),onselect:function(e){n(t,i,e.control.settings.data)},onclick:function(){t.execCommand(o)}})},p=function(t,e,n,r,o,i){var l,a,s,u,p;i.length>0?d(t,e,n,r,o,i):(a=e,s=n,u=r,p=o,(l=t).addButton(a,{active:!1,type:"button",tooltip:s,onPostRender:c(l,p),onclick:function(){l.execCommand(u)}}))},f=function(t){p(t,"numlist","Numbered list","InsertOrderedList","OL",o(t)),p(t,"bullist","Bullet list","InsertUnorderedList","UL",i(t))};t.add("advlist",function(t){var n,o,i;o="lists",i=(n=t).settings.plugins?n.settings.plugins:"",-1!==e.inArray(i.split(/[ ,]/),o)&&(f(t),r(t))})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/anchor/index.js b/node_modules/tinymce/plugins/anchor/index.js new file mode 100644 index 0000000..ceddfe3 --- /dev/null +++ b/node_modules/tinymce/plugins/anchor/index.js @@ -0,0 +1,7 @@ +// Exports the "anchor" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/anchor') +// ES2015: +// import 'tinymce/plugins/anchor' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/anchor/plugin.js b/node_modules/tinymce/plugins/anchor/plugin.js new file mode 100644 index 0000000..3fc7118 --- /dev/null +++ b/node_modules/tinymce/plugins/anchor/plugin.js @@ -0,0 +1,117 @@ +(function () { +var anchor = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var isValidId = function (id) { + return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id); + }; + var getId = function (editor) { + var selectedNode = editor.selection.getNode(); + var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === ''; + return isAnchor ? selectedNode.id || selectedNode.name : ''; + }; + var insert = function (editor, id) { + var selectedNode = editor.selection.getNode(); + var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === ''; + if (isAnchor) { + selectedNode.removeAttribute('name'); + selectedNode.id = id; + } else { + editor.focus(); + editor.selection.collapse(true); + editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { id: id })); + } + }; + var $_c1hrip7ojd09evi3 = { + isValidId: isValidId, + getId: getId, + insert: insert + }; + + var insertAnchor = function (editor, newId) { + if (!$_c1hrip7ojd09evi3.isValidId(newId)) { + editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.'); + return true; + } else { + $_c1hrip7ojd09evi3.insert(editor, newId); + return false; + } + }; + var open = function (editor) { + var currentId = $_c1hrip7ojd09evi3.getId(editor); + editor.windowManager.open({ + title: 'Anchor', + body: { + type: 'textbox', + name: 'id', + size: 40, + label: 'Id', + value: currentId + }, + onsubmit: function (e) { + var newId = e.data.id; + if (insertAnchor(editor, newId)) { + e.preventDefault(); + } + } + }); + }; + var $_drw1km7njd09evi2 = { open: open }; + + var register = function (editor) { + editor.addCommand('mceAnchor', function () { + $_drw1km7njd09evi2.open(editor); + }); + }; + var $_5zyao7mjd09evi1 = { register: register }; + + var isAnchorNode = function (node) { + return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild; + }; + var setContentEditable = function (state) { + return function (nodes) { + for (var i = 0; i < nodes.length; i++) { + if (isAnchorNode(nodes[i])) { + nodes[i].attr('contenteditable', state); + } + } + }; + }; + var setup = function (editor) { + editor.on('PreInit', function () { + editor.parser.addNodeFilter('a', setContentEditable('false')); + editor.serializer.addNodeFilter('a', setContentEditable(null)); + }); + }; + var $_mx9k67pjd09evi5 = { setup: setup }; + + var register$1 = function (editor) { + editor.addButton('anchor', { + icon: 'anchor', + tooltip: 'Anchor', + cmd: 'mceAnchor', + stateSelector: 'a:not([href])' + }); + editor.addMenuItem('anchor', { + icon: 'anchor', + text: 'Anchor', + context: 'insert', + cmd: 'mceAnchor' + }); + }; + var $_581fcg7qjd09evi7 = { register: register$1 }; + + PluginManager.add('anchor', function (editor) { + $_mx9k67pjd09evi5.setup(editor); + $_5zyao7mjd09evi1.register(editor); + $_581fcg7qjd09evi7.register(editor); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/anchor/plugin.min.js b/node_modules/tinymce/plugins/anchor/plugin.min.js new file mode 100644 index 0000000..ec0cf75 --- /dev/null +++ b/node_modules/tinymce/plugins/anchor/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},e=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.id||e.name:""},n=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},o=function(o){var r=e(o);o.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:r},onsubmit:function(e){var r,a,i=e.data.id;r=o,(t(a=i)?(n(r,a),0):(r.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&e.preventDefault()}})},r=function(t){t.addCommand("mceAnchor",function(){o(t)})},a=function(t){return function(e){for(var n=0;n len) { + index = len; + } + } + return index; + }; + var setStart = function (rng, container, offset) { + if (container.nodeType !== 1 || container.hasChildNodes()) { + rng.setStart(container, scopeIndex(container, offset)); + } else { + rng.setStartBefore(container); + } + }; + var setEnd = function (rng, container, offset) { + if (container.nodeType !== 1 || container.hasChildNodes()) { + rng.setEnd(container, scopeIndex(container, offset)); + } else { + rng.setEndAfter(container); + } + }; + var parseCurrentLine = function (editor, endOffset, delimiter) { + var rng, end, start, endContainer, bookmark, text, matches, prev, len, rngText; + var autoLinkPattern = $_1u3gta7vjd09evip.getAutoLinkPattern(editor); + var defaultLinkTarget = $_1u3gta7vjd09evip.getDefaultLinkTarget(editor); + if (editor.selection.getNode().tagName === 'A') { + return; + } + rng = editor.selection.getRng(true).cloneRange(); + if (rng.startOffset < 5) { + prev = rng.endContainer.previousSibling; + if (!prev) { + if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) { + return; + } + prev = rng.endContainer.firstChild.nextSibling; + } + len = prev.length; + setStart(rng, prev, len); + setEnd(rng, prev, len); + if (rng.endOffset < 5) { + return; + } + end = rng.endOffset; + endContainer = prev; + } else { + endContainer = rng.endContainer; + if (endContainer.nodeType !== 3 && endContainer.firstChild) { + while (endContainer.nodeType !== 3 && endContainer.firstChild) { + endContainer = endContainer.firstChild; + } + if (endContainer.nodeType === 3) { + setStart(rng, endContainer, 0); + setEnd(rng, endContainer, endContainer.nodeValue.length); + } + } + if (rng.endOffset === 1) { + end = 2; + } else { + end = rng.endOffset - 1 - endOffset; + } + } + start = end; + do { + setStart(rng, endContainer, end >= 2 ? end - 2 : 0); + setEnd(rng, endContainer, end >= 1 ? end - 1 : 0); + end -= 1; + rngText = rng.toString(); + } while (rngText !== ' ' && rngText !== '' && rngText.charCodeAt(0) !== 160 && end - 2 >= 0 && rngText !== delimiter); + if (rangeEqualsDelimiterOrSpace(rng.toString(), delimiter)) { + setStart(rng, endContainer, end); + setEnd(rng, endContainer, start); + end += 1; + } else if (rng.startOffset === 0) { + setStart(rng, endContainer, 0); + setEnd(rng, endContainer, start); + } else { + setStart(rng, endContainer, end); + setEnd(rng, endContainer, start); + } + text = rng.toString(); + if (text.charAt(text.length - 1) === '.') { + setEnd(rng, endContainer, start - 1); + } + text = rng.toString().trim(); + matches = text.match(autoLinkPattern); + if (matches) { + if (matches[1] === 'www.') { + matches[1] = 'http://www.'; + } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) { + matches[1] = 'mailto:' + matches[1]; + } + bookmark = editor.selection.getBookmark(); + editor.selection.setRng(rng); + editor.execCommand('createlink', false, matches[1] + matches[2]); + if (defaultLinkTarget) { + editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget); + } + editor.selection.moveToBookmark(bookmark); + editor.nodeChanged(); + } + }; + var setup = function (editor) { + var autoUrlDetectState; + editor.on('keydown', function (e) { + if (e.keyCode === 13) { + return handleEnter(editor); + } + }); + if (Env.ie) { + editor.on('focus', function () { + if (!autoUrlDetectState) { + autoUrlDetectState = true; + try { + editor.execCommand('AutoUrlDetect', false, true); + } catch (ex) { + } + } + }); + return; + } + editor.on('keypress', function (e) { + if (e.keyCode === 41) { + return handleEclipse(editor); + } + }); + editor.on('keyup', function (e) { + if (e.keyCode === 32) { + return handleSpacebar(editor); + } + }); + }; + var $_df67k7tjd09evik = { setup: setup }; + + PluginManager.add('autolink', function (editor) { + $_df67k7tjd09evik.setup(editor); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/autolink/plugin.min.js b/node_modules/tinymce/plugins/autolink/plugin.min.js new file mode 100644 index 0000000..b6c4e75 --- /dev/null +++ b/node_modules/tinymce/plugins/autolink/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},i=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;t>n&&(t=n)}return t},r=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},a=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},d=function(e,t,o){var d,f,s,l,c,u,g,h,C,m,y=n(e),k=i(e);if("A"!==e.selection.getNode().tagName){if((d=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(h=d.endContainer.previousSibling)){if(!d.endContainer.firstChild||!d.endContainer.firstChild.nextSibling)return;h=d.endContainer.firstChild.nextSibling}if(C=h.length,r(d,h,C),a(d,h,C),d.endOffset<5)return;f=d.endOffset,l=h}else{if(3!==(l=d.endContainer).nodeType&&l.firstChild){for(;3!==l.nodeType&&l.firstChild;)l=l.firstChild;3===l.nodeType&&(r(d,l,0),a(d,l,l.nodeValue.length))}f=1===d.endOffset?2:d.endOffset-1-t}s=f;do{r(d,l,f>=2?f-2:0),a(d,l,f>=1?f-1:0),f-=1,m=d.toString()}while(" "!==m&&""!==m&&160!==m.charCodeAt(0)&&f-2>=0&&m!==o);var p;(p=d.toString())===o||" "===p||160===p.charCodeAt(0)?(r(d,l,f),a(d,l,s),f+=1):0===d.startOffset?(r(d,l,0),a(d,l,s)):(r(d,l,f),a(d,l,s)),"."===(u=d.toString()).charAt(u.length-1)&&a(d,l,s-1),(g=(u=d.toString().trim()).match(y))&&("www."===g[1]?g[1]="http://www.":/@$/.test(g[1])&&!/^mailto:/.test(g[1])&&(g[1]="mailto:"+g[1]),c=e.selection.getBookmark(),e.selection.setRng(d),e.execCommand("createlink",!1,g[1]+g[2]),k&&e.dom.setAttrib(e.selection.getNode(),"target",k),e.selection.moveToBookmark(c),e.nodeChanged())}},f=function(e){var n;e.on("keydown",function(t){13!==t.keyCode||d(e,-1,"")}),t.ie?e.on("focus",function(){if(!n){n=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(t){}}}):(e.on("keypress",function(t){41!==t.keyCode||d(e,-1,"(")}),e.on("keyup",function(t){32!==t.keyCode||d(e,0,"")}))};e.add("autolink",function(e){f(e)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/autoresize/index.js b/node_modules/tinymce/plugins/autoresize/index.js new file mode 100644 index 0000000..a4a7a42 --- /dev/null +++ b/node_modules/tinymce/plugins/autoresize/index.js @@ -0,0 +1,7 @@ +// Exports the "autoresize" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/autoresize') +// ES2015: +// import 'tinymce/plugins/autoresize' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/autoresize/plugin.js b/node_modules/tinymce/plugins/autoresize/plugin.js new file mode 100644 index 0000000..f9e585f --- /dev/null +++ b/node_modules/tinymce/plugins/autoresize/plugin.js @@ -0,0 +1,169 @@ +(function () { +var autoresize = (function () { + 'use strict'; + + var Cell = function (initial) { + var value = initial; + var get = function () { + return value; + }; + var set = function (v) { + value = v; + }; + var clone = function () { + return Cell(get()); + }; + return { + get: get, + set: set, + clone: clone + }; + }; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var Env = tinymce.util.Tools.resolve('tinymce.Env'); + + var Delay = tinymce.util.Tools.resolve('tinymce.util.Delay'); + + var getAutoResizeMinHeight = function (editor) { + return parseInt(editor.getParam('autoresize_min_height', editor.getElement().offsetHeight), 10); + }; + var getAutoResizeMaxHeight = function (editor) { + return parseInt(editor.getParam('autoresize_max_height', 0), 10); + }; + var getAutoResizeOverflowPadding = function (editor) { + return editor.getParam('autoresize_overflow_padding', 1); + }; + var getAutoResizeBottomMargin = function (editor) { + return editor.getParam('autoresize_bottom_margin', 50); + }; + var shouldAutoResizeOnInit = function (editor) { + return editor.getParam('autoresize_on_init', true); + }; + var $_1ycf0883jd09evjc = { + getAutoResizeMinHeight: getAutoResizeMinHeight, + getAutoResizeMaxHeight: getAutoResizeMaxHeight, + getAutoResizeOverflowPadding: getAutoResizeOverflowPadding, + getAutoResizeBottomMargin: getAutoResizeBottomMargin, + shouldAutoResizeOnInit: shouldAutoResizeOnInit + }; + + var isFullscreen = function (editor) { + return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen(); + }; + var wait = function (editor, oldSize, times, interval, callback) { + Delay.setEditorTimeout(editor, function () { + resize(editor, oldSize); + if (times--) { + wait(editor, oldSize, times, interval, callback); + } else if (callback) { + callback(); + } + }, interval); + }; + var toggleScrolling = function (editor, state) { + var body = editor.getBody(); + if (body) { + body.style.overflowY = state ? '' : 'hidden'; + if (!state) { + body.scrollTop = 0; + } + } + }; + var resize = function (editor, oldSize) { + var deltaSize, doc, body, resizeHeight, myHeight; + var marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom; + var dom = editor.dom; + doc = editor.getDoc(); + if (!doc) { + return; + } + if (isFullscreen(editor)) { + toggleScrolling(editor, true); + return; + } + body = doc.body; + resizeHeight = $_1ycf0883jd09evjc.getAutoResizeMinHeight(editor); + marginTop = dom.getStyle(body, 'margin-top', true); + marginBottom = dom.getStyle(body, 'margin-bottom', true); + paddingTop = dom.getStyle(body, 'padding-top', true); + paddingBottom = dom.getStyle(body, 'padding-bottom', true); + borderTop = dom.getStyle(body, 'border-top-width', true); + borderBottom = dom.getStyle(body, 'border-bottom-width', true); + myHeight = body.offsetHeight + parseInt(marginTop, 10) + parseInt(marginBottom, 10) + parseInt(paddingTop, 10) + parseInt(paddingBottom, 10) + parseInt(borderTop, 10) + parseInt(borderBottom, 10); + if (isNaN(myHeight) || myHeight <= 0) { + myHeight = Env.ie ? body.scrollHeight : Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight; + } + if (myHeight > $_1ycf0883jd09evjc.getAutoResizeMinHeight(editor)) { + resizeHeight = myHeight; + } + var maxHeight = $_1ycf0883jd09evjc.getAutoResizeMaxHeight(editor); + if (maxHeight && myHeight > maxHeight) { + resizeHeight = maxHeight; + toggleScrolling(editor, true); + } else { + toggleScrolling(editor, false); + } + if (resizeHeight !== oldSize.get()) { + deltaSize = resizeHeight - oldSize.get(); + dom.setStyle(editor.iframeElement, 'height', resizeHeight + 'px'); + oldSize.set(resizeHeight); + if (Env.webkit && deltaSize < 0) { + resize(editor, oldSize); + } + } + }; + var setup = function (editor, oldSize) { + editor.on('init', function () { + var overflowPadding, bottomMargin; + var dom = editor.dom; + overflowPadding = $_1ycf0883jd09evjc.getAutoResizeOverflowPadding(editor); + bottomMargin = $_1ycf0883jd09evjc.getAutoResizeBottomMargin(editor); + if (overflowPadding !== false) { + dom.setStyles(editor.getBody(), { + paddingLeft: overflowPadding, + paddingRight: overflowPadding + }); + } + if (bottomMargin !== false) { + dom.setStyles(editor.getBody(), { paddingBottom: bottomMargin }); + } + }); + editor.on('nodechange setcontent keyup FullscreenStateChanged', function (e) { + resize(editor, oldSize); + }); + if ($_1ycf0883jd09evjc.shouldAutoResizeOnInit(editor)) { + editor.on('init', function () { + wait(editor, oldSize, 20, 100, function () { + wait(editor, oldSize, 5, 1000); + }); + }); + } + }; + var $_5npi1y80jd09evj8 = { + setup: setup, + resize: resize + }; + + var register = function (editor, oldSize) { + editor.addCommand('mceAutoResize', function () { + $_5npi1y80jd09evj8.resize(editor, oldSize); + }); + }; + var $_6ijtil7zjd09evj7 = { register: register }; + + PluginManager.add('autoresize', function (editor) { + if (!editor.inline) { + var oldSize = Cell(0); + $_6ijtil7zjd09evj7.register(editor, oldSize); + $_5npi1y80jd09evj8.setup(editor, oldSize); + } + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/autoresize/plugin.min.js b/node_modules/tinymce/plugins/autoresize/plugin.min.js new file mode 100644 index 0000000..9f2b8fc --- /dev/null +++ b/node_modules/tinymce/plugins/autoresize/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t=function(e){var n=e,i=function(){return n};return{get:i,set:function(t){n=t},clone:function(){return t(i())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),i=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=function(t){return parseInt(t.getParam("autoresize_min_height",t.getElement().offsetHeight),10)},r=function(t){return parseInt(t.getParam("autoresize_max_height",0),10)},a=function(t){return t.getParam("autoresize_overflow_padding",1)},u=function(t){return t.getParam("autoresize_bottom_margin",50)},s=function(t){return t.getParam("autoresize_on_init",!0)},l=function(t,e,n,o,r){i.setEditorTimeout(t,function(){c(t,e),n--?l(t,e,n,o,r):r&&r()},o)},g=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},c=function(t,e){var i,a,u,s,l,f,d,m,p,y,h,v=t.dom;if(a=t.getDoc())if((S=t).plugins.fullscreen&&S.plugins.fullscreen.isFullscreen())g(t,!0);else{var S;u=a.body,s=o(t),f=v.getStyle(u,"margin-top",!0),d=v.getStyle(u,"margin-bottom",!0),m=v.getStyle(u,"padding-top",!0),p=v.getStyle(u,"padding-bottom",!0),y=v.getStyle(u,"border-top-width",!0),h=v.getStyle(u,"border-bottom-width",!0),l=u.offsetHeight+parseInt(f,10)+parseInt(d,10)+parseInt(m,10)+parseInt(p,10)+parseInt(y,10)+parseInt(h,10),(isNaN(l)||l<=0)&&(l=n.ie?u.scrollHeight:n.webkit&&0===u.clientHeight?0:u.offsetHeight),l>o(t)&&(s=l);var _=r(t);_&&l>_?(s=_,g(t,!0)):g(t,!1),s!==e.get()&&(i=s-e.get(),v.setStyle(t.iframeElement,"height",s+"px"),e.set(s),n.webkit&&i<0&&c(t,e))}},f={setup:function(t,e){t.on("init",function(){var e,n,i=t.dom;e=a(t),n=u(t),!1!==e&&i.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e}),!1!==n&&i.setStyles(t.getBody(),{paddingBottom:n})}),t.on("nodechange setcontent keyup FullscreenStateChanged",function(n){c(t,e)}),s(t)&&t.on("init",function(){l(t,e,20,100,function(){l(t,e,5,1e3)})})},resize:c},d=function(t,e){t.addCommand("mceAutoResize",function(){f.resize(t,e)})};e.add("autoresize",function(e){if(!e.inline){var n=t(0);d(e,n),f.setup(e,n)}})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/autosave/index.js b/node_modules/tinymce/plugins/autosave/index.js new file mode 100644 index 0000000..261d5c9 --- /dev/null +++ b/node_modules/tinymce/plugins/autosave/index.js @@ -0,0 +1,7 @@ +// Exports the "autosave" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/autosave') +// ES2015: +// import 'tinymce/plugins/autosave' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/autosave/plugin.js b/node_modules/tinymce/plugins/autosave/plugin.js new file mode 100644 index 0000000..9dc9dee --- /dev/null +++ b/node_modules/tinymce/plugins/autosave/plugin.js @@ -0,0 +1,226 @@ +(function () { +var autosave = (function () { + 'use strict'; + + var Cell = function (initial) { + var value = initial; + var get = function () { + return value; + }; + var set = function (v) { + value = v; + }; + var clone = function () { + return Cell(get()); + }; + return { + get: get, + set: set, + clone: clone + }; + }; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var LocalStorage = tinymce.util.Tools.resolve('tinymce.util.LocalStorage'); + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var fireRestoreDraft = function (editor) { + return editor.fire('RestoreDraft'); + }; + var fireStoreDraft = function (editor) { + return editor.fire('StoreDraft'); + }; + var fireRemoveDraft = function (editor) { + return editor.fire('RemoveDraft'); + }; + var $_9oiz9v8bjd09evjx = { + fireRestoreDraft: fireRestoreDraft, + fireStoreDraft: fireStoreDraft, + fireRemoveDraft: fireRemoveDraft + }; + + var parse = function (time, defaultTime) { + var multiples = { + s: 1000, + m: 60000 + }; + time = /^(\d+)([ms]?)$/.exec('' + (time || defaultTime)); + return (time[2] ? multiples[time[2]] : 1) * parseInt(time, 10); + }; + var $_acnp9w8djd09evk0 = { parse: parse }; + + var shouldAskBeforeUnload = function (editor) { + return editor.getParam('autosave_ask_before_unload', true); + }; + var getAutoSavePrefix = function (editor) { + var prefix = editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-'); + prefix = prefix.replace(/\{path\}/g, document.location.pathname); + prefix = prefix.replace(/\{query\}/g, document.location.search); + prefix = prefix.replace(/\{hash\}/g, document.location.hash); + prefix = prefix.replace(/\{id\}/g, editor.id); + return prefix; + }; + var shouldRestoreWhenEmpty = function (editor) { + return editor.getParam('autosave_restore_when_empty', false); + }; + var getAutoSaveInterval = function (editor) { + return $_acnp9w8djd09evk0.parse(editor.settings.autosave_interval, '30s'); + }; + var getAutoSaveRetention = function (editor) { + return $_acnp9w8djd09evk0.parse(editor.settings.autosave_retention, '20m'); + }; + var $_fnrt778cjd09evjy = { + shouldAskBeforeUnload: shouldAskBeforeUnload, + getAutoSavePrefix: getAutoSavePrefix, + shouldRestoreWhenEmpty: shouldRestoreWhenEmpty, + getAutoSaveInterval: getAutoSaveInterval, + getAutoSaveRetention: getAutoSaveRetention + }; + + var isEmpty = function (editor, html) { + var forcedRootBlockName = editor.settings.forced_root_block; + html = Tools.trim(typeof html === 'undefined' ? editor.getBody().innerHTML : html); + return html === '' || new RegExp('^<' + forcedRootBlockName + '[^>]*>((\xA0| |[ \t]|]*>)+?|)|
$', 'i').test(html); + }; + var hasDraft = function (editor) { + var time = parseInt(LocalStorage.getItem($_fnrt778cjd09evjy.getAutoSavePrefix(editor) + 'time'), 10) || 0; + if (new Date().getTime() - time > $_fnrt778cjd09evjy.getAutoSaveRetention(editor)) { + removeDraft(editor, false); + return false; + } + return true; + }; + var removeDraft = function (editor, fire) { + var prefix = $_fnrt778cjd09evjy.getAutoSavePrefix(editor); + LocalStorage.removeItem(prefix + 'draft'); + LocalStorage.removeItem(prefix + 'time'); + if (fire !== false) { + $_9oiz9v8bjd09evjx.fireRemoveDraft(editor); + } + }; + var storeDraft = function (editor) { + var prefix = $_fnrt778cjd09evjy.getAutoSavePrefix(editor); + if (!isEmpty(editor) && editor.isDirty()) { + LocalStorage.setItem(prefix + 'draft', editor.getContent({ + format: 'raw', + no_events: true + })); + LocalStorage.setItem(prefix + 'time', new Date().getTime().toString()); + $_9oiz9v8bjd09evjx.fireStoreDraft(editor); + } + }; + var restoreDraft = function (editor) { + var prefix = $_fnrt778cjd09evjy.getAutoSavePrefix(editor); + if (hasDraft(editor)) { + editor.setContent(LocalStorage.getItem(prefix + 'draft'), { format: 'raw' }); + $_9oiz9v8bjd09evjx.fireRestoreDraft(editor); + } + }; + var startStoreDraft = function (editor, started) { + var interval = $_fnrt778cjd09evjy.getAutoSaveInterval(editor); + if (!started.get()) { + setInterval(function () { + if (!editor.removed) { + storeDraft(editor); + } + }, interval); + started.set(true); + } + }; + var restoreLastDraft = function (editor) { + editor.undoManager.transact(function () { + restoreDraft(editor); + removeDraft(editor); + }); + editor.focus(); + }; + var $_9ciimi88jd09evju = { + isEmpty: isEmpty, + hasDraft: hasDraft, + removeDraft: removeDraft, + storeDraft: storeDraft, + restoreDraft: restoreDraft, + startStoreDraft: startStoreDraft, + restoreLastDraft: restoreLastDraft + }; + + var curry = function (f, editor) { + return function () { + var args = Array.prototype.slice.call(arguments); + return f.apply(null, [editor].concat(args)); + }; + }; + var get = function (editor) { + return { + hasDraft: curry($_9ciimi88jd09evju.hasDraft, editor), + storeDraft: curry($_9ciimi88jd09evju.storeDraft, editor), + restoreDraft: curry($_9ciimi88jd09evju.restoreDraft, editor), + removeDraft: curry($_9ciimi88jd09evju.removeDraft, editor), + isEmpty: curry($_9ciimi88jd09evju.isEmpty, editor) + }; + }; + var $_esnacr87jd09evjt = { get: get }; + + var EditorManager = tinymce.util.Tools.resolve('tinymce.EditorManager'); + + EditorManager._beforeUnloadHandler = function () { + var msg; + Tools.each(EditorManager.get(), function (editor) { + if (editor.plugins.autosave) { + editor.plugins.autosave.storeDraft(); + } + if (!msg && editor.isDirty() && $_fnrt778cjd09evjy.shouldAskBeforeUnload(editor)) { + msg = editor.translate('You have unsaved changes are you sure you want to navigate away?'); + } + }); + return msg; + }; + var setup = function (editor) { + window.onbeforeunload = EditorManager._beforeUnloadHandler; + }; + var $_8ixviu8ejd09evk9 = { setup: setup }; + + var postRender = function (editor, started) { + return function (e) { + var ctrl = e.control; + ctrl.disabled(!$_9ciimi88jd09evju.hasDraft(editor)); + editor.on('StoreDraft RestoreDraft RemoveDraft', function () { + ctrl.disabled(!$_9ciimi88jd09evju.hasDraft(editor)); + }); + $_9ciimi88jd09evju.startStoreDraft(editor, started); + }; + }; + var register = function (editor, started) { + editor.addButton('restoredraft', { + title: 'Restore last draft', + onclick: function () { + $_9ciimi88jd09evju.restoreLastDraft(editor); + }, + onPostRender: postRender(editor, started) + }); + editor.addMenuItem('restoredraft', { + text: 'Restore last draft', + onclick: function () { + $_9ciimi88jd09evju.restoreLastDraft(editor); + }, + onPostRender: postRender(editor, started), + context: 'file' + }); + }; + var $_fcm8fu8gjd09evkb = { register: register }; + + PluginManager.add('autosave', function (editor) { + var started = Cell(false); + $_8ixviu8ejd09evk9.setup(editor); + $_fcm8fu8gjd09evkb.register(editor, started); + return $_esnacr87jd09evjt.get(editor); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/autosave/plugin.min.js b/node_modules/tinymce/plugins/autosave/plugin.min.js new file mode 100644 index 0000000..77d0af9 --- /dev/null +++ b/node_modules/tinymce/plugins/autosave/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t=function(e){var r=e,n=function(){return r};return{get:n,set:function(t){r=t},clone:function(){return t(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(t){return t.fire("RestoreDraft")},o=function(t){return t.fire("StoreDraft")},i=function(t){return t.fire("RemoveDraft")},s=function(t,e){return((t=/^(\d+)([ms]?)$/.exec(""+(t||e)))[2]?{s:1e3,m:6e4}[t[2]]:1)*parseInt(t,10)},u=function(t){return t.getParam("autosave_ask_before_unload",!0)},f=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,t.id)},c=function(t){return s(t.settings.autosave_interval,"30s")},l=function(t){return s(t.settings.autosave_retention,"20m")},m=function(t,e){var r=t.settings.forced_root_block;return""===(e=n.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0| |[ \t]|]*>)+?|)|
$","i").test(e)},v=function(t){var e=parseInt(r.getItem(f(t)+"time"),10)||0;return!((new Date).getTime()-e>l(t)&&(d(t,!1),1))},d=function(t,e){var n=f(t);r.removeItem(n+"draft"),r.removeItem(n+"time"),!1!==e&&i(t)},D=function(t){var e=f(t);!m(t)&&t.isDirty()&&(r.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),r.setItem(e+"time",(new Date).getTime().toString()),o(t))},g=function(t){var e=f(t);v(t)&&(t.setContent(r.getItem(e+"draft"),{format:"raw"}),a(t))},y={isEmpty:m,hasDraft:v,removeDraft:d,storeDraft:D,restoreDraft:g,startStoreDraft:function(t,e){var r=c(t);e.get()||(setInterval(function(){t.removed||D(t)},r),e.set(!0))},restoreLastDraft:function(t){t.undoManager.transact(function(){g(t),d(t)}),t.focus()}},p=function(t,e){return function(){var r=Array.prototype.slice.call(arguments);return t.apply(null,[e].concat(r))}},h=function(t){return{hasDraft:p(y.hasDraft,t),storeDraft:p(y.storeDraft,t),restoreDraft:p(y.restoreDraft,t),removeDraft:p(y.removeDraft,t),isEmpty:p(y.isEmpty,t)}},_=tinymce.util.Tools.resolve("tinymce.EditorManager");_._beforeUnloadHandler=function(){var t;return n.each(_.get(),function(e){e.plugins.autosave&&e.plugins.autosave.storeDraft(),!t&&e.isDirty()&&u(e)&&(t=e.translate("You have unsaved changes are you sure you want to navigate away?"))}),t};var b=function(t){window.onbeforeunload=_._beforeUnloadHandler},I=function(t,e){return function(r){var n=r.control;n.disabled(!y.hasDraft(t)),t.on("StoreDraft RestoreDraft RemoveDraft",function(){n.disabled(!y.hasDraft(t))}),y.startStoreDraft(t,e)}},w=function(t,e){t.addButton("restoredraft",{title:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e)}),t.addMenuItem("restoredraft",{text:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e),context:"file"})};e.add("autosave",function(e){var r=t(!1);return b(e),w(e,r),h(e)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/bbcode/index.js b/node_modules/tinymce/plugins/bbcode/index.js new file mode 100644 index 0000000..2dd534e --- /dev/null +++ b/node_modules/tinymce/plugins/bbcode/index.js @@ -0,0 +1,7 @@ +// Exports the "bbcode" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/bbcode') +// ES2015: +// import 'tinymce/plugins/bbcode' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/bbcode/plugin.js b/node_modules/tinymce/plugins/bbcode/plugin.js new file mode 100644 index 0000000..56eee7e --- /dev/null +++ b/node_modules/tinymce/plugins/bbcode/plugin.js @@ -0,0 +1,101 @@ +(function () { +var bbcode = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var html2bbcode = function (s) { + s = Tools.trim(s); + var rep = function (re, str) { + s = s.replace(re, str); + }; + rep(/(.*?)<\/a>/gi, '[url=$1]$2[/url]'); + rep(/(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]'); + rep(/(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]'); + rep(/(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]'); + rep(/(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]'); + rep(/(.*?)<\/span>/gi, '[color=$1]$2[/color]'); + rep(/(.*?)<\/font>/gi, '[color=$1]$2[/color]'); + rep(/(.*?)<\/span>/gi, '[size=$1]$2[/size]'); + rep(/(.*?)<\/font>/gi, '$1'); + rep(//gi, '[img]$1[/img]'); + rep(/(.*?)<\/span>/gi, '[code]$1[/code]'); + rep(/(.*?)<\/span>/gi, '[quote]$1[/quote]'); + rep(/(.*?)<\/strong>/gi, '[code][b]$1[/b][/code]'); + rep(/(.*?)<\/strong>/gi, '[quote][b]$1[/b][/quote]'); + rep(/(.*?)<\/em>/gi, '[code][i]$1[/i][/code]'); + rep(/(.*?)<\/em>/gi, '[quote][i]$1[/i][/quote]'); + rep(/(.*?)<\/u>/gi, '[code][u]$1[/u][/code]'); + rep(/(.*?)<\/u>/gi, '[quote][u]$1[/u][/quote]'); + rep(/<\/(strong|b)>/gi, '[/b]'); + rep(/<(strong|b)>/gi, '[b]'); + rep(/<\/(em|i)>/gi, '[/i]'); + rep(/<(em|i)>/gi, '[i]'); + rep(/<\/u>/gi, '[/u]'); + rep(/(.*?)<\/span>/gi, '[u]$1[/u]'); + rep(//gi, '[u]'); + rep(/]*>/gi, '[quote]'); + rep(/<\/blockquote>/gi, '[/quote]'); + rep(/
/gi, '\n'); + rep(//gi, '\n'); + rep(/
/gi, '\n'); + rep(/

/gi, ''); + rep(/<\/p>/gi, '\n'); + rep(/ |\u00a0/gi, ' '); + rep(/"/gi, '"'); + rep(/</gi, '<'); + rep(/>/gi, '>'); + rep(/&/gi, '&'); + return s; + }; + var bbcode2html = function (s) { + s = Tools.trim(s); + var rep = function (re, str) { + s = s.replace(re, str); + }; + rep(/\n/gi, '
'); + rep(/\[b\]/gi, ''); + rep(/\[\/b\]/gi, ''); + rep(/\[i\]/gi, ''); + rep(/\[\/i\]/gi, ''); + rep(/\[u\]/gi, ''); + rep(/\[\/u\]/gi, ''); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, '$2'); + rep(/\[url\](.*?)\[\/url\]/gi, '$1'); + rep(/\[img\](.*?)\[\/img\]/gi, ''); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, '$2'); + rep(/\[code\](.*?)\[\/code\]/gi, '$1 '); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi, '$1 '); + return s; + }; + var $_3znyhe8jjd09evkt = { + html2bbcode: html2bbcode, + bbcode2html: bbcode2html + }; + + PluginManager.add('bbcode', function () { + return { + init: function (editor) { + editor.on('beforeSetContent', function (e) { + e.content = $_3znyhe8jjd09evkt.bbcode2html(e.content); + }); + editor.on('postProcess', function (e) { + if (e.set) { + e.content = $_3znyhe8jjd09evkt.bbcode2html(e.content); + } + if (e.get) { + e.content = $_3znyhe8jjd09evkt.html2bbcode(e.content); + } + }); + } + }; + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/bbcode/plugin.min.js b/node_modules/tinymce/plugins/bbcode/plugin.min.js new file mode 100644 index 0000000..1589274 --- /dev/null +++ b/node_modules/tinymce/plugins/bbcode/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(o){o=t.trim(o);var e=function(t,e){o=o.replace(t,e)};return e(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),e(/(.*?)<\/font>/gi,"$1"),e(//gi,"[img]$1[/img]"),e(/(.*?)<\/span>/gi,"[code]$1[/code]"),e(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),e(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),e(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),e(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),e(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),e(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),e(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),e(/<\/(strong|b)>/gi,"[/b]"),e(/<(strong|b)>/gi,"[b]"),e(/<\/(em|i)>/gi,"[/i]"),e(/<(em|i)>/gi,"[i]"),e(/<\/u>/gi,"[/u]"),e(/(.*?)<\/span>/gi,"[u]$1[/u]"),e(//gi,"[u]"),e(/]*>/gi,"[quote]"),e(/<\/blockquote>/gi,"[/quote]"),e(/
/gi,"\n"),e(//gi,"\n"),e(/
/gi,"\n"),e(/

/gi,""),e(/<\/p>/gi,"\n"),e(/ |\u00a0/gi," "),e(/"/gi,'"'),e(/</gi,"<"),e(/>/gi,">"),e(/&/gi,"&"),o},i=function(o){o=t.trim(o);var e=function(t,e){o=o.replace(t,e)};return e(/\n/gi,"
"),e(/\[b\]/gi,""),e(/\[\/b\]/gi,""),e(/\[i\]/gi,""),e(/\[\/i\]/gi,""),e(/\[u\]/gi,""),e(/\[\/u\]/gi,""),e(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),e(/\[url\](.*?)\[\/url\]/gi,'$1'),e(/\[img\](.*?)\[\/img\]/gi,''),e(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),e(/\[code\](.*?)\[\/code\]/gi,'$1 '),e(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),o};o.add("bbcode",function(){return{init:function(o){o.on("beforeSetContent",function(o){o.content=i(o.content)}),o.on("postProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=e(o.content))})}}})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/charmap/index.js b/node_modules/tinymce/plugins/charmap/index.js new file mode 100644 index 0000000..13a1673 --- /dev/null +++ b/node_modules/tinymce/plugins/charmap/index.js @@ -0,0 +1,7 @@ +// Exports the "charmap" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/charmap') +// ES2015: +// import 'tinymce/plugins/charmap' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/charmap/plugin.js b/node_modules/tinymce/plugins/charmap/plugin.js new file mode 100644 index 0000000..cd4622f --- /dev/null +++ b/node_modules/tinymce/plugins/charmap/plugin.js @@ -0,0 +1,1275 @@ +(function () { +var charmap = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var fireInsertCustomChar = function (editor, chr) { + return editor.fire('insertCustomChar', { chr: chr }); + }; + var $_7kz3sm8pjd09evl7 = { fireInsertCustomChar: fireInsertCustomChar }; + + var insertChar = function (editor, chr) { + var evtChr = $_7kz3sm8pjd09evl7.fireInsertCustomChar(editor, chr).chr; + editor.execCommand('mceInsertContent', false, evtChr); + }; + var $_4dycx18ojd09evl6 = { insertChar: insertChar }; + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var getCharMap = function (editor) { + return editor.settings.charmap; + }; + var getCharMapAppend = function (editor) { + return editor.settings.charmap_append; + }; + var $_en4m5w8sjd09evld = { + getCharMap: getCharMap, + getCharMapAppend: getCharMapAppend + }; + + var isArray = Tools.isArray; + var getDefaultCharMap = function () { + return [ + [ + '160', + 'no-break space' + ], + [ + '173', + 'soft hyphen' + ], + [ + '34', + 'quotation mark' + ], + [ + '162', + 'cent sign' + ], + [ + '8364', + 'euro sign' + ], + [ + '163', + 'pound sign' + ], + [ + '165', + 'yen sign' + ], + [ + '169', + 'copyright sign' + ], + [ + '174', + 'registered sign' + ], + [ + '8482', + 'trade mark sign' + ], + [ + '8240', + 'per mille sign' + ], + [ + '181', + 'micro sign' + ], + [ + '183', + 'middle dot' + ], + [ + '8226', + 'bullet' + ], + [ + '8230', + 'three dot leader' + ], + [ + '8242', + 'minutes / feet' + ], + [ + '8243', + 'seconds / inches' + ], + [ + '167', + 'section sign' + ], + [ + '182', + 'paragraph sign' + ], + [ + '223', + 'sharp s / ess-zed' + ], + [ + '8249', + 'single left-pointing angle quotation mark' + ], + [ + '8250', + 'single right-pointing angle quotation mark' + ], + [ + '171', + 'left pointing guillemet' + ], + [ + '187', + 'right pointing guillemet' + ], + [ + '8216', + 'left single quotation mark' + ], + [ + '8217', + 'right single quotation mark' + ], + [ + '8220', + 'left double quotation mark' + ], + [ + '8221', + 'right double quotation mark' + ], + [ + '8218', + 'single low-9 quotation mark' + ], + [ + '8222', + 'double low-9 quotation mark' + ], + [ + '60', + 'less-than sign' + ], + [ + '62', + 'greater-than sign' + ], + [ + '8804', + 'less-than or equal to' + ], + [ + '8805', + 'greater-than or equal to' + ], + [ + '8211', + 'en dash' + ], + [ + '8212', + 'em dash' + ], + [ + '175', + 'macron' + ], + [ + '8254', + 'overline' + ], + [ + '164', + 'currency sign' + ], + [ + '166', + 'broken bar' + ], + [ + '168', + 'diaeresis' + ], + [ + '161', + 'inverted exclamation mark' + ], + [ + '191', + 'turned question mark' + ], + [ + '710', + 'circumflex accent' + ], + [ + '732', + 'small tilde' + ], + [ + '176', + 'degree sign' + ], + [ + '8722', + 'minus sign' + ], + [ + '177', + 'plus-minus sign' + ], + [ + '247', + 'division sign' + ], + [ + '8260', + 'fraction slash' + ], + [ + '215', + 'multiplication sign' + ], + [ + '185', + 'superscript one' + ], + [ + '178', + 'superscript two' + ], + [ + '179', + 'superscript three' + ], + [ + '188', + 'fraction one quarter' + ], + [ + '189', + 'fraction one half' + ], + [ + '190', + 'fraction three quarters' + ], + [ + '402', + 'function / florin' + ], + [ + '8747', + 'integral' + ], + [ + '8721', + 'n-ary sumation' + ], + [ + '8734', + 'infinity' + ], + [ + '8730', + 'square root' + ], + [ + '8764', + 'similar to' + ], + [ + '8773', + 'approximately equal to' + ], + [ + '8776', + 'almost equal to' + ], + [ + '8800', + 'not equal to' + ], + [ + '8801', + 'identical to' + ], + [ + '8712', + 'element of' + ], + [ + '8713', + 'not an element of' + ], + [ + '8715', + 'contains as member' + ], + [ + '8719', + 'n-ary product' + ], + [ + '8743', + 'logical and' + ], + [ + '8744', + 'logical or' + ], + [ + '172', + 'not sign' + ], + [ + '8745', + 'intersection' + ], + [ + '8746', + 'union' + ], + [ + '8706', + 'partial differential' + ], + [ + '8704', + 'for all' + ], + [ + '8707', + 'there exists' + ], + [ + '8709', + 'diameter' + ], + [ + '8711', + 'backward difference' + ], + [ + '8727', + 'asterisk operator' + ], + [ + '8733', + 'proportional to' + ], + [ + '8736', + 'angle' + ], + [ + '180', + 'acute accent' + ], + [ + '184', + 'cedilla' + ], + [ + '170', + 'feminine ordinal indicator' + ], + [ + '186', + 'masculine ordinal indicator' + ], + [ + '8224', + 'dagger' + ], + [ + '8225', + 'double dagger' + ], + [ + '192', + 'A - grave' + ], + [ + '193', + 'A - acute' + ], + [ + '194', + 'A - circumflex' + ], + [ + '195', + 'A - tilde' + ], + [ + '196', + 'A - diaeresis' + ], + [ + '197', + 'A - ring above' + ], + [ + '256', + 'A - macron' + ], + [ + '198', + 'ligature AE' + ], + [ + '199', + 'C - cedilla' + ], + [ + '200', + 'E - grave' + ], + [ + '201', + 'E - acute' + ], + [ + '202', + 'E - circumflex' + ], + [ + '203', + 'E - diaeresis' + ], + [ + '274', + 'E - macron' + ], + [ + '204', + 'I - grave' + ], + [ + '205', + 'I - acute' + ], + [ + '206', + 'I - circumflex' + ], + [ + '207', + 'I - diaeresis' + ], + [ + '298', + 'I - macron' + ], + [ + '208', + 'ETH' + ], + [ + '209', + 'N - tilde' + ], + [ + '210', + 'O - grave' + ], + [ + '211', + 'O - acute' + ], + [ + '212', + 'O - circumflex' + ], + [ + '213', + 'O - tilde' + ], + [ + '214', + 'O - diaeresis' + ], + [ + '216', + 'O - slash' + ], + [ + '332', + 'O - macron' + ], + [ + '338', + 'ligature OE' + ], + [ + '352', + 'S - caron' + ], + [ + '217', + 'U - grave' + ], + [ + '218', + 'U - acute' + ], + [ + '219', + 'U - circumflex' + ], + [ + '220', + 'U - diaeresis' + ], + [ + '362', + 'U - macron' + ], + [ + '221', + 'Y - acute' + ], + [ + '376', + 'Y - diaeresis' + ], + [ + '562', + 'Y - macron' + ], + [ + '222', + 'THORN' + ], + [ + '224', + 'a - grave' + ], + [ + '225', + 'a - acute' + ], + [ + '226', + 'a - circumflex' + ], + [ + '227', + 'a - tilde' + ], + [ + '228', + 'a - diaeresis' + ], + [ + '229', + 'a - ring above' + ], + [ + '257', + 'a - macron' + ], + [ + '230', + 'ligature ae' + ], + [ + '231', + 'c - cedilla' + ], + [ + '232', + 'e - grave' + ], + [ + '233', + 'e - acute' + ], + [ + '234', + 'e - circumflex' + ], + [ + '235', + 'e - diaeresis' + ], + [ + '275', + 'e - macron' + ], + [ + '236', + 'i - grave' + ], + [ + '237', + 'i - acute' + ], + [ + '238', + 'i - circumflex' + ], + [ + '239', + 'i - diaeresis' + ], + [ + '299', + 'i - macron' + ], + [ + '240', + 'eth' + ], + [ + '241', + 'n - tilde' + ], + [ + '242', + 'o - grave' + ], + [ + '243', + 'o - acute' + ], + [ + '244', + 'o - circumflex' + ], + [ + '245', + 'o - tilde' + ], + [ + '246', + 'o - diaeresis' + ], + [ + '248', + 'o slash' + ], + [ + '333', + 'o macron' + ], + [ + '339', + 'ligature oe' + ], + [ + '353', + 's - caron' + ], + [ + '249', + 'u - grave' + ], + [ + '250', + 'u - acute' + ], + [ + '251', + 'u - circumflex' + ], + [ + '252', + 'u - diaeresis' + ], + [ + '363', + 'u - macron' + ], + [ + '253', + 'y - acute' + ], + [ + '254', + 'thorn' + ], + [ + '255', + 'y - diaeresis' + ], + [ + '563', + 'y - macron' + ], + [ + '913', + 'Alpha' + ], + [ + '914', + 'Beta' + ], + [ + '915', + 'Gamma' + ], + [ + '916', + 'Delta' + ], + [ + '917', + 'Epsilon' + ], + [ + '918', + 'Zeta' + ], + [ + '919', + 'Eta' + ], + [ + '920', + 'Theta' + ], + [ + '921', + 'Iota' + ], + [ + '922', + 'Kappa' + ], + [ + '923', + 'Lambda' + ], + [ + '924', + 'Mu' + ], + [ + '925', + 'Nu' + ], + [ + '926', + 'Xi' + ], + [ + '927', + 'Omicron' + ], + [ + '928', + 'Pi' + ], + [ + '929', + 'Rho' + ], + [ + '931', + 'Sigma' + ], + [ + '932', + 'Tau' + ], + [ + '933', + 'Upsilon' + ], + [ + '934', + 'Phi' + ], + [ + '935', + 'Chi' + ], + [ + '936', + 'Psi' + ], + [ + '937', + 'Omega' + ], + [ + '945', + 'alpha' + ], + [ + '946', + 'beta' + ], + [ + '947', + 'gamma' + ], + [ + '948', + 'delta' + ], + [ + '949', + 'epsilon' + ], + [ + '950', + 'zeta' + ], + [ + '951', + 'eta' + ], + [ + '952', + 'theta' + ], + [ + '953', + 'iota' + ], + [ + '954', + 'kappa' + ], + [ + '955', + 'lambda' + ], + [ + '956', + 'mu' + ], + [ + '957', + 'nu' + ], + [ + '958', + 'xi' + ], + [ + '959', + 'omicron' + ], + [ + '960', + 'pi' + ], + [ + '961', + 'rho' + ], + [ + '962', + 'final sigma' + ], + [ + '963', + 'sigma' + ], + [ + '964', + 'tau' + ], + [ + '965', + 'upsilon' + ], + [ + '966', + 'phi' + ], + [ + '967', + 'chi' + ], + [ + '968', + 'psi' + ], + [ + '969', + 'omega' + ], + [ + '8501', + 'alef symbol' + ], + [ + '982', + 'pi symbol' + ], + [ + '8476', + 'real part symbol' + ], + [ + '978', + 'upsilon - hook symbol' + ], + [ + '8472', + 'Weierstrass p' + ], + [ + '8465', + 'imaginary part' + ], + [ + '8592', + 'leftwards arrow' + ], + [ + '8593', + 'upwards arrow' + ], + [ + '8594', + 'rightwards arrow' + ], + [ + '8595', + 'downwards arrow' + ], + [ + '8596', + 'left right arrow' + ], + [ + '8629', + 'carriage return' + ], + [ + '8656', + 'leftwards double arrow' + ], + [ + '8657', + 'upwards double arrow' + ], + [ + '8658', + 'rightwards double arrow' + ], + [ + '8659', + 'downwards double arrow' + ], + [ + '8660', + 'left right double arrow' + ], + [ + '8756', + 'therefore' + ], + [ + '8834', + 'subset of' + ], + [ + '8835', + 'superset of' + ], + [ + '8836', + 'not a subset of' + ], + [ + '8838', + 'subset of or equal to' + ], + [ + '8839', + 'superset of or equal to' + ], + [ + '8853', + 'circled plus' + ], + [ + '8855', + 'circled times' + ], + [ + '8869', + 'perpendicular' + ], + [ + '8901', + 'dot operator' + ], + [ + '8968', + 'left ceiling' + ], + [ + '8969', + 'right ceiling' + ], + [ + '8970', + 'left floor' + ], + [ + '8971', + 'right floor' + ], + [ + '9001', + 'left-pointing angle bracket' + ], + [ + '9002', + 'right-pointing angle bracket' + ], + [ + '9674', + 'lozenge' + ], + [ + '9824', + 'black spade suit' + ], + [ + '9827', + 'black club suit' + ], + [ + '9829', + 'black heart suit' + ], + [ + '9830', + 'black diamond suit' + ], + [ + '8194', + 'en space' + ], + [ + '8195', + 'em space' + ], + [ + '8201', + 'thin space' + ], + [ + '8204', + 'zero width non-joiner' + ], + [ + '8205', + 'zero width joiner' + ], + [ + '8206', + 'left-to-right mark' + ], + [ + '8207', + 'right-to-left mark' + ] + ]; + }; + var charmapFilter = function (charmap) { + return Tools.grep(charmap, function (item) { + return isArray(item) && item.length === 2; + }); + }; + var getCharsFromSetting = function (settingValue) { + if (isArray(settingValue)) { + return [].concat(charmapFilter(settingValue)); + } + if (typeof settingValue === 'function') { + return settingValue(); + } + return []; + }; + var extendCharMap = function (editor, charmap) { + var userCharMap = $_en4m5w8sjd09evld.getCharMap(editor); + if (userCharMap) { + charmap = getCharsFromSetting(userCharMap); + } + var userCharMapAppend = $_en4m5w8sjd09evld.getCharMapAppend(editor); + if (userCharMapAppend) { + return [].concat(charmap).concat(getCharsFromSetting(userCharMapAppend)); + } + return charmap; + }; + var getCharMap$1 = function (editor) { + return extendCharMap(editor, getDefaultCharMap()); + }; + var $_4s39sj8qjd09evl8 = { getCharMap: getCharMap$1 }; + + var get = function (editor) { + var getCharMap = function () { + return $_4s39sj8qjd09evl8.getCharMap(editor); + }; + var insertChar = function (chr) { + $_4dycx18ojd09evl6.insertChar(editor, chr); + }; + return { + getCharMap: getCharMap, + insertChar: insertChar + }; + }; + var $_dqh15x8njd09evl5 = { get: get }; + + var getHtml = function (charmap) { + var gridHtml, x, y; + var width = Math.min(charmap.length, 25); + var height = Math.ceil(charmap.length / width); + gridHtml = ''; + for (y = 0; y < height; y++) { + gridHtml += ''; + for (x = 0; x < width; x++) { + var index = y * width + x; + if (index < charmap.length) { + var chr = charmap[index]; + var charCode = parseInt(chr[0], 10); + var chrText = chr ? String.fromCharCode(charCode) : ' '; + gridHtml += ''; + } else { + gridHtml += ''; + } + gridHtml += ''; + return gridHtml; + }; + var $_a8cp3a8vjd09evli = { getHtml: getHtml }; + + var getParentTd = function (elm) { + while (elm) { + if (elm.nodeName === 'TD') { + return elm; + } + elm = elm.parentNode; + } + }; + var open = function (editor) { + var win; + var charMapPanel = { + type: 'container', + html: $_a8cp3a8vjd09evli.getHtml($_4s39sj8qjd09evl8.getCharMap(editor)), + onclick: function (e) { + var target = e.target; + if (/^(TD|DIV)$/.test(target.nodeName)) { + var charDiv = getParentTd(target).firstChild; + if (charDiv && charDiv.hasAttribute('data-chr')) { + var charCodeString = charDiv.getAttribute('data-chr'); + var charCode = parseInt(charCodeString, 10); + if (!isNaN(charCode)) { + $_4dycx18ojd09evl6.insertChar(editor, String.fromCharCode(charCode)); + } + if (!e.ctrlKey) { + win.close(); + } + } + } + }, + onmouseover: function (e) { + var td = getParentTd(e.target); + if (td && td.firstChild) { + win.find('#preview').text(td.firstChild.firstChild.data); + win.find('#previewTitle').text(td.title); + } else { + win.find('#preview').text(' '); + win.find('#previewTitle').text(' '); + } + } + }; + win = editor.windowManager.open({ + title: 'Special character', + spacing: 10, + padding: 10, + items: [ + charMapPanel, + { + type: 'container', + layout: 'flex', + direction: 'column', + align: 'center', + spacing: 5, + minWidth: 160, + minHeight: 160, + items: [ + { + type: 'label', + name: 'preview', + text: ' ', + style: 'font-size: 40px; text-align: center', + border: 1, + minWidth: 140, + minHeight: 80 + }, + { + type: 'spacer', + minHeight: 20 + }, + { + type: 'label', + name: 'previewTitle', + text: ' ', + style: 'white-space: pre-wrap;', + border: 1, + minWidth: 140 + } + ] + } + ], + buttons: [{ + text: 'Close', + onclick: function () { + win.close(); + } + }] + }); + }; + var $_1l10cd8ujd09evlg = { open: open }; + + var register = function (editor) { + editor.addCommand('mceShowCharmap', function () { + $_1l10cd8ujd09evlg.open(editor); + }); + }; + var $_gf5htt8tjd09evle = { register: register }; + + var register$1 = function (editor) { + editor.addButton('charmap', { + icon: 'charmap', + tooltip: 'Special character', + cmd: 'mceShowCharmap' + }); + editor.addMenuItem('charmap', { + icon: 'charmap', + text: 'Special character', + cmd: 'mceShowCharmap', + context: 'insert' + }); + }; + var $_3gvvq88wjd09evlj = { register: register$1 }; + + PluginManager.add('charmap', function (editor) { + $_gf5htt8tjd09evle.register(editor); + $_3gvvq88wjd09evlj.register(editor); + return $_dqh15x8njd09evl5.get(editor); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/charmap/plugin.min.js b/node_modules/tinymce/plugins/charmap/plugin.min.js new file mode 100644 index 0000000..14d1653 --- /dev/null +++ b/node_modules/tinymce/plugins/charmap/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,t){return e.fire("insertCustomChar",{chr:t})},a=function(e,a){var i=t(e,a).chr;e.execCommand("mceInsertContent",!1,i)},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.settings.charmap},n=function(e){return e.settings.charmap_append},o=i.isArray,l=function(e){return o(e)?[].concat((t=e,i.grep(t,function(e){return o(e)&&2===e.length}))):"function"==typeof e?e():[];var t},c=function(e){return function(e,t){var a=r(e);a&&(t=l(a));var i=n(e);return i?[].concat(t).concat(l(i)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},s=function(e){return{getCharMap:function(){return c(e)},insertChar:function(t){a(e,t)}}},u=function(e){var t,a,i,r=Math.min(e.length,25),n=Math.ceil(e.length/r);for(t='',i=0;i",a=0;a
'+s+"
"}else t+="
"}return t+=""},d=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},m=function(e){var t,i={type:"container",html:u(c(e)),onclick:function(i){var r=i.target;if(/^(TD|DIV)$/.test(r.nodeName)){var n=d(r).firstChild;if(n&&n.hasAttribute("data-chr")){var o=n.getAttribute("data-chr"),l=parseInt(o,10);isNaN(l)||a(e,String.fromCharCode(l)),i.ctrlKey||t.close()}}},onmouseover:function(e){var a=d(e.target);a&&a.firstChild?(t.find("#preview").text(a.firstChild.firstChild.data),t.find("#previewTitle").text(a.title)):(t.find("#preview").text(" "),t.find("#previewTitle").text(" "))}};t=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[i,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){t.close()}}]})},g=function(e){e.addCommand("mceShowCharmap",function(){m(e)})},p=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return g(e),p(e),s(e)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/code/index.js b/node_modules/tinymce/plugins/code/index.js new file mode 100644 index 0000000..1e412f3 --- /dev/null +++ b/node_modules/tinymce/plugins/code/index.js @@ -0,0 +1,7 @@ +// Exports the "code" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/code') +// ES2015: +// import 'tinymce/plugins/code' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/code/plugin.js b/node_modules/tinymce/plugins/code/plugin.js new file mode 100644 index 0000000..473c321 --- /dev/null +++ b/node_modules/tinymce/plugins/code/plugin.js @@ -0,0 +1,94 @@ +(function () { +var code = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var DOMUtils = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var getMinWidth = function (editor) { + return editor.getParam('code_dialog_width', 600); + }; + var getMinHeight = function (editor) { + return editor.getParam('code_dialog_height', Math.min(DOMUtils.DOM.getViewPort().h - 200, 500)); + }; + var $_fr6uym91jd09evml = { + getMinWidth: getMinWidth, + getMinHeight: getMinHeight + }; + + var setContent = function (editor, html) { + editor.focus(); + editor.undoManager.transact(function () { + editor.setContent(html); + }); + editor.selection.setCursorLocation(); + editor.nodeChanged(); + }; + var getContent = function (editor) { + return editor.getContent({ source_view: true }); + }; + var $_8uqjeh93jd09evmm = { + setContent: setContent, + getContent: getContent + }; + + var open = function (editor) { + var minWidth = $_fr6uym91jd09evml.getMinWidth(editor); + var minHeight = $_fr6uym91jd09evml.getMinHeight(editor); + var win = editor.windowManager.open({ + title: 'Source code', + body: { + type: 'textbox', + name: 'code', + multiline: true, + minWidth: minWidth, + minHeight: minHeight, + spellcheck: false, + style: 'direction: ltr; text-align: left' + }, + onSubmit: function (e) { + $_8uqjeh93jd09evmm.setContent(editor, e.data.code); + } + }); + win.find('#code').value($_8uqjeh93jd09evmm.getContent(editor)); + }; + var $_6y34fq90jd09evmj = { open: open }; + + var register = function (editor) { + editor.addCommand('mceCodeEditor', function () { + $_6y34fq90jd09evmj.open(editor); + }); + }; + var $_5cbnc58zjd09evmi = { register: register }; + + var register$1 = function (editor) { + editor.addButton('code', { + icon: 'code', + tooltip: 'Source code', + onclick: function () { + $_6y34fq90jd09evmj.open(editor); + } + }); + editor.addMenuItem('code', { + icon: 'code', + text: 'Source code', + onclick: function () { + $_6y34fq90jd09evmj.open(editor); + } + }); + }; + var $_fo0ike94jd09evmn = { register: register$1 }; + + PluginManager.add('code', function (editor) { + $_5cbnc58zjd09evmi.register(editor); + $_fo0ike94jd09evmn.register(editor); + return {}; + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/code/plugin.min.js b/node_modules/tinymce/plugins/code/plugin.min.js new file mode 100644 index 0000000..c983b5c --- /dev/null +++ b/node_modules/tinymce/plugins/code/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),e=function(t){return t.getParam("code_dialog_width",600)},o=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},i=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},c=function(t){return t.getContent({source_view:!0})},d=function(t){var n=e(t),d=o(t);t.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:n,minHeight:d,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(n){i(t,n.data.code)}}).find("#code").value(c(t))},u=function(t){t.addCommand("mceCodeEditor",function(){d(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){d(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){d(t)}})};t.add("code",function(t){return u(t),a(t),{}})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/codesample/css/prism.css b/node_modules/tinymce/plugins/codesample/css/prism.css new file mode 100644 index 0000000..128237f --- /dev/null +++ b/node_modules/tinymce/plugins/codesample/css/prism.css @@ -0,0 +1,138 @@ +/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ + +code[class*="language-"], +pre[class*="language-"] { + color: black; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: #b3d4fc; +} + +pre[class*="language-"]::selection, pre[class*="language-"] ::selection, +code[class*="language-"]::selection, code[class*="language-"] ::selection { + text-shadow: none; + background: #b3d4fc; +} + +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #f5f2f0; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #999; +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #a67f59; + background: hsla(0, 0%, 100%, .5); +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} + +.token.function { + color: #DD4A68; +} + +.token.regex, +.token.important, +.token.variable { + color: #e90; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + diff --git a/node_modules/tinymce/plugins/codesample/index.js b/node_modules/tinymce/plugins/codesample/index.js new file mode 100644 index 0000000..c400ec3 --- /dev/null +++ b/node_modules/tinymce/plugins/codesample/index.js @@ -0,0 +1,7 @@ +// Exports the "codesample" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/codesample') +// ES2015: +// import 'tinymce/plugins/codesample' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/codesample/plugin.js b/node_modules/tinymce/plugins/codesample/plugin.js new file mode 100644 index 0000000..b6c9696 --- /dev/null +++ b/node_modules/tinymce/plugins/codesample/plugin.js @@ -0,0 +1,969 @@ +(function () { +var codesample = (function () { + 'use strict'; + + var Cell = function (initial) { + var value = initial; + var get = function () { + return value; + }; + var set = function (v) { + value = v; + }; + var clone = function () { + return Cell(get()); + }; + return { + get: get, + set: set, + clone: clone + }; + }; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var DOMUtils = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var getContentCss = function (editor) { + return editor.settings.codesample_content_css; + }; + var getLanguages = function (editor) { + return editor.settings.codesample_languages; + }; + var getDialogMinWidth = function (editor) { + return Math.min(DOMUtils.DOM.getViewPort().w, editor.getParam('codesample_dialog_width', 800)); + }; + var getDialogMinHeight = function (editor) { + return Math.min(DOMUtils.DOM.getViewPort().w, editor.getParam('codesample_dialog_height', 650)); + }; + var $_3zfvka9ajd09evn3 = { + getContentCss: getContentCss, + getLanguages: getLanguages, + getDialogMinWidth: getDialogMinWidth, + getDialogMinHeight: getDialogMinHeight + }; + + var window = {}; + var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {}; + var Prism = function () { + var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i; + var _ = _self.Prism = { + util: { + encode: function (tokens) { + if (tokens instanceof Token) { + return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias); + } else if (_.util.type(tokens) === 'Array') { + return tokens.map(_.util.encode); + } else { + return tokens.replace(/&/g, '&').replace(/ text.length) { + break tokenloop; + } + if (str instanceof Token) { + continue; + } + pattern.lastIndex = 0; + var match = pattern.exec(str); + if (match) { + if (lookbehind) { + lookbehindLength = match[1].length; + } + var from = match.index - 1 + lookbehindLength; + match = match[0].slice(lookbehindLength); + var len = match.length, to = from + len, before = str.slice(0, from + 1), after = str.slice(to + 1); + var args = [ + i, + 1 + ]; + if (before) { + args.push(before); + } + var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias); + args.push(wrapped); + if (after) { + args.push(after); + } + Array.prototype.splice.apply(strarr, args); + } + } + } + } + return strarr; + }, + hooks: { + all: {}, + add: function (name, callback) { + var hooks = _.hooks.all; + hooks[name] = hooks[name] || []; + hooks[name].push(callback); + }, + run: function (name, env) { + var callbacks = _.hooks.all[name]; + if (!callbacks || !callbacks.length) { + return; + } + for (var i = 0, callback = void 0; callback = callbacks[i++];) { + callback(env); + } + } + } + }; + var Token = _.Token = function (type, content, alias) { + this.type = type; + this.content = content; + this.alias = alias; + }; + Token.stringify = function (o, language, parent) { + if (typeof o === 'string') { + return o; + } + if (_.util.type(o) === 'Array') { + return o.map(function (element) { + return Token.stringify(element, language, o); + }).join(''); + } + var env = { + type: o.type, + content: Token.stringify(o.content, language, parent), + tag: 'span', + classes: [ + 'token', + o.type + ], + attributes: {}, + language: language, + parent: parent + }; + if (env.type === 'comment') { + env.attributes.spellcheck = 'true'; + } + if (o.alias) { + var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias]; + Array.prototype.push.apply(env.classes, aliases); + } + _.hooks.run('wrap', env); + var attributes = ''; + for (var name_1 in env.attributes) { + attributes += (attributes ? ' ' : '') + name_1 + '="' + (env.attributes[name_1] || '') + '"'; + } + return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + ''; + }; + if (!_self.document) { + if (!_self.addEventListener) { + return _self.Prism; + } + _self.addEventListener('message', function (evt) { + var message = JSON.parse(evt.data), lang = message.language, code = message.code, immediateClose = message.immediateClose; + _self.postMessage(_.highlight(code, _.languages[lang], lang)); + if (immediateClose) { + _self.close(); + } + }, false); + return _self.Prism; + } + }(); + if (typeof module !== 'undefined' && module.exports) { + module.exports = Prism; + } + if (typeof global !== 'undefined') { + global.Prism = Prism; + } + Prism.languages.markup = { + comment: //, + prolog: /<\?[\w\W]+?\?>/, + doctype: //, + cdata: //i, + tag: { + pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i, + inside: { + 'tag': { + pattern: /^<\/?[^\s>\/]+/i, + inside: { + punctuation: /^<\/?/, + namespace: /^[^\s>\/:]+:/ + } + }, + 'attr-value': { + pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i, + inside: { punctuation: /[=>"']/ } + }, + 'punctuation': /\/?>/, + 'attr-name': { + pattern: /[^\s>\/]+/, + inside: { namespace: /^[^\s>\/:]+:/ } + } + } + }, + entity: /&#?[\da-z]{1,8};/i + }; + Prism.hooks.add('wrap', function (env) { + if (env.type === 'entity') { + env.attributes.title = env.content.replace(/&/, '&'); + } + }); + Prism.languages.xml = Prism.languages.markup; + Prism.languages.html = Prism.languages.markup; + Prism.languages.mathml = Prism.languages.markup; + Prism.languages.svg = Prism.languages.markup; + Prism.languages.css = { + comment: /\/\*[\w\W]*?\*\//, + atrule: { + pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i, + inside: { rule: /@[\w-]+/ } + }, + url: /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i, + selector: /[^\{\}\s][^\{\};]*?(?=\s*\{)/, + string: /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/, + property: /(\b|\B)[\w-]+(?=\s*:)/i, + important: /\B!important\b/i, + function: /[-a-z0-9]+(?=\()/i, + punctuation: /[(){};:]/ + }; + Prism.languages.css.atrule.inside.rest = Prism.util.clone(Prism.languages.css); + if (Prism.languages.markup) { + Prism.languages.insertBefore('markup', 'tag', { + style: { + pattern: /[\w\W]*?<\/style>/i, + inside: { + tag: { + pattern: /|<\/style>/i, + inside: Prism.languages.markup.tag.inside + }, + rest: Prism.languages.css + }, + alias: 'language-css' + } + }); + Prism.languages.insertBefore('inside', 'attr-value', { + 'style-attr': { + pattern: /\s*style=("|').*?\1/i, + inside: { + 'attr-name': { + pattern: /^\s*style/i, + inside: Prism.languages.markup.tag.inside + }, + 'punctuation': /^\s*=\s*['"]|['"]\s*$/, + 'attr-value': { + pattern: /.+/i, + inside: Prism.languages.css + } + }, + alias: 'language-css' + } + }, Prism.languages.markup.tag); + } + Prism.languages.clike = { + 'comment': [ + { + pattern: /(^|[^\\])\/\*[\w\W]*?\*\//, + lookbehind: true + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true + } + ], + 'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + 'class-name': { + pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i, + lookbehind: true, + inside: { punctuation: /(\.|\\)/ } + }, + 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, + 'boolean': /\b(true|false)\b/, + 'function': /[a-z0-9_]+(?=\()/i, + 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i, + 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, + 'punctuation': /[{}[\];(),.:]/ + }; + Prism.languages.javascript = Prism.languages.extend('clike', { + keyword: /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/, + number: /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, + function: /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i + }); + Prism.languages.insertBefore('javascript', 'keyword', { + regex: { + pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/, + lookbehind: true + } + }); + Prism.languages.insertBefore('javascript', 'class-name', { + 'template-string': { + pattern: /`(?:\\`|\\?[^`])*`/, + inside: { + interpolation: { + pattern: /\$\{[^}]+\}/, + inside: { + 'interpolation-punctuation': { + pattern: /^\$\{|\}$/, + alias: 'punctuation' + }, + 'rest': Prism.languages.javascript + } + }, + string: /[\s\S]+/ + } + } + }); + if (Prism.languages.markup) { + Prism.languages.insertBefore('markup', 'tag', { + script: { + pattern: /[\w\W]*?<\/script>/i, + inside: { + tag: { + pattern: /|<\/script>/i, + inside: Prism.languages.markup.tag.inside + }, + rest: Prism.languages.javascript + }, + alias: 'language-javascript' + } + }); + } + Prism.languages.js = Prism.languages.javascript; + Prism.languages.c = Prism.languages.extend('clike', { + keyword: /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, + operator: /\-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*\/]/, + number: /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i + }); + Prism.languages.insertBefore('c', 'string', { + macro: { + pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im, + lookbehind: true, + alias: 'property', + inside: { + string: { + pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/, + lookbehind: true + } + } + } + }); + delete Prism.languages.c['class-name']; + delete Prism.languages.c.boolean; + Prism.languages.csharp = Prism.languages.extend('clike', { + keyword: /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/, + string: [ + /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/, + /("|')(\\?.)*?\1/ + ], + number: /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i + }); + Prism.languages.insertBefore('csharp', 'keyword', { + preprocessor: { + pattern: /(^\s*)#.*/m, + lookbehind: true + } + }); + Prism.languages.cpp = Prism.languages.extend('c', { + keyword: /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, + boolean: /\b(true|false)\b/, + operator: /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ + }); + Prism.languages.insertBefore('cpp', 'keyword', { + 'class-name': { + pattern: /(class\s+)[a-z0-9_]+/i, + lookbehind: true + } + }); + Prism.languages.java = Prism.languages.extend('clike', { + keyword: /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/, + number: /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i, + operator: { + pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m, + lookbehind: true + } + }); + Prism.languages.php = Prism.languages.extend('clike', { + keyword: /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i, + constant: /\b[A-Z0-9_]{2,}\b/, + comment: { + pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/, + lookbehind: true + } + }); + Prism.languages.insertBefore('php', 'class-name', { + 'shell-comment': { + pattern: /(^|[^\\])#.*/, + lookbehind: true, + alias: 'comment' + } + }); + Prism.languages.insertBefore('php', 'keyword', { + delimiter: /\?>|<\?(?:php)?/i, + variable: /\$\w+\b/i, + package: { + pattern: /(\\|namespace\s+|use\s+)[\w\\]+/, + lookbehind: true, + inside: { punctuation: /\\/ } + } + }); + Prism.languages.insertBefore('php', 'operator', { + property: { + pattern: /(->)[\w]+/, + lookbehind: true + } + }); + if (Prism.languages.markup) { + Prism.hooks.add('before-highlight', function (env) { + if (env.language !== 'php') { + return; + } + env.tokenStack = []; + env.backupCode = env.code; + env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function (match) { + env.tokenStack.push(match); + return '{{{PHP' + env.tokenStack.length + '}}}'; + }); + }); + Prism.hooks.add('before-insert', function (env) { + if (env.language === 'php') { + env.code = env.backupCode; + delete env.backupCode; + } + }); + Prism.hooks.add('after-highlight', function (env) { + if (env.language !== 'php') { + return; + } + for (var i = 0, t = void 0; t = env.tokenStack[i]; i++) { + env.highlightedCode = env.highlightedCode.replace('{{{PHP' + (i + 1) + '}}}', Prism.highlight(t, env.grammar, 'php').replace(/\$/g, '$$$$')); + } + env.element.innerHTML = env.highlightedCode; + }); + Prism.hooks.add('wrap', function (env) { + if (env.language === 'php' && env.type === 'markup') { + env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, '$1'); + } + }); + Prism.languages.insertBefore('php', 'comment', { + markup: { + pattern: /<[^?]\/?(.*?)>/, + inside: Prism.languages.markup + }, + php: /\{\{\{PHP[0-9]+\}\}\}/ + }); + } + Prism.languages.python = { + 'comment': { + pattern: /(^|[^\\])#.*/, + lookbehind: true + }, + 'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/, + 'function': { + pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g, + lookbehind: true + }, + 'class-name': { + pattern: /(\bclass\s+)[a-z0-9_]+/i, + lookbehind: true + }, + 'keyword': /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/, + 'boolean': /\b(?:True|False)\b/, + 'number': /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i, + 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/, + 'punctuation': /[{}[\];(),.:]/ + }; + (function (Prism) { + Prism.languages.ruby = Prism.languages.extend('clike', { + comment: /#(?!\{[^\r\n]*?\}).*/, + keyword: /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/ + }); + var interpolation = { + pattern: /#\{[^}]+\}/, + inside: { + delimiter: { + pattern: /^#\{|\}$/, + alias: 'tag' + }, + rest: Prism.util.clone(Prism.languages.ruby) + } + }; + Prism.languages.insertBefore('ruby', 'keyword', { + regex: [ + { + pattern: /%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/, + inside: { interpolation: interpolation } + }, + { + pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/, + inside: { interpolation: interpolation } + }, + { + pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/, + inside: { interpolation: interpolation } + }, + { + pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/, + inside: { interpolation: interpolation } + }, + { + pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/, + inside: { interpolation: interpolation } + }, + { + pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/, + lookbehind: true + } + ], + variable: /[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/, + symbol: /:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/ + }); + Prism.languages.insertBefore('ruby', 'number', { + builtin: /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/, + constant: /\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/ + }); + Prism.languages.ruby.string = [ + { + pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/, + inside: { interpolation: interpolation } + }, + { + pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/, + inside: { interpolation: interpolation } + }, + { + pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/, + inside: { interpolation: interpolation } + }, + { + pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/, + inside: { interpolation: interpolation } + }, + { + pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/, + inside: { interpolation: interpolation } + }, + { + pattern: /("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/, + inside: { interpolation: interpolation } + } + ]; + }(Prism)); + + function isCodeSample(elm) { + return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1; + } + function trimArg(predicateFn) { + return function (arg1, arg2) { + return predicateFn(arg2); + }; + } + var $_7l8l6j9ejd09evo3 = { + isCodeSample: isCodeSample, + trimArg: trimArg + }; + + var getSelectedCodeSample = function (editor) { + var node = editor.selection.getNode(); + if ($_7l8l6j9ejd09evo3.isCodeSample(node)) { + return node; + } + return null; + }; + var insertCodeSample = function (editor, language, code) { + editor.undoManager.transact(function () { + var node = getSelectedCodeSample(editor); + code = DOMUtils.DOM.encode(code); + if (node) { + editor.dom.setAttrib(node, 'class', 'language-' + language); + node.innerHTML = code; + Prism.highlightElement(node); + editor.selection.select(node); + } else { + editor.insertContent('

' + code + '
'); + editor.selection.select(editor.$('#__new').removeAttr('id')[0]); + } + }); + }; + var getCurrentCode = function (editor) { + var node = getSelectedCodeSample(editor); + if (node) { + return node.textContent; + } + return ''; + }; + var $_7a7usu9cjd09evn5 = { + getSelectedCodeSample: getSelectedCodeSample, + insertCodeSample: insertCodeSample, + getCurrentCode: getCurrentCode + }; + + var getLanguages$1 = function (editor) { + var defaultLanguages = [ + { + text: 'HTML/XML', + value: 'markup' + }, + { + text: 'JavaScript', + value: 'javascript' + }, + { + text: 'CSS', + value: 'css' + }, + { + text: 'PHP', + value: 'php' + }, + { + text: 'Ruby', + value: 'ruby' + }, + { + text: 'Python', + value: 'python' + }, + { + text: 'Java', + value: 'java' + }, + { + text: 'C', + value: 'c' + }, + { + text: 'C#', + value: 'csharp' + }, + { + text: 'C++', + value: 'cpp' + } + ]; + var customLanguages = $_3zfvka9ajd09evn3.getLanguages(editor); + return customLanguages ? customLanguages : defaultLanguages; + }; + var getCurrentLanguage = function (editor) { + var matches; + var node = $_7a7usu9cjd09evn5.getSelectedCodeSample(editor); + if (node) { + matches = node.className.match(/language-(\w+)/); + return matches ? matches[1] : ''; + } + return ''; + }; + var $_cofyz49fjd09evo4 = { + getLanguages: getLanguages$1, + getCurrentLanguage: getCurrentLanguage + }; + + var $_4inqkk99jd09evn2 = { + open: function (editor) { + var minWidth = $_3zfvka9ajd09evn3.getDialogMinWidth(editor); + var minHeight = $_3zfvka9ajd09evn3.getDialogMinHeight(editor); + var currentLanguage = $_cofyz49fjd09evo4.getCurrentLanguage(editor); + var currentLanguages = $_cofyz49fjd09evo4.getLanguages(editor); + var currentCode = $_7a7usu9cjd09evn5.getCurrentCode(editor); + editor.windowManager.open({ + title: 'Insert/Edit code sample', + minWidth: minWidth, + minHeight: minHeight, + layout: 'flex', + direction: 'column', + align: 'stretch', + body: [ + { + type: 'listbox', + name: 'language', + label: 'Language', + maxWidth: 200, + value: currentLanguage, + values: currentLanguages + }, + { + type: 'textbox', + name: 'code', + multiline: true, + spellcheck: false, + ariaLabel: 'Code view', + flex: 1, + style: 'direction: ltr; text-align: left', + classes: 'monospace', + value: currentCode, + autofocus: true + } + ], + onSubmit: function (e) { + $_7a7usu9cjd09evn5.insertCodeSample(editor, e.data.language, e.data.code); + } + }); + } + }; + + var register = function (editor) { + editor.addCommand('codesample', function () { + var node = editor.selection.getNode(); + if (editor.selection.isCollapsed() || $_7l8l6j9ejd09evo3.isCodeSample(node)) { + $_4inqkk99jd09evn2.open(editor); + } else { + editor.formatter.toggle('code'); + } + }); + }; + var $_91w40j98jd09evn1 = { register: register }; + + var setup = function (editor) { + var $ = editor.$; + editor.on('PreProcess', function (e) { + $('pre[contenteditable=false]', e.node).filter($_7l8l6j9ejd09evo3.trimArg($_7l8l6j9ejd09evo3.isCodeSample)).each(function (idx, elm) { + var $elm = $(elm), code = elm.textContent; + $elm.attr('class', $.trim($elm.attr('class'))); + $elm.removeAttr('contentEditable'); + $elm.empty().append($('').each(function () { + this.textContent = code; + })); + }); + }); + editor.on('SetContent', function () { + var unprocessedCodeSamples = $('pre').filter($_7l8l6j9ejd09evo3.trimArg($_7l8l6j9ejd09evo3.isCodeSample)).filter(function (idx, elm) { + return elm.contentEditable !== 'false'; + }); + if (unprocessedCodeSamples.length) { + editor.undoManager.transact(function () { + unprocessedCodeSamples.each(function (idx, elm) { + $(elm).find('br').each(function (idx, elm) { + elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm); + }); + elm.contentEditable = false; + elm.innerHTML = editor.dom.encode(elm.textContent); + Prism.highlightElement(elm); + elm.className = $.trim(elm.className); + }); + }); + } + }); + }; + var $_cenwwq9gjd09evo6 = { setup: setup }; + + var loadCss = function (editor, pluginUrl, addedInlineCss, addedCss) { + var linkElm; + var contentCss = $_3zfvka9ajd09evn3.getContentCss(editor); + if (editor.inline && addedInlineCss.get()) { + return; + } + if (!editor.inline && addedCss.get()) { + return; + } + if (editor.inline) { + addedInlineCss.set(true); + } else { + addedCss.set(true); + } + if (contentCss !== false) { + linkElm = editor.dom.create('link', { + rel: 'stylesheet', + href: contentCss ? contentCss : pluginUrl + '/css/prism.css' + }); + editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm); + } + }; + var $_1w66ds9hjd09evo9 = { loadCss: loadCss }; + + var register$1 = function (editor) { + editor.addButton('codesample', { + cmd: 'codesample', + title: 'Insert/Edit code sample' + }); + editor.addMenuItem('codesample', { + cmd: 'codesample', + text: 'Code sample', + icon: 'codesample' + }); + }; + var $_6mprvg9ijd09evoa = { register: register$1 }; + + var addedInlineCss = Cell(false); + PluginManager.add('codesample', function (editor, pluginUrl) { + var addedCss = Cell(false); + $_cenwwq9gjd09evo6.setup(editor); + $_6mprvg9ijd09evoa.register(editor); + $_91w40j98jd09evn1.register(editor); + editor.on('init', function () { + $_1w66ds9hjd09evo9.loadCss(editor, pluginUrl, addedInlineCss, addedCss); + }); + editor.on('dblclick', function (ev) { + if ($_7l8l6j9ejd09evo3.isCodeSample(ev.target)) { + $_4inqkk99jd09evn2.open(editor); + } + }); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/codesample/plugin.min.js b/node_modules/tinymce/plugins/codesample/plugin.min.js new file mode 100644 index 0000000..f8bdb3f --- /dev/null +++ b/node_modules/tinymce/plugins/codesample/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=function(t){var a=t,n=function(){return a};return{get:n,set:function(e){a=e},clone:function(){return e(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=function(e){return e.settings.codesample_content_css},i=function(e){return e.settings.codesample_languages},r=function(e){return Math.min(a.DOM.getViewPort().w,e.getParam("codesample_dialog_width",800))},s=function(e){return Math.min(a.DOM.getViewPort().w,e.getParam("codesample_dialog_height",650))},o={},l=void 0!==o?o:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},c=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=l.Prism={util:{encode:function(e){return e instanceof a?new a(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(!(m instanceof i)){u.lastIndex=0;var b=u.exec(m);if(b){d&&(p=b[1].length);var y=b.index-1+p,v=y+(b=b[0].slice(p)).length,k=m.slice(0,y+1),w=m.slice(v+1),x=[h,1];k&&x.push(k);var S=new i(o,g?t.tokenize(b,g):b,f);x.push(S),w&&x.push(w),Array.prototype.splice.apply(r,x)}}}}}return r},hooks:{all:{},add:function(e,a){var n=t.hooks.all;n[e]=n[e]||[],n[e].push(a)},run:function(e,a){var n=t.hooks.all[e];if(n&&n.length)for(var i=0,r=void 0;r=n[i++];)r(a)}}},a=t.Token=function(e,t,a){this.type=e,this.content=t,this.alias=a};if(a.stringify=function(e,n,i){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return a.stringify(t,n,e)}).join("");var r={type:e.type,content:a.stringify(e.content,n,i),tag:"span",classes:["token",e.type],attributes:{},language:n,parent:i};if("comment"===r.type&&(r.attributes.spellcheck="true"),e.alias){var s="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,s)}t.hooks.run("wrap",r);var o="";for(var l in r.attributes)o+=(o?" ":"")+l+'="'+(r.attributes[l]||"")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'" '+o+">"+r.content+""},!l.document)return l.addEventListener?(l.addEventListener("message",function(e){var a=JSON.parse(e.data),n=a.language,i=a.code,r=a.immediateClose;l.postMessage(t.highlight(i,t.languages[n],n)),r&&l.close()},!1),l.Prism):l.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=c),"undefined"!=typeof global&&(global.Prism=c),c.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},c.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),c.languages.xml=c.languages.markup,c.languages.html=c.languages.markup,c.languages.mathml=c.languages.markup,c.languages.svg=c.languages.markup,c.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},c.languages.css.atrule.inside.rest=c.util.clone(c.languages.css),c.languages.markup&&(c.languages.insertBefore("markup","tag",{style:{pattern:/[\w\W]*?<\/style>/i,inside:{tag:{pattern:/|<\/style>/i,inside:c.languages.markup.tag.inside},rest:c.languages.css},alias:"language-css"}}),c.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:c.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:c.languages.css}},alias:"language-css"}},c.languages.markup.tag)),c.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},c.languages.javascript=c.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),c.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),c.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:c.languages.javascript}},string:/[\s\S]+/}}}),c.languages.markup&&c.languages.insertBefore("markup","tag",{script:{pattern:/[\w\W]*?<\/script>/i,inside:{tag:{pattern:/|<\/script>/i,inside:c.languages.markup.tag.inside},rest:c.languages.javascript},alias:"language-javascript"}}),c.languages.js=c.languages.javascript,c.languages.c=c.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),c.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete c.languages.c["class-name"],delete c.languages.c["boolean"],c.languages.csharp=c.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),c.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),c.languages.cpp=c.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),c.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),c.languages.java=c.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),c.languages.php=c.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),c.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),c.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),c.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),c.languages.markup&&(c.hooks.add("before-highlight",function(e){"php"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(t){return e.tokenStack.push(t),"{{{PHP"+e.tokenStack.length+"}}}"}))}),c.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),c.hooks.add("after-highlight",function(e){if("php"===e.language){for(var t=0,a=void 0;a=e.tokenStack[t];t++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(t+1)+"}}}",c.highlight(a,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),c.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'$1'))}),c.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:c.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),c.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:t}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:t}}]}(c);var u={isCodeSample:function(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")},trimArg:function(e){return function(t,a){return e(a)}}},g=function(e){var t=e.selection.getNode();return u.isCodeSample(t)?t:null},d=g,p=function(e,t,n){e.undoManager.transact(function(){var i=g(e);n=a.DOM.encode(n),i?(e.dom.setAttrib(i,"class","language-"+t),i.innerHTML=n,c.highlightElement(i),e.selection.select(i)):(e.insertContent('
'+n+"
"),e.selection.select(e.$("#__new").removeAttr("id")[0]))})},f=function(e){var t=g(e);return t?t.textContent:""},h=function(e){var t=i(e);return t||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]},m=function(e){var t,a=d(e);return a&&(t=a.className.match(/language-(\w+)/))?t[1]:""},b=function(e){var t=r(e),a=s(e),n=m(e),i=h(e),o=f(e);e.windowManager.open({title:"Insert/Edit code sample",minWidth:t,minHeight:a,layout:"flex",direction:"column",align:"stretch",body:[{type:"listbox",name:"language",label:"Language",maxWidth:200,value:n,values:i},{type:"textbox",name:"code",multiline:!0,spellcheck:!1,ariaLabel:"Code view",flex:1,style:"direction: ltr; text-align: left",classes:"monospace",value:o,autofocus:!0}],onSubmit:function(t){p(e,t.data.language,t.data.code)}})},y=function(e){e.addCommand("codesample",function(){var t=e.selection.getNode();e.selection.isCollapsed()||u.isCodeSample(t)?b(e):e.formatter.toggle("code")})},v=function(e){var t=e.$;e.on("PreProcess",function(e){t("pre[contenteditable=false]",e.node).filter(u.trimArg(u.isCodeSample)).each(function(e,a){var n=t(a),i=a.textContent;n.attr("class",t.trim(n.attr("class"))),n.removeAttr("contentEditable"),n.empty().append(t("").each(function(){this.textContent=i}))})}),e.on("SetContent",function(){var a=t("pre").filter(u.trimArg(u.isCodeSample)).filter(function(e,t){return"false"!==t.contentEditable});a.length&&e.undoManager.transact(function(){a.each(function(a,n){t(n).find("br").each(function(t,a){a.parentNode.replaceChild(e.getDoc().createTextNode("\n"),a)}),n.contentEditable=!1,n.innerHTML=e.dom.encode(n.textContent),c.highlightElement(n),n.className=t.trim(n.className)})})})},k=function(e,t,a,i){var r,s=n(e);e.inline&&a.get()||!e.inline&&i.get()||(e.inline?a.set(!0):i.set(!0),!1!==s&&(r=e.dom.create("link",{rel:"stylesheet",href:s||t+"/css/prism.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(r)))},w=function(e){e.addButton("codesample",{cmd:"codesample",title:"Insert/Edit code sample"}),e.addMenuItem("codesample",{cmd:"codesample",text:"Code sample",icon:"codesample"})},x=e(!1);t.add("codesample",function(t,a){var n=e(!1);v(t),w(t),y(t),t.on("init",function(){k(t,a,x,n)}),t.on("dblclick",function(e){u.isCodeSample(e.target)&&b(t)})})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/colorpicker/index.js b/node_modules/tinymce/plugins/colorpicker/index.js new file mode 100644 index 0000000..1af1ae6 --- /dev/null +++ b/node_modules/tinymce/plugins/colorpicker/index.js @@ -0,0 +1,7 @@ +// Exports the "colorpicker" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/colorpicker') +// ES2015: +// import 'tinymce/plugins/colorpicker' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/colorpicker/plugin.js b/node_modules/tinymce/plugins/colorpicker/plugin.js new file mode 100644 index 0000000..3f04c03 --- /dev/null +++ b/node_modules/tinymce/plugins/colorpicker/plugin.js @@ -0,0 +1,126 @@ +(function () { +var colorpicker = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var Color = tinymce.util.Tools.resolve('tinymce.util.Color'); + + var showPreview = function (win, hexColor) { + win.find('#preview')[0].getEl().style.background = hexColor; + }; + var setColor = function (win, value) { + var color = Color(value), rgb = color.toRgb(); + win.fromJSON({ + r: rgb.r, + g: rgb.g, + b: rgb.b, + hex: color.toHex().substr(1) + }); + showPreview(win, color.toHex()); + }; + var open = function (editor, callback, value) { + var win = editor.windowManager.open({ + title: 'Color', + items: { + type: 'container', + layout: 'flex', + direction: 'row', + align: 'stretch', + padding: 5, + spacing: 10, + items: [ + { + type: 'colorpicker', + value: value, + onchange: function () { + var rgb = this.rgb(); + if (win) { + win.find('#r').value(rgb.r); + win.find('#g').value(rgb.g); + win.find('#b').value(rgb.b); + win.find('#hex').value(this.value().substr(1)); + showPreview(win, this.value()); + } + } + }, + { + type: 'form', + padding: 0, + labelGap: 5, + defaults: { + type: 'textbox', + size: 7, + value: '0', + flex: 1, + spellcheck: false, + onchange: function () { + var colorPickerCtrl = win.find('colorpicker')[0]; + var name, value; + name = this.name(); + value = this.value(); + if (name === 'hex') { + value = '#' + value; + setColor(win, value); + colorPickerCtrl.value(value); + return; + } + value = { + r: win.find('#r').value(), + g: win.find('#g').value(), + b: win.find('#b').value() + }; + colorPickerCtrl.value(value); + setColor(win, value); + } + }, + items: [ + { + name: 'r', + label: 'R', + autofocus: 1 + }, + { + name: 'g', + label: 'G' + }, + { + name: 'b', + label: 'B' + }, + { + name: 'hex', + label: '#', + value: '000000' + }, + { + name: 'preview', + type: 'container', + border: 1 + } + ] + } + ] + }, + onSubmit: function () { + callback('#' + win.toJSON().hex); + } + }); + setColor(win, value); + }; + var $_2hbjx89ljd09evps = { open: open }; + + PluginManager.add('colorpicker', function (editor) { + if (!editor.settings.color_picker_callback) { + editor.settings.color_picker_callback = function (callback, value) { + $_2hbjx89ljd09evps.open(editor, callback, value); + }; + } + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/colorpicker/plugin.min.js b/node_modules/tinymce/plugins/colorpicker/plugin.min.js new file mode 100644 index 0000000..3ffbe16 --- /dev/null +++ b/node_modules/tinymce/plugins/colorpicker/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Color"),i=function(e,n){e.find("#preview")[0].getEl().style.background=n},t=function(e,t){var l=n(t),a=l.toRgb();e.fromJSON({r:a.r,g:a.g,b:a.b,hex:l.toHex().substr(1)}),i(e,l.toHex())},l=function(e,n,l){var a=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:l,onchange:function(){var e=this.rgb();a&&(a.find("#r").value(e.r),a.find("#g").value(e.g),a.find("#b").value(e.b),a.find("#hex").value(this.value().substr(1)),i(a,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=a.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return t(a,n="#"+n),void i.value(n);n={r:a.find("#r").value(),g:a.find("#g").value(),b:a.find("#b").value()},i.value(n),t(a,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+a.toJSON().hex)}});t(a,l)};e.add("colorpicker",function(e){e.settings.color_picker_callback||(e.settings.color_picker_callback=function(n,i){l(e,n,i)})})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/contextmenu/index.js b/node_modules/tinymce/plugins/contextmenu/index.js new file mode 100644 index 0000000..ae837e2 --- /dev/null +++ b/node_modules/tinymce/plugins/contextmenu/index.js @@ -0,0 +1,7 @@ +// Exports the "contextmenu" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/contextmenu') +// ES2015: +// import 'tinymce/plugins/contextmenu' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/contextmenu/plugin.js b/node_modules/tinymce/plugins/contextmenu/plugin.js new file mode 100644 index 0000000..0d8e82e --- /dev/null +++ b/node_modules/tinymce/plugins/contextmenu/plugin.js @@ -0,0 +1,167 @@ +(function () { +var contextmenu = (function () { + 'use strict'; + + var Cell = function (initial) { + var value = initial; + var get = function () { + return value; + }; + var set = function (v) { + value = v; + }; + var clone = function () { + return Cell(get()); + }; + return { + get: get, + set: set, + clone: clone + }; + }; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var get = function (visibleState) { + var isContextMenuVisible = function () { + return visibleState.get(); + }; + return { isContextMenuVisible: isContextMenuVisible }; + }; + var $_8dippc9qjd09evqc = { get: get }; + + var shouldNeverUseNative = function (editor) { + return editor.settings.contextmenu_never_use_native; + }; + var getContextMenu = function (editor) { + return editor.getParam('contextmenu', 'link openlink image inserttable | cell row column deletetable'); + }; + var $_ov1mf9sjd09evqf = { + shouldNeverUseNative: shouldNeverUseNative, + getContextMenu: getContextMenu + }; + + var Env = tinymce.util.Tools.resolve('tinymce.Env'); + + var DOMUtils = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var nu = function (x, y) { + return { + x: x, + y: y + }; + }; + var transpose = function (pos, dx, dy) { + return nu(pos.x + dx, pos.y + dy); + }; + var fromPageXY = function (e) { + return nu(e.pageX, e.pageY); + }; + var fromClientXY = function (e) { + return nu(e.clientX, e.clientY); + }; + var transposeUiContainer = function (element, pos) { + if (element && DOMUtils.DOM.getStyle(element, 'position', true) !== 'static') { + var containerPos = DOMUtils.DOM.getPos(element); + var dx = containerPos.x - element.scrollLeft; + var dy = containerPos.y - element.scrollTop; + return transpose(pos, -dx, -dy); + } else { + return transpose(pos, 0, 0); + } + }; + var transposeContentAreaContainer = function (element, pos) { + var containerPos = DOMUtils.DOM.getPos(element); + return transpose(pos, containerPos.x, containerPos.y); + }; + var getUiContainer = function (editor) { + return Env.container; + }; + var getPos = function (editor, e) { + if (editor.inline) { + return transposeUiContainer(getUiContainer(editor), fromPageXY(e)); + } else { + var iframePos = transposeContentAreaContainer(editor.getContentAreaContainer(), fromClientXY(e)); + return transposeUiContainer(getUiContainer(editor), iframePos); + } + }; + var $_jtb59tjd09evqi = { getPos: getPos }; + + var Factory = tinymce.util.Tools.resolve('tinymce.ui.Factory'); + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var renderMenu = function (editor, visibleState) { + var menu, contextmenu; + var items = []; + contextmenu = $_ov1mf9sjd09evqf.getContextMenu(editor); + Tools.each(contextmenu.split(/[ ,]/), function (name) { + var item = editor.menuItems[name]; + if (name === '|') { + item = { text: name }; + } + if (item) { + item.shortcut = ''; + items.push(item); + } + }); + for (var i = 0; i < items.length; i++) { + if (items[i].text === '|') { + if (i === 0 || i === items.length - 1) { + items.splice(i, 1); + } + } + } + menu = Factory.create('menu', { + items: items, + context: 'contextmenu', + classes: 'contextmenu' + }).renderTo(); + menu.on('hide', function (e) { + if (e.control === this) { + visibleState.set(false); + } + }); + editor.on('remove', function () { + menu.remove(); + menu = null; + }); + return menu; + }; + var show = function (editor, pos, visibleState, menu) { + if (menu.get() === null) { + menu.set(renderMenu(editor, visibleState)); + } else { + menu.get().show(); + } + menu.get().moveTo(pos.x, pos.y); + visibleState.set(true); + }; + var $_br9ypx9wjd09evql = { show: show }; + + var isNativeOverrideKeyEvent = function (editor, e) { + return e.ctrlKey && !$_ov1mf9sjd09evqf.shouldNeverUseNative(editor); + }; + var setup = function (editor, visibleState, menu) { + editor.on('contextmenu', function (e) { + if (isNativeOverrideKeyEvent(editor, e)) { + return; + } + e.preventDefault(); + $_br9ypx9wjd09evql.show(editor, $_jtb59tjd09evqi.getPos(editor, e), visibleState, menu); + }); + }; + var $_4xypji9rjd09evqe = { setup: setup }; + + PluginManager.add('contextmenu', function (editor) { + var menu = Cell(null), visibleState = Cell(false); + $_4xypji9rjd09evqe.setup(editor, visibleState, menu); + return $_8dippc9qjd09evqc.get(visibleState); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/contextmenu/plugin.min.js b/node_modules/tinymce/plugins/contextmenu/plugin.min.js new file mode 100644 index 0000000..bdb6754 --- /dev/null +++ b/node_modules/tinymce/plugins/contextmenu/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t=function(n){var e=n,o=function(){return e};return{get:o,set:function(t){e=t},clone:function(){return t(o())}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){return{isContextMenuVisible:function(){return t.get()}}},o=function(t){return t.settings.contextmenu_never_use_native},r=function(t){return t.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},i=tinymce.util.Tools.resolve("tinymce.Env"),u=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=function(t,n){return{x:t,y:n}},l=function(t,n,e){return c(t.x+n,t.y+e)},s=function(t,n){if(t&&"static"!==u.DOM.getStyle(t,"position",!0)){var e=u.DOM.getPos(t),o=e.x-t.scrollLeft,r=e.y-t.scrollTop;return l(n,-o,-r)}return l(n,0,0)},a=function(t){return i.container},f=function(t,n){if(t.inline)return s(a(),c((f=n).pageX,f.pageY));var e,o,r,i,f,m=(e=t.getContentAreaContainer(),o=c((i=n).clientX,i.clientY),r=u.DOM.getPos(e),l(o,r.x,r.y));return s(a(),m)},m=tinymce.util.Tools.resolve("tinymce.ui.Factory"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=function(t,n,e,o){null===o.get()?o.set(function(t,n){var e,o,i=[];o=r(t),v.each(o.split(/[ ,]/),function(n){var e=t.menuItems[n];"|"===n&&(e={text:n}),e&&(e.shortcut="",i.push(e))});for(var u=0;uKx}s1_F$4FCWDA^8LW0018VEC2ui01^Na000Hw;3tYzX_jM3Qpv$_M?zI9i5=0S zX-{-uv=l3%&P0s%m9Ox_a(m_c|u z01g3U0`Wll5)poVdma=N8y<3f0Sf~hXmTC}2oxMW4FdxUj+z4<0}lrX2nP=qkDRIt z9Ge*(qzMrj3jrIOjvI{`5eWzt3`G_T8yChG8w(a19SkK12@M(+799Zr9n=~PzBCmA z5)BU-)YKUd4H5!D9|!^o9kWIe9SH(WDHRk92}DZ?3})2$P@$55g90f0N)ZA8JID5J Aw*UYD literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-cry.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-cry.gif new file mode 100644 index 0000000000000000000000000000000000000000..74d897a4f6d22e814e2b054e98b8a75fb464b4be GIT binary patch literal 329 zcmV-P0k-}}Nk%w1VG;lm0Mr-&E)xPSit@9T3%;vR+|V+?t0A(pllJjXrMl7n=_A_a za^B+Su$LjvyC3@TIQZNZa##w=!k(SO^P#bO*w(eU#;{U83XFCU_V)J5wrb+;g2vkN z#>U24qVoOvY5)KLA^8LW0018VEC2ui01^Na000HX;3tY$X_jM3QUfCh%s^o(nF++< zc?Th6v=oL>*by8K!mhvwelUXuuW&&U9iGO3hM@>Njw{l^#0q9mWpcefdI;O$;efnY zkd~@r-o$*74FCWI1%d((4+jDz0va0>69^fI6%`W{8w!gU1pyL>prH>E0R<%k6Aq%H z4ij+^9TEwM5P}eh2@)L<~6+>@EpxfA0YrcPNsSu literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-embarassed.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-embarassed.gif new file mode 100644 index 0000000000000000000000000000000000000000..963a96b8a7593b1d8bcbab073abe5ee4e539dbf6 GIT binary patch literal 331 zcmV-R0kr-{Nk%w1VG;lm0MrryDh>j~yq&6%75dW~z^P39(NxsGDE{UkxtkIEq(S-a zRKlwv+S=Lr?>hbYY~sQ?c3T&ZcN_Nh_EU3s(>Io6B&>WW`@bsw**)Ocy1bht z{*G6|uwwqUQ2+n{A^8LW0018VEC2ui01^Na000HZ;3tYwX_jM3YQ!c88=*-m*&&bO zILd=`w3KAC;8hxpif*w9ek6oqV-Z0L77fROK$BSR@5BAv-%C>6y>>#+D4e#&nz^qMDItlpp zTG728+|V&?R13PIEBW(C`uh6d*t-1sZ^XQv;oDD}iYLOV7uVO;{`xl4#4tJ{0;h@! z>)kdc3IhA?Hvj+tA^8La0018VEC2ui01^Na06+!P;3tYuX_ljS7!u|-O)I}TzP1q%xT4HOFwMJaO;2ml)!00$)141pU08x3594IX?4 o5YuAA8yXz~76K1c;3^jg77WP185Rf^u}23N0sR5^q(T4yJ1sVN5dZ)H literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-frown.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-frown.gif new file mode 100644 index 0000000000000000000000000000000000000000..716f55e161bfebb1c3d34f0b0f40c177fc82c30b GIT binary patch literal 340 zcmV-a0jvH;Nk%w1VG;lm0MroxK_>;q#>Sw62=mns-On=0wransPVevT^YK{Dy(0YY zH)vE6x0?;Wqb>gZas1^OT0si>`ugD5y87}*#H$s=yq(wA*8cf7{`y+(+9J7|9QfT7 z`ROHiU=Y&6FaQ7mA^8LW0018VEC2ui01^Na000Hi;3tYvX_jM3N`@u~nju9hSuh^r zIEcp-wA7(NL0~2d#RP+(G!CPPA>o*KJjv_CkucCA5=K?AfF#RG2V*8BU@jL304|4P z2;PGRF@bj$et;Jf2pR_mVsIA<85|n}kQ*Bq42Ovqj*yy>6P0=h3X&9Z01yyk~2N4w%7#RW^55W%`0vQ+-6(y_*2pqz~90*;x9}yM}%$UI(7t#$D mK_3Se1{4HKM+6iG7EmeH6$V631{L5n)#CyC0qx-*Apkoyg?w!Q literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-innocent.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-innocent.gif new file mode 100644 index 0000000000000000000000000000000000000000..334d49e0e60f2997c9ba24071764f95d9e08a5cc GIT binary patch literal 336 zcmV-W0k8f?Nk%w1VG;lm0MrryI4TI-%dP0m5~*+Y`T~ z7Rth){q{I_X%*S48uRZ|(b3V&wIKTX`u+WJzo<^$#wuY;3W|Cf{O29IkTAcaE&lpe z+P*^H)-tknA^-pYA^8LW0018VEC2ui01^Na000He;3tYwX_n)75QgVvNQ`6#5gcMm zEEG~blgXokptKAJgCU?%JT?yos!R6cPtcQWh2siHlNI2L}ifQhgX02^InZ2?-ktkqVRyZJY^Trk|lv zovp437?1~d46O)?2(1i+2NDYk8<+_Kil!K!3njA^!I#dL8x<729}*B65mC=m5gHH@ iDi9P3f*VjB3KS4HDb_qqRul{0DIT=Nk%w1VG;lm0Mrx!QauaC#>Vb6G=_5=^YB^9wrc376Sb5I-qJGf@9vZ# z5WlKU(!eVB+7tfnDXp0zyB`?BZ5IChalob*`uh6d*t+@dKGHcU+L|83yq*5~IoH?L zy`?Gp<{bX|SpWb4A^8LW0018VEC2ui01^Na000Hg;3tYyX_jM3R?Bl7&r(q;SsVx< zNd$5fv{ZsKA$SlL3&KN~a1tZRf*~1Ltkx9~2uL3&z-yb0WJDRY082|tP literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-laughing.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-laughing.gif new file mode 100644 index 0000000000000000000000000000000000000000..82c5b182e61d32bd394acae551eff180f1eebd26 GIT binary patch literal 343 zcmV-d0jT~*Nk%w1VG;lm0Q4UK!lp8=s;1-69HWK?p_PpF=Pd8~Ygtcnp*fHAL z**;z>w3iC}`fmL6IkKB1N;3zEa}&zKpsu1;_V)HocR5-{J~BcYvE`YXhBnc@CfU=! za(Ec zG>66zv=rqr;2j)}gKqE$ekcSD?}0=WLB?AWp85)qALd+P=4)6X4oXy{bw2>K^d$ z@6ERvva+(4ib~41YUkTEn1&#?rzrOHT>1I=Y*h`+%*@WtPUPg|!@EEI_d5LgZ>^Og z-qyBKJqy*wF8}}lA^8La0018VEC2ui01^Na06+!6;3tYxX_lj?7+U61R3gAaEg8x< zT>%mSfCwURnWQF&g=Q0ZxH1ulW`QtH0>O!5%iT_X0VBy_@EkOngU8?ye~=H!t21{= z9@Uj3a_UbE88~kh5Eq7rh!7QSBn1c?0|Off1&k^`5*QE<4-gmSR<4C>Dj%C>6W(lWoQPVevT^YB^Fy&h6M z4YZgH{O~qtR1(Ci8T;lQ`uh6d*t-7xar*K{#Jrulo-Wtd*44u?{`oh#n;gQXGXDEo z_}UUC3IeK%0ssI2A^8La0018VEC2ui01^Na06+!R;3tYuX_ljSEE482&%+G^XK%|f zLKbCc4u{4-u|QG~LqamSTo?@JM3OKZAr!|Z2IzP@fY`=CIg$vA3qm46TowfLCt29I z6pDKuvnf~)83+sm9yW#?9s>^(89F=~2?!W44-6Ox2^vNza}fp^9v&G65pp936%Gg+ z6HpTy2o4oGoh+>l3Q)KVQwybl2oo*<4a3D469|nfEii|MH4`}p1_cZp0ssj%2>=2d q41Na?)CpS;4gvxWVpZcR76uLludD?Q1{SnP2NnVU0rZ&)0RTIit8@_n literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-surprised.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-surprised.gif new file mode 100644 index 0000000000000000000000000000000000000000..0cc9bb71cca4cdeafbb248ce7e07c3708c1cbd64 GIT binary patch literal 338 zcmV-Y0j>T=Nk%w1VG;lm0Q4UK`{WwN#>SnDDC*4*{OcpiwransPVevTQacIr@mkQp zCf(06s)_=>r7UYx48o@u`uh6d*t-7rH~ji<`P&oj;5Wp)o!8ga`SV6TA_BIW5#ZWV z{`*)c32kA}f=futY?#YE7kxGD|7L}4&OEDw$hkm+~<00QS>F_H?J#bz?uEHnl42f5(9 z5O)`6Q9V2o5;YVLUK)Y`7!Nr+4GMq?85s%^2?`BGDRU798Vn2?1`%>22R{iO0u>bk z9tlA?nk*O<3zHJH6&Mp5qALj)E(mxM!Y&vII4dm@1Ov{`f*8pL3xPEVUI>D>1_uxa kNm?`6VH{N6Di;P13m6<67z+;u7qCYM7XkVK^`jvGJD~P?KL7v# literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-tongue-out.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-tongue-out.gif new file mode 100644 index 0000000000000000000000000000000000000000..2075dc16058f1f17912167675ce5cfb9986fc71d GIT binary patch literal 328 zcmV-O0k{4~Nk%w1VG;lm0Mrx!CJF+^#>SU@3-{U*rx+Q^wrc$ABfqLn@9*x?z8(4X zSW-O=@){bmmI~g|GQXoP);cvj3|f1M8e@{G*!tYaiCEujj1NGxRN#6#tiCETo+{x{Hkzt z5k-kPvcD=V2nbmjCgL6k{uF&2nP-t0s;w<385Nx2oxDb z9T5Pp7qJl?3Kkh9oe2sCr5F$p7zPSlsUH*@54w*83=9Or4;w)r2pcU95(FL|1Th;< aDaRQH4;Tal7#Y$v#?=Au0pHUfApkpvZg^t= literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-undecided.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-undecided.gif new file mode 100644 index 0000000000000000000000000000000000000000..bef7e257303f8243c89787e7a7f9955dd1f112e2 GIT binary patch literal 337 zcmV-X0j~Z>Nk%w1VG;lm0MroxDi#99#>R?y8~4}{%C>6#>?OadPVevTr-=vi@LATn z4rERY-qJF+n+?CCE&B3D{{3Shh?>WT0o%`b%*Voqm`dL;(4F35y zc485^n;g!+Bme*aA^8LW0018VEC2ui01^Na000Hf;3tYvX_jM3N=AnuogqakNi<9X zK?&0kwA8^tNn{?C$|IAYI1ZzT!2>}iuMddFK#NEkRl!7%6brJAnUs;)XcnA}TNBSP zxQ9;SvEfwYeSaGd2^|LqU~(QF1qBxr3Ii7x84ZVt8wCTKoSYAqc?p`G2onnpk`IOl z1`HLGj}riN2p1K12N4z&8IBDc6tEWs859;JtRB6>lf+xO9}yT19toMv8wnl`7(pKg j7zPv!OGgY81{hE&(iR3pP6ig;HPPS!_yOwPA0Yrc)=Yf3 literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/emoticons/img/smiley-wink.gif b/node_modules/tinymce/plugins/emoticons/img/smiley-wink.gif new file mode 100644 index 0000000000000000000000000000000000000000..0631c7616ec8624ddeee02b633326f697ee72f80 GIT binary patch literal 350 zcmV-k0ipg!Nk%w1VG;lm0Q4UK(ZVUl#>Sn03F^-g-qAA3wransPV?|t@9*x%vmQ`7 z4E*pcw3rOOq%3t@4*K#({N^40{c-yG`rz2Q!KfI-yq*61HrBop*VoqW<}&{JS@_x# zwwfF$4Fdh~IsgCwA^8La0018VEC2ui01^Na06+!X;3tYwX_ljiFp=e23$zWxW@`*G zN?2ty6iUNT!AMdPLn89IbS7WCB_mWF$+hzY-{PWkp(?(Xf;zbH~P z3jOdj?W+^YwrakfE8fyG&5jTBz!3WS`fgM_;MltQ+c}4GO8)(E`S3`@yq&d~5!ct& z)v79NObo)O7XSbNA^8LW0018VEC2ui01^Na000He;3tYwX_jM3QifI(nn6h_*=Wyk zUB{y}v=qYOIUF#R3dZPhAVv~H;(|a2yN_5FH&J0|$eJ3kw4gj1Y?v5d#>LMV12^6BYy$1)ZKA zga!|m2?POz0R)f>4+aPl8KD{gz`+G_9vLMFQU?RU!8uyH9}*i52|cC+7S0YEK_3Vk i1|APfM-Ltb8&4_H83sg61{vHn(cc000qNZzApkp'; + }); + emoticonsHtml += ''; + }); + emoticonsHtml += ''; + return emoticonsHtml; + }; + var $_3gkq0ga8jd09evrp = { getHtml: getHtml }; + + var insertEmoticon = function (editor, src, alt) { + editor.insertContent(editor.dom.createHTML('img', { + src: src, + alt: alt + })); + }; + var register = function (editor, pluginUrl) { + var panelHtml = $_3gkq0ga8jd09evrp.getHtml(pluginUrl); + editor.addButton('emoticons', { + type: 'panelbutton', + panel: { + role: 'application', + autohide: true, + html: panelHtml, + onclick: function (e) { + var linkElm = editor.dom.getParent(e.target, 'a'); + if (linkElm) { + insertEmoticon(editor, linkElm.getAttribute('data-mce-url'), linkElm.getAttribute('data-mce-alt')); + this.hide(); + } + } + }, + tooltip: 'Emoticons' + }); + }; + var $_9tmk0ga7jd09evro = { register: register }; + + PluginManager.add('emoticons', function (editor, pluginUrl) { + $_9tmk0ga7jd09evro.register(editor, pluginUrl); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/emoticons/plugin.min.js b/node_modules/tinymce/plugins/emoticons/plugin.min.js new file mode 100644 index 0000000..75f5f7c --- /dev/null +++ b/node_modules/tinymce/plugins/emoticons/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]],o=function(t){var o;return o='',e.each(i,function(i){o+="",e.each(i,function(e){var i=t+"/img/smiley-"+e+".gif";o+=''}),o+=""}),o+="
"},n=function(t,e){var i=o(e);t.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:i,onclick:function(e){var i,o,n,a=t.dom.getParent(e.target,"a");a&&(i=t,o=a.getAttribute("data-mce-url"),n=a.getAttribute("data-mce-alt"),i.insertContent(i.dom.createHTML("img",{src:o,alt:n})),this.hide())}},tooltip:"Emoticons"})};t.add("emoticons",function(t,e){n(t,e)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/fullpage/index.js b/node_modules/tinymce/plugins/fullpage/index.js new file mode 100644 index 0000000..c327d6a --- /dev/null +++ b/node_modules/tinymce/plugins/fullpage/index.js @@ -0,0 +1,7 @@ +// Exports the "fullpage" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/fullpage') +// ES2015: +// import 'tinymce/plugins/fullpage' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/fullpage/plugin.js b/node_modules/tinymce/plugins/fullpage/plugin.js new file mode 100644 index 0000000..a110e78 --- /dev/null +++ b/node_modules/tinymce/plugins/fullpage/plugin.js @@ -0,0 +1,519 @@ +(function () { +var fullpage = (function () { + 'use strict'; + + var Cell = function (initial) { + var value = initial; + var get = function () { + return value; + }; + var set = function (v) { + value = v; + }; + var clone = function () { + return Cell(get()); + }; + return { + get: get, + set: set, + clone: clone + }; + }; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var DomParser = tinymce.util.Tools.resolve('tinymce.html.DomParser'); + + var Node = tinymce.util.Tools.resolve('tinymce.html.Node'); + + var Serializer = tinymce.util.Tools.resolve('tinymce.html.Serializer'); + + var shouldHideInSourceView = function (editor) { + return editor.getParam('fullpage_hide_in_source_view'); + }; + var getDefaultXmlPi = function (editor) { + return editor.getParam('fullpage_default_xml_pi'); + }; + var getDefaultEncoding = function (editor) { + return editor.getParam('fullpage_default_encoding'); + }; + var getDefaultFontFamily = function (editor) { + return editor.getParam('fullpage_default_font_family'); + }; + var getDefaultFontSize = function (editor) { + return editor.getParam('fullpage_default_font_size'); + }; + var getDefaultTextColor = function (editor) { + return editor.getParam('fullpage_default_text_color'); + }; + var getDefaultTitle = function (editor) { + return editor.getParam('fullpage_default_title'); + }; + var getDefaultDocType = function (editor) { + return editor.getParam('fullpage_default_doctype', ''); + }; + var $_anyw30b4jd09evvn = { + shouldHideInSourceView: shouldHideInSourceView, + getDefaultXmlPi: getDefaultXmlPi, + getDefaultEncoding: getDefaultEncoding, + getDefaultFontFamily: getDefaultFontFamily, + getDefaultFontSize: getDefaultFontSize, + getDefaultTextColor: getDefaultTextColor, + getDefaultTitle: getDefaultTitle, + getDefaultDocType: getDefaultDocType + }; + + var parseHeader = function (head) { + return DomParser({ + validate: false, + root_name: '#document' + }).parse(head); + }; + var htmlToData = function (editor, head) { + var headerFragment = parseHeader(head); + var data = {}; + var elm, matches; + function getAttr(elm, name) { + var value = elm.attr(name); + return value || ''; + } + data.fontface = $_anyw30b4jd09evvn.getDefaultFontFamily(editor); + data.fontsize = $_anyw30b4jd09evvn.getDefaultFontSize(editor); + elm = headerFragment.firstChild; + if (elm.type === 7) { + data.xml_pi = true; + matches = /encoding="([^"]+)"/.exec(elm.value); + if (matches) { + data.docencoding = matches[1]; + } + } + elm = headerFragment.getAll('#doctype')[0]; + if (elm) { + data.doctype = ''; + } + elm = headerFragment.getAll('title')[0]; + if (elm && elm.firstChild) { + data.title = elm.firstChild.value; + } + Tools.each(headerFragment.getAll('meta'), function (meta) { + var name = meta.attr('name'); + var httpEquiv = meta.attr('http-equiv'); + var matches; + if (name) { + data[name.toLowerCase()] = meta.attr('content'); + } else if (httpEquiv === 'Content-Type') { + matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content')); + if (matches) { + data.docencoding = matches[1]; + } + } + }); + elm = headerFragment.getAll('html')[0]; + if (elm) { + data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang'); + } + data.stylesheets = []; + Tools.each(headerFragment.getAll('link'), function (link) { + if (link.attr('rel') === 'stylesheet') { + data.stylesheets.push(link.attr('href')); + } + }); + elm = headerFragment.getAll('body')[0]; + if (elm) { + data.langdir = getAttr(elm, 'dir'); + data.style = getAttr(elm, 'style'); + data.visited_color = getAttr(elm, 'vlink'); + data.link_color = getAttr(elm, 'link'); + data.active_color = getAttr(elm, 'alink'); + } + return data; + }; + var dataToHtml = function (editor, data, head) { + var headerFragment, headElement, html, elm, value; + var dom = editor.dom; + function setAttr(elm, name, value) { + elm.attr(name, value ? value : undefined); + } + function addHeadNode(node) { + if (headElement.firstChild) { + headElement.insert(node, headElement.firstChild); + } else { + headElement.append(node); + } + } + headerFragment = parseHeader(head); + headElement = headerFragment.getAll('head')[0]; + if (!headElement) { + elm = headerFragment.getAll('html')[0]; + headElement = new Node('head', 1); + if (elm.firstChild) { + elm.insert(headElement, elm.firstChild, true); + } else { + elm.append(headElement); + } + } + elm = headerFragment.firstChild; + if (data.xml_pi) { + value = 'version="1.0"'; + if (data.docencoding) { + value += ' encoding="' + data.docencoding + '"'; + } + if (elm.type !== 7) { + elm = new Node('xml', 7); + headerFragment.insert(elm, headerFragment.firstChild, true); + } + elm.value = value; + } else if (elm && elm.type === 7) { + elm.remove(); + } + elm = headerFragment.getAll('#doctype')[0]; + if (data.doctype) { + if (!elm) { + elm = new Node('#doctype', 10); + if (data.xml_pi) { + headerFragment.insert(elm, headerFragment.firstChild); + } else { + addHeadNode(elm); + } + } + elm.value = data.doctype.substring(9, data.doctype.length - 1); + } else if (elm) { + elm.remove(); + } + elm = null; + Tools.each(headerFragment.getAll('meta'), function (meta) { + if (meta.attr('http-equiv') === 'Content-Type') { + elm = meta; + } + }); + if (data.docencoding) { + if (!elm) { + elm = new Node('meta', 1); + elm.attr('http-equiv', 'Content-Type'); + elm.shortEnded = true; + addHeadNode(elm); + } + elm.attr('content', 'text/html; charset=' + data.docencoding); + } else if (elm) { + elm.remove(); + } + elm = headerFragment.getAll('title')[0]; + if (data.title) { + if (!elm) { + elm = new Node('title', 1); + addHeadNode(elm); + } else { + elm.empty(); + } + elm.append(new Node('#text', 3)).value = data.title; + } else if (elm) { + elm.remove(); + } + Tools.each('keywords,description,author,copyright,robots'.split(','), function (name) { + var nodes = headerFragment.getAll('meta'); + var i, meta; + var value = data[name]; + for (i = 0; i < nodes.length; i++) { + meta = nodes[i]; + if (meta.attr('name') === name) { + if (value) { + meta.attr('content', value); + } else { + meta.remove(); + } + return; + } + } + if (value) { + elm = new Node('meta', 1); + elm.attr('name', name); + elm.attr('content', value); + elm.shortEnded = true; + addHeadNode(elm); + } + }); + var currentStyleSheetsMap = {}; + Tools.each(headerFragment.getAll('link'), function (stylesheet) { + if (stylesheet.attr('rel') === 'stylesheet') { + currentStyleSheetsMap[stylesheet.attr('href')] = stylesheet; + } + }); + Tools.each(data.stylesheets, function (stylesheet) { + if (!currentStyleSheetsMap[stylesheet]) { + elm = new Node('link', 1); + elm.attr({ + rel: 'stylesheet', + text: 'text/css', + href: stylesheet + }); + elm.shortEnded = true; + addHeadNode(elm); + } + delete currentStyleSheetsMap[stylesheet]; + }); + Tools.each(currentStyleSheetsMap, function (stylesheet) { + stylesheet.remove(); + }); + elm = headerFragment.getAll('body')[0]; + if (elm) { + setAttr(elm, 'dir', data.langdir); + setAttr(elm, 'style', data.style); + setAttr(elm, 'vlink', data.visited_color); + setAttr(elm, 'link', data.link_color); + setAttr(elm, 'alink', data.active_color); + dom.setAttribs(editor.getBody(), { + style: data.style, + dir: data.dir, + vLink: data.visited_color, + link: data.link_color, + aLink: data.active_color + }); + } + elm = headerFragment.getAll('html')[0]; + if (elm) { + setAttr(elm, 'lang', data.langcode); + setAttr(elm, 'xml:lang', data.langcode); + } + if (!headElement.firstChild) { + headElement.remove(); + } + html = Serializer({ + validate: false, + indent: true, + apply_source_formatting: true, + indent_before: 'head,html,body,meta,title,script,link,style', + indent_after: 'head,html,body,meta,title,script,link,style' + }).serialize(headerFragment); + return html.substring(0, html.indexOf('')); + }; + var $_8p8gcgb0jd09evv7 = { + parseHeader: parseHeader, + htmlToData: htmlToData, + dataToHtml: dataToHtml + }; + + var open = function (editor, headState) { + var data = $_8p8gcgb0jd09evv7.htmlToData(editor, headState.get()); + editor.windowManager.open({ + title: 'Document properties', + data: data, + defaults: { + type: 'textbox', + size: 40 + }, + body: [ + { + name: 'title', + label: 'Title' + }, + { + name: 'keywords', + label: 'Keywords' + }, + { + name: 'description', + label: 'Description' + }, + { + name: 'robots', + label: 'Robots' + }, + { + name: 'author', + label: 'Author' + }, + { + name: 'docencoding', + label: 'Encoding' + } + ], + onSubmit: function (e) { + var headHtml = $_8p8gcgb0jd09evv7.dataToHtml(editor, Tools.extend(data, e.data), headState.get()); + headState.set(headHtml); + } + }); + }; + var $_69rv5vayjd09evv4 = { open: open }; + + var register = function (editor, headState) { + editor.addCommand('mceFullPageProperties', function () { + $_69rv5vayjd09evv4.open(editor, headState); + }); + }; + var $_24ypkzaxjd09evv3 = { register: register }; + + var protectHtml = function (protect, html) { + Tools.each(protect, function (pattern) { + html = html.replace(pattern, function (str) { + return ''; + }); + }); + return html; + }; + var unprotectHtml = function (html) { + return html.replace(//g, function (a, m) { + return unescape(m); + }); + }; + var $_g0nxp5b6jd09evvu = { + protectHtml: protectHtml, + unprotectHtml: unprotectHtml + }; + + var each = Tools.each; + var low = function (s) { + return s.replace(/<\/?[A-Z]+/g, function (a) { + return a.toLowerCase(); + }); + }; + var handleSetContent = function (editor, headState, footState, evt) { + var startPos, endPos, content, headerFragment, styles = ''; + var dom = editor.dom; + var elm; + if (evt.selection) { + return; + } + content = $_g0nxp5b6jd09evvu.protectHtml(editor.settings.protect, evt.content); + if (evt.format === 'raw' && headState.get()) { + return; + } + if (evt.source_view && $_anyw30b4jd09evvn.shouldHideInSourceView(editor)) { + return; + } + if (content.length === 0 && !evt.source_view) { + content = Tools.trim(headState.get()) + '\n' + Tools.trim(content) + '\n' + Tools.trim(footState.get()); + } + content = content.replace(/<(\/?)BODY/gi, '<$1body'); + startPos = content.indexOf('', startPos); + headState.set(low(content.substring(0, startPos + 1))); + endPos = content.indexOf('\n'); + } + headerFragment = $_8p8gcgb0jd09evv7.parseHeader(headState.get()); + each(headerFragment.getAll('style'), function (node) { + if (node.firstChild) { + styles += node.firstChild.value; + } + }); + elm = headerFragment.getAll('body')[0]; + if (elm) { + dom.setAttribs(editor.getBody(), { + style: elm.attr('style') || '', + dir: elm.attr('dir') || '', + vLink: elm.attr('vlink') || '', + link: elm.attr('link') || '', + aLink: elm.attr('alink') || '' + }); + } + dom.remove('fullpage_styles'); + var headElm = editor.getDoc().getElementsByTagName('head')[0]; + if (styles) { + dom.add(headElm, 'style', { id: 'fullpage_styles' }, styles); + elm = dom.get('fullpage_styles'); + if (elm.styleSheet) { + elm.styleSheet.cssText = styles; + } + } + var currentStyleSheetsMap = {}; + Tools.each(headElm.getElementsByTagName('link'), function (stylesheet) { + if (stylesheet.rel === 'stylesheet' && stylesheet.getAttribute('data-mce-fullpage')) { + currentStyleSheetsMap[stylesheet.href] = stylesheet; + } + }); + Tools.each(headerFragment.getAll('link'), function (stylesheet) { + var href = stylesheet.attr('href'); + if (!href) { + return true; + } + if (!currentStyleSheetsMap[href] && stylesheet.attr('rel') === 'stylesheet') { + dom.add(headElm, 'link', { + 'rel': 'stylesheet', + 'text': 'text/css', + 'href': href, + 'data-mce-fullpage': '1' + }); + } + delete currentStyleSheetsMap[href]; + }); + Tools.each(currentStyleSheetsMap, function (stylesheet) { + stylesheet.parentNode.removeChild(stylesheet); + }); + }; + var getDefaultHeader = function (editor) { + var header = '', value, styles = ''; + if ($_anyw30b4jd09evvn.getDefaultXmlPi(editor)) { + var piEncoding = $_anyw30b4jd09evvn.getDefaultEncoding(editor); + header += '\n'; + } + header += $_anyw30b4jd09evvn.getDefaultDocType(editor); + header += '\n\n\n'; + if (value = $_anyw30b4jd09evvn.getDefaultTitle(editor)) { + header += '' + value + '\n'; + } + if (value = $_anyw30b4jd09evvn.getDefaultEncoding(editor)) { + header += '\n'; + } + if (value = $_anyw30b4jd09evvn.getDefaultFontFamily(editor)) { + styles += 'font-family: ' + value + ';'; + } + if (value = $_anyw30b4jd09evvn.getDefaultFontSize(editor)) { + styles += 'font-size: ' + value + ';'; + } + if (value = $_anyw30b4jd09evvn.getDefaultTextColor(editor)) { + styles += 'color: ' + value + ';'; + } + header += '\n\n'; + return header; + }; + var handleGetContent = function (editor, head, foot, evt) { + if (!evt.selection && (!evt.source_view || !$_anyw30b4jd09evvn.shouldHideInSourceView(editor))) { + evt.content = $_g0nxp5b6jd09evvu.unprotectHtml(Tools.trim(head) + '\n' + Tools.trim(evt.content) + '\n' + Tools.trim(foot)); + } + }; + var setup = function (editor, headState, footState) { + editor.on('BeforeSetContent', function (evt) { + handleSetContent(editor, headState, footState, evt); + }); + editor.on('GetContent', function (evt) { + handleGetContent(editor, headState.get(), footState.get(), evt); + }); + }; + var $_fe5sfdb5jd09evvp = { setup: setup }; + + var register$1 = function (editor) { + editor.addButton('fullpage', { + title: 'Document properties', + cmd: 'mceFullPageProperties' + }); + editor.addMenuItem('fullpage', { + text: 'Document properties', + cmd: 'mceFullPageProperties', + context: 'file' + }); + }; + var $_52c7czb7jd09evvv = { register: register$1 }; + + PluginManager.add('fullpage', function (editor) { + var headState = Cell(''), footState = Cell(''); + $_24ypkzaxjd09evv3.register(editor, headState); + $_52c7czb7jd09evvv.register(editor); + $_fe5sfdb5jd09evvp.setup(editor, headState, footState); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/fullpage/plugin.min.js b/node_modules/tinymce/plugins/fullpage/plugin.min.js new file mode 100644 index 0000000..9d2cdff --- /dev/null +++ b/node_modules/tinymce/plugins/fullpage/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=function(t){var n=t,l=function(){return n};return{get:l,set:function(e){n=e},clone:function(){return e(l())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=tinymce.util.Tools.resolve("tinymce.html.DomParser"),i=tinymce.util.Tools.resolve("tinymce.html.Node"),r=tinymce.util.Tools.resolve("tinymce.html.Serializer"),o=function(e){return e.getParam("fullpage_hide_in_source_view")},a=function(e){return e.getParam("fullpage_default_xml_pi")},c=function(e){return e.getParam("fullpage_default_encoding")},s=function(e){return e.getParam("fullpage_default_font_family")},u=function(e){return e.getParam("fullpage_default_font_size")},d=function(e){return e.getParam("fullpage_default_text_color")},f=function(e){return e.getParam("fullpage_default_title")},g=function(e){return e.getParam("fullpage_default_doctype","")},m=function(e){return l({validate:!1,root_name:"#document"}).parse(e)},h=m,p=function(e,t){var l,i,r=m(t),o={};function a(e,t){return e.attr(t)||""}return o.fontface=s(e),o.fontsize=u(e),7===(l=r.firstChild).type&&(o.xml_pi=!0,(i=/encoding="([^"]+)"/.exec(l.value))&&(o.docencoding=i[1])),(l=r.getAll("#doctype")[0])&&(o.doctype=""),(l=r.getAll("title")[0])&&l.firstChild&&(o.title=l.firstChild.value),n.each(r.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?o[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(o.docencoding=t[1])}),(l=r.getAll("html")[0])&&(o.langcode=a(l,"lang")||a(l,"xml:lang")),o.stylesheets=[],n.each(r.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&o.stylesheets.push(e.attr("href"))}),(l=r.getAll("body")[0])&&(o.langdir=a(l,"dir"),o.style=a(l,"style"),o.visited_color=a(l,"vlink"),o.link_color=a(l,"link"),o.active_color=a(l,"alink")),o},y=function(e,t,l){var o,a,c,s,u,d=e.dom;function f(e,t,n){e.attr(t,n||undefined)}function g(e){a.firstChild?a.insert(e,a.firstChild):a.append(e)}o=m(l),(a=o.getAll("head")[0])||(s=o.getAll("html")[0],a=new i("head",1),s.firstChild?s.insert(a,s.firstChild,!0):s.append(a)),s=o.firstChild,t.xml_pi?(u='version="1.0"',t.docencoding&&(u+=' encoding="'+t.docencoding+'"'),7!==s.type&&(s=new i("xml",7),o.insert(s,o.firstChild,!0)),s.value=u):s&&7===s.type&&s.remove(),s=o.getAll("#doctype")[0],t.doctype?(s||(s=new i("#doctype",10),t.xml_pi?o.insert(s,o.firstChild):g(s)),s.value=t.doctype.substring(9,t.doctype.length-1)):s&&s.remove(),s=null,n.each(o.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(s=e)}),t.docencoding?(s||((s=new i("meta",1)).attr("http-equiv","Content-Type"),s.shortEnded=!0,g(s)),s.attr("content","text/html; charset="+t.docencoding)):s&&s.remove(),s=o.getAll("title")[0],t.title?(s?s.empty():g(s=new i("title",1)),s.append(new i("#text",3)).value=t.title):s&&s.remove(),n.each("keywords,description,author,copyright,robots".split(","),function(e){var n,l,r=o.getAll("meta"),a=t[e];for(n=0;n"))},v=function(e,t){var l=p(e,t.get());e.windowManager.open({title:"Document properties",data:l,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(i){var r=y(e,n.extend(l,i.data),t.get());t.set(r)}})},_=function(e,t){e.addCommand("mceFullPageProperties",function(){v(e,t)})},b=function(e,t){return n.each(e,function(e){t=t.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),t},x=function(e){return e.replace(//g,function(e,t){return unescape(t)})},k=n.each,C=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},A=function(e){var t,n="",l="";if(a(e)){var i=c(e);n+='\n'}return n+=g(e),n+="\n\n\n",(t=f(e))&&(n+=""+t+"\n"),(t=c(e))&&(n+='\n'),(t=s(e))&&(l+="font-family: "+t+";"),(t=u(e))&&(l+="font-size: "+t+";"),(t=d(e))&&(l+="color: "+t+";"),n+="\n\n"},w=function(e,t,l){e.on("BeforeSetContent",function(i){!function(e,t,l,i){var r,a,c,s,u,d="",f=e.dom;if(!(i.selection||(c=b(e.settings.protect,i.content),"raw"===i.format&&t.get()||i.source_view&&o(e)))){0!==c.length||i.source_view||(c=n.trim(t.get())+"\n"+n.trim(c)+"\n"+n.trim(l.get())),-1!==(r=(c=c.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("",r),t.set(C(c.substring(0,r+1))),-1===(a=c.indexOf("\n")),s=h(t.get()),k(s.getAll("style"),function(e){e.firstChild&&(d+=e.firstChild.value)}),(u=s.getAll("body")[0])&&f.setAttribs(e.getBody(),{style:u.attr("style")||"",dir:u.attr("dir")||"",vLink:u.attr("vlink")||"",link:u.attr("link")||"",aLink:u.attr("alink")||""}),f.remove("fullpage_styles");var g=e.getDoc().getElementsByTagName("head")[0];d&&(f.add(g,"style",{id:"fullpage_styles"},d),(u=f.get("fullpage_styles")).styleSheet&&(u.styleSheet.cssText=d));var m={};n.each(g.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(m[e.href]=e)}),n.each(s.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;m[t]||"stylesheet"!==e.attr("rel")||f.add(g,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete m[t]}),n.each(m,function(e){e.parentNode.removeChild(e)})}}(e,t,l,i)}),e.on("GetContent",function(i){var r,a,c,s;r=e,a=t.get(),c=l.get(),(s=i).selection||s.source_view&&o(r)||(s.content=x(n.trim(a)+"\n"+n.trim(s.content)+"\n"+n.trim(c)))})},P=function(e){e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"})};t.add("fullpage",function(t){var n=e(""),l=e("");_(t,n),P(t),w(t,n,l)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/fullscreen/index.js b/node_modules/tinymce/plugins/fullscreen/index.js new file mode 100644 index 0000000..6b4e263 --- /dev/null +++ b/node_modules/tinymce/plugins/fullscreen/index.js @@ -0,0 +1,7 @@ +// Exports the "fullscreen" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/fullscreen') +// ES2015: +// import 'tinymce/plugins/fullscreen' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/fullscreen/plugin.js b/node_modules/tinymce/plugins/fullscreen/plugin.js new file mode 100644 index 0000000..8f2a8c0 --- /dev/null +++ b/node_modules/tinymce/plugins/fullscreen/plugin.js @@ -0,0 +1,174 @@ +(function () { +var fullscreen = (function () { + 'use strict'; + + var Cell = function (initial) { + var value = initial; + var get = function () { + return value; + }; + var set = function (v) { + value = v; + }; + var clone = function () { + return Cell(get()); + }; + return { + get: get, + set: set, + clone: clone + }; + }; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var get = function (fullscreenState) { + return { + isFullscreen: function () { + return fullscreenState.get() !== null; + } + }; + }; + var $_dmb2mrbbjd09evwu = { get: get }; + + var DOMUtils = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var fireFullscreenStateChanged = function (editor, state) { + editor.fire('FullscreenStateChanged', { state: state }); + }; + var $_5ri4j0bfjd09evxa = { fireFullscreenStateChanged: fireFullscreenStateChanged }; + + var DOM = DOMUtils.DOM; + var getWindowSize = function () { + var w; + var h; + var win = window; + var doc = document; + var body = doc.body; + if (body.offsetWidth) { + w = body.offsetWidth; + h = body.offsetHeight; + } + if (win.innerWidth && win.innerHeight) { + w = win.innerWidth; + h = win.innerHeight; + } + return { + w: w, + h: h + }; + }; + var getScrollPos = function () { + var vp = DOM.getViewPort(); + return { + x: vp.x, + y: vp.y + }; + }; + var setScrollPos = function (pos) { + window.scrollTo(pos.x, pos.y); + }; + var toggleFullscreen = function (editor, fullscreenState) { + var body = document.body; + var documentElement = document.documentElement; + var editorContainerStyle; + var editorContainer, iframe, iframeStyle; + var fullscreenInfo = fullscreenState.get(); + var resize = function () { + DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight)); + }; + var removeResize = function () { + DOM.unbind(window, 'resize', resize); + }; + editorContainer = editor.getContainer(); + editorContainerStyle = editorContainer.style; + iframe = editor.getContentAreaContainer().firstChild; + iframeStyle = iframe.style; + if (!fullscreenInfo) { + var newFullScreenInfo = { + scrollPos: getScrollPos(), + containerWidth: editorContainerStyle.width, + containerHeight: editorContainerStyle.height, + iframeWidth: iframeStyle.width, + iframeHeight: iframeStyle.height, + resizeHandler: resize, + removeHandler: removeResize + }; + iframeStyle.width = iframeStyle.height = '100%'; + editorContainerStyle.width = editorContainerStyle.height = ''; + DOM.addClass(body, 'mce-fullscreen'); + DOM.addClass(documentElement, 'mce-fullscreen'); + DOM.addClass(editorContainer, 'mce-fullscreen'); + DOM.bind(window, 'resize', resize); + editor.on('remove', removeResize); + resize(); + fullscreenState.set(newFullScreenInfo); + $_5ri4j0bfjd09evxa.fireFullscreenStateChanged(editor, true); + } else { + iframeStyle.width = fullscreenInfo.iframeWidth; + iframeStyle.height = fullscreenInfo.iframeHeight; + if (fullscreenInfo.containerWidth) { + editorContainerStyle.width = fullscreenInfo.containerWidth; + } + if (fullscreenInfo.containerHeight) { + editorContainerStyle.height = fullscreenInfo.containerHeight; + } + DOM.removeClass(body, 'mce-fullscreen'); + DOM.removeClass(documentElement, 'mce-fullscreen'); + DOM.removeClass(editorContainer, 'mce-fullscreen'); + setScrollPos(fullscreenInfo.scrollPos); + DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler); + editor.off('remove', fullscreenInfo.removeHandler); + fullscreenState.set(null); + $_5ri4j0bfjd09evxa.fireFullscreenStateChanged(editor, false); + } + }; + var $_fpoonjbdjd09evwz = { toggleFullscreen: toggleFullscreen }; + + var register = function (editor, fullscreenState) { + editor.addCommand('mceFullScreen', function () { + $_fpoonjbdjd09evwz.toggleFullscreen(editor, fullscreenState); + }); + }; + var $_cit2ggbcjd09evwx = { register: register }; + + var postRender = function (editor) { + return function (e) { + var ctrl = e.control; + editor.on('FullscreenStateChanged', function (e) { + ctrl.active(e.state); + }); + }; + }; + var register$1 = function (editor) { + editor.addMenuItem('fullscreen', { + text: 'Fullscreen', + shortcut: 'Ctrl+Shift+F', + selectable: true, + cmd: 'mceFullScreen', + onPostRender: postRender(editor), + context: 'view' + }); + editor.addButton('fullscreen', { + active: false, + tooltip: 'Fullscreen', + cmd: 'mceFullScreen', + onPostRender: postRender(editor) + }); + }; + var $_c38toibgjd09evxb = { register: register$1 }; + + PluginManager.add('fullscreen', function (editor) { + var fullscreenState = Cell(null); + $_cit2ggbcjd09evwx.register(editor, fullscreenState); + $_c38toibgjd09evxb.register(editor); + editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen'); + return $_dmb2mrbbjd09evwu.get(fullscreenState); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/fullscreen/plugin.min.js b/node_modules/tinymce/plugins/fullscreen/plugin.min.js new file mode 100644 index 0000000..ac1b804 --- /dev/null +++ b/node_modules/tinymce/plugins/fullscreen/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=function(t){var n=t,i=function(){return n};return{get:i,set:function(e){n=e},clone:function(){return e(i())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isFullscreen:function(){return null!==e.get()}}},i=function(e,t){e.fire("FullscreenStateChanged",{state:t})},r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils").DOM,l=function(e,t){var n,l,o,c,s,u,d=document.body,a=document.documentElement,h=t.get(),f=function(){var e,t,n,i;r.setStyle(o,"height",(n=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,t=i.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}).h-(l.clientHeight-o.clientHeight))},m=function(){r.unbind(window,"resize",f)};if(n=(l=e.getContainer()).style,c=(o=e.getContentAreaContainer().firstChild).style,h)c.width=h.iframeWidth,c.height=h.iframeHeight,h.containerWidth&&(n.width=h.containerWidth),h.containerHeight&&(n.height=h.containerHeight),r.removeClass(d,"mce-fullscreen"),r.removeClass(a,"mce-fullscreen"),r.removeClass(l,"mce-fullscreen"),s=h.scrollPos,window.scrollTo(s.x,s.y),r.unbind(window,"resize",h.resizeHandler),e.off("remove",h.removeHandler),t.set(null),i(e,!1);else{var g={scrollPos:(u=r.getViewPort(),{x:u.x,y:u.y}),containerWidth:n.width,containerHeight:n.height,iframeWidth:c.width,iframeHeight:c.height,resizeHandler:f,removeHandler:m};c.width=c.height="100%",n.width=n.height="",r.addClass(d,"mce-fullscreen"),r.addClass(a,"mce-fullscreen"),r.addClass(l,"mce-fullscreen"),r.bind(window,"resize",f),e.on("remove",m),f(),t.set(g),i(e,!0)}},o=function(e,t){e.addCommand("mceFullScreen",function(){l(e,t)})},c=function(e){return function(t){var n=t.control;e.on("FullscreenStateChanged",function(e){n.active(e.state)})}},s=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:c(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:c(e)})};t.add("fullscreen",function(t){var i=e(null);return o(t,i),s(t),t.addShortcut("Ctrl+Shift+F","","mceFullScreen"),n(i)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/help/img/logo.png b/node_modules/tinymce/plugins/help/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ebd7eb1424b5b571d74a06fc1ba211e168b7e0e9 GIT binary patch literal 13208 zcmV;JGiS_+P)*?%_#SM)QlQv9ofJF*6DwEO@qGX zfPA~xoSA+MDd8U>mB)i?C}WSyrkY{{Nc16D27Qnk~^dQWsz>25;EhfTcOh06VW~fcfjIGO%i?mTJjd9j~$P z*-{0Y0(CL&U3!xbuuxfE<3`-0j~7>3HDJk&PJ4|5J{fq`fK^MiGzGA#Z%jQ`uF&TC zM%)=?)@~a5=E&&!F83TB^B$z$*J(DXWo!it5AAMkBH8TevrE ze&%tk<9N7;(EwVp%qPsqF~l0Md{<#z&)Q$)vRhcgy5YcqRZF#0OUI(DY&TFY-)09^ zWAzQ0H*)XME!mSe*2OnGT1I?_K?`?>?fyblM+&q`0M=U*#}|8+Ic4tHq#$dT@J;+E zR3ogx6fK$aBQ;FI*VtM##uk02IA^TYtdD#!#=^0>Z6EsMueuvp7fnB3fZ9@kRmKNa zQUz})7^l>P24@C$@%+?dWPrDM%`C=e#(73%KXW)ki!m}6C@03rc==o7`nLg5Pn-P;)Lk|if3eE)ck zVZ)j1I)8JWTXT7^aVCMm6W-=~ixrA5*_{M~>hc->jo zxbDISvVAlDazj!Mp6a6ABG)+t>`!!g(t>j#EdPS36UfhOQUE?51~ezm{}h$tyG(Tz^(1nt6>vO1`9iw0p74pLG0-j(5EI&*>xJ?jhW&vD-%NM!vp+PjCREnJ<8a7?WBPi=9&D+{{rp4Hwx z@}c(b{7>4t^Vha@5C642IdY|rKT!D(wXNR#5Z5p<^02CK=elFf=BKqKhv%xkUnyTl zeacsW^H}=+&;PR8;?2t;yVr)Yg3EU$k`%UqjoveznejqrNn@ zb&b4k(aIq&47^I(H$~|_|JUpNliR!U&u;4(`MlcuDQ&9{e^L8av?p^v@6h$u?)-BS zt8YKmZJ&A$IX7@xL*@mA9l-w3npF{4g`w4idq_Z~DXl?V%FhR-4rypv-+1kaAWuOz z$5>EOMD}yk-@A0(0!PP`@A0CAdt_W=UAs@`gI;6$5mxoIIjc_bYBGw@A4zw0c;mSKV>l8$jiGm)z*1_`GH(>l#p1neCeUe*m`dXB}2I zDtjfWnz8VsL(H9(Kj4juSgMuf1?9rr%um0B>mU1N;XBjXo%^(mX0!6`GNK_J-^}&a zRrg#ZuzXK{4_&c-yMJYRx1UJu@~^b4zpq%o!`Jze#yT+kT6_5x!~{*@~G zALUVd-s($OeH&Dt`qG{pPPBIAp6!g9;W_%L-h_Q`_{IN!~MHs%_iEv zL*+XKlb00%anTe8U2AIVMVi|N)xBPD8cR&lhs1`Rv_GyNh7IaN)1q}lp4*2*CW1W@ z+wejb*h^DZ#i2C~_mD4s(|(|J2=9uS0zqL2+<9WnfC6(ucGmMIlzlRAckfdkfB-gA zIJQez7fWBy4k1~}^LpU3KVVId_C8q8?*{t3#>2W<;XTH6j~DdTt6zn-0H= z{4?9S@?TY*o36_2@fWS#O8voDwp-iQKKE%`_c!~L*E#u5Qaw*_)nd8stibbeHnyo|GL@vLTm??t+V6gcyVCnv#-Q!4k0qJJlON~uya)9+QfR#>plfRl{@L=v{ ztL{984sbMYZPN=I8$*#xsXILi6oD2hOp0iQ>bnA!q+^$kIqMJLWA_#q>3r2}!Pwez z$NXTqsH*=~#z&T-ybG7qfloPUZycWL`o34_^LF~9dOywe7pQ$xEi#B`pp?dBEPHT` zPy*L(oZ#9xhNj~V-RlipxJ9@z%2`2Wg8MuNkT5d2JD2V?FyB7`_wl*`-={8RV8HoS zJ)3On&Rwf#7fE&e4Fx1P7}WN(>-^e{zTetC{99MK6;qW4HMzG>QynP)3>+DopkQ@x zW_)UUvButxn$zFQQC6M3TdaSyJAO_7IOp3m?oXGhbPOuLTYmS2s{dMprRo?3j0x*Q zS8koIEf$nIIcgr(a$Ws2r8UZPS7*n3T=B%ZtruGT2h9zPG-O`{tQ6s{rVwUN*blopZy0#maWO?`x2QC5xwxfj(MQcLzcS7E7aA9Fw^aCA~&HKZS;b~YE(8*Qa~2|5h`#5LOfGrP8|Ik`sk zWX(OmtDm2FkNUgx?OQ=hc&K_%dy9vkrZ z(J~c^tI0Z+0n5~aR7gB9(h0z$;}$`t@N1t0V8h>UOO8CA^%u99->w`wQ-FD%?q35-= z1#^&E)H6JtvTSfXz;2+yDzs)5O})7YtjdNKZjonkTB@I85ojIqNn`k%?GiGsSuHFe z7oF>pBi&tK0Yktf$c?Hk0BNq?4i?l)1+ZY%TzE;HXEO$^-|SCmd(rjJ=7$Ak7r3>{ ztZyi$a=%}=nSf6a-xHBi)ZagFfo4W0!-}DdPyo0is0%3#j`_Bp;a8N>B#X$nP^c&j zQ=qw3i^pH5E@gnhwL3etpj=XY-6NOs4D|)|`W@XvFPuzam;nn&uSQJ;00mk)=B{r| z4!^aW@7coS@H0_e%nQ&&ZQ&jZz~6Is68F~!HZL@f{gfB*cA%Ejulw4&hCf>B0zN7Z zxN7V}f!f-x`Z#V_nA~!{t&u%IZXiaH60B0&z5h{GWx%RTr6mKr%bE;rKVW`a7~ zyKjp+!VIurg?|+jTf7EoVNCy)+Gb89boMuRDm#ySuHo8 zVxLpFYn8-xv7ThRi+~Gv-Rg69NC`in9N!V#UR!sfOd0<->>5CYOI!F471`H?!5#({ zkO>y3cenL!dQv$C!QwhcJ^Mji7#8Dg(O8Nt-_d>FL(5q(wsOR41%2Bsl?7D4XMMNG z@WPr={$l|scVpOq;@b5i=NKrg-bw>kHJ-o!=?33tQ{b;R`;2LE7_f|y5D(U!v|&JB zxBk9+=*b4mO8Q{WwfAg(DvSS8uDI*K^S+LCJ7-Rv8)(WZZpzBsz`mkxVD**O#>Zml z`=E7w5v6r>0?QOuunV{w!x!lHs;f$OKUqUUHCde&)EnM06r_GcIaC&~>&)@d29!nYPN9SVJ;3Fo`QyG#QA9 z?Lsjr7k1a2z5x^qd}V=KpadjiKv!#4FFz1ig+nubFLzUIWCg;T$#Qi!vT*M9Ly-Co zyNbBKs4Fd;&vAiPVY2#x<~)NkDws`xDRTo^v*1_Nlof7<8@k{cX)#&_V5JwhhI6FyN#16EOw(X1R~lEE~Ns-TpeJd=T~B|1ywXE!_9xCT=&KLmRNG% z8B!`4E#%uqz#X04_g>7sAN{oeVQmb&E!b7uLwkfO6zPB2$?8~evwzBhB_rpsJGwyX zZNZY8PvM>ghDr_IN*{qWaBEEwcUJ`Z<<3P`bD_n2>L+GS^Lz`zz14?RL*`{6H*j2A z^lz!Y8(5Be*!TFleQ{c&f)?;U$Y7^Y`B!Z7j`KV#elVEufg+6Zi~Z}7&dW5)I)tN zSZfFIgRWXBCAo{qC^Q!HgWbZ-sGa{+9{Dx_*LD;q*i8(#R~2X#QDB<0w*V5>>@;>< zwr_C#dwRtNg>@jAHh^O=)~^L~I~u6iH&Hv(eM|M-z{)}%2z&%uC@nxh zT$2l}qZU}iVX-sV%$#JFy1R~*zjAcfX#(L!+NU4Hlo500ma%b2)qOBfSGx<5`RSk7 zcZ*zPvHjB)%HV}V8A2%(hXtqzY{ZrMXjzIV48X43&jSFCv4({)n`=}FAOK)cA9-hc zPwuI9Z}Gs;nF?DN#CXZ@eCc-@Y|8USSHLIRQ9ZlS5CL3R55+ zPW9W4Wi{MFKcuWOJ25VE1BtUL!wo#P@=V<&Kd4+EtYiKQ=fp>^~EE8_sW3m z!{orq#S1PRfWe)~zpD~pnel3U=Q}}t6D$%d9_v-6h$;aVFDCB;R(`ht_>8?UTb+L_ zfv%`8+SI*780=G&!chG?YLfA?@ZP$5=v}E$JxY^!?+BVWQRHW*KelE+v&CJi6n#UnREI`mS%c-#_Bt_s;la1rO@bRAUCA+ zM*opO3n#4;r?nGS;e*y>1uS*AUsDOd;(sppxy=EryQvys_t;HP_nq|0w*KIZ(`Q#` zHhz`+!eUC1P=*MAwNU~z^FJyBuwWa<8DIe<1fP}zSi<e^o`86;C(U z46K=!{(e+5u#!&(`ikn)l5t`l4&=&7?AAdpXiYA_${1j2%vAY+rM{_o23X_{zT}Wq z1AyfNP;LF<4+_BTfGu&&GM>3!pI+bTS$l;tO!q?>ikpO*4+vo4wEl4!fCbyAC}1^p z6bCGE=zkqkkSKj(u!P+mI$HU5cK;|_BW)?>G(bY&E$KXjH}G2N#wsZH6~KaBmIYQa zk-kLi4im~M3lO>x*$iaz=+e44=3At-$`7!a_feXhuUY&gNtxJJQd`UVj0##L-7=wG zIsjTdhgJ%-VuodawX!(F@*Xk*SU0O#N|gLAobN8EF=i()c(a8vV0yZt3=+6U#WoI-6tP;VBWowdL-Oz=a8OE$;4GUJz#G_)s z2g$NWG=U#1ra_d(1Y`f&BeMh2UpBrdpvCgN#c2ru0$MnHebAZ|3~S^8D1y$ zNFNp*w4%w3#ekJA4p_FbIJN7A@;_M1{(8*4l;3fMNGKESI_Qb0cS9MX0v36H)c{!T zB)xdv!>^Ukv(&iKz|lM0K1S<7O8FP=p*r0+P_1G7DY@uBs8$kU2`+TaKsU~c3)}Y+ zE0q0B|3v!wsjT$;nD>#|f2GO(a{gapR=PK~1kidA5LD12;`+$pKns8`|$ zTobo><^RfO8g6ii#Ybrn>#r@?)RL;%x75b@=%?8KFfy}ZWoAm<-k}RHtLR{*lS&)= zSJdpXF=+pcJ-T_g_}vz#g-N1;j7Jm&E$43lq;$}VO+t4(vful7Ao3s#*lu0-9J{Vi zNr*lNsxoY)%BXw%L}gf(XGa)?COvQGyj+i+Z{!04A53DWdt`>CV|UepR$GahT{6B;*aOpQsfAlg>qhDuf{aE&6u|OvJ z!dFqRswAcr1D1|W7j$}lVGoVaJj|S`{asSCS13bw@lb|{aah&DumA!#eFv5m*1_5Z zXdP|Q>E-ycEP1-6YyAfS3Q~heZWd5paS_!&opFf&>hF&xkq6~%ZsqfGfYVd`xlBt< z7kH&|X*4siKJzu9;cn=HGOOrd#eSwID910+mSG}|M58$o zTCmEaU4NC_lk=H8_*&FNS^M&7nb(%Ex)}Sgyx$2vP1%1n$7zY@C1I(e?%psraYY!) zaGDp&Fo8`%*oBQT+12-Ht4!LY5%yMP6tj(MEwQwVCLL$Hs1Hy72zH3lP`w3@+I5o@ zEkM>o04a&&`Vcs*RM29~cF!c3_YW#yu}w=Y&nLfdcxHtb-2k)dDG98c3C0ijBdX-W ziN%_NY8LgO@r#XdP?xkOz`?4YYzN?7HqFUpRf)vt)8#if9BeXzJ@)f?QT? z5|#&8j@eCK>Tw$RzMJ2mw3WQaOdK?nVG;lq_ty56@6OappIb>WVzrKQyEVJmcewMq zl}}+$azCyPnNxNX;}GUF$G?XI^}FVau3;F^N!t^GOy7T8pBErE6fxp^_H*(Fzl8}H zu0V#0J4lcf$a%}|uZ5g4qF?=#-E+{35 z*LB2W9%`zHw(fQGO~P%+ywZySt8#SpVyCh$KeDyPQy0Gl^AmO9avkx+h*1?2&@eR~0GG)P5TG(#Lb1Ep zB#d_awXiH64%~aHYy>R2cqqe!4QpV6`)V~f#swUfUXJ-D{wykgh9#D>b4VbLa&GEv zp$?63gh`xfsKVyvRR3p+U5jgW%DFFw?Gf=#1N2lJ^~bXo4_#Cc)}-n|H>&^zKxyhh z=X$w}o*C#cD}H2V^2le?EqJdAR|88PFJ*!)xmy8?wwWkvwEmF2svua!CZWf&h_&N* zTP+O#2bsvB48`hUReF_h_9z3E3tEY;{43BrWP;<*N>GuJH5sJkxhYe^|zEctkE zLMRovGGeDf`TX2H0IsS)Z&z)?Uh2u)d560PY}Cbf1YEZQdadezk|gbeNGqB-?~!*Q zdB!y*JG0-BaUB6mBw`+47}v}3yia!Kk1rxB8^%I8%xb5afV(gQb)sfqFt(C2DF91B z2)#e#wycD(JmCSWMMPJ-`;7!(vAnO0j&|?90G3SlMWH#rnDKTGEu@;s!CfUSIT*4@eG=z#!M@ttqw(_9xt1|2(V7Wr7+nFd$ow*;D16aty(;p@bAef|F zaT$Om<2nbXL4q@SgQUC^0}jq%=An$^bQqSd-0h)J?;Y?8m3(rWP=!XZ8U};u2Eb@i z@h+}`zonlWk{#<`?*mdq(E1~x2!I}d3EQ%M8Jh~q_5)}p;%b_V1j1qhVus55U%CAc z8nA~@ruwXOf@JpSs$lTs4bmZ|rr%_fbiA2_w2GO8dVQ~{>v|3)d(qdk+T_T$<3AY* zuo|QyK}YQoy@i@X?kfbox&4>CGD;;*isxa*)*ki{X-fgvu~^{j!>cNBFL)h*!Zp?& znFFxqRuHfvw2upH#V$}2CEP2PAY5WbNdy z7RG1~qe8LOPGpkg2ep$QE`SAaQG*>}OcMyOrTZzx6W=>ve^zfdW><0ZFYd zoiqz5%R6FVrkM;MoUw@TV2n8gHxmJ>(iRwQL>U9j=Z!juj`ff}I>RJCmk z02K@p(^J|Vn5}l5$|j4)lZiv~7eufFR+taG2f!R*%){|x5v&Jj!L(e^nowa4dOgUi z!>l~8>cXV4{i@EyEe0;*aZ~n0#agXdhB~w-Fj2Xb6Fwh<{-XasBJ{^Tur0p^dm`2U zYN{y6>fyH&Qml}8tz>Hb7b!oSyrchlzKK~*<%hww9R za6G_c6F;iXVx?=sTjF$7*|f+aAUI=%HQhm}*;lBfI8Qi_b|Z=kXu-hDJX|9`q5!ns z%OoCGsX5pCsW}nNz&oD>SQ)cY&`M1?WcdrnkXb#BHsZ(XzGFRpCwKLe_)mivtOEmv ze`*D5ls(Q~D|w9-@2||wjem*|i#0-}m4_TdX+ViHx28V*Vcxq{4*VYo#qBhRa;GsZ z11%qlXFvlK$ILWt4`qhv~a|` zpjAEPWqb#FX09%qV+I0NZRE6#B3Q+nQvw-nOKGa)gU8@H8xD2R3}PSTU7>DXG;xbh_`t2eOdi_#MQ&cmE0mQD?kab0;H5#@p?0f!jl86$n{bQrJ-`QG&jwn zrP-hN>_5`ui~PBcg(7juj{f&Hr#5_8#5Ui-xcBj-@fL$t_x>7Gx+^-JgIxtNZK$y$6L&_ z>H(|h=HW<#Rreg%45Ypl#rY-+SlRoT?GL_+`q+t7@B7^J4S&BDQAm*t`acO6953~v z4wdZxFOM{6l~&p%_ZBK-YIVvr2qUQINe?X!$G(6-{$~_Xqm~g8QWS&>>LsBI zw`faE)WU86A?73{aObKSN+p0|rYa3~=O53pe$E;DYVD{uQxHz;DJ?UGW#^;~Xa3r` z*pL1F^ZDgdXzq6r_NkUF1}zb1nBkd+YXGegWj2n_3WvHzuIp-G=4z@?Ocn<_0H91{ zDsoL)zBZ@^N%1=BCCzFpU>0iuxV~?)50xsZp`teqyfnRUF8My3QgGhpOIU(3;Ux zXH08kLCXcJheEJ|Sy2O=KvOBB^WJm$e*BerhDlJnsFFW=GmB=;MQ1LzoU*&<$5Ffu zAhNQ!N!7E%oDv3hm(~;C3b0v2VMbWlPO54OtNDkHc}QV`D;D-W7ZHP|PGM}F{XcAI z%YFdn;``K4G)7E;x=k{++5z)bj&EwqepWvFUQjzJ-Typa@RK5OVP(smjB6E6_z-v> zc|FHbm<~};8<)NM0G8-}=otywFFaT7`%UdZ0la6sU?lfv3d%B!b5`5>=ezgVzzcRZ zv%T+Cw2S9GEYj*#`B02OOTZ%pt!V>HYjy1bOI}}5^HBR?Dcl7sWms2mo^b(I9-v%x zX8}RVSpp*I#`eBX*$yC1FXOqeirH5TS}5;m zZrFf%2xuADRLl&l%iN+4_H7DQmk}jBUcky{BRs7El$-8FCaL$Q{(gSVBHkATGMWd7 zuny^evHE$o0wU_e+9?c+$r%Ec)FM|=%%XrLeE?XuGfCZRuyZknWGdePfY31203FOs z{VW8LR9Huy4d!KXU1*V}Ky~RE=Ho}S@lMICt>S_ZTrcwfnF#lEaP=JL=2mp2D zF7wZ0W0UU=Ws++@56BARR8(KYB>XJ(&M`w(C1sO<^LzA|4%-LfmVLe< zbfQ4^Hz+hd-M*98^fWS0l;;oU_Iih^~Ynv=G8IG0D zuM!~my(<=g??*mA7cenhJkO+LpMOc;_hMerm{`OwVP?62g}I37Xl7#*4ad7GvB*UK zl}$!heyVZ7`q#;IZ&n+-DS>Xh9=kdAh|4YC{`^qK|4D~iZR!qPgK+6BdB-l~0 z;rbLymow8+R;ae697w@ z!20Xf6bcAiBGDx8dBQUZP76(vY}4)ez%07QbwVRge$##7DqvCozy%Z+w3<6My#z*s zQ@OD%_Ys5vaCnT+bEem$#m(@SAb03EN0gtG7TD+^DVIhQ!Q z5Qynl#Z%KPLdY0y!ch;9H3LKnyqI?u-eA|nJ>|MsQ8iN(rQ}P~1DbyK!3?il9x%UK z?S2>Hu!e~QTGYVGObtQHF%PFj11&Z0RDUmXvttJG+RS&w!D?Lku-1sFB!GiHTDvY=?aTz{bw}PZ27`VJ*z>2V!>p41XG+151LH z&1}oQ35GR09Vq{<0f>EuVm>q23*!l$?Ac?{unT-xp?K&zxmPcAvDWzC@SN`X3WLf>upk`ae_|b)?c)yG*N?&kC?oMzvkRDp4(965i#Z6(a#!ozR|USm66wz5;#`0W4fcT2 zFlN#)L-v`2-+w~-V;sA2e9QPQLa3C_tqJHh$>+_m6JA+KQy73?{Q*ipL<7bq{obvB)X!M$KHy7) z6`O)Gp%hJ>09wqjCNgM+3Mn(v|5ni2rJ)a=dFYsdfK^@QCIc(g4Q!|;u<`+m$;PB; zMwZ+ItOk)E52eI&eXs#Q3$S8>3z+>I-wMn{CD)aWc(GWi+;8b$lZ3 zgu6C4pTuJ&+H!`=Qh9$cCZ)!REunv1O`LyCSK;Zg(|t1J9!_&XYo$2O zGpj<-!u$&(m@xwZtI!ODS*>L?aAq;EswR^Vr?xJ;`zGPh`d!yRBzG!*`jz4G{sZdx zT}?kWQCvS0EJ6BT$3$0Olpn6JOIPh~R6o&AFyr`)NljDcw8x0rFCBNE*HmKD19Y5ETf4Vz*0svv(2Fl6EN+Hg6Wk5w47CtNu zd05G3@^?MgB>i#y_nWic-B^W`v1D-AV?OeK2*%%@{T#ug%Fvc4<~{UcF|p4FzyLP> zHx`>V(E~4ab_Rx1Bp426YUxhs$mK~V3DSSqul_D^c0wf1($Lj#ub8E zK9AqXWpZx7Dq#yS4PEhE(mcQayA6x7H84X!fuK;C?0mPz{6WNN!TJ=4_Jna(`EJ4| z070VviIHL~8i&R8UTKl;!Ui`GAWEOfJMMm-AI%P6;h4v%55T})NyQNcxeU+&v;cnM zwy3Mcc(hW*GR!^pA;yXv%5%FOcsid0;*3?U=Ubek<*wc-JTw3-{94?@*q=4wK}!WR z>$?Am5)MpDivcdHncn>&0jnz!sQ|1*0tyCpz7JMa3|LuZ2|J0(#^l3y0*Hz8n!j(u z0qn&zU3X;|^3ZE>OH2?Su!uQ=T@?c?fJvA9uTyj92l!^1oc;B6C%^!p`hFT?bC|0# zo||xr!#DsgLNKHeg}xcHOs{WKgD{m~vbV4QASPjW&ipz7k~Xecqw2Te69WhU4~=wR zitj2k+466vU;I;?XE26!aYyfaNxR|PJQ!@Bq%-#Sx`2h*2+#nWpERsd9h7GNds&-R#A)t4@�x8a_6hzULJ1Og=3n8m7@LHN&c08QS_81L zvgm@D&)@(=nRrWaOlvOT9&0cP^BpCGAq0KT&%X_Sm6~d4!`8Km0s_PAV`C^~AOC+ZJL zytniD!W=a3`n|rK@l4Jw_GuxKid^|*7Sy!KbJeoKvq%x4kX)2iD7Q`)CW0Dl#+WcZ;lk1g7~x)@5l#haTG=YiN{ z1+7v|j$%)I0IFF1^5Xkd?piKryO&kc?-KvT0s-fZbqC|E*!F)?_)<-9H<)4o0000< KMNUMnLSTZ+CVU?N literal 0 HcmV?d00001 diff --git a/node_modules/tinymce/plugins/help/index.js b/node_modules/tinymce/plugins/help/index.js new file mode 100644 index 0000000..7f4bfe0 --- /dev/null +++ b/node_modules/tinymce/plugins/help/index.js @@ -0,0 +1,7 @@ +// Exports the "help" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/help') +// ES2015: +// import 'tinymce/plugins/help' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/help/plugin.js b/node_modules/tinymce/plugins/help/plugin.js new file mode 100644 index 0000000..7346d20 --- /dev/null +++ b/node_modules/tinymce/plugins/help/plugin.js @@ -0,0 +1,1057 @@ +(function () { +var help = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var noop = function () { + }; + var noarg = function (f) { + return function () { + return f(); + }; + }; + var compose = function (fa, fb) { + return function () { + return fa(fb.apply(null, arguments)); + }; + }; + var constant = function (value) { + return function () { + return value; + }; + }; + var identity = function (x) { + return x; + }; + var tripleEquals = function (a, b) { + return a === b; + }; + var curry = function (f) { + var args = new Array(arguments.length - 1); + for (var i = 1; i < arguments.length; i++) + args[i - 1] = arguments[i]; + return function () { + var newArgs = new Array(arguments.length); + for (var j = 0; j < newArgs.length; j++) + newArgs[j] = arguments[j]; + var all = args.concat(newArgs); + return f.apply(null, all); + }; + }; + var not = function (f) { + return function () { + return !f.apply(null, arguments); + }; + }; + var die = function (msg) { + return function () { + throw new Error(msg); + }; + }; + var apply = function (f) { + return f(); + }; + var call = function (f) { + f(); + }; + var never = constant(false); + var always = constant(true); + var $_4r2zi8ahjd09evsm = { + noop: noop, + noarg: noarg, + compose: compose, + constant: constant, + identity: identity, + tripleEquals: tripleEquals, + curry: curry, + not: not, + die: die, + apply: apply, + call: call, + never: never, + always: always + }; + + var never$1 = $_4r2zi8ahjd09evsm.never; + var always$1 = $_4r2zi8ahjd09evsm.always; + var none = function () { + return NONE; + }; + var NONE = function () { + var eq = function (o) { + return o.isNone(); + }; + var call = function (thunk) { + return thunk(); + }; + var id = function (n) { + return n; + }; + var noop = function () { + }; + var me = { + fold: function (n, s) { + return n(); + }, + is: never$1, + isSome: never$1, + isNone: always$1, + getOr: id, + getOrThunk: call, + getOrDie: function (msg) { + throw new Error(msg || 'error: getOrDie called on none.'); + }, + or: id, + orThunk: call, + map: none, + ap: none, + each: noop, + bind: none, + flatten: none, + exists: never$1, + forall: always$1, + filter: none, + equals: eq, + equals_: eq, + toArray: function () { + return []; + }, + toString: $_4r2zi8ahjd09evsm.constant('none()') + }; + if (Object.freeze) + Object.freeze(me); + return me; + }(); + var some = function (a) { + var constant_a = function () { + return a; + }; + var self = function () { + return me; + }; + var map = function (f) { + return some(f(a)); + }; + var bind = function (f) { + return f(a); + }; + var me = { + fold: function (n, s) { + return s(a); + }, + is: function (v) { + return a === v; + }, + isSome: always$1, + isNone: never$1, + getOr: constant_a, + getOrThunk: constant_a, + getOrDie: constant_a, + or: self, + orThunk: self, + map: map, + ap: function (optfab) { + return optfab.fold(none, function (fab) { + return some(fab(a)); + }); + }, + each: function (f) { + f(a); + }, + bind: bind, + flatten: constant_a, + exists: bind, + forall: bind, + filter: function (f) { + return f(a) ? me : NONE; + }, + equals: function (o) { + return o.is(a); + }, + equals_: function (o, elementEq) { + return o.fold(never$1, function (b) { + return elementEq(a, b); + }); + }, + toArray: function () { + return [a]; + }, + toString: function () { + return 'some(' + a + ')'; + } + }; + return me; + }; + var from = function (value) { + return value === null || value === undefined ? NONE : some(value); + }; + var $_d8659wagjd09evsc = { + some: some, + none: none, + from: from + }; + + var rawIndexOf = function () { + var pIndexOf = Array.prototype.indexOf; + var fastIndex = function (xs, x) { + return pIndexOf.call(xs, x); + }; + var slowIndex = function (xs, x) { + return slowIndexOf(xs, x); + }; + return pIndexOf === undefined ? slowIndex : fastIndex; + }(); + var indexOf = function (xs, x) { + var r = rawIndexOf(xs, x); + return r === -1 ? $_d8659wagjd09evsc.none() : $_d8659wagjd09evsc.some(r); + }; + var contains = function (xs, x) { + return rawIndexOf(xs, x) > -1; + }; + var exists = function (xs, pred) { + return findIndex(xs, pred).isSome(); + }; + var range = function (num, f) { + var r = []; + for (var i = 0; i < num; i++) { + r.push(f(i)); + } + return r; + }; + var chunk = function (array, size) { + var r = []; + for (var i = 0; i < array.length; i += size) { + var s = array.slice(i, i + size); + r.push(s); + } + return r; + }; + var map = function (xs, f) { + var len = xs.length; + var r = new Array(len); + for (var i = 0; i < len; i++) { + var x = xs[i]; + r[i] = f(x, i, xs); + } + return r; + }; + var each = function (xs, f) { + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + f(x, i, xs); + } + }; + var eachr = function (xs, f) { + for (var i = xs.length - 1; i >= 0; i--) { + var x = xs[i]; + f(x, i, xs); + } + }; + var partition = function (xs, pred) { + var pass = []; + var fail = []; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + var arr = pred(x, i, xs) ? pass : fail; + arr.push(x); + } + return { + pass: pass, + fail: fail + }; + }; + var filter = function (xs, pred) { + var r = []; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + if (pred(x, i, xs)) { + r.push(x); + } + } + return r; + }; + var groupBy = function (xs, f) { + if (xs.length === 0) { + return []; + } else { + var wasType = f(xs[0]); + var r = []; + var group = []; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + var type = f(x); + if (type !== wasType) { + r.push(group); + group = []; + } + wasType = type; + group.push(x); + } + if (group.length !== 0) { + r.push(group); + } + return r; + } + }; + var foldr = function (xs, f, acc) { + eachr(xs, function (x) { + acc = f(acc, x); + }); + return acc; + }; + var foldl = function (xs, f, acc) { + each(xs, function (x) { + acc = f(acc, x); + }); + return acc; + }; + var find = function (xs, pred) { + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + if (pred(x, i, xs)) { + return $_d8659wagjd09evsc.some(x); + } + } + return $_d8659wagjd09evsc.none(); + }; + var findIndex = function (xs, pred) { + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + if (pred(x, i, xs)) { + return $_d8659wagjd09evsc.some(i); + } + } + return $_d8659wagjd09evsc.none(); + }; + var slowIndexOf = function (xs, x) { + for (var i = 0, len = xs.length; i < len; ++i) { + if (xs[i] === x) { + return i; + } + } + return -1; + }; + var push = Array.prototype.push; + var flatten = function (xs) { + var r = []; + for (var i = 0, len = xs.length; i < len; ++i) { + if (!Array.prototype.isPrototypeOf(xs[i])) + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + push.apply(r, xs[i]); + } + return r; + }; + var bind = function (xs, f) { + var output = map(xs, f); + return flatten(output); + }; + var forall = function (xs, pred) { + for (var i = 0, len = xs.length; i < len; ++i) { + var x = xs[i]; + if (pred(x, i, xs) !== true) { + return false; + } + } + return true; + }; + var equal = function (a1, a2) { + return a1.length === a2.length && forall(a1, function (x, i) { + return x === a2[i]; + }); + }; + var slice = Array.prototype.slice; + var reverse = function (xs) { + var r = slice.call(xs, 0); + r.reverse(); + return r; + }; + var difference = function (a1, a2) { + return filter(a1, function (x) { + return !contains(a2, x); + }); + }; + var mapToObject = function (xs, f) { + var r = {}; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + r[String(x)] = f(x, i); + } + return r; + }; + var pure = function (x) { + return [x]; + }; + var sort = function (xs, comparator) { + var copy = slice.call(xs, 0); + copy.sort(comparator); + return copy; + }; + var head = function (xs) { + return xs.length === 0 ? $_d8659wagjd09evsc.none() : $_d8659wagjd09evsc.some(xs[0]); + }; + var last = function (xs) { + return xs.length === 0 ? $_d8659wagjd09evsc.none() : $_d8659wagjd09evsc.some(xs[xs.length - 1]); + }; + var $_d0axraafjd09evs6 = { + map: map, + each: each, + eachr: eachr, + partition: partition, + filter: filter, + groupBy: groupBy, + indexOf: indexOf, + foldr: foldr, + foldl: foldl, + find: find, + findIndex: findIndex, + flatten: flatten, + bind: bind, + forall: forall, + exists: exists, + contains: contains, + equal: equal, + reverse: reverse, + chunk: chunk, + difference: difference, + mapToObject: mapToObject, + pure: pure, + sort: sort, + range: range, + head: head, + last: last + }; + + var I18n = tinymce.util.Tools.resolve('tinymce.util.I18n'); + + var Env = tinymce.util.Tools.resolve('tinymce.Env'); + + var meta = Env.mac ? '\u2318' : 'Ctrl'; + var access = Env.mac ? 'Ctrl + Alt' : 'Shift + Alt'; + var shortcuts = [ + { + shortcut: meta + ' + B', + action: 'Bold' + }, + { + shortcut: meta + ' + I', + action: 'Italic' + }, + { + shortcut: meta + ' + U', + action: 'Underline' + }, + { + shortcut: meta + ' + A', + action: 'Select all' + }, + { + shortcut: meta + ' + Y or ' + meta + ' + Shift + Z', + action: 'Redo' + }, + { + shortcut: meta + ' + Z', + action: 'Undo' + }, + { + shortcut: access + ' + 1', + action: 'Header 1' + }, + { + shortcut: access + ' + 2', + action: 'Header 2' + }, + { + shortcut: access + ' + 3', + action: 'Header 3' + }, + { + shortcut: access + ' + 4', + action: 'Header 4' + }, + { + shortcut: access + ' + 5', + action: 'Header 5' + }, + { + shortcut: access + ' + 6', + action: 'Header 6' + }, + { + shortcut: access + ' + 7', + action: 'Paragraph' + }, + { + shortcut: access + ' + 8', + action: 'Div' + }, + { + shortcut: access + ' + 9', + action: 'Address' + }, + { + shortcut: 'Alt + F9', + action: 'Focus to menubar' + }, + { + shortcut: 'Alt + F10', + action: 'Focus to toolbar' + }, + { + shortcut: 'Alt + F11', + action: 'Focus to element path' + }, + { + shortcut: 'Ctrl + Shift + P > Ctrl + Shift + P', + action: 'Focus to contextual toolbar' + }, + { + shortcut: meta + ' + K', + action: 'Insert link (if link plugin activated)' + }, + { + shortcut: meta + ' + S', + action: 'Save (if save plugin activated)' + }, + { + shortcut: meta + ' + F', + action: 'Find (if searchreplace plugin activated)' + } + ]; + var $_7hd876ajjd09evsp = { shortcuts: shortcuts }; + + var makeTab = function () { + var makeAriaLabel = function (shortcut) { + return 'aria-label="Action: ' + shortcut.action + ', Shortcut: ' + shortcut.shortcut.replace(/Ctrl/g, 'Control') + '"'; + }; + var shortcutLisString = $_d0axraafjd09evs6.map($_7hd876ajjd09evsp.shortcuts, function (shortcut) { + return '' + '' + I18n.translate(shortcut.action) + '' + '' + shortcut.shortcut + '' + ''; + }).join(''); + return { + title: 'Handy Shortcuts', + type: 'container', + style: 'overflow-y: auto; overflow-x: hidden; max-height: 250px', + items: [{ + type: 'container', + html: '
' + '' + '' + '' + '' + '' + shortcutLisString + '
' + I18n.translate('Action') + '' + I18n.translate('Shortcut') + '
' + '
' + }] + }; + }; + var $_czlwknaejd09evs2 = { makeTab: makeTab }; + + var keys = function () { + var fastKeys = Object.keys; + var slowKeys = function (o) { + var r = []; + for (var i in o) { + if (o.hasOwnProperty(i)) { + r.push(i); + } + } + return r; + }; + return fastKeys === undefined ? slowKeys : fastKeys; + }(); + var each$1 = function (obj, f) { + var props = keys(obj); + for (var k = 0, len = props.length; k < len; k++) { + var i = props[k]; + var x = obj[i]; + f(x, i, obj); + } + }; + var objectMap = function (obj, f) { + return tupleMap(obj, function (x, i, obj) { + return { + k: i, + v: f(x, i, obj) + }; + }); + }; + var tupleMap = function (obj, f) { + var r = {}; + each$1(obj, function (x, i) { + var tuple = f(x, i, obj); + r[tuple.k] = tuple.v; + }); + return r; + }; + var bifilter = function (obj, pred) { + var t = {}; + var f = {}; + each$1(obj, function (x, i) { + var branch = pred(x, i) ? t : f; + branch[i] = x; + }); + return { + t: t, + f: f + }; + }; + var mapToArray = function (obj, f) { + var r = []; + each$1(obj, function (value, name) { + r.push(f(value, name)); + }); + return r; + }; + var find$1 = function (obj, pred) { + var props = keys(obj); + for (var k = 0, len = props.length; k < len; k++) { + var i = props[k]; + var x = obj[i]; + if (pred(x, i, obj)) { + return $_d8659wagjd09evsc.some(x); + } + } + return $_d8659wagjd09evsc.none(); + }; + var values = function (obj) { + return mapToArray(obj, function (v) { + return v; + }); + }; + var size = function (obj) { + return values(obj).length; + }; + var $_9az4yamjd09evsx = { + bifilter: bifilter, + each: each$1, + map: objectMap, + mapToArray: mapToArray, + tupleMap: tupleMap, + find: find$1, + keys: keys, + values: values, + size: size + }; + + var addToStart = function (str, prefix) { + return prefix + str; + }; + var addToEnd = function (str, suffix) { + return str + suffix; + }; + var removeFromStart = function (str, numChars) { + return str.substring(numChars); + }; + var removeFromEnd = function (str, numChars) { + return str.substring(0, str.length - numChars); + }; + var $_bi7jzgaojd09evt4 = { + addToStart: addToStart, + addToEnd: addToEnd, + removeFromStart: removeFromStart, + removeFromEnd: removeFromEnd + }; + + var first = function (str, count) { + return str.substr(0, count); + }; + var last$1 = function (str, count) { + return str.substr(str.length - count, str.length); + }; + var head$1 = function (str) { + return str === '' ? $_d8659wagjd09evsc.none() : $_d8659wagjd09evsc.some(str.substr(0, 1)); + }; + var tail = function (str) { + return str === '' ? $_d8659wagjd09evsc.none() : $_d8659wagjd09evsc.some(str.substring(1)); + }; + var $_bpykrapjd09evt5 = { + first: first, + last: last$1, + head: head$1, + tail: tail + }; + + var checkRange = function (str, substr, start) { + if (substr === '') + return true; + if (str.length < substr.length) + return false; + var x = str.substr(start, start + substr.length); + return x === substr; + }; + var supplant = function (str, obj) { + var isStringOrNumber = function (a) { + var t = typeof a; + return t === 'string' || t === 'number'; + }; + return str.replace(/\${([^{}]*)}/g, function (a, b) { + var value = obj[b]; + return isStringOrNumber(value) ? value : a; + }); + }; + var removeLeading = function (str, prefix) { + return startsWith(str, prefix) ? $_bi7jzgaojd09evt4.removeFromStart(str, prefix.length) : str; + }; + var removeTrailing = function (str, prefix) { + return endsWith(str, prefix) ? $_bi7jzgaojd09evt4.removeFromEnd(str, prefix.length) : str; + }; + var ensureLeading = function (str, prefix) { + return startsWith(str, prefix) ? str : $_bi7jzgaojd09evt4.addToStart(str, prefix); + }; + var ensureTrailing = function (str, prefix) { + return endsWith(str, prefix) ? str : $_bi7jzgaojd09evt4.addToEnd(str, prefix); + }; + var contains$1 = function (str, substr) { + return str.indexOf(substr) !== -1; + }; + var capitalize = function (str) { + return $_bpykrapjd09evt5.head(str).bind(function (head) { + return $_bpykrapjd09evt5.tail(str).map(function (tail) { + return head.toUpperCase() + tail; + }); + }).getOr(str); + }; + var startsWith = function (str, prefix) { + return checkRange(str, prefix, 0); + }; + var endsWith = function (str, suffix) { + return checkRange(str, suffix, str.length - suffix.length); + }; + var trim = function (str) { + return str.replace(/^\s+|\s+$/g, ''); + }; + var lTrim = function (str) { + return str.replace(/^\s+/g, ''); + }; + var rTrim = function (str) { + return str.replace(/\s+$/g, ''); + }; + var $_4b7dpzanjd09evt2 = { + supplant: supplant, + startsWith: startsWith, + removeLeading: removeLeading, + removeTrailing: removeTrailing, + ensureLeading: ensureLeading, + ensureTrailing: ensureTrailing, + endsWith: endsWith, + contains: contains$1, + trim: trim, + lTrim: lTrim, + rTrim: rTrim, + capitalize: capitalize + }; + + var urls = [ + { + key: 'advlist', + name: 'Advanced List' + }, + { + key: 'anchor', + name: 'Anchor' + }, + { + key: 'autolink', + name: 'Autolink' + }, + { + key: 'autoresize', + name: 'Autoresize' + }, + { + key: 'autosave', + name: 'Autosave' + }, + { + key: 'bbcode', + name: 'BBCode' + }, + { + key: 'charmap', + name: 'Character Map' + }, + { + key: 'code', + name: 'Code' + }, + { + key: 'codesample', + name: 'Code Sample' + }, + { + key: 'colorpicker', + name: 'Color Picker' + }, + { + key: 'compat3x', + name: '3.x Compatibility' + }, + { + key: 'contextmenu', + name: 'Context Menu' + }, + { + key: 'directionality', + name: 'Directionality' + }, + { + key: 'emoticons', + name: 'Emoticons' + }, + { + key: 'fullpage', + name: 'Full Page' + }, + { + key: 'fullscreen', + name: 'Full Screen' + }, + { + key: 'help', + name: 'Help' + }, + { + key: 'hr', + name: 'Horizontal Rule' + }, + { + key: 'image', + name: 'Image' + }, + { + key: 'imagetools', + name: 'Image Tools' + }, + { + key: 'importcss', + name: 'Import CSS' + }, + { + key: 'insertdatetime', + name: 'Insert Date/Time' + }, + { + key: 'legacyoutput', + name: 'Legacy Output' + }, + { + key: 'link', + name: 'Link' + }, + { + key: 'lists', + name: 'Lists' + }, + { + key: 'media', + name: 'Media' + }, + { + key: 'nonbreaking', + name: 'Nonbreaking' + }, + { + key: 'noneditable', + name: 'Noneditable' + }, + { + key: 'pagebreak', + name: 'Page Break' + }, + { + key: 'paste', + name: 'Paste' + }, + { + key: 'preview', + name: 'Preview' + }, + { + key: 'print', + name: 'Print' + }, + { + key: 'save', + name: 'Save' + }, + { + key: 'searchreplace', + name: 'Search and Replace' + }, + { + key: 'spellchecker', + name: 'Spell Checker' + }, + { + key: 'tabfocus', + name: 'Tab Focus' + }, + { + key: 'table', + name: 'Table' + }, + { + key: 'template', + name: 'Template' + }, + { + key: 'textcolor', + name: 'Text Color' + }, + { + key: 'textpattern', + name: 'Text Pattern' + }, + { + key: 'toc', + name: 'Table of Contents' + }, + { + key: 'visualblocks', + name: 'Visual Blocks' + }, + { + key: 'visualchars', + name: 'Visual Characters' + }, + { + key: 'wordcount', + name: 'Word Count' + } + ]; + var $_c0pbvaqjd09evt7 = { urls: urls }; + + var makeLink = $_4r2zi8ahjd09evsm.curry($_4b7dpzanjd09evt2.supplant, '${name}'); + var maybeUrlize = function (editor, key) { + return $_d0axraafjd09evs6.find($_c0pbvaqjd09evt7.urls, function (x) { + return x.key === key; + }).fold(function () { + var getMetadata = editor.plugins[key].getMetadata; + return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key; + }, function (x) { + return makeLink({ + name: x.name, + url: 'https://www.tinymce.com/docs/plugins/' + x.key + }); + }); + }; + var getPluginKeys = function (editor) { + var keys = $_9az4yamjd09evsx.keys(editor.plugins); + return editor.settings.forced_plugins === undefined ? keys : $_d0axraafjd09evs6.filter(keys, $_4r2zi8ahjd09evsm.not($_4r2zi8ahjd09evsm.curry($_d0axraafjd09evs6.contains, editor.settings.forced_plugins))); + }; + var pluginLister = function (editor) { + var pluginKeys = getPluginKeys(editor); + var pluginLis = $_d0axraafjd09evs6.map(pluginKeys, function (key) { + return '
  • ' + maybeUrlize(editor, key) + '
  • '; + }); + var count = pluginLis.length; + var pluginsString = pluginLis.join(''); + return '

    ' + I18n.translate([ + 'Plugins installed ({0}):', + count + ]) + '

    ' + '
      ' + pluginsString + '
    '; + }; + var installedPlugins = function (editor) { + return { + type: 'container', + html: '
    ' + pluginLister(editor) + '
    ', + flex: 1 + }; + }; + var availablePlugins = function () { + return { + type: 'container', + html: '
    ' + '

    ' + I18n.translate('Premium plugins:') + '

    ' + '
      ' + '
    • PowerPaste
    • ' + '
    • Spell Checker Pro
    • ' + '
    • Accessibility Checker
    • ' + '
    • Advanced Code Editor
    • ' + '
    • Enhanced Media Embed
    • ' + '
    • Link Checker
    • ' + '

    ' + '

    ' + I18n.translate('Learn more...') + '

    ' + '
    ', + flex: 1 + }; + }; + var makeTab$1 = function (editor) { + return { + title: 'Plugins', + type: 'container', + style: 'overflow-y: auto; overflow-x: hidden;', + layout: 'flex', + padding: 10, + spacing: 10, + items: [ + installedPlugins(editor), + availablePlugins() + ] + }; + }; + var $_7bezmyaljd09evsr = { makeTab: makeTab$1 }; + + var EditorManager = tinymce.util.Tools.resolve('tinymce.EditorManager'); + + var getVersion = function (major, minor) { + return major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor; + }; + var makeRow = function () { + var version = getVersion(EditorManager.majorVersion, EditorManager.minorVersion); + var changeLogLink = 'TinyMCE ' + version + ''; + return [ + { + type: 'label', + html: I18n.translate([ + 'You are using {0}', + changeLogLink + ]) + }, + { + type: 'spacer', + flex: 1 + }, + { + text: 'Close', + onclick: function () { + this.parent().parent().close(); + } + } + ]; + }; + var $_dubkovarjd09evt9 = { makeRow: makeRow }; + + var open = function (editor, pluginUrl) { + return function () { + editor.windowManager.open({ + title: 'Help', + bodyType: 'tabpanel', + layout: 'flex', + body: [ + $_czlwknaejd09evs2.makeTab(), + $_7bezmyaljd09evsr.makeTab(editor) + ], + buttons: $_dubkovarjd09evt9.makeRow(), + onPostRender: function () { + var title = this.getEl('title'); + title.innerHTML = 'TinyMCE Logo'; + } + }); + }; + }; + var $_8eu5ebadjd09evs0 = { open: open }; + + var register = function (editor, pluginUrl) { + editor.addCommand('mceHelp', $_8eu5ebadjd09evs0.open(editor, pluginUrl)); + }; + var $_90auybacjd09evrz = { register: register }; + + var register$1 = function (editor, pluginUrl) { + editor.addButton('help', { + icon: 'help', + onclick: $_8eu5ebadjd09evs0.open(editor, pluginUrl) + }); + editor.addMenuItem('Help', { + text: 'Help', + icon: 'help', + context: 'help', + onclick: $_8eu5ebadjd09evs0.open(editor, pluginUrl) + }); + }; + var $_f3e8r4atjd09evtb = { register: register$1 }; + + PluginManager.add('help', function (editor, pluginUrl) { + $_f3e8r4atjd09evtb.register(editor, pluginUrl); + $_90auybacjd09evrz.register(editor, pluginUrl); + editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp'); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/help/plugin.min.js b/node_modules/tinymce/plugins/help/plugin.min.js new file mode 100644 index 0000000..77a6b62 --- /dev/null +++ b/node_modules/tinymce/plugins/help/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,n,r,o,a,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return function(){return e}},c={noop:function(){},noarg:function(e){return function(){return e()}},compose:function(e,t){return function(){return e(t.apply(null,arguments))}},constant:u,identity:function(e){return e},tripleEquals:function(e,t){return e===t},curry:function(e){for(var t=new Array(arguments.length-1),n=1;n-1},g=function(e,t){for(var n=e.length,r=new Array(n),o=0;o Ctrl + Shift + P",action:"Focus to contextual toolbar"},{shortcut:T+" + K",action:"Insert link (if link plugin activated)"},{shortcut:T+" + S",action:"Save (if save plugin activated)"},{shortcut:T+" + F",action:"Find (if searchreplace plugin activated)"}]},H=function(){var e=b(_.shortcuts,function(e){return''+A.translate(e.action)+""+e.shortcut+"";var t}).join("");return{title:"Handy Shortcuts",type:"container",style:"overflow-y: auto; overflow-x: hidden; max-height: 250px",items:[{type:"container",html:'
    "+e+"
    '+A.translate("Action")+""+A.translate("Shortcut")+"
    "}]}},O=(a=Object.keys)===undefined?function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}:a,M=function(e,t){for(var n=O(e),r=0,o=n.length;r${name}'),z=function(e){var t,n,r=(t=e,n=L.keys(t.plugins),t.settings.forced_plugins===undefined?n:x(n,c.not(c.curry(C,t.settings.forced_plugins)))),o=b(r,function(t){return"
  • "+(n=e,r=t,w(B,function(e){return e.key===r}).fold(function(){var e=n.plugins[r].getMetadata;return"function"==typeof e?j(e()):r},function(e){return j({name:e.name,url:"https://www.tinymce.com/docs/plugins/"+e.key})}))+"
  • ";var n,r}),a=o.length,i=o.join("");return"

    "+A.translate(["Plugins installed ({0}):",a])+"

      "+i+"
    "},D=function(e){return{title:"Plugins",type:"container",style:"overflow-y: auto; overflow-x: hidden;",layout:"flex",padding:10,spacing:10,items:[(t=e,{type:"container",html:'
    '+z(t)+"
    ",flex:1}),{type:"container",html:'

    '+A.translate("Premium plugins:")+'

    • PowerPaste
    • Spell Checker Pro
    • Accessibility Checker
    • Advanced Code Editor
    • Enhanced Media Embed
    • Link Checker

    '+A.translate("Learn more...")+"

    ",flex:1}]};var t},q=tinymce.util.Tools.resolve("tinymce.EditorManager"),N=function(){var e,t,n='TinyMCE '+(e=q.majorVersion,t=q.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"";return[{type:"label",html:A.translate(["You are using {0}",n])},{type:"spacer",flex:1},{text:"Close",onclick:function(){this.parent().parent().close()}}]},R=function(e,t){return function(){e.windowManager.open({title:"Help",bodyType:"tabpanel",layout:"flex",body:[H(),D(e)],buttons:N(),onPostRender:function(){this.getEl("title").innerHTML='TinyMCE Logo'}})}},V=function(e,t){e.addCommand("mceHelp",R(e,t))},U=function(e,t){e.addButton("help",{icon:"help",onclick:R(e,t)}),e.addMenuItem("Help",{text:"Help",icon:"help",context:"help",onclick:R(e,t)})};i.add("help",function(e,t){U(e,t),V(e,t),e.shortcuts.add("Alt+0","Open help dialog","mceHelp")})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/hr/index.js b/node_modules/tinymce/plugins/hr/index.js new file mode 100644 index 0000000..e4c56e5 --- /dev/null +++ b/node_modules/tinymce/plugins/hr/index.js @@ -0,0 +1,7 @@ +// Exports the "hr" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/hr') +// ES2015: +// import 'tinymce/plugins/hr' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/hr/plugin.js b/node_modules/tinymce/plugins/hr/plugin.js new file mode 100644 index 0000000..5e755d7 --- /dev/null +++ b/node_modules/tinymce/plugins/hr/plugin.js @@ -0,0 +1,39 @@ +(function () { +var hr = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var register = function (editor) { + editor.addCommand('InsertHorizontalRule', function () { + editor.execCommand('mceInsertContent', false, '
    '); + }); + }; + var $_817bcvbjjd09evxv = { register: register }; + + var register$1 = function (editor) { + editor.addButton('hr', { + icon: 'hr', + tooltip: 'Horizontal line', + cmd: 'InsertHorizontalRule' + }); + editor.addMenuItem('hr', { + icon: 'hr', + text: 'Horizontal line', + cmd: 'InsertHorizontalRule', + context: 'insert' + }); + }; + var $_f0wf0vbkjd09evxw = { register: register$1 }; + + PluginManager.add('hr', function (editor) { + $_817bcvbjjd09evxv.register(editor); + $_f0wf0vbkjd09evxw.register(editor); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/hr/plugin.min.js b/node_modules/tinymce/plugins/hr/plugin.min.js new file mode 100644 index 0000000..40487cc --- /dev/null +++ b/node_modules/tinymce/plugins/hr/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var n=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"
    ")})},t=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",function(o){n(o),t(o)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/image/index.js b/node_modules/tinymce/plugins/image/index.js new file mode 100644 index 0000000..092c73a --- /dev/null +++ b/node_modules/tinymce/plugins/image/index.js @@ -0,0 +1,7 @@ +// Exports the "image" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/image') +// ES2015: +// import 'tinymce/plugins/image' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/image/plugin.js b/node_modules/tinymce/plugins/image/plugin.js new file mode 100644 index 0000000..9af8080 --- /dev/null +++ b/node_modules/tinymce/plugins/image/plugin.js @@ -0,0 +1,952 @@ +(function () { +var image = (function () { + 'use strict'; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var hasDimensions = function (editor) { + return editor.settings.image_dimensions === false ? false : true; + }; + var hasAdvTab = function (editor) { + return editor.settings.image_advtab === true ? true : false; + }; + var getPrependUrl = function (editor) { + return editor.getParam('image_prepend_url', ''); + }; + var getClassList = function (editor) { + return editor.getParam('image_class_list'); + }; + var hasDescription = function (editor) { + return editor.settings.image_description === false ? false : true; + }; + var hasImageTitle = function (editor) { + return editor.settings.image_title === true ? true : false; + }; + var hasImageCaption = function (editor) { + return editor.settings.image_caption === true ? true : false; + }; + var getImageList = function (editor) { + return editor.getParam('image_list', false); + }; + var hasUploadUrl = function (editor) { + return editor.getParam('images_upload_url', false); + }; + var hasUploadHandler = function (editor) { + return editor.getParam('images_upload_handler', false); + }; + var getUploadUrl = function (editor) { + return editor.getParam('images_upload_url'); + }; + var getUploadHandler = function (editor) { + return editor.getParam('images_upload_handler'); + }; + var getUploadBasePath = function (editor) { + return editor.getParam('images_upload_base_path'); + }; + var getUploadCredentials = function (editor) { + return editor.getParam('images_upload_credentials'); + }; + var $_7gt9p3bqjd09evyc = { + hasDimensions: hasDimensions, + hasAdvTab: hasAdvTab, + getPrependUrl: getPrependUrl, + getClassList: getClassList, + hasDescription: hasDescription, + hasImageTitle: hasImageTitle, + hasImageCaption: hasImageCaption, + getImageList: getImageList, + hasUploadUrl: hasUploadUrl, + hasUploadHandler: hasUploadHandler, + getUploadUrl: getUploadUrl, + getUploadHandler: getUploadHandler, + getUploadBasePath: getUploadBasePath, + getUploadCredentials: getUploadCredentials + }; + + var global = typeof window !== 'undefined' ? window : Function('return this;')(); + + var path = function (parts, scope) { + var o = scope !== undefined && scope !== null ? scope : global; + for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i) + o = o[parts[i]]; + return o; + }; + var resolve = function (p, scope) { + var parts = p.split('.'); + return path(parts, scope); + }; + var step = function (o, part) { + if (o[part] === undefined || o[part] === null) + o[part] = {}; + return o[part]; + }; + var forge = function (parts, target) { + var o = target !== undefined ? target : global; + for (var i = 0; i < parts.length; ++i) + o = step(o, parts[i]); + return o; + }; + var namespace = function (name, target) { + var parts = name.split('.'); + return forge(parts, target); + }; + var $_9x72nsbujd09evyo = { + path: path, + resolve: resolve, + forge: forge, + namespace: namespace + }; + + var unsafe = function (name, scope) { + return $_9x72nsbujd09evyo.resolve(name, scope); + }; + var getOrDie = function (name, scope) { + var actual = unsafe(name, scope); + if (actual === undefined || actual === null) + throw name + ' not available on this browser'; + return actual; + }; + var $_8gjv21btjd09evyl = { getOrDie: getOrDie }; + + function FileReader () { + var f = $_8gjv21btjd09evyl.getOrDie('FileReader'); + return new f(); + } + + var Promise = tinymce.util.Tools.resolve('tinymce.util.Promise'); + + var XHR = tinymce.util.Tools.resolve('tinymce.util.XHR'); + + var parseIntAndGetMax = function (val1, val2) { + return Math.max(parseInt(val1, 10), parseInt(val2, 10)); + }; + var getImageSize = function (url, callback) { + var img = document.createElement('img'); + function done(width, height) { + if (img.parentNode) { + img.parentNode.removeChild(img); + } + callback({ + width: width, + height: height + }); + } + img.onload = function () { + var width = parseIntAndGetMax(img.width, img.clientWidth); + var height = parseIntAndGetMax(img.height, img.clientHeight); + done(width, height); + }; + img.onerror = function () { + done(0, 0); + }; + var style = img.style; + style.visibility = 'hidden'; + style.position = 'fixed'; + style.bottom = style.left = '0px'; + style.width = style.height = 'auto'; + document.body.appendChild(img); + img.src = url; + }; + var buildListItems = function (inputList, itemCallback, startItems) { + function appendItems(values, output) { + output = output || []; + Tools.each(values, function (item) { + var menuItem = { text: item.text || item.title }; + if (item.menu) { + menuItem.menu = appendItems(item.menu); + } else { + menuItem.value = item.value; + itemCallback(menuItem); + } + output.push(menuItem); + }); + return output; + } + return appendItems(inputList, startItems || []); + }; + var removePixelSuffix = function (value) { + if (value) { + value = value.replace(/px$/, ''); + } + return value; + }; + var addPixelSuffix = function (value) { + if (value.length > 0 && /^[0-9]+$/.test(value)) { + value += 'px'; + } + return value; + }; + var mergeMargins = function (css) { + if (css.margin) { + var splitMargin = css.margin.split(' '); + switch (splitMargin.length) { + case 1: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[0]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[0]; + css['margin-left'] = css['margin-left'] || splitMargin[0]; + break; + case 2: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[1]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[0]; + css['margin-left'] = css['margin-left'] || splitMargin[1]; + break; + case 3: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[1]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[2]; + css['margin-left'] = css['margin-left'] || splitMargin[1]; + break; + case 4: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[1]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[2]; + css['margin-left'] = css['margin-left'] || splitMargin[3]; + } + delete css.margin; + } + return css; + }; + var createImageList = function (editor, callback) { + var imageList = $_7gt9p3bqjd09evyc.getImageList(editor); + if (typeof imageList === 'string') { + XHR.send({ + url: imageList, + success: function (text) { + callback(JSON.parse(text)); + } + }); + } else if (typeof imageList === 'function') { + imageList(callback); + } else { + callback(imageList); + } + }; + var waitLoadImage = function (editor, data, imgElm) { + function selectImage() { + imgElm.onload = imgElm.onerror = null; + if (editor.selection) { + editor.selection.select(imgElm); + editor.nodeChanged(); + } + } + imgElm.onload = function () { + if (!data.width && !data.height && $_7gt9p3bqjd09evyc.hasDimensions(editor)) { + editor.dom.setAttribs(imgElm, { + width: imgElm.clientWidth, + height: imgElm.clientHeight + }); + } + selectImage(); + }; + imgElm.onerror = selectImage; + }; + var blobToDataUri = function (blob) { + return new Promise(function (resolve, reject) { + var reader = new FileReader(); + reader.onload = function () { + resolve(reader.result); + }; + reader.onerror = function () { + reject(FileReader.error.message); + }; + reader.readAsDataURL(blob); + }); + }; + var $_8r0kc6brjd09evyf = { + getImageSize: getImageSize, + buildListItems: buildListItems, + removePixelSuffix: removePixelSuffix, + addPixelSuffix: addPixelSuffix, + mergeMargins: mergeMargins, + createImageList: createImageList, + waitLoadImage: waitLoadImage, + blobToDataUri: blobToDataUri + }; + + var updateVSpaceHSpaceBorder = function (editor) { + return function (evt) { + var dom = editor.dom; + var rootControl = evt.control.rootControl; + if (!$_7gt9p3bqjd09evyc.hasAdvTab(editor)) { + return; + } + var data = rootControl.toJSON(); + var css = dom.parseStyle(data.style); + rootControl.find('#vspace').value(''); + rootControl.find('#hspace').value(''); + css = $_8r0kc6brjd09evyf.mergeMargins(css); + if (css['margin-top'] && css['margin-bottom'] || css['margin-right'] && css['margin-left']) { + if (css['margin-top'] === css['margin-bottom']) { + rootControl.find('#vspace').value($_8r0kc6brjd09evyf.removePixelSuffix(css['margin-top'])); + } else { + rootControl.find('#vspace').value(''); + } + if (css['margin-right'] === css['margin-left']) { + rootControl.find('#hspace').value($_8r0kc6brjd09evyf.removePixelSuffix(css['margin-right'])); + } else { + rootControl.find('#hspace').value(''); + } + } + if (css['border-width']) { + rootControl.find('#border').value($_8r0kc6brjd09evyf.removePixelSuffix(css['border-width'])); + } + rootControl.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css)))); + }; + }; + var makeTab = function (editor, updateStyle) { + return { + title: 'Advanced', + type: 'form', + pack: 'start', + items: [ + { + label: 'Style', + name: 'style', + type: 'textbox', + onchange: updateVSpaceHSpaceBorder(editor) + }, + { + type: 'form', + layout: 'grid', + packV: 'start', + columns: 2, + padding: 0, + alignH: [ + 'left', + 'right' + ], + defaults: { + type: 'textbox', + maxWidth: 50, + onchange: function (evt) { + updateStyle(editor, evt.control.rootControl); + } + }, + items: [ + { + label: 'Vertical space', + name: 'vspace' + }, + { + label: 'Horizontal space', + name: 'hspace' + }, + { + label: 'Border', + name: 'border' + } + ] + } + ] + }; + }; + var $_9eockpbyjd09evyr = { makeTab: makeTab }; + + var doSyncSize = function (widthCtrl, heightCtrl) { + widthCtrl.state.set('oldVal', widthCtrl.value()); + heightCtrl.state.set('oldVal', heightCtrl.value()); + }; + var doSizeControls = function (win, f) { + var widthCtrl = win.find('#width')[0]; + var heightCtrl = win.find('#height')[0]; + var constrained = win.find('#constrain')[0]; + if (widthCtrl && heightCtrl && constrained) { + f(widthCtrl, heightCtrl, constrained.checked()); + } + }; + var doUpdateSize = function (widthCtrl, heightCtrl, isContrained) { + var oldWidth = widthCtrl.state.get('oldVal'); + var oldHeight = heightCtrl.state.get('oldVal'); + var newWidth = widthCtrl.value(); + var newHeight = heightCtrl.value(); + if (isContrained && oldWidth && oldHeight && newWidth && newHeight) { + if (newWidth !== oldWidth) { + newHeight = Math.round(newWidth / oldWidth * newHeight); + if (!isNaN(newHeight)) { + heightCtrl.value(newHeight); + } + } else { + newWidth = Math.round(newHeight / oldHeight * newWidth); + if (!isNaN(newWidth)) { + widthCtrl.value(newWidth); + } + } + } + doSyncSize(widthCtrl, heightCtrl); + }; + var syncSize = function (win) { + doSizeControls(win, doSyncSize); + }; + var updateSize = function (win) { + doSizeControls(win, doUpdateSize); + }; + var createUi = function () { + var recalcSize = function (evt) { + updateSize(evt.control.rootControl); + }; + return { + type: 'container', + label: 'Dimensions', + layout: 'flex', + align: 'center', + spacing: 5, + items: [ + { + name: 'width', + type: 'textbox', + maxLength: 5, + size: 5, + onchange: recalcSize, + ariaLabel: 'Width' + }, + { + type: 'label', + text: 'x' + }, + { + name: 'height', + type: 'textbox', + maxLength: 5, + size: 5, + onchange: recalcSize, + ariaLabel: 'Height' + }, + { + name: 'constrain', + type: 'checkbox', + checked: true, + text: 'Constrain proportions' + } + ] + }; + }; + var $_4wfur4c0jd09evyx = { + createUi: createUi, + syncSize: syncSize, + updateSize: updateSize + }; + + var onSrcChange = function (evt, editor) { + var srcURL, prependURL, absoluteURLPattern; + var meta = evt.meta || {}; + var control = evt.control; + var rootControl = control.rootControl; + var imageListCtrl = rootControl.find('#image-list')[0]; + if (imageListCtrl) { + imageListCtrl.value(editor.convertURL(control.value(), 'src')); + } + Tools.each(meta, function (value, key) { + rootControl.find('#' + key).value(value); + }); + if (!meta.width && !meta.height) { + srcURL = editor.convertURL(control.value(), 'src'); + prependURL = $_7gt9p3bqjd09evyc.getPrependUrl(editor); + absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i'); + if (prependURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, prependURL.length) !== prependURL) { + srcURL = prependURL + srcURL; + } + control.value(srcURL); + $_8r0kc6brjd09evyf.getImageSize(editor.documentBaseURI.toAbsolute(control.value()), function (data) { + if (data.width && data.height && $_7gt9p3bqjd09evyc.hasDimensions(editor)) { + rootControl.find('#width').value(data.width); + rootControl.find('#height').value(data.height); + $_4wfur4c0jd09evyx.updateSize(rootControl); + } + }); + } + }; + var onBeforeCall = function (evt) { + evt.meta = evt.control.rootControl.toJSON(); + }; + var getGeneralItems = function (editor, imageListCtrl) { + var generalFormItems = [ + { + name: 'src', + type: 'filepicker', + filetype: 'image', + label: 'Source', + autofocus: true, + onchange: function (evt) { + onSrcChange(evt, editor); + }, + onbeforecall: onBeforeCall + }, + imageListCtrl + ]; + if ($_7gt9p3bqjd09evyc.hasDescription(editor)) { + generalFormItems.push({ + name: 'alt', + type: 'textbox', + label: 'Image description' + }); + } + if ($_7gt9p3bqjd09evyc.hasImageTitle(editor)) { + generalFormItems.push({ + name: 'title', + type: 'textbox', + label: 'Image Title' + }); + } + if ($_7gt9p3bqjd09evyc.hasDimensions(editor)) { + generalFormItems.push($_4wfur4c0jd09evyx.createUi()); + } + if ($_7gt9p3bqjd09evyc.getClassList(editor)) { + generalFormItems.push({ + name: 'class', + type: 'listbox', + label: 'Class', + values: $_8r0kc6brjd09evyf.buildListItems($_7gt9p3bqjd09evyc.getClassList(editor), function (item) { + if (item.value) { + item.textStyle = function () { + return editor.formatter.getCssText({ + inline: 'img', + classes: [item.value] + }); + }; + } + }) + }); + } + if ($_7gt9p3bqjd09evyc.hasImageCaption(editor)) { + generalFormItems.push({ + name: 'caption', + type: 'checkbox', + label: 'Caption' + }); + } + return generalFormItems; + }; + var makeTab$1 = function (editor, imageListCtrl) { + return { + title: 'General', + type: 'form', + items: getGeneralItems(editor, imageListCtrl) + }; + }; + var $_3ni2wpbzjd09evyu = { + makeTab: makeTab$1, + getGeneralItems: getGeneralItems + }; + + var url = function () { + return $_8gjv21btjd09evyl.getOrDie('URL'); + }; + var createObjectURL = function (blob) { + return url().createObjectURL(blob); + }; + var revokeObjectURL = function (u) { + url().revokeObjectURL(u); + }; + var $_9s3gltc2jd09evz2 = { + createObjectURL: createObjectURL, + revokeObjectURL: revokeObjectURL + }; + + var Factory = tinymce.util.Tools.resolve('tinymce.ui.Factory'); + + function XMLHttpRequest () { + var f = $_8gjv21btjd09evyl.getOrDie('XMLHttpRequest'); + return new f(); + } + + var noop = function () { + }; + var pathJoin = function (path1, path2) { + if (path1) { + return path1.replace(/\/$/, '') + '/' + path2.replace(/^\//, ''); + } + return path2; + }; + function Uploader (settings) { + var defaultHandler = function (blobInfo, success, failure, progress) { + var xhr, formData; + xhr = new XMLHttpRequest(); + xhr.open('POST', settings.url); + xhr.withCredentials = settings.credentials; + xhr.upload.onprogress = function (e) { + progress(e.loaded / e.total * 100); + }; + xhr.onerror = function () { + failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status); + }; + xhr.onload = function () { + var json; + if (xhr.status < 200 || xhr.status >= 300) { + failure('HTTP Error: ' + xhr.status); + return; + } + json = JSON.parse(xhr.responseText); + if (!json || typeof json.location !== 'string') { + failure('Invalid JSON: ' + xhr.responseText); + return; + } + success(pathJoin(settings.basePath, json.location)); + }; + formData = new FormData(); + formData.append('file', blobInfo.blob(), blobInfo.filename()); + xhr.send(formData); + }; + var uploadBlob = function (blobInfo, handler) { + return new Promise(function (resolve, reject) { + try { + handler(blobInfo, resolve, reject, noop); + } catch (ex) { + reject(ex.message); + } + }); + }; + var isDefaultHandler = function (handler) { + return handler === defaultHandler; + }; + var upload = function (blobInfo) { + return !settings.url && isDefaultHandler(settings.handler) ? Promise.reject('Upload url missing from the settings.') : uploadBlob(blobInfo, settings.handler); + }; + settings = Tools.extend({ + credentials: false, + handler: defaultHandler + }, settings); + return { upload: upload }; + } + + var onFileInput = function (editor) { + return function (evt) { + var Throbber = Factory.get('Throbber'); + var rootControl = evt.control.rootControl; + var throbber = new Throbber(rootControl.getEl()); + var file = evt.control.value(); + var blobUri = $_9s3gltc2jd09evz2.createObjectURL(file); + var uploader = Uploader({ + url: $_7gt9p3bqjd09evyc.getUploadUrl(editor), + basePath: $_7gt9p3bqjd09evyc.getUploadBasePath(editor), + credentials: $_7gt9p3bqjd09evyc.getUploadCredentials(editor), + handler: $_7gt9p3bqjd09evyc.getUploadHandler(editor) + }); + var finalize = function () { + throbber.hide(); + $_9s3gltc2jd09evz2.revokeObjectURL(blobUri); + }; + throbber.show(); + return $_8r0kc6brjd09evyf.blobToDataUri(file).then(function (dataUrl) { + var blobInfo = editor.editorUpload.blobCache.create({ + blob: file, + blobUri: blobUri, + name: file.name ? file.name.replace(/\.[^\.]+$/, '') : null, + base64: dataUrl.split(',')[1] + }); + return uploader.upload(blobInfo).then(function (url) { + var src = rootControl.find('#src'); + src.value(url); + rootControl.find('tabpanel')[0].activateTab(0); + src.fire('change'); + finalize(); + return url; + }); + }).catch(function (err) { + editor.windowManager.alert(err); + finalize(); + }); + }; + }; + var acceptExts = '.jpg,.jpeg,.png,.gif'; + var makeTab$2 = function (editor) { + return { + title: 'Upload', + type: 'form', + layout: 'flex', + direction: 'column', + align: 'stretch', + padding: '20 20 20 20', + items: [ + { + type: 'container', + layout: 'flex', + direction: 'column', + align: 'center', + spacing: 10, + items: [ + { + text: 'Browse for an image', + type: 'browsebutton', + accept: acceptExts, + onchange: onFileInput(editor) + }, + { + text: 'OR', + type: 'label' + } + ] + }, + { + text: 'Drop an image here', + type: 'dropzone', + accept: acceptExts, + height: 100, + onchange: onFileInput(editor) + } + ] + }; + }; + var $_ajlcp2c1jd09evz0 = { makeTab: makeTab$2 }; + + function Dialog (editor) { + var updateStyle = function (editor, rootControl) { + if (!$_7gt9p3bqjd09evyc.hasAdvTab(editor)) { + return; + } + var dom = editor.dom; + var data = rootControl.toJSON(); + var css = dom.parseStyle(data.style); + css = $_8r0kc6brjd09evyf.mergeMargins(css); + if (data.vspace) { + css['margin-top'] = css['margin-bottom'] = $_8r0kc6brjd09evyf.addPixelSuffix(data.vspace); + } + if (data.hspace) { + css['margin-left'] = css['margin-right'] = $_8r0kc6brjd09evyf.addPixelSuffix(data.hspace); + } + if (data.border) { + css['border-width'] = $_8r0kc6brjd09evyf.addPixelSuffix(data.border); + } + rootControl.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css)))); + }; + function showDialog(imageList) { + var win, data = {}, imgElm, figureElm; + var dom = editor.dom; + var imageListCtrl; + function onSubmitForm() { + var figureElm, oldImg; + $_4wfur4c0jd09evyx.updateSize(win); + updateStyle(editor, win); + data = Tools.extend(data, win.toJSON()); + if (!data.alt) { + data.alt = ''; + } + if (!data.title) { + data.title = ''; + } + if (data.width === '') { + data.width = null; + } + if (data.height === '') { + data.height = null; + } + if (!data.style) { + data.style = null; + } + data = { + src: data.src, + alt: data.alt, + title: data.title, + width: data.width, + height: data.height, + style: data.style, + caption: data.caption, + class: data.class + }; + editor.undoManager.transact(function () { + if (!data.src) { + if (imgElm) { + var elm = dom.is(imgElm.parentNode, 'figure.image') ? imgElm.parentNode : imgElm; + dom.remove(elm); + editor.focus(); + editor.nodeChanged(); + if (dom.isEmpty(editor.getBody())) { + editor.setContent(''); + editor.selection.setCursorLocation(); + } + } + return; + } + if (data.title === '') { + data.title = null; + } + if (!imgElm) { + data.id = '__mcenew'; + editor.focus(); + editor.selection.setContent(dom.createHTML('img', data)); + imgElm = dom.get('__mcenew'); + dom.setAttrib(imgElm, 'id', null); + } else { + dom.setAttribs(imgElm, data); + } + editor.editorUpload.uploadImagesAuto(); + if (data.caption === false) { + if (dom.is(imgElm.parentNode, 'figure.image')) { + figureElm = imgElm.parentNode; + dom.insertAfter(imgElm, figureElm); + dom.remove(figureElm); + } + } + if (data.caption === true) { + if (!dom.is(imgElm.parentNode, 'figure.image')) { + oldImg = imgElm; + imgElm = imgElm.cloneNode(true); + figureElm = dom.create('figure', { class: 'image' }); + figureElm.appendChild(imgElm); + figureElm.appendChild(dom.create('figcaption', { contentEditable: true }, 'Caption')); + figureElm.contentEditable = false; + var textBlock = dom.getParent(oldImg, function (node) { + return editor.schema.getTextBlockElements()[node.nodeName]; + }); + if (textBlock) { + dom.split(textBlock, oldImg, figureElm); + } else { + dom.replace(figureElm, oldImg); + } + editor.selection.select(figureElm); + } + return; + } + $_8r0kc6brjd09evyf.waitLoadImage(editor, data, imgElm); + }); + } + imgElm = editor.selection.getNode(); + figureElm = dom.getParent(imgElm, 'figure.image'); + if (figureElm) { + imgElm = dom.select('img', figureElm)[0]; + } + if (imgElm && (imgElm.nodeName !== 'IMG' || imgElm.getAttribute('data-mce-object') || imgElm.getAttribute('data-mce-placeholder'))) { + imgElm = null; + } + if (imgElm) { + data = { + src: dom.getAttrib(imgElm, 'src'), + alt: dom.getAttrib(imgElm, 'alt'), + title: dom.getAttrib(imgElm, 'title'), + class: dom.getAttrib(imgElm, 'class'), + width: dom.getAttrib(imgElm, 'width'), + height: dom.getAttrib(imgElm, 'height'), + caption: !!figureElm + }; + } + if (imageList) { + imageListCtrl = { + type: 'listbox', + label: 'Image list', + name: 'image-list', + values: $_8r0kc6brjd09evyf.buildListItems(imageList, function (item) { + item.value = editor.convertURL(item.value || item.url, 'src'); + }, [{ + text: 'None', + value: '' + }]), + value: data.src && editor.convertURL(data.src, 'src'), + onselect: function (e) { + var altCtrl = win.find('#alt'); + if (!altCtrl.value() || e.lastControl && altCtrl.value() === e.lastControl.text()) { + altCtrl.value(e.control.text()); + } + win.find('#src').value(e.control.value()).fire('change'); + }, + onPostRender: function () { + imageListCtrl = this; + } + }; + } + if ($_7gt9p3bqjd09evyc.hasAdvTab(editor) || $_7gt9p3bqjd09evyc.hasUploadUrl(editor) || $_7gt9p3bqjd09evyc.hasUploadHandler(editor)) { + var body = [$_3ni2wpbzjd09evyu.makeTab(editor, imageListCtrl)]; + if ($_7gt9p3bqjd09evyc.hasAdvTab(editor)) { + if (imgElm) { + if (imgElm.style.marginLeft && imgElm.style.marginRight && imgElm.style.marginLeft === imgElm.style.marginRight) { + data.hspace = $_8r0kc6brjd09evyf.removePixelSuffix(imgElm.style.marginLeft); + } + if (imgElm.style.marginTop && imgElm.style.marginBottom && imgElm.style.marginTop === imgElm.style.marginBottom) { + data.vspace = $_8r0kc6brjd09evyf.removePixelSuffix(imgElm.style.marginTop); + } + if (imgElm.style.borderWidth) { + data.border = $_8r0kc6brjd09evyf.removePixelSuffix(imgElm.style.borderWidth); + } + data.style = editor.dom.serializeStyle(editor.dom.parseStyle(editor.dom.getAttrib(imgElm, 'style'))); + } + body.push($_9eockpbyjd09evyr.makeTab(editor, updateStyle)); + } + if ($_7gt9p3bqjd09evyc.hasUploadUrl(editor) || $_7gt9p3bqjd09evyc.hasUploadHandler(editor)) { + body.push($_ajlcp2c1jd09evz0.makeTab(editor)); + } + win = editor.windowManager.open({ + title: 'Insert/edit image', + data: data, + bodyType: 'tabpanel', + body: body, + onSubmit: onSubmitForm + }); + } else { + win = editor.windowManager.open({ + title: 'Insert/edit image', + data: data, + body: $_3ni2wpbzjd09evyu.getGeneralItems(editor, imageListCtrl), + onSubmit: onSubmitForm + }); + } + $_4wfur4c0jd09evyx.syncSize(win); + } + function open() { + $_8r0kc6brjd09evyf.createImageList(editor, showDialog); + } + return { open: open }; + } + + var register = function (editor) { + editor.addCommand('mceImage', Dialog(editor).open); + }; + var $_869gjibnjd09evy3 = { register: register }; + + var hasImageClass = function (node) { + var className = node.attr('class'); + return className && /\bimage\b/.test(className); + }; + var toggleContentEditableState = function (state) { + return function (nodes) { + var i = nodes.length, node; + var toggleContentEditable = function (node) { + node.attr('contenteditable', state ? 'true' : null); + }; + while (i--) { + node = nodes[i]; + if (hasImageClass(node)) { + node.attr('contenteditable', state ? 'false' : null); + Tools.each(node.getAll('figcaption'), toggleContentEditable); + } + } + }; + }; + var setup = function (editor) { + editor.on('preInit', function () { + editor.parser.addNodeFilter('figure', toggleContentEditableState(true)); + editor.serializer.addNodeFilter('figure', toggleContentEditableState(false)); + }); + }; + var $_fv2j0zc6jd09evz8 = { setup: setup }; + + var register$1 = function (editor) { + editor.addButton('image', { + icon: 'image', + tooltip: 'Insert/edit image', + onclick: Dialog(editor).open, + stateSelector: 'img:not([data-mce-object],[data-mce-placeholder]),figure.image' + }); + editor.addMenuItem('image', { + icon: 'image', + text: 'Image', + onclick: Dialog(editor).open, + context: 'insert', + prependToContext: true + }); + }; + var $_3ld2r1c7jd09evza = { register: register$1 }; + + PluginManager.add('image', function (editor) { + $_fv2j0zc6jd09evz8.setup(editor); + $_3ld2r1c7jd09evza.register(editor); + $_869gjibnjd09evy3.register(editor); + }); + function Plugin () { + } + + return Plugin; + +}()); +})() diff --git a/node_modules/tinymce/plugins/image/plugin.min.js b/node_modules/tinymce/plugins/image/plugin.min.js new file mode 100644 index 0000000..b06bc39 --- /dev/null +++ b/node_modules/tinymce/plugins/image/plugin.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n={hasDimensions:function(e){return!1!==e.settings.image_dimensions},hasAdvTab:function(e){return!0===e.settings.image_advtab},getPrependUrl:function(e){return e.getParam("image_prepend_url","")},getClassList:function(e){return e.getParam("image_class_list")},hasDescription:function(e){return!1!==e.settings.image_description},hasImageTitle:function(e){return!0===e.settings.image_title},hasImageCaption:function(e){return!0===e.settings.image_caption},getImageList:function(e){return e.getParam("image_list",!1)},hasUploadUrl:function(e){return e.getParam("images_upload_url",!1)},hasUploadHandler:function(e){return e.getParam("images_upload_handler",!1)},getUploadUrl:function(e){return e.getParam("images_upload_url")},getUploadHandler:function(e){return e.getParam("images_upload_handler")},getUploadBasePath:function(e){return e.getParam("images_upload_base_path")},getUploadCredentials:function(e){return e.getParam("images_upload_credentials")}},a="undefined"!=typeof window?window:Function("return this;")(),i=function(e,t){for(var n=t!==undefined&&null!==t?t:a,i=0;i0&&/^[0-9]+$/.test(e)&&(e+="px"),e},mergeMargins:function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},createImageList:function(e,t){var a=n.getImageList(e);"string"==typeof a?c.send({url:a,success:function(e){t(JSON.parse(e))}}):"function"==typeof a?a(t):t(a)},waitLoadImage:function(e,t,a){function i(){a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())}a.onload=function(){t.width||t.height||!n.hasDimensions(e)||e.dom.setAttribs(a,{width:a.clientWidth,height:a.clientHeight}),i()},a.onerror=i},blobToDataUri:function(e){return new s(function(t,n){var a=new l;a.onload=function(){t(a.result)},a.onerror=function(){n(l.error.message)},a.readAsDataURL(e)})}},d={makeTab:function(e,t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:(a=e,function(e){var t=a.dom,i=e.control.rootControl;if(n.hasAdvTab(a)){var r=i.toJSON(),o=t.parseStyle(r.style);i.find("#vspace").value(""),i.find("#hspace").value(""),((o=g.mergeMargins(o))["margin-top"]&&o["margin-bottom"]||o["margin-right"]&&o["margin-left"])&&(o["margin-top"]===o["margin-bottom"]?i.find("#vspace").value(g.removePixelSuffix(o["margin-top"])):i.find("#vspace").value(""),o["margin-right"]===o["margin-left"]?i.find("#hspace").value(g.removePixelSuffix(o["margin-right"])):i.find("#hspace").value("")),o["border-width"]&&i.find("#border").value(g.removePixelSuffix(o["border-width"])),i.find("#style").value(t.serializeStyle(t.parseStyle(t.serializeStyle(o))))}})},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:function(n){t(e,n.control.rootControl)}},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]};var a}},m=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},f=function(e,t){var n=e.find("#width")[0],a=e.find("#height")[0],i=e.find("#constrain")[0];n&&a&&i&&t(n,a,i.checked())},p=function(e,t,n){var a=e.state.get("oldVal"),i=t.state.get("oldVal"),r=e.value(),o=t.value();n&&a&&i&&r&&o&&(r!==a?(o=Math.round(r/a*o),isNaN(o)||t.value(o)):(r=Math.round(o/i*r),isNaN(r)||e.value(r))),m(e,t)},h=function(e){f(e,p)},b={createUi:function(){var e=function(e){h(e.control.rootControl)};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},syncSize:function(e){f(e,m)},updateSize:h},v=function(e){e.meta=e.control.rootControl.toJSON()},y=function(e,a){var i=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:function(a){var i,r,o,l,s,c,u,d,m;r=e,c=(i=a).meta||{},u=i.control,d=u.rootControl,(m=d.find("#image-list")[0])&&m.value(r.convertURL(u.value(),"src")),t.each(c,function(e,t){d.find("#"+t).value(e)}),c.width||c.height||(o=r.convertURL(u.value(),"src"),l=n.getPrependUrl(r),s=new RegExp("^(?:[a-z]+:)?//","i"),l&&!s.test(o)&&o.substring(0,l.length)!==l&&(o=l+o),u.value(o),g.getImageSize(r.documentBaseURI.toAbsolute(u.value()),function(e){e.width&&e.height&&n.hasDimensions(r)&&(d.find("#width").value(e.width),d.find("#height").value(e.height),b.updateSize(d))}))},onbeforecall:v},a];return n.hasDescription(e)&&i.push({name:"alt",type:"textbox",label:"Image description"}),n.hasImageTitle(e)&&i.push({name:"title",type:"textbox",label:"Image Title"}),n.hasDimensions(e)&&i.push(b.createUi()),n.getClassList(e)&&i.push({name:"class",type:"listbox",label:"Class",values:g.buildListItems(n.getClassList(e),function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})})})}),n.hasImageCaption(e)&&i.push({name:"caption",type:"checkbox",label:"Caption"}),i},x={makeTab:function(e,t){return{title:"General",type:"form",items:y(e,t)}},getGeneralItems:y},w=function(){return o.getOrDie("URL")},S=function(e){return w().createObjectURL(e)},U=function(e){w().revokeObjectURL(e)},T=tinymce.util.Tools.resolve("tinymce.ui.Factory"),C=function(){},I=function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t};function P(e){var n=function(t,n,a,i){var r,l;(r=new function(){return new(o.getOrDie("XMLHttpRequest"))}).open("POST",e.url),r.withCredentials=e.credentials,r.upload.onprogress=function(e){i(e.loaded/e.total*100)},r.onerror=function(){a("Image upload failed due to a XHR Transport error. Code: "+r.status)},r.onload=function(){var t;r.status<200||r.status>=300?a("HTTP Error: "+r.status):(t=JSON.parse(r.responseText))&&"string"==typeof t.location?n(I(e.basePath,t.location)):a("Invalid JSON: "+r.responseText)},(l=new FormData).append("file",t.blob(),t.filename()),r.send(l)};return e=t.extend({credentials:!1,handler:n},e),{upload:function(t){return e.url||e.handler!==n?(a=t,i=e.handler,new s(function(e,t){try{i(a,e,t,C)}catch(n){t(n.message)}})):s.reject("Upload url missing from the settings.");var a,i}}}var L=function(e){return function(t){var a=T.get("Throbber"),i=t.control.rootControl,r=new a(i.getEl()),o=t.control.value(),l=S(o),s=P({url:n.getUploadUrl(e),basePath:n.getUploadBasePath(e),credentials:n.getUploadCredentials(e),handler:n.getUploadHandler(e)}),c=function(){r.hide(),U(l)};return r.show(),g.blobToDataUri(o).then(function(t){var n=e.editorUpload.blobCache.create({blob:o,blobUri:l,name:o.name?o.name.replace(/\.[^\.]+$/,""):null,base64:t.split(",")[1]});return s.upload(n).then(function(e){var t=i.find("#src");return t.value(e),i.find("tabpanel")[0].activateTab(0),t.fire("change"),c(),e})})["catch"](function(t){e.windowManager.alert(t),c()})}},_=".jpg,.jpeg,.png,.gif",N={makeTab:function(e){return{title:"Upload",type:"form",layout:"flex",direction:"column",align:"stretch",padding:"20 20 20 20",items:[{type:"container",layout:"flex",direction:"column",align:"center",spacing:10,items:[{text:"Browse for an image",type:"browsebutton",accept:_,onchange:L(e)},{text:"OR",type:"label"}]},{text:"Drop an image here",type:"dropzone",accept:_,height:100,onchange:L(e)}]}}};function A(e){var a=function(e,t){if(n.hasAdvTab(e)){var a=e.dom,i=t.toJSON(),r=a.parseStyle(i.style);r=g.mergeMargins(r),i.vspace&&(r["margin-top"]=r["margin-bottom"]=g.addPixelSuffix(i.vspace)),i.hspace&&(r["margin-left"]=r["margin-right"]=g.addPixelSuffix(i.hspace)),i.border&&(r["border-width"]=g.addPixelSuffix(i.border)),t.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(r))))}};function i(i){var r,o,l,s,c={},u=e.dom;function m(){var n,i;b.updateSize(r),a(e,r),(c=t.extend(c,r.toJSON())).alt||(c.alt=""),c.title||(c.title=""),""===c.width&&(c.width=null),""===c.height&&(c.height=null),c.style||(c.style=null),c={src:c.src,alt:c.alt,title:c.title,width:c.width,height:c.height,style:c.style,caption:c.caption,"class":c["class"]},e.undoManager.transact(function(){if(c.src){if(""===c.title&&(c.title=null),o?u.setAttribs(o,c):(c.id="__mcenew",e.focus(),e.selection.setContent(u.createHTML("img",c)),o=u.get("__mcenew"),u.setAttrib(o,"id",null)),e.editorUpload.uploadImagesAuto(),!1===c.caption&&u.is(o.parentNode,"figure.image")&&(n=o.parentNode,u.insertAfter(o,n),u.remove(n)),!0!==c.caption)g.waitLoadImage(e,c,o);else if(!u.is(o.parentNode,"figure.image")){i=o,o=o.cloneNode(!0),(n=u.create("figure",{"class":"image"})).appendChild(o),n.appendChild(u.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable=!1;var t=u.getParent(i,function(t){return e.schema.getTextBlockElements()[t.nodeName]});t?u.split(t,i,n):u.replace(n,i),e.selection.select(n)}}else if(o){var a=u.is(o.parentNode,"figure.image")?o.parentNode:o;u.remove(a),e.focus(),e.nodeChanged(),u.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})}if(o=e.selection.getNode(),(l=u.getParent(o,"figure.image"))&&(o=u.select("img",l)[0]),o&&("IMG"!==o.nodeName||o.getAttribute("data-mce-object")||o.getAttribute("data-mce-placeholder"))&&(o=null),o&&(c={src:u.getAttrib(o,"src"),alt:u.getAttrib(o,"alt"),title:u.getAttrib(o,"title"),"class":u.getAttrib(o,"class"),width:u.getAttrib(o,"width"),height:u.getAttrib(o,"height"),caption:!!l}),i&&(s={type:"listbox",label:"Image list",name:"image-list",values:g.buildListItems(i,function(t){t.value=e.convertURL(t.value||t.url,"src")},[{text:"None",value:""}]),value:c.src&&e.convertURL(c.src,"src"),onselect:function(e){var t=r.find("#alt");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),r.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){s=this}}),n.hasAdvTab(e)||n.hasUploadUrl(e)||n.hasUploadHandler(e)){var f=[x.makeTab(e,s)];n.hasAdvTab(e)&&(o&&(o.style.marginLeft&&o.style.marginRight&&o.style.marginLeft===o.style.marginRight&&(c.hspace=g.removePixelSuffix(o.style.marginLeft)),o.style.marginTop&&o.style.marginBottom&&o.style.marginTop===o.style.marginBottom&&(c.vspace=g.removePixelSuffix(o.style.marginTop)),o.style.borderWidth&&(c.border=g.removePixelSuffix(o.style.borderWidth)),c.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(o,"style")))),f.push(d.makeTab(e,a))),(n.hasUploadUrl(e)||n.hasUploadHandler(e))&&f.push(N.makeTab(e)),r=e.windowManager.open({title:"Insert/edit image",data:c,bodyType:"tabpanel",body:f,onSubmit:m})}else r=e.windowManager.open({title:"Insert/edit image",data:c,body:x.getGeneralItems(e,s),onSubmit:m});b.syncSize(r)}return{open:function(){g.createImageList(e,i)}}}var k=function(e){e.addCommand("mceImage",A(e).open)},z=function(e){return function(n){for(var a,i,r=n.length,o=function(t){t.attr("contenteditable",e?"true":null)};r--;)a=n[r],(i=a.attr("class"))&&/\bimage\b/.test(i)&&(a.attr("contenteditable",e?"false":null),t.each(a.getAll("figcaption"),o))}},R=function(e){e.on("preInit",function(){e.parser.addNodeFilter("figure",z(!0)),e.serializer.addNodeFilter("figure",z(!1))})},D=function(e){e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:A(e).open,stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:A(e).open,context:"insert",prependToContext:!0})};e.add("image",function(e){R(e),D(e),k(e)})}(); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/imagetools/index.js b/node_modules/tinymce/plugins/imagetools/index.js new file mode 100644 index 0000000..c8b4f96 --- /dev/null +++ b/node_modules/tinymce/plugins/imagetools/index.js @@ -0,0 +1,7 @@ +// Exports the "imagetools" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/imagetools') +// ES2015: +// import 'tinymce/plugins/imagetools' +require('./plugin.js'); \ No newline at end of file diff --git a/node_modules/tinymce/plugins/imagetools/plugin.js b/node_modules/tinymce/plugins/imagetools/plugin.js new file mode 100644 index 0000000..cb41a9c --- /dev/null +++ b/node_modules/tinymce/plugins/imagetools/plugin.js @@ -0,0 +1,3425 @@ +(function () { +var imagetools = (function () { + 'use strict'; + + var Cell = function (initial) { + var value = initial; + var get = function () { + return value; + }; + var set = function (v) { + value = v; + }; + var clone = function () { + return Cell(get()); + }; + return { + get: get, + set: set, + clone: clone + }; + }; + + var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + function create(width, height) { + return resize(document.createElement('canvas'), width, height); + } + function clone(canvas) { + var tCanvas, ctx; + tCanvas = create(canvas.width, canvas.height); + ctx = get2dContext(tCanvas); + ctx.drawImage(canvas, 0, 0); + return tCanvas; + } + function get2dContext(canvas) { + return canvas.getContext('2d'); + } + function get3dContext(canvas) { + var gl = null; + try { + gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + } catch (e) { + } + if (!gl) { + gl = null; + } + return gl; + } + function resize(canvas, width, height) { + canvas.width = width; + canvas.height = height; + return canvas; + } + var $_bxynizcgjd09ew2o = { + create: create, + clone: clone, + resize: resize, + get2dContext: get2dContext, + get3dContext: get3dContext + }; + + function getWidth(image) { + return image.naturalWidth || image.width; + } + function getHeight(image) { + return image.naturalHeight || image.height; + } + var $_2l963tchjd09ew2r = { + getWidth: getWidth, + getHeight: getHeight + }; + + var promise = function () { + var Promise = function (fn) { + if (typeof this !== 'object') + throw new TypeError('Promises must be constructed via new'); + if (typeof fn !== 'function') + throw new TypeError('not a function'); + this._state = null; + this._value = null; + this._deferreds = []; + doResolve(fn, bind(resolve, this), bind(reject, this)); + }; + var asap = Promise.immediateFn || typeof setImmediate === 'function' && setImmediate || function (fn) { + setTimeout(fn, 1); + }; + function bind(fn, thisArg) { + return function () { + fn.apply(thisArg, arguments); + }; + } + var isArray = Array.isArray || function (value) { + return Object.prototype.toString.call(value) === '[object Array]'; + }; + function handle(deferred) { + var me = this; + if (this._state === null) { + this._deferreds.push(deferred); + return; + } + asap(function () { + var cb = me._state ? deferred.onFulfilled : deferred.onRejected; + if (cb === null) { + (me._state ? deferred.resolve : deferred.reject)(me._value); + return; + } + var ret; + try { + ret = cb(me._value); + } catch (e) { + deferred.reject(e); + return; + } + deferred.resolve(ret); + }); + } + function resolve(newValue) { + try { + if (newValue === this) + throw new TypeError('A promise cannot be resolved with itself.'); + if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) { + var then = newValue.then; + if (typeof then === 'function') { + doResolve(bind(then, newValue), bind(resolve, this), bind(reject, this)); + return; + } + } + this._state = true; + this._value = newValue; + finale.call(this); + } catch (e) { + reject.call(this, e); + } + } + function reject(newValue) { + this._state = false; + this._value = newValue; + finale.call(this); + } + function finale() { + for (var i = 0, len = this._deferreds.length; i < len; i++) { + handle.call(this, this._deferreds[i]); + } + this._deferreds = null; + } + function Handler(onFulfilled, onRejected, resolve, reject) { + this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null; + this.onRejected = typeof onRejected === 'function' ? onRejected : null; + this.resolve = resolve; + this.reject = reject; + } + function doResolve(fn, onFulfilled, onRejected) { + var done = false; + try { + fn(function (value) { + if (done) + return; + done = true; + onFulfilled(value); + }, function (reason) { + if (done) + return; + done = true; + onRejected(reason); + }); + } catch (ex) { + if (done) + return; + done = true; + onRejected(ex); + } + } + Promise.prototype['catch'] = function (onRejected) { + return this.then(null, onRejected); + }; + Promise.prototype.then = function (onFulfilled, onRejected) { + var me = this; + return new Promise(function (resolve, reject) { + handle.call(me, new Handler(onFulfilled, onRejected, resolve, reject)); + }); + }; + Promise.all = function () { + var args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments); + return new Promise(function (resolve, reject) { + if (args.length === 0) + return resolve([]); + var remaining = args.length; + function res(i, val) { + try { + if (val && (typeof val === 'object' || typeof val === 'function')) { + var then = val.then; + if (typeof then === 'function') { + then.call(val, function (val) { + res(i, val); + }, reject); + return; + } + } + args[i] = val; + if (--remaining === 0) { + resolve(args); + } + } catch (ex) { + reject(ex); + } + } + for (var i = 0; i < args.length; i++) { + res(i, args[i]); + } + }); + }; + Promise.resolve = function (value) { + if (value && typeof value === 'object' && value.constructor === Promise) { + return value; + } + return new Promise(function (resolve) { + resolve(value); + }); + }; + Promise.reject = function (value) { + return new Promise(function (resolve, reject) { + reject(value); + }); + }; + Promise.race = function (values) { + return new Promise(function (resolve, reject) { + for (var i = 0, len = values.length; i < len; i++) { + values[i].then(resolve, reject); + } + }); + }; + return Promise; + }; + var Promise = window.Promise ? window.Promise : promise(); + + var noop = function () { + }; + var noarg = function (f) { + return function () { + return f(); + }; + }; + var compose = function (fa, fb) { + return function () { + return fa(fb.apply(null, arguments)); + }; + }; + var constant = function (value) { + return function () { + return value; + }; + }; + var identity = function (x) { + return x; + }; + var tripleEquals = function (a, b) { + return a === b; + }; + var curry = function (f) { + var args = new Array(arguments.length - 1); + for (var i = 1; i < arguments.length; i++) + args[i - 1] = arguments[i]; + return function () { + var newArgs = new Array(arguments.length); + for (var j = 0; j < newArgs.length; j++) + newArgs[j] = arguments[j]; + var all = args.concat(newArgs); + return f.apply(null, all); + }; + }; + var not = function (f) { + return function () { + return !f.apply(null, arguments); + }; + }; + var die = function (msg) { + return function () { + throw new Error(msg); + }; + }; + var apply = function (f) { + return f(); + }; + var call = function (f) { + f(); + }; + var never = constant(false); + var always = constant(true); + var $_76jbnrckjd09ew32 = { + noop: noop, + noarg: noarg, + compose: compose, + constant: constant, + identity: identity, + tripleEquals: tripleEquals, + curry: curry, + not: not, + die: die, + apply: apply, + call: call, + never: never, + always: always + }; + + var never$1 = $_76jbnrckjd09ew32.never; + var always$1 = $_76jbnrckjd09ew32.always; + var none = function () { + return NONE; + }; + var NONE = function () { + var eq = function (o) { + return o.isNone(); + }; + var call = function (thunk) { + return thunk(); + }; + var id = function (n) { + return n; + }; + var noop = function () { + }; + var me = { + fold: function (n, s) { + return n(); + }, + is: never$1, + isSome: never$1, + isNone: always$1, + getOr: id, + getOrThunk: call, + getOrDie: function (msg) { + throw new Error(msg || 'error: getOrDie called on none.'); + }, + or: id, + orThunk: call, + map: none, + ap: none, + each: noop, + bind: none, + flatten: none, + exists: never$1, + forall: always$1, + filter: none, + equals: eq, + equals_: eq, + toArray: function () { + return []; + }, + toString: $_76jbnrckjd09ew32.constant('none()') + }; + if (Object.freeze) + Object.freeze(me); + return me; + }(); + var some = function (a) { + var constant_a = function () { + return a; + }; + var self = function () { + return me; + }; + var map = function (f) { + return some(f(a)); + }; + var bind = function (f) { + return f(a); + }; + var me = { + fold: function (n, s) { + return s(a); + }, + is: function (v) { + return a === v; + }, + isSome: always$1, + isNone: never$1, + getOr: constant_a, + getOrThunk: constant_a, + getOrDie: constant_a, + or: self, + orThunk: self, + map: map, + ap: function (optfab) { + return optfab.fold(none, function (fab) { + return some(fab(a)); + }); + }, + each: function (f) { + f(a); + }, + bind: bind, + flatten: constant_a, + exists: bind, + forall: bind, + filter: function (f) { + return f(a) ? me : NONE; + }, + equals: function (o) { + return o.is(a); + }, + equals_: function (o, elementEq) { + return o.fold(never$1, function (b) { + return elementEq(a, b); + }); + }, + toArray: function () { + return [a]; + }, + toString: function () { + return 'some(' + a + ')'; + } + }; + return me; + }; + var from = function (value) { + return value === null || value === undefined ? NONE : some(value); + }; + var $_4yggckcjjd09ew2x = { + some: some, + none: none, + from: from + }; + + var global = typeof window !== 'undefined' ? window : Function('return this;')(); + + var path = function (parts, scope) { + var o = scope !== undefined && scope !== null ? scope : global; + for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i) + o = o[parts[i]]; + return o; + }; + var resolve = function (p, scope) { + var parts = p.split('.'); + return path(parts, scope); + }; + var step = function (o, part) { + if (o[part] === undefined || o[part] === null) + o[part] = {}; + return o[part]; + }; + var forge = function (parts, target) { + var o = target !== undefined ? target : global; + for (var i = 0; i < parts.length; ++i) + o = step(o, parts[i]); + return o; + }; + var namespace = function (name, target) { + var parts = name.split('.'); + return forge(parts, target); + }; + var $_3b253hcnjd09ew37 = { + path: path, + resolve: resolve, + forge: forge, + namespace: namespace + }; + + var unsafe = function (name, scope) { + return $_3b253hcnjd09ew37.resolve(name, scope); + }; + var getOrDie = function (name, scope) { + var actual = unsafe(name, scope); + if (actual === undefined || actual === null) + throw name + ' not available on this browser'; + return actual; + }; + var $_8t3s11cmjd09ew35 = { getOrDie: getOrDie }; + + function Blob (parts, properties) { + var f = $_8t3s11cmjd09ew35.getOrDie('Blob'); + return new f(parts, properties); + } + + function FileReader () { + var f = $_8t3s11cmjd09ew35.getOrDie('FileReader'); + return new f(); + } + + function Uint8Array (arr) { + var f = $_8t3s11cmjd09ew35.getOrDie('Uint8Array'); + return new f(arr); + } + + var requestAnimationFrame = function (callback) { + var f = $_8t3s11cmjd09ew35.getOrDie('requestAnimationFrame'); + f(callback); + }; + var atob = function (base64) { + var f = $_8t3s11cmjd09ew35.getOrDie('atob'); + return f(base64); + }; + var $_ayrqcbcrjd09ew3a = { + atob: atob, + requestAnimationFrame: requestAnimationFrame + }; + + function loadImage(image) { + return new Promise(function (resolve) { + function loaded() { + image.removeEventListener('load', loaded); + resolve(image); + } + if (image.complete) { + resolve(image); + } else { + image.addEventListener('load', loaded); + } + }); + } + function imageToBlob(image) { + return loadImage(image).then(function (image) { + var src = image.src; + if (src.indexOf('blob:') === 0) { + return anyUriToBlob(src); + } + if (src.indexOf('data:') === 0) { + return dataUriToBlob(src); + } + return anyUriToBlob(src); + }); + } + function blobToImage(blob) { + return new Promise(function (resolve, reject) { + var blobUrl = URL.createObjectURL(blob); + var image = new Image(); + var removeListeners = function () { + image.removeEventListener('load', loaded); + image.removeEventListener('error', error); + }; + function loaded() { + removeListeners(); + resolve(image); + } + function error() { + removeListeners(); + reject('Unable to load data of type ' + blob.type + ': ' + blobUrl); + } + image.addEventListener('load', loaded); + image.addEventListener('error', error); + image.src = blobUrl; + if (image.complete) { + loaded(); + } + }); + } + function anyUriToBlob(url) { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'blob'; + xhr.onload = function () { + if (this.status == 200) { + resolve(this.response); + } + }; + xhr.onerror = function () { + var _this = this; + var corsError = function () { + var obj = new Error('No access to download image'); + obj.code = 18; + obj.name = 'SecurityError'; + return obj; + }; + var genericError = function () { + return new Error('Error ' + _this.status + ' downloading image'); + }; + reject(this.status === 0 ? corsError() : genericError()); + }; + xhr.send(); + }); + } + function dataUriToBlobSync(uri) { + var data = uri.split(','); + var matches = /data:([^;]+)/.exec(data[0]); + if (!matches) + return $_4yggckcjjd09ew2x.none(); + var mimetype = matches[1]; + var base64 = data[1]; + var sliceSize = 1024; + var byteCharacters = $_ayrqcbcrjd09ew3a.atob(base64); + var bytesLength = byteCharacters.length; + var slicesCount = Math.ceil(bytesLength / sliceSize); + var byteArrays = new Array(slicesCount); + for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) { + var begin = sliceIndex * sliceSize; + var end = Math.min(begin + sliceSize, bytesLength); + var bytes = new Array(end - begin); + for (var offset = begin, i = 0; offset < end; ++i, ++offset) { + bytes[i] = byteCharacters[offset].charCodeAt(0); + } + byteArrays[sliceIndex] = Uint8Array(bytes); + } + return $_4yggckcjjd09ew2x.some(Blob(byteArrays, { type: mimetype })); + } + function dataUriToBlob(uri) { + return new Promise(function (resolve, reject) { + dataUriToBlobSync(uri).fold(function () { + reject('uri is not base64: ' + uri); + }, resolve); + }); + } + function uriToBlob(url) { + if (url.indexOf('blob:') === 0) { + return anyUriToBlob(url); + } + if (url.indexOf('data:') === 0) { + return dataUriToBlob(url); + } + return null; + } + function canvasToBlob(canvas, type, quality) { + type = type || 'image/png'; + if (HTMLCanvasElement.prototype.toBlob) { + return new Promise(function (resolve) { + canvas.toBlob(function (blob) { + resolve(blob); + }, type, quality); + }); + } else { + return dataUriToBlob(canvas.toDataURL(type, quality)); + } + } + function canvasToDataURL(getCanvas, type, quality) { + type = type || 'image/png'; + return getCanvas.then(function (canvas) { + return canvas.toDataURL(type, quality); + }); + } + function blobToCanvas(blob) { + return blobToImage(blob).then(function (image) { + revokeImageUrl(image); + var context, canvas; + canvas = $_bxynizcgjd09ew2o.create($_2l963tchjd09ew2r.getWidth(image), $_2l963tchjd09ew2r.getHeight(image)); + context = $_bxynizcgjd09ew2o.get2dContext(canvas); + context.drawImage(image, 0, 0); + return canvas; + }); + } + function blobToDataUri(blob) { + return new Promise(function (resolve) { + var reader = new FileReader(); + reader.onloadend = function () { + resolve(reader.result); + }; + reader.readAsDataURL(blob); + }); + } + function blobToBase64(blob) { + return blobToDataUri(blob).then(function (dataUri) { + return dataUri.split(',')[1]; + }); + } + function revokeImageUrl(image) { + URL.revokeObjectURL(image.src); + } + var $_ckpbbrcfjd09ew2d = { + blobToImage: blobToImage, + imageToBlob: imageToBlob, + blobToDataUri: blobToDataUri, + blobToBase64: blobToBase64, + dataUriToBlobSync: dataUriToBlobSync, + canvasToBlob: canvasToBlob, + canvasToDataURL: canvasToDataURL, + blobToCanvas: blobToCanvas, + uriToBlob: uriToBlob + }; + + var blobToImage$1 = function (image) { + return $_ckpbbrcfjd09ew2d.blobToImage(image); + }; + var imageToBlob$1 = function (blob) { + return $_ckpbbrcfjd09ew2d.imageToBlob(blob); + }; + var blobToDataUri$1 = function (blob) { + return $_ckpbbrcfjd09ew2d.blobToDataUri(blob); + }; + var blobToBase64$1 = function (blob) { + return $_ckpbbrcfjd09ew2d.blobToBase64(blob); + }; + var dataUriToBlobSync$1 = function (uri) { + return $_ckpbbrcfjd09ew2d.dataUriToBlobSync(uri); + }; + var uriToBlob$1 = function (uri) { + return $_4yggckcjjd09ew2x.from($_ckpbbrcfjd09ew2d.uriToBlob(uri)); + }; + var $_22sf3pcejd09ew29 = { + blobToImage: blobToImage$1, + imageToBlob: imageToBlob$1, + blobToDataUri: blobToDataUri$1, + blobToBase64: blobToBase64$1, + dataUriToBlobSync: dataUriToBlobSync$1, + uriToBlob: uriToBlob$1 + }; + + function create$1(getCanvas, blob, uri) { + var initialType = blob.type; + var getType = $_76jbnrckjd09ew32.constant(initialType); + function toBlob() { + return Promise.resolve(blob); + } + function toDataURL() { + return uri; + } + function toBase64() { + return uri.split(',')[1]; + } + function toAdjustedBlob(type, quality) { + return getCanvas.then(function (canvas) { + return $_ckpbbrcfjd09ew2d.canvasToBlob(canvas, type, quality); + }); + } + function toAdjustedDataURL(type, quality) { + return getCanvas.then(function (canvas) { + return $_ckpbbrcfjd09ew2d.canvasToDataURL(canvas, type, quality); + }); + } + function toAdjustedBase64(type, quality) { + return toAdjustedDataURL(type, quality).then(function (dataurl) { + return dataurl.split(',')[1]; + }); + } + function toCanvas() { + return getCanvas.then($_bxynizcgjd09ew2o.clone); + } + return { + getType: getType, + toBlob: toBlob, + toDataURL: toDataURL, + toBase64: toBase64, + toAdjustedBlob: toAdjustedBlob, + toAdjustedDataURL: toAdjustedDataURL, + toAdjustedBase64: toAdjustedBase64, + toCanvas: toCanvas + }; + } + function fromBlob(blob) { + return $_ckpbbrcfjd09ew2d.blobToDataUri(blob).then(function (uri) { + return create$1($_ckpbbrcfjd09ew2d.blobToCanvas(blob), blob, uri); + }); + } + function fromCanvas(canvas, type) { + return $_ckpbbrcfjd09ew2d.canvasToBlob(canvas, type).then(function (blob) { + return create$1(Promise.resolve(canvas), blob, canvas.toDataURL()); + }); + } + function fromImage(image) { + return $_ckpbbrcfjd09ew2d.imageToBlob(image).then(function (blob) { + return fromBlob(blob); + }); + } + var fromBlobAndUrlSync = function (blob, url) { + return create$1($_ckpbbrcfjd09ew2d.blobToCanvas(blob), blob, url); + }; + var $_9a7u9kcujd09ew3q = { + fromBlob: fromBlob, + fromCanvas: fromCanvas, + fromImage: fromImage, + fromBlobAndUrlSync: fromBlobAndUrlSync + }; + + function clamp(value, min, max) { + value = parseFloat(value); + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + return value; + } + function identity$1() { + return [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]; + } + var DELTA_INDEX = [ + 0, + 0.01, + 0.02, + 0.04, + 0.05, + 0.06, + 0.07, + 0.08, + 0.1, + 0.11, + 0.12, + 0.14, + 0.15, + 0.16, + 0.17, + 0.18, + 0.2, + 0.21, + 0.22, + 0.24, + 0.25, + 0.27, + 0.28, + 0.3, + 0.32, + 0.34, + 0.36, + 0.38, + 0.4, + 0.42, + 0.44, + 0.46, + 0.48, + 0.5, + 0.53, + 0.56, + 0.59, + 0.62, + 0.65, + 0.68, + 0.71, + 0.74, + 0.77, + 0.8, + 0.83, + 0.86, + 0.89, + 0.92, + 0.95, + 0.98, + 1, + 1.06, + 1.12, + 1.18, + 1.24, + 1.3, + 1.36, + 1.42, + 1.48, + 1.54, + 1.6, + 1.66, + 1.72, + 1.78, + 1.84, + 1.9, + 1.96, + 2, + 2.12, + 2.25, + 2.37, + 2.5, + 2.62, + 2.75, + 2.87, + 3, + 3.2, + 3.4, + 3.6, + 3.8, + 4, + 4.3, + 4.7, + 4.9, + 5, + 5.5, + 6, + 6.5, + 6.8, + 7, + 7.3, + 7.5, + 7.8, + 8, + 8.4, + 8.7, + 9, + 9.4, + 9.6, + 9.8, + 10 + ]; + function multiply(matrix1, matrix2) { + var i, j, k, val, col = [], out = new Array(10); + for (i = 0; i < 5; i++) { + for (j = 0; j < 5; j++) { + col[j] = matrix2[j + i * 5]; + } + for (j = 0; j < 5; j++) { + val = 0; + for (k = 0; k < 5; k++) { + val += matrix1[j + k * 5] * col[k]; + } + out[j + i * 5] = val; + } + } + return out; + } + function adjust(matrix, adjustValue) { + adjustValue = clamp(adjustValue, 0, 1); + return matrix.map(function (value, index) { + if (index % 6 === 0) { + value = 1 - (1 - value) * adjustValue; + } else { + value *= adjustValue; + } + return clamp(value, 0, 1); + }); + } + function adjustContrast(matrix, value) { + var x; + value = clamp(value, -1, 1); + value *= 100; + if (value < 0) { + x = 127 + value / 100 * 127; + } else { + x = value % 1; + if (x === 0) { + x = DELTA_INDEX[value]; + } else { + x = DELTA_INDEX[Math.floor(value)] * (1 - x) + DELTA_INDEX[Math.floor(value) + 1] * x; + } + x = x * 127 + 127; + } + return multiply(matrix, [ + x / 127, + 0, + 0, + 0, + 0.5 * (127 - x), + 0, + x / 127, + 0, + 0, + 0.5 * (127 - x), + 0, + 0, + x / 127, + 0, + 0.5 * (127 - x), + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + } + function adjustSaturation(matrix, value) { + var x, lumR, lumG, lumB; + value = clamp(value, -1, 1); + x = 1 + (value > 0 ? 3 * value : value); + lumR = 0.3086; + lumG = 0.6094; + lumB = 0.082; + return multiply(matrix, [ + lumR * (1 - x) + x, + lumG * (1 - x), + lumB * (1 - x), + 0, + 0, + lumR * (1 - x), + lumG * (1 - x) + x, + lumB * (1 - x), + 0, + 0, + lumR * (1 - x), + lumG * (1 - x), + lumB * (1 - x) + x, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + } + function adjustHue(matrix, angle) { + var cosVal, sinVal, lumR, lumG, lumB; + angle = clamp(angle, -180, 180) / 180 * Math.PI; + cosVal = Math.cos(angle); + sinVal = Math.sin(angle); + lumR = 0.213; + lumG = 0.715; + lumB = 0.072; + return multiply(matrix, [ + lumR + cosVal * (1 - lumR) + sinVal * -lumR, + lumG + cosVal * -lumG + sinVal * -lumG, + lumB + cosVal * -lumB + sinVal * (1 - lumB), + 0, + 0, + lumR + cosVal * -lumR + sinVal * 0.143, + lumG + cosVal * (1 - lumG) + sinVal * 0.14, + lumB + cosVal * -lumB + sinVal * -0.283, + 0, + 0, + lumR + cosVal * -lumR + sinVal * -(1 - lumR), + lumG + cosVal * -lumG + sinVal * lumG, + lumB + cosVal * (1 - lumB) + sinVal * lumB, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + } + function adjustBrightness(matrix, value) { + value = clamp(255 * value, -255, 255); + return multiply(matrix, [ + 1, + 0, + 0, + 0, + value, + 0, + 1, + 0, + 0, + value, + 0, + 0, + 1, + 0, + value, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + } + function adjustColors(matrix, adjustR, adjustG, adjustB) { + adjustR = clamp(adjustR, 0, 2); + adjustG = clamp(adjustG, 0, 2); + adjustB = clamp(adjustB, 0, 2); + return multiply(matrix, [ + adjustR, + 0, + 0, + 0, + 0, + 0, + adjustG, + 0, + 0, + 0, + 0, + 0, + adjustB, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + } + function adjustSepia(matrix, value) { + value = clamp(value, 0, 1); + return multiply(matrix, adjust([ + 0.393, + 0.769, + 0.189, + 0, + 0, + 0.349, + 0.686, + 0.168, + 0, + 0, + 0.272, + 0.534, + 0.131, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], value)); + } + function adjustGrayscale(matrix, value) { + value = clamp(value, 0, 1); + return multiply(matrix, adjust([ + 0.33, + 0.34, + 0.33, + 0, + 0, + 0.33, + 0.34, + 0.33, + 0, + 0, + 0.33, + 0.34, + 0.33, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], value)); + } + var $_ei7ocacvjd09ew3v = { + identity: identity$1, + adjust: adjust, + multiply: multiply, + adjustContrast: adjustContrast, + adjustBrightness: adjustBrightness, + adjustSaturation: adjustSaturation, + adjustHue: adjustHue, + adjustColors: adjustColors, + adjustSepia: adjustSepia, + adjustGrayscale: adjustGrayscale + }; + + function colorFilter(ir, matrix) { + return ir.toCanvas().then(function (canvas) { + return applyColorFilter(canvas, ir.getType(), matrix); + }); + } + function applyColorFilter(canvas, type, matrix) { + var context = $_bxynizcgjd09ew2o.get2dContext(canvas); + var pixels; + function applyMatrix(pixels, m) { + var d = pixels.data, r, g, b, a, i, m0 = m[0], m1 = m[1], m2 = m[2], m3 = m[3], m4 = m[4], m5 = m[5], m6 = m[6], m7 = m[7], m8 = m[8], m9 = m[9], m10 = m[10], m11 = m[11], m12 = m[12], m13 = m[13], m14 = m[14], m15 = m[15], m16 = m[16], m17 = m[17], m18 = m[18], m19 = m[19]; + for (i = 0; i < d.length; i += 4) { + r = d[i]; + g = d[i + 1]; + b = d[i + 2]; + a = d[i + 3]; + d[i] = r * m0 + g * m1 + b * m2 + a * m3 + m4; + d[i + 1] = r * m5 + g * m6 + b * m7 + a * m8 + m9; + d[i + 2] = r * m10 + g * m11 + b * m12 + a * m13 + m14; + d[i + 3] = r * m15 + g * m16 + b * m17 + a * m18 + m19; + } + return pixels; + } + pixels = applyMatrix(context.getImageData(0, 0, canvas.width, canvas.height), matrix); + context.putImageData(pixels, 0, 0); + return $_9a7u9kcujd09ew3q.fromCanvas(canvas, type); + } + function convoluteFilter(ir, matrix) { + return ir.toCanvas().then(function (canvas) { + return applyConvoluteFilter(canvas, ir.getType(), matrix); + }); + } + function applyConvoluteFilter(canvas, type, matrix) { + var context = $_bxynizcgjd09ew2o.get2dContext(canvas); + var pixelsIn, pixelsOut; + function applyMatrix(pixelsIn, pixelsOut, matrix) { + var rgba, drgba, side, halfSide, x, y, r, g, b, cx, cy, scx, scy, offset, wt, w, h; + function clamp(value, min, max) { + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + return value; + } + side = Math.round(Math.sqrt(matrix.length)); + halfSide = Math.floor(side / 2); + rgba = pixelsIn.data; + drgba = pixelsOut.data; + w = pixelsIn.width; + h = pixelsIn.height; + for (y = 0; y < h; y++) { + for (x = 0; x < w; x++) { + r = g = b = 0; + for (cy = 0; cy < side; cy++) { + for (cx = 0; cx < side; cx++) { + scx = clamp(x + cx - halfSide, 0, w - 1); + scy = clamp(y + cy - halfSide, 0, h - 1); + offset = (scy * w + scx) * 4; + wt = matrix[cy * side + cx]; + r += rgba[offset] * wt; + g += rgba[offset + 1] * wt; + b += rgba[offset + 2] * wt; + } + } + offset = (y * w + x) * 4; + drgba[offset] = clamp(r, 0, 255); + drgba[offset + 1] = clamp(g, 0, 255); + drgba[offset + 2] = clamp(b, 0, 255); + } + } + return pixelsOut; + } + pixelsIn = context.getImageData(0, 0, canvas.width, canvas.height); + pixelsOut = context.getImageData(0, 0, canvas.width, canvas.height); + pixelsOut = applyMatrix(pixelsIn, pixelsOut, matrix); + context.putImageData(pixelsOut, 0, 0); + return $_9a7u9kcujd09ew3q.fromCanvas(canvas, type); + } + function functionColorFilter(colorFn) { + var filterImpl = function (canvas, type, value) { + var context = $_bxynizcgjd09ew2o.get2dContext(canvas); + var pixels, i, lookup = new Array(256); + function applyLookup(pixels, lookup) { + var d = pixels.data, i; + for (i = 0; i < d.length; i += 4) { + d[i] = lookup[d[i]]; + d[i + 1] = lookup[d[i + 1]]; + d[i + 2] = lookup[d[i + 2]]; + } + return pixels; + } + for (i = 0; i < lookup.length; i++) { + lookup[i] = colorFn(i, value); + } + pixels = applyLookup(context.getImageData(0, 0, canvas.width, canvas.height), lookup); + context.putImageData(pixels, 0, 0); + return $_9a7u9kcujd09ew3q.fromCanvas(canvas, type); + }; + return function (ir, value) { + return ir.toCanvas().then(function (canvas) { + return filterImpl(canvas, ir.getType(), value); + }); + }; + } + function complexAdjustableColorFilter(matrixAdjustFn) { + return function (ir, adjust) { + return colorFilter(ir, matrixAdjustFn($_ei7ocacvjd09ew3v.identity(), adjust)); + }; + } + function basicColorFilter(matrix) { + return function (ir) { + return colorFilter(ir, matrix); + }; + } + function basicConvolutionFilter(kernel) { + return function (ir) { + return convoluteFilter(ir, kernel); + }; + } + var $_3mtud2ctjd09ew3f = { + invert: basicColorFilter([ + -1, + 0, + 0, + 0, + 255, + 0, + -1, + 0, + 0, + 255, + 0, + 0, + -1, + 0, + 255, + 0, + 0, + 0, + 1, + 0 + ]), + brightness: complexAdjustableColorFilter($_ei7ocacvjd09ew3v.adjustBrightness), + hue: complexAdjustableColorFilter($_ei7ocacvjd09ew3v.adjustHue), + saturate: complexAdjustableColorFilter($_ei7ocacvjd09ew3v.adjustSaturation), + contrast: complexAdjustableColorFilter($_ei7ocacvjd09ew3v.adjustContrast), + grayscale: complexAdjustableColorFilter($_ei7ocacvjd09ew3v.adjustGrayscale), + sepia: complexAdjustableColorFilter($_ei7ocacvjd09ew3v.adjustSepia), + colorize: function (ir, adjustR, adjustG, adjustB) { + return colorFilter(ir, $_ei7ocacvjd09ew3v.adjustColors($_ei7ocacvjd09ew3v.identity(), adjustR, adjustG, adjustB)); + }, + sharpen: basicConvolutionFilter([ + 0, + -1, + 0, + -1, + 5, + -1, + 0, + -1, + 0 + ]), + emboss: basicConvolutionFilter([ + -2, + -1, + 0, + -1, + 1, + 1, + 0, + 1, + 2 + ]), + gamma: functionColorFilter(function (color, value) { + return Math.pow(color / 255, 1 - value) * 255; + }), + exposure: functionColorFilter(function (color, value) { + return 255 * (1 - Math.exp(-(color / 255) * value)); + }), + colorFilter: colorFilter, + convoluteFilter: convoluteFilter + }; + + function scale(image, dW, dH) { + var sW = $_2l963tchjd09ew2r.getWidth(image); + var sH = $_2l963tchjd09ew2r.getHeight(image); + var wRatio = dW / sW; + var hRatio = dH / sH; + var scaleCapped = false; + if (wRatio < 0.5 || wRatio > 2) { + wRatio = wRatio < 0.5 ? 0.5 : 2; + scaleCapped = true; + } + if (hRatio < 0.5 || hRatio > 2) { + hRatio = hRatio < 0.5 ? 0.5 : 2; + scaleCapped = true; + } + var scaled = _scale(image, wRatio, hRatio); + return !scaleCapped ? scaled : scaled.then(function (tCanvas) { + return scale(tCanvas, dW, dH); + }); + } + function _scale(image, wRatio, hRatio) { + return new Promise(function (resolve) { + var sW = $_2l963tchjd09ew2r.getWidth(image); + var sH = $_2l963tchjd09ew2r.getHeight(image); + var dW = Math.floor(sW * wRatio); + var dH = Math.floor(sH * hRatio); + var canvas = $_bxynizcgjd09ew2o.create(dW, dH); + var context = $_bxynizcgjd09ew2o.get2dContext(canvas); + context.drawImage(image, 0, 0, sW, sH, 0, 0, dW, dH); + resolve(canvas); + }); + } + var $_973za5cxjd09ew46 = { scale: scale }; + + function rotate(ir, angle) { + return ir.toCanvas().then(function (canvas) { + return applyRotate(canvas, ir.getType(), angle); + }); + } + function applyRotate(image, type, angle) { + var canvas = $_bxynizcgjd09ew2o.create(image.width, image.height); + var context = $_bxynizcgjd09ew2o.get2dContext(canvas); + var translateX = 0, translateY = 0; + angle = angle < 0 ? 360 + angle : angle; + if (angle == 90 || angle == 270) { + $_bxynizcgjd09ew2o.resize(canvas, canvas.height, canvas.width); + } + if (angle == 90 || angle == 180) { + translateX = canvas.width; + } + if (angle == 270 || angle == 180) { + translateY = canvas.height; + } + context.translate(translateX, translateY); + context.rotate(angle * Math.PI / 180); + context.drawImage(image, 0, 0); + return $_9a7u9kcujd09ew3q.fromCanvas(canvas, type); + } + function flip(ir, axis) { + return ir.toCanvas().then(function (canvas) { + return applyFlip(canvas, ir.getType(), axis); + }); + } + function applyFlip(image, type, axis) { + var canvas = $_bxynizcgjd09ew2o.create(image.width, image.height); + var context = $_bxynizcgjd09ew2o.get2dContext(canvas); + if (axis == 'v') { + context.scale(1, -1); + context.drawImage(image, 0, -canvas.height); + } else { + context.scale(-1, 1); + context.drawImage(image, -canvas.width, 0); + } + return $_9a7u9kcujd09ew3q.fromCanvas(canvas, type); + } + function crop(ir, x, y, w, h) { + return ir.toCanvas().then(function (canvas) { + return applyCrop(canvas, ir.getType(), x, y, w, h); + }); + } + function applyCrop(image, type, x, y, w, h) { + var canvas = $_bxynizcgjd09ew2o.create(w, h); + var context = $_bxynizcgjd09ew2o.get2dContext(canvas); + context.drawImage(image, -x, -y); + return $_9a7u9kcujd09ew3q.fromCanvas(canvas, type); + } + function resize$1(ir, w, h) { + return ir.toCanvas().then(function (canvas) { + return $_973za5cxjd09ew46.scale(canvas, w, h).then(function (newCanvas) { + return $_9a7u9kcujd09ew3q.fromCanvas(newCanvas, ir.getType()); + }); + }); + } + var $_5e23xicwjd09ew43 = { + rotate: rotate, + flip: flip, + crop: crop, + resize: resize$1 + }; + + var invert = function (ir) { + return $_3mtud2ctjd09ew3f.invert(ir); + }; + var sharpen = function (ir) { + return $_3mtud2ctjd09ew3f.sharpen(ir); + }; + var emboss = function (ir) { + return $_3mtud2ctjd09ew3f.emboss(ir); + }; + var gamma = function (ir, value) { + return $_3mtud2ctjd09ew3f.gamma(ir, value); + }; + var exposure = function (ir, value) { + return $_3mtud2ctjd09ew3f.exposure(ir, value); + }; + var colorize = function (ir, adjustR, adjustG, adjustB) { + return $_3mtud2ctjd09ew3f.colorize(ir, adjustR, adjustG, adjustB); + }; + var brightness = function (ir, adjust) { + return $_3mtud2ctjd09ew3f.brightness(ir, adjust); + }; + var hue = function (ir, adjust) { + return $_3mtud2ctjd09ew3f.hue(ir, adjust); + }; + var saturate = function (ir, adjust) { + return $_3mtud2ctjd09ew3f.saturate(ir, adjust); + }; + var contrast = function (ir, adjust) { + return $_3mtud2ctjd09ew3f.contrast(ir, adjust); + }; + var grayscale = function (ir, adjust) { + return $_3mtud2ctjd09ew3f.grayscale(ir, adjust); + }; + var sepia = function (ir, adjust) { + return $_3mtud2ctjd09ew3f.sepia(ir, adjust); + }; + var flip$1 = function (ir, axis) { + return $_5e23xicwjd09ew43.flip(ir, axis); + }; + var crop$1 = function (ir, x, y, w, h) { + return $_5e23xicwjd09ew43.crop(ir, x, y, w, h); + }; + var resize$2 = function (ir, w, h) { + return $_5e23xicwjd09ew43.resize(ir, w, h); + }; + var rotate$1 = function (ir, angle) { + return $_5e23xicwjd09ew43.rotate(ir, angle); + }; + var $_5liicwcsjd09ew3c = { + invert: invert, + sharpen: sharpen, + emboss: emboss, + brightness: brightness, + hue: hue, + saturate: saturate, + contrast: contrast, + grayscale: grayscale, + sepia: sepia, + colorize: colorize, + gamma: gamma, + exposure: exposure, + flip: flip$1, + crop: crop$1, + resize: resize$2, + rotate: rotate$1 + }; + + var blobToImageResult = function (blob) { + return $_9a7u9kcujd09ew3q.fromBlob(blob); + }; + var fromBlobAndUrlSync$1 = function (blob, uri) { + return $_9a7u9kcujd09ew3q.fromBlobAndUrlSync(blob, uri); + }; + var imageToImageResult = function (image) { + return $_9a7u9kcujd09ew3q.fromImage(image); + }; + var imageResultToBlob = function (ir, type, quality) { + if (type === undefined && quality === undefined) { + return imageResultToOriginalBlob(ir); + } else { + return ir.toAdjustedBlob(type, quality); + } + }; + var imageResultToOriginalBlob = function (ir) { + return ir.toBlob(); + }; + var imageResultToDataURL = function (ir) { + return ir.toDataURL(); + }; + var $_6ie9orcyjd09ew48 = { + blobToImageResult: blobToImageResult, + fromBlobAndUrlSync: fromBlobAndUrlSync$1, + imageToImageResult: imageToImageResult, + imageResultToBlob: imageResultToBlob, + imageResultToOriginalBlob: imageResultToOriginalBlob, + imageResultToDataURL: imageResultToDataURL + }; + + var url = function () { + return $_8t3s11cmjd09ew35.getOrDie('URL'); + }; + var createObjectURL = function (blob) { + return url().createObjectURL(blob); + }; + var revokeObjectURL = function (u) { + url().revokeObjectURL(u); + }; + var $_29beikczjd09ew49 = { + createObjectURL: createObjectURL, + revokeObjectURL: revokeObjectURL + }; + + var Delay = tinymce.util.Tools.resolve('tinymce.util.Delay'); + + var Promise$1 = tinymce.util.Tools.resolve('tinymce.util.Promise'); + + var URI = tinymce.util.Tools.resolve('tinymce.util.URI'); + + var getToolbarItems = function (editor) { + return editor.getParam('imagetools_toolbar', 'rotateleft rotateright | flipv fliph | crop editimage imageoptions'); + }; + var getProxyUrl = function (editor) { + return editor.getParam('imagetools_proxy'); + }; + var $_4qgaddd3jd09ew4b = { + getToolbarItems: getToolbarItems, + getProxyUrl: getProxyUrl + }; + + function getImageSize(img) { + var width, height; + function isPxValue(value) { + return /^[0-9\.]+px$/.test(value); + } + width = img.style.width; + height = img.style.height; + if (width || height) { + if (isPxValue(width) && isPxValue(height)) { + return { + w: parseInt(width, 10), + h: parseInt(height, 10) + }; + } + return null; + } + width = img.width; + height = img.height; + if (width && height) { + return { + w: parseInt(width, 10), + h: parseInt(height, 10) + }; + } + return null; + } + function setImageSize(img, size) { + var width, height; + if (size) { + width = img.style.width; + height = img.style.height; + if (width || height) { + img.style.width = size.w + 'px'; + img.style.height = size.h + 'px'; + img.removeAttribute('data-mce-style'); + } + width = img.width; + height = img.height; + if (width || height) { + img.setAttribute('width', size.w); + img.setAttribute('height', size.h); + } + } + } + function getNaturalImageSize(img) { + return { + w: img.naturalWidth, + h: img.naturalHeight + }; + } + var $_fn7bx9d4jd09ew4c = { + getImageSize: getImageSize, + setImageSize: setImageSize, + getNaturalImageSize: getNaturalImageSize + }; + + var rawIndexOf = function () { + var pIndexOf = Array.prototype.indexOf; + var fastIndex = function (xs, x) { + return pIndexOf.call(xs, x); + }; + var slowIndex = function (xs, x) { + return slowIndexOf(xs, x); + }; + return pIndexOf === undefined ? slowIndex : fastIndex; + }(); + var indexOf = function (xs, x) { + var r = rawIndexOf(xs, x); + return r === -1 ? $_4yggckcjjd09ew2x.none() : $_4yggckcjjd09ew2x.some(r); + }; + var contains = function (xs, x) { + return rawIndexOf(xs, x) > -1; + }; + var exists = function (xs, pred) { + return findIndex(xs, pred).isSome(); + }; + var range = function (num, f) { + var r = []; + for (var i = 0; i < num; i++) { + r.push(f(i)); + } + return r; + }; + var chunk = function (array, size) { + var r = []; + for (var i = 0; i < array.length; i += size) { + var s = array.slice(i, i + size); + r.push(s); + } + return r; + }; + var map = function (xs, f) { + var len = xs.length; + var r = new Array(len); + for (var i = 0; i < len; i++) { + var x = xs[i]; + r[i] = f(x, i, xs); + } + return r; + }; + var each = function (xs, f) { + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + f(x, i, xs); + } + }; + var eachr = function (xs, f) { + for (var i = xs.length - 1; i >= 0; i--) { + var x = xs[i]; + f(x, i, xs); + } + }; + var partition = function (xs, pred) { + var pass = []; + var fail = []; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + var arr = pred(x, i, xs) ? pass : fail; + arr.push(x); + } + return { + pass: pass, + fail: fail + }; + }; + var filter = function (xs, pred) { + var r = []; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + if (pred(x, i, xs)) { + r.push(x); + } + } + return r; + }; + var groupBy = function (xs, f) { + if (xs.length === 0) { + return []; + } else { + var wasType = f(xs[0]); + var r = []; + var group = []; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + var type = f(x); + if (type !== wasType) { + r.push(group); + group = []; + } + wasType = type; + group.push(x); + } + if (group.length !== 0) { + r.push(group); + } + return r; + } + }; + var foldr = function (xs, f, acc) { + eachr(xs, function (x) { + acc = f(acc, x); + }); + return acc; + }; + var foldl = function (xs, f, acc) { + each(xs, function (x) { + acc = f(acc, x); + }); + return acc; + }; + var find = function (xs, pred) { + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + if (pred(x, i, xs)) { + return $_4yggckcjjd09ew2x.some(x); + } + } + return $_4yggckcjjd09ew2x.none(); + }; + var findIndex = function (xs, pred) { + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + if (pred(x, i, xs)) { + return $_4yggckcjjd09ew2x.some(i); + } + } + return $_4yggckcjjd09ew2x.none(); + }; + var slowIndexOf = function (xs, x) { + for (var i = 0, len = xs.length; i < len; ++i) { + if (xs[i] === x) { + return i; + } + } + return -1; + }; + var push = Array.prototype.push; + var flatten = function (xs) { + var r = []; + for (var i = 0, len = xs.length; i < len; ++i) { + if (!Array.prototype.isPrototypeOf(xs[i])) + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + push.apply(r, xs[i]); + } + return r; + }; + var bind = function (xs, f) { + var output = map(xs, f); + return flatten(output); + }; + var forall = function (xs, pred) { + for (var i = 0, len = xs.length; i < len; ++i) { + var x = xs[i]; + if (pred(x, i, xs) !== true) { + return false; + } + } + return true; + }; + var equal = function (a1, a2) { + return a1.length === a2.length && forall(a1, function (x, i) { + return x === a2[i]; + }); + }; + var slice = Array.prototype.slice; + var reverse = function (xs) { + var r = slice.call(xs, 0); + r.reverse(); + return r; + }; + var difference = function (a1, a2) { + return filter(a1, function (x) { + return !contains(a2, x); + }); + }; + var mapToObject = function (xs, f) { + var r = {}; + for (var i = 0, len = xs.length; i < len; i++) { + var x = xs[i]; + r[String(x)] = f(x, i); + } + return r; + }; + var pure = function (x) { + return [x]; + }; + var sort = function (xs, comparator) { + var copy = slice.call(xs, 0); + copy.sort(comparator); + return copy; + }; + var head = function (xs) { + return xs.length === 0 ? $_4yggckcjjd09ew2x.none() : $_4yggckcjjd09ew2x.some(xs[0]); + }; + var last = function (xs) { + return xs.length === 0 ? $_4yggckcjjd09ew2x.none() : $_4yggckcjjd09ew2x.some(xs[xs.length - 1]); + }; + var $_4txxehd7jd09ew4l = { + map: map, + each: each, + eachr: eachr, + partition: partition, + filter: filter, + groupBy: groupBy, + indexOf: indexOf, + foldr: foldr, + foldl: foldl, + find: find, + findIndex: findIndex, + flatten: flatten, + bind: bind, + forall: forall, + exists: exists, + contains: contains, + equal: equal, + reverse: reverse, + chunk: chunk, + difference: difference, + mapToObject: mapToObject, + pure: pure, + sort: sort, + range: range, + head: head, + last: last + }; + + function XMLHttpRequest$1 () { + var f = $_8t3s11cmjd09ew35.getOrDie('XMLHttpRequest'); + return new f(); + } + + var isValue = function (obj) { + return obj !== null && obj !== undefined; + }; + var traverse = function (json, path) { + var value; + value = path.reduce(function (result, key) { + return isValue(result) ? result[key] : undefined; + }, json); + return isValue(value) ? value : null; + }; + var requestUrlAsBlob = function (url, headers) { + return new Promise$1(function (resolve) { + var xhr; + xhr = new XMLHttpRequest$1(); + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + resolve({ + status: xhr.status, + blob: this.response + }); + } + }; + xhr.open('GET', url, true); + Tools.each(headers, function (value, key) { + xhr.setRequestHeader(key, value); + }); + xhr.responseType = 'blob'; + xhr.send(); + }); + }; + var readBlob = function (blob) { + return new Promise$1(function (resolve) { + var fr = new FileReader(); + fr.onload = function (e) { + var data = e.target; + resolve(data.result); + }; + fr.readAsText(blob); + }); + }; + var parseJson = function (text) { + var json; + try { + json = JSON.parse(text); + } catch (ex) { + } + return json; + }; + var $_e3yv49d8jd09ew4q = { + traverse: traverse, + readBlob: readBlob, + requestUrlAsBlob: requestUrlAsBlob, + parseJson: parseJson + }; + + var friendlyHttpErrors = [ + { + code: 404, + message: 'Could not find Image Proxy' + }, + { + code: 403, + message: 'Rejected request' + }, + { + code: 0, + message: 'Incorrect Image Proxy URL' + } + ]; + var friendlyServiceErrors = [ + { + type: 'key_missing', + message: 'The request did not include an api key.' + }, + { + type: 'key_not_found', + message: 'The provided api key could not be found.' + }, + { + type: 'domain_not_trusted', + message: 'The api key is not valid for the request origins.' + } + ]; + var isServiceErrorCode = function (code) { + return code === 400 || code === 403 || code === 500; + }; + var getHttpErrorMsg = function (status) { + var message = $_4txxehd7jd09ew4l.find(friendlyHttpErrors, function (error) { + return status === error.code; + }).fold($_76jbnrckjd09ew32.constant('Unknown ImageProxy error'), function (error) { + return error.message; + }); + return 'ImageProxy HTTP error: ' + message; + }; + var handleHttpError = function (status) { + var message = getHttpErrorMsg(status); + return Promise$1.reject(message); + }; + var getServiceErrorMsg = function (type) { + return $_4txxehd7jd09ew4l.find(friendlyServiceErrors, function (error) { + return error.type === type; + }).fold($_76jbnrckjd09ew32.constant('Unknown service error'), function (error) { + return error.message; + }); + }; + var getServiceError = function (text) { + var serviceError = $_e3yv49d8jd09ew4q.parseJson(text); + var errorType = $_e3yv49d8jd09ew4q.traverse(serviceError, [ + 'error', + 'type' + ]); + var errorMsg = errorType ? getServiceErrorMsg(errorType) : 'Invalid JSON in service error message'; + return 'ImageProxy Service error: ' + errorMsg; + }; + var handleServiceError = function (status, blob) { + return $_e3yv49d8jd09ew4q.readBlob(blob).then(function (text) { + var serviceError = getServiceError(text); + return Promise$1.reject(serviceError); + }); + }; + var handleServiceErrorResponse = function (status, blob) { + return isServiceErrorCode(status) ? handleServiceError(status, blob) : handleHttpError(status); + }; + var $_a1zuysd6jd09ew4g = { + handleServiceErrorResponse: handleServiceErrorResponse, + handleHttpError: handleHttpError, + getHttpErrorMsg: getHttpErrorMsg, + getServiceErrorMsg: getServiceErrorMsg + }; + + var appendApiKey = function (url, apiKey) { + var separator = url.indexOf('?') === -1 ? '?' : '&'; + if (/[?&]apiKey=/.test(url) || !apiKey) { + return url; + } else { + return url + separator + 'apiKey=' + encodeURIComponent(apiKey); + } + }; + var requestServiceBlob = function (url, apiKey) { + return $_e3yv49d8jd09ew4q.requestUrlAsBlob(appendApiKey(url, apiKey), { + 'Content-Type': 'application/json;charset=UTF-8', + 'tiny-api-key': apiKey + }).then(function (result) { + return result.status < 200 || result.status >= 300 ? $_a1zuysd6jd09ew4g.handleServiceErrorResponse(result.status, result.blob) : Promise$1.resolve(result.blob); + }); + }; + function requestBlob(url) { + return $_e3yv49d8jd09ew4q.requestUrlAsBlob(url, {}).then(function (result) { + return result.status < 200 || result.status >= 300 ? $_a1zuysd6jd09ew4g.handleHttpError(result.status) : Promise$1.resolve(result.blob); + }); + } + var getUrl = function (url, apiKey) { + return apiKey ? requestServiceBlob(url, apiKey) : requestBlob(url); + }; + var $_e4kghd5jd09ew4e = { getUrl: getUrl }; + + var DOMUtils = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var Factory = tinymce.util.Tools.resolve('tinymce.ui.Factory'); + + function UndoStack () { + var data = []; + var index = -1; + function add(state) { + var removed; + removed = data.splice(++index); + data.push(state); + return { + state: state, + removed: removed + }; + } + function undo() { + if (canUndo()) { + return data[--index]; + } + } + function redo() { + if (canRedo()) { + return data[++index]; + } + } + function canUndo() { + return index > 0; + } + function canRedo() { + return index !== -1 && index < data.length - 1; + } + return { + data: data, + add: add, + undo: undo, + redo: redo, + canUndo: canUndo, + canRedo: canRedo + }; + } + + var Rect = tinymce.util.Tools.resolve('tinymce.geom.Rect'); + + var loadImage$1 = function (image) { + return new Promise$1(function (resolve) { + var loaded = function () { + image.removeEventListener('load', loaded); + resolve(image); + }; + if (image.complete) { + resolve(image); + } else { + image.addEventListener('load', loaded); + } + }); + }; + var $_3d45n6dgjd09ew5t = { loadImage: loadImage$1 }; + + var DomQuery = tinymce.util.Tools.resolve('tinymce.dom.DomQuery'); + + var Observable = tinymce.util.Tools.resolve('tinymce.util.Observable'); + + var VK = tinymce.util.Tools.resolve('tinymce.util.VK'); + + var count = 0; + function CropRect (currentRect, viewPortRect, clampRect, containerElm, action) { + var instance; + var handles; + var dragHelpers; + var blockers; + var prefix = 'mce-'; + var id = prefix + 'crid-' + count++; + handles = [ + { + name: 'move', + xMul: 0, + yMul: 0, + deltaX: 1, + deltaY: 1, + deltaW: 0, + deltaH: 0, + label: 'Crop Mask' + }, + { + name: 'nw', + xMul: 0, + yMul: 0, + deltaX: 1, + deltaY: 1, + deltaW: -1, + deltaH: -1, + label: 'Top Left Crop Handle' + }, + { + name: 'ne', + xMul: 1, + yMul: 0, + deltaX: 0, + deltaY: 1, + deltaW: 1, + deltaH: -1, + label: 'Top Right Crop Handle' + }, + { + name: 'sw', + xMul: 0, + yMul: 1, + deltaX: 1, + deltaY: 0, + deltaW: -1, + deltaH: 1, + label: 'Bottom Left Crop Handle' + }, + { + name: 'se', + xMul: 1, + yMul: 1, + deltaX: 0, + deltaY: 0, + deltaW: 1, + deltaH: 1, + label: 'Bottom Right Crop Handle' + } + ]; + blockers = [ + 'top', + 'right', + 'bottom', + 'left' + ]; + function getAbsoluteRect(outerRect, relativeRect) { + return { + x: relativeRect.x + outerRect.x, + y: relativeRect.y + outerRect.y, + w: relativeRect.w, + h: relativeRect.h + }; + } + function getRelativeRect(outerRect, innerRect) { + return { + x: innerRect.x - outerRect.x, + y: innerRect.y - outerRect.y, + w: innerRect.w, + h: innerRect.h + }; + } + function getInnerRect() { + return getRelativeRect(clampRect, currentRect); + } + function moveRect(handle, startRect, deltaX, deltaY) { + var x, y, w, h, rect; + x = startRect.x; + y = startRect.y; + w = startRect.w; + h = startRect.h; + x += deltaX * handle.deltaX; + y += deltaY * handle.deltaY; + w += deltaX * handle.deltaW; + h += deltaY * handle.deltaH; + if (w < 20) { + w = 20; + } + if (h < 20) { + h = 20; + } + rect = currentRect = Rect.clamp({ + x: x, + y: y, + w: w, + h: h + }, clampRect, handle.name === 'move'); + rect = getRelativeRect(clampRect, rect); + instance.fire('updateRect', { rect: rect }); + setInnerRect(rect); + } + function render() { + function createDragHelper(handle) { + var startRect; + var DragHelper = Factory.get('DragHelper'); + return new DragHelper(id, { + document: containerElm.ownerDocument, + handle: id + '-' + handle.name, + start: function () { + startRect = currentRect; + }, + drag: function (e) { + moveRect(handle, startRect, e.deltaX, e.deltaY); + } + }); + } + DomQuery('
    ').appendTo(containerElm); + Tools.each(blockers, function (blocker) { + DomQuery('#' + id, containerElm).append('