diff --git a/.gitignore b/.gitignore index 9173642252..adf28e291b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,74 @@ -# ignore any files beginning with . -#\.* +# assets +/assets/.thumbs/* +!/assets/.thumbs/index.html +!/assets/.thumbs/.htaccess + +/assets/backup/* +!/assets/backup/index.html +!/assets/backup/.htaccess -# and any files in the cache directory /assets/cache/* +!/assets/cache/.htaccess +!/assets/cache/index.html +!/assets/cache/siteManager.php +!/assets/cache/sitePublishing.idx.php +!/assets/cache/images/index.html +!/assets/cache/rss/index.html +!/assets/cache/updater/index.html + +/assets/docs/* +!/assets/docs/.htaccess +!/assets/docs/changelog.txt +!/assets/docs/index.html +!/assets/docs/license.txt + +/assets/export/* +!/assets/export/index.html +!/assets/export/.htaccess + +/assets/files/* +!/assets/files/index.html +!/assets/files/.htaccess + +/assets/images/* +!/assets/images/index.html +!/assets/images/evo-logo.png +!/assets/images/.htaccess -# and the config file +/assets/import/* +!/assets/import/index.html +!/assets/import/.htaccess + +/assets/site/* +!/assets/site/index.html +!/assets/site/.htaccess + +# Manager /manager/includes/config.inc.php -# Windows and Mac +# Composer +/composer.phar +/vendor/* +!/vendor/.htaccess +!/vendor/index.html + +# IDE Helper +modx_evolution.IDEhelper.php +_ide_helper.php +.phpstorm.meta.php + +#node.JS +/node_modules +npm-debug.log + +# System +ftpsync.settings Thumbs.db Desktop.ini .DS_Store +.idea +.vagrant +.rocketeer # except do not ignore .gitignore !.gitignore diff --git a/README.md b/README.md index e6a3df6023..1f06112f34 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Evolution CMS -![PHP version](https://img.shields.io/badge/PHP->=v5.6-green.svg?php=5.6) [![GitHub release](https://img.shields.io/github/release/evolution-cms/evolution.svg)](https://github.com/evolution-cms/evolution/) +[![CMS Evolution](https://img.shields.io/badge/CMS-Evolution-brightgreen.svg)](https://github.com/evolution-cms/evolution) [![GitHub release](https://img.shields.io/github/release/evolution-cms/evolution.svg)](https://github.com/evolution-cms/evolution/releases) ![PHP version](https://img.shields.io/badge/PHP->=v5.6-green.svg?php=5.6) [![Issues](https://img.shields.io/github/issues-closed-raw/evolution-cms/evolution.svg?maxAge=2592000)](https://github.com/evolution-cms/evolution/issues) [![Code quality](https://img.shields.io/scrutinizer/g/evolution-cms/evolution.svg?maxAge=2592000&b=develop)](https://scrutinizer-ci.com/g/evolution-cms/evolution/?branch=develop) [![Documentation](https://img.shields.io/badge/Documentation-processed-orange.svg)](https://github.com/evolution-cms/docs/) Evolution CMS requires **PHP >= 5.6** diff --git a/assets/.thumbs/.htaccess b/assets/.thumbs/.htaccess new file mode 100644 index 0000000000..6c1cc6e2da --- /dev/null +++ b/assets/.thumbs/.htaccess @@ -0,0 +1,5 @@ +IndexIgnore */* + + Order Deny,Allow + Deny from all + diff --git a/assets/cache/updater/.htaccess b/assets/backup/.htaccess similarity index 100% rename from assets/cache/updater/.htaccess rename to assets/backup/.htaccess diff --git a/assets/docs/.htaccess b/assets/docs/.htaccess index 7ec3cfae9a..1fce156e5a 100755 --- a/assets/docs/.htaccess +++ b/assets/docs/.htaccess @@ -2,4 +2,8 @@ IndexIgnore */* Order Allow,Deny Deny from all - \ No newline at end of file + + + Order Deny,Allow + Deny from all + diff --git a/assets/docs/changelog.txt b/assets/docs/changelog.txt index f6741011a2..40a4fd37cf 100755 --- a/assets/docs/changelog.txt +++ b/assets/docs/changelog.txt @@ -1,6 +1,122 @@ This file shows the changes in recent releases of Evolution CMS. The most current release is usually the development release, and is only shown to give an idea of what's currently in the pipeline. +Evolution CMS 1.4.2 (Mar 23, 2018) +* [GitHub:#6a33e6f2b] - now you can use argv like this: php cli-install.php --database_server=localhost --database=db --database_user=dbuser --database_password=dbpass --table_prefix=evo_ --cmsadmin=admin --cmsadminemail=dmi3yy@gmail.com --cmspassword=123456 --language=ru --mode=new --installData=n --removeInstall=y (dmi3yy) +* [GitHub:#d8e7ec072] - run install file (dmi3yy) +* [GitHub:#1baf289d6] - Install Evo from console: (https://monosnap.com/file/Tj21cmlMhZXNJdRXfKBLAvTlJcElkJ) (dmi3yy) +* [GitHub:#52c27d0d6] - fix for use html tags in name (dmi3yy) +* [GitHub:#6324989c9] - [F] #577 Fix "undefined index"-notice (Deesen) +* [GitHub:#8389d3c15] - [C] #577 TinyMCE4 code clean-up (Deesen) +* [GitHub:#4c9b26d56] - fix (document.parser.class.inc.php) sendStrictURI (Ruslan) +* [GitHub:#27c63435a] - modernize default theme (Serg) +* [GitHub:#b42174b85] - Globat Tabs by Default On (dmi3yy) +* [GitHub:#4f8323b13] - add .tpl for create file from filemanager (dmi3yy) +* [GitHub:#2ad9bb7e3] - correct getTpl (Serg) +* [GitHub:#e5718a08a] - add composer.json (dmi3yy) +* [GitHub:#14155ff84] - fix lang error (dmi3yy) +* [GitHub:#628eabf86] - update DocLister and FormLister (dmi3yy) +* [GitHub:#c1ea7c3e0] - fix escapeshellarg disabled for security reason (dmi3yy) +* [GitHub:#f55cff2b8] - Update english.inc.php (Mr B) +* [GitHub:#151206e87] - Update mainmenu.php (Mr B) +* [GitHub:#4ae239de6] - fix #559 Zend OPcache API is restricted by "restrict_api" configuration directive (Pathologic) +* [GitHub:#ddcdcdbc0] - fix #563 Error when upgrading to 'phpmailer sender property' commit(Pathologic) +* [GitHub:#e3ce8aaf9] - phpmailer sender property (Pathologic) +* [GitHub:#ce2fc8313] - fix only variables can be passed by reference (Pathologic) +* [GitHub:#271d809b0] - log only public properties of MODxMailer (Pathologic) + + +Evolution CMS 1.4.1 (Mar 02, 2018) +* [GitHub:#3a9224b03] - revert [I] save_content.processor.php Initialize full cache only when alias, parent, and published are changed (dmi3yy) +* [GitHub:#dae083a26] - Update FormLister (dmi3yy) +* [GitHub:#367a6507e] - update DocLister (dmi3yy) +* [GitHub:#ef6dfb889] - fix #548 (Pathologic) +* [GitHub:#8770f4f99] - function method (Agel_Nash) +* [GitHub:#16e54b2fe] - deleting an unused variables and functions (64j) +* [GitHub:#db08547fa] - fix #539 (Agel_Nash) +* [GitHub:#1f24ed117] - cli (Agel_Nash) +* [GitHub:#76c89acab] - phpDoc (Agel_Nash) +* [GitHub:#8c93023a7] - Исправлено добавление фигурных скобок в пустые параметры плагина (media_kot) +* [GitHub:#bb183dd25] - fix #102 (Pathologic) +* [GitHub:#22618e102] - single entry point (Pathologic) +* [GitHub:#14e98f967] - join() => implode() (Agel_Nash) +* [GitHub:#ef6566b2d] - intval() => (int) (Agel_Nash) +* [GitHub:#c1a3d3a31] - refactor (Agel_Nash) +* [GitHub:#19f4fe321] - public method (Agel_Nash) +* [GitHub:#8b8bce9d8] - Duplicate function name manager/processors/save_template.processor.php (Agel_Nash) +* [GitHub:#573aa5683] - It seems like $categories defined by $cm->getCategories() (Agel_Nash) +* [GitHub:#fdc0ee465] - New random method for $table_prefix (Vitaliy Rudnyh) +* [GitHub:#1ce79fbf4] - Step 1 + fix conflicts (Agel_Nash) +* [GitHub:#31d870fdb] - Change version and date (Vitaliy Rudnyh) +* [GitHub:#438eacc6b] - Add php-doc (Vitaliy Rudnyh) +* [GitHub:#8583aae71] - formatting psr-2 (Vitaliy Rudnyh) +* [GitHub:#697b1e3e8] - Check exists mysqi extension (Vitaliy Rudnyh) +* [GitHub:#638334d94] - Fix install error on PHP 7.2 (Vitaliy Rudnyh) +* [GitHub:#663a1fdb4] - Commented "plugin locks" / lock-file (Deesen) +* [GitHub:#00fbcc2fc] - [F] #523 If config.inc.php exists, change chmod to 0666 (Deesen) +* [GitHub:#0f6f45a85] - - Fix classname Imagic and Gmagic - Refactor (Agel_Nash) +* [GitHub:#ae66352b5] - Step 2 (Agel_Nash) +* [GitHub:#de7245b0a] - Fix Imagick class name (Agel_Nash) +* [GitHub:#0d0d9ae28] - Fix Gmagic class name (Agel_Nash) +* [GitHub:#af9476613] - refactor array_change_key_case function (Agel_Nash) +* [GitHub:#426b74903] - Fix IN_MANAGER_MODE (Agel_Nash) +* [GitHub:#8d4595dc7] - Step 1 (Agel_Nash) +* [GitHub:#a1b09fad5] - fix install (Pathologic) +* [GitHub:#1581c4c75] - Fix readme (Agel_Nash) +* [GitHub:#8061c2891] - Update badges (Agel_Nash) +* [GitHub:#63117c3b0] - sqlParser for PHP5 (Agel_Nash) +* [GitHub:#095021f7d] - Remove closing tag ```?>``` in files (Agel_Nash) +* [GitHub:#d98fbcb3e] - random table prefix (Agel_Nash) +* [GitHub:#868b6aaa7] - Code style (Agel_Nash) +* [GitHub:#932ceff2f] - Update .gitignore and .htaccess files (Agel_Nash) +* [GitHub:#923a1c674] - [F] #481 Fix export of Static-HTML with FURLs enabled (Deesen) +* [GitHub:#fcd59ef78] - fix #397 (Pathologic) +* [GitHub:#1ce8cb620] - fix #484 (64j) +* [GitHub:#a22a4ddb3] - fix #396 (Pathologic) +* [GitHub:#5c176a09a] - fix #484 need permission for editing templates or chunks or snippets or plugins (64j) +* [GitHub:#3738d46a5] - fix #484 need permission for editing documents (64j) +* [GitHub:#65d13ad82] - fix error session "nrtotalmessages" for role editor (64j) +* [GitHub:#654b69146] - fix russian lang extrascheck (Serg) +* [GitHub:#93d503295] - single entry point (Pathologic) +* [GitHub:#93e702991] - fixed something (Pathologic) +* [GitHub:#52dd369e1] - single entry point (Pathologic) +* [GitHub:#7e06c92bf] - fix Store module unparsed placeholders (Pathologic) +* [GitHub:#b530747af] - moved page icon to style.php (Nicola) +* [GitHub:#1db4e4baf] - page icon - mutate password (Nicola) +* [GitHub:#83318077b] - icon_help (Nicola) +* [GitHub:#6ac0a5c24] - fix broken OnWUsrFormRender event (Pathologic) +* [GitHub:#47b459a0e] - update SystemEvent (Pathologic) +* [GitHub:#c7873b6b0] - Update plugin.updater.php (Mr B) +* [GitHub:#81df65a80] - [MODxMailer] log only public properties (Pathologic) +* [GitHub:#a4081217d] - Update modxmailer.class.inc.php (Pathologic) +* [GitHub:#c9ca177af] - fix #493 (Pathologic) +* [GitHub:#bb4152705] - fix #475 (64j) +* [GitHub:#2f0685fe2] - [F] fix for moving content to another tab (Mr B) +* [GitHub:#b010fe286] - fix #42 (Pathologic) +* [GitHub:#d902a2ce6] - fix #258 (Pathologic) +* [GitHub:#20ff0eb2e] - fix #258 (Pathologic) +* [GitHub:#7b63c4293] - Update style.css (Mr B) +* [GitHub:#a91dc393d] - [I] Add right menu section ids (Mr B) +* [GitHub:#28a085634] - [I] QM+ Remove space from Edit Resource text (Mr B) +* [GitHub:#b34a39c60] - [F] Quick Manager+ ID text fix (Mr B) +* [GitHub:#4aa572f2f] - [I] #483 Provide [+base_path+] and [+base_url+] (Deesen) +* [GitHub:#8a6338966] - [F] #477 Cache plugin-properties using parseProperties() (Deesen) +* [GitHub:#26def6fef] - fix #478 (Pathologic) +* [GitHub:#6a754cc4b] - Fix tree buttons JS (Piotr Matysiak) +* [GitHub:#2987cfff4] - fix and improvements (Outdated Extras Check) (Nicola) +* [GitHub:#cd946c440] - ability to use extended DocumentParser class (Pathologic) +* [GitHub:#83b776239] - [F] Fix Information tab logo path (Mr B) +* [GitHub:#2902c56b2] - [I] Allow default-placeholders like [+which_browser+] in theme-values - $this-set('browserPath', '[+site_manager_url+]media/browser/[+which_browser+]/...') (Deesen) +* [GitHub:#c49d50d2d] - [F] #442 New inlite-theme is only compatible with inline-mode - backend falls back to modern-theme (Deesen) +* [GitHub:#f29ec8638] - [I] Extras/Store - New feature "Install by file-upload" - accepts ZIP-files from https://github.com/extras-evolution/ (Deesen) +* [GitHub:#633908ec0] - Replaced "MODX Content Manager" by "EVO Content Manager" (Deesen) +* [GitHub:#5aeb2a3f7] - Updated project-description (MODX to EVO) (Deesen) +* [GitHub:#cfea32cab] - Update mm_hidefields.php (Mr B) +* [GitHub:#6df0e1c33] - Update jquery.ddMM.js (Mr B) +* [GitHub:#6609e8c51] - [I] Updated TinyMCE4 to v4.7.4 (from v4.6.3) - added param "mobile" to theme.base - added param "Skin-Theme" to settings - fixed/improved theme/skin settings and labels (Deesen) +* [GitHub:#6cff1adc0] - fix #463 (Pathologic) + + Evolution CMS 1.4.0 (Jan 25, 2018) * [GitHub:#b1fffc26] - fix for php 7.2 (dmi3yy) * [GitHub:#da5b0533] - [F] Moving which_editor with resource content for MM (Mr B) diff --git a/assets/export/.htaccess b/assets/export/.htaccess new file mode 100644 index 0000000000..6c1cc6e2da --- /dev/null +++ b/assets/export/.htaccess @@ -0,0 +1,5 @@ +IndexIgnore */* + + Order Deny,Allow + Deny from all + diff --git a/assets/files/.htaccess b/assets/files/.htaccess new file mode 100644 index 0000000000..6c1cc6e2da --- /dev/null +++ b/assets/files/.htaccess @@ -0,0 +1,5 @@ +IndexIgnore */* + + Order Deny,Allow + Deny from all + diff --git a/assets/images/.htaccess b/assets/images/.htaccess new file mode 100644 index 0000000000..6c1cc6e2da --- /dev/null +++ b/assets/images/.htaccess @@ -0,0 +1,5 @@ +IndexIgnore */* + + Order Deny,Allow + Deny from all + diff --git a/assets/import/.htaccess b/assets/import/.htaccess new file mode 100644 index 0000000000..6c1cc6e2da --- /dev/null +++ b/assets/import/.htaccess @@ -0,0 +1,5 @@ +IndexIgnore */* + + Order Deny,Allow + Deny from all + diff --git a/assets/js/euiuploader/lang/de.js b/assets/js/euiuploader/lang/de.js new file mode 100644 index 0000000000..b9716d570c --- /dev/null +++ b/assets/js/euiuploader/lang/de.js @@ -0,0 +1,23 @@ +_euiuLang = []; +_euiuLang['upload'] = 'Upload'; +_euiuLang['file'] = 'Datei'; +_euiuLang['size'] = 'Größe'; +_euiuLang['progress'] = 'Fortschritt'; +_euiuLang['files_upload'] = 'Dateien hochladen'; +_euiuLang['cancel'] = 'Abbrechen'; +_euiuLang['close'] = 'Schließen'; +_euiuLang['uploaded'] = 'Hochgeladen'; +_euiuLang['server_error'] = 'Server-Fehler: '; +_euiuLang['parse_error'] = 'Fehler bei der Verarbeitung'; +_euiuUploadResult = []; +_euiuUploadResult['upload_failed_1'] = 'Datei ist größer als upload_max_filesize'; +_euiuUploadResult['upload_failed_2'] = 'Datei ist größer als erlaubt'; +_euiuUploadResult['upload_failed_3'] = 'Die Datei wurde nur teilweise hochgeladen'; +_euiuUploadResult['upload_failed_4'] = 'Es wurde keine Datei hochgeladen'; +_euiuUploadResult['upload_failed_6'] = 'Es ist kein temporärer Ordner vorhanden'; +_euiuUploadResult['upload_failed_7'] = 'Fehler beim Schreiben der Datei auf die Festplatte'; +_euiuUploadResult['upload_failed_8'] = 'Eine PHP-Erweiterung hat den Datei-Upload gestoppt'; +_euiuUploadResult['unable_to_process_file'] = 'Fehler bei der Verarbeitung der hochgeladenen Datei'; +_euiuUploadResult['unable_to_move'] = 'Fehler beim Speichern der Datei'; +_euiuUploadResult['forbidden_file'] = 'Upload der Datei unzulässig'; +_euiuUploadResult['unable_to_create_folder'] = 'Fehler beim Erstellen des Upload-Ordners'; \ No newline at end of file diff --git a/assets/js/euiuploader/lang/nl.js b/assets/js/euiuploader/lang/nl.js new file mode 100644 index 0000000000..9005952c08 --- /dev/null +++ b/assets/js/euiuploader/lang/nl.js @@ -0,0 +1,23 @@ +_euiuLang = []; +_euiuLang['upload'] = 'Uploaden'; +_euiuLang['file'] = 'Bestand'; +_euiuLang['size'] = 'Afmeting'; +_euiuLang['progress'] = 'Voortgang'; +_euiuLang['files_upload'] = 'Bestanden uploaden'; +_euiuLang['cancel'] = 'Annuleer'; +_euiuLang['close'] = 'Sluit'; +_euiuLang['uploaded'] = 'Geupload'; +_euiuLang['server_error'] = 'Server error: '; +_euiuLang['parse_error'] = 'Serverrespons mislukt'; +_euiuUploadResult = []; +_euiuUploadResult['upload_failed_1'] = 'Bestandsgrootte is groter dan upload_max_filesize'; +_euiuUploadResult['upload_failed_2'] = 'Bestandsgrootte is groter dan toegestaan'; +_euiuUploadResult['upload_failed_3'] = 'Het geuploade bestand is slechts gedeeltelijk geupload'; +_euiuUploadResult['upload_failed_4'] = 'Er is geen bestand geupload'; +_euiuUploadResult['upload_failed_6'] = 'Een tijdelijke map ontbreekt'; +_euiuUploadResult['upload_failed_7'] = 'Bestand uploaden mislukt'; +_euiuUploadResult['upload_failed_8'] = 'Een PHP-extensie heeft de upload van bestanden gestopt'; +_euiuUploadResult['unable_to_process_file'] = 'Het bestand uploaden is mislukt'; +_euiuUploadResult['unable_to_move'] = 'Kan het bestand niet opslaan'; +_euiuUploadResult['forbidden_file'] = 'Bestand is niet toegestaan om te uploaden'; +_euiuUploadResult['unable_to_create_folder'] = 'Kan uploadmap niet aanmaken'; diff --git a/assets/lib/APIHelpers.class.php b/assets/lib/APIHelpers.class.php old mode 100755 new mode 100644 index c92ecad6f5..d4256ead99 --- a/assets/lib/APIHelpers.class.php +++ b/assets/lib/APIHelpers.class.php @@ -1,10 +1,11 @@ data as $key => $element) { - if ( ! $p($key, $element)) { + if (! $p($key, $element)) { return false; } } @@ -231,7 +231,7 @@ public function current() */ public function remove($key) { - if ( ! isset($this->data[$key]) && ! array_key_exists($key, $this->data)) { + if (! isset($this->data[$key]) && ! array_key_exists($key, $this->data)) { return null; } $removed = $this->data[$key]; @@ -280,7 +280,7 @@ public function offsetGet($offset) */ public function offsetSet($offset, $value) { - if ( ! isset($offset)) { + if (! isset($offset)) { return $this->add($value); } $this->set($offset, $value); @@ -381,7 +381,7 @@ public function reduce(Closure $callback, $initial = null) */ public function max($key) { - return $this->reduce(function($result, $item) use ($key) { + return $this->reduce(function ($result, $item) use ($key) { return (is_null($result) || $item[$key] > $result) ? $item[$key] : $result; }); } @@ -394,7 +394,7 @@ public function max($key) */ public function min($key) { - return $this->reduce(function($result, $item) use ($key) { + return $this->reduce(function ($result, $item) use ($key) { return (is_null($result) || $item[$key] < $result) ? $item[$key] : $result; }); } @@ -452,4 +452,5 @@ public function reverse() { return $this->create(array_reverse($this->data)); } + } diff --git a/assets/lib/Helpers/Config.php b/assets/lib/Helpers/Config.php old mode 100755 new mode 100644 index 9c016ebefc..e8166c2187 --- a/assets/lib/Helpers/Config.php +++ b/assets/lib/Helpers/Config.php @@ -13,9 +13,14 @@ class Config protected $fs = null; protected $path = ''; + /** + * Config constructor. + * + * @param array $cfg + */ public function __construct($cfg = array()) { - if ($cfg) { + if (!empty($cfg)) { $this->setConfig($cfg); } $this->fs = FS::getInstance(); @@ -25,7 +30,8 @@ public function __construct($cfg = array()) * @param $path * @return $this */ - public function setPath($path) { + public function setPath($path) + { $this->path = $path; return $this; @@ -117,7 +123,7 @@ public function getCFGDef($name, $def = null) */ public function loadArray($arr, $sep = ',') { - switch(gettype($arr)){ + switch (gettype($arr)) { case 'string': $out = jsonHelper::jsonDecode($arr, array('assoc' => true)); if (!is_array($out)) { diff --git a/assets/lib/Helpers/Mailer.php b/assets/lib/Helpers/Mailer.php old mode 100755 new mode 100644 index 943eafe6e8..397fa01b4f --- a/assets/lib/Helpers/Mailer.php +++ b/assets/lib/Helpers/Mailer.php @@ -1,8 +1,13 @@ modx = $modx; - $this->mail = new \MODxMailer(); - if (method_exists('\MODxMailer', 'init')) { - $this->mail->init($modx); + $this->noemail = (bool)(isset($cfg['noemail']) ? $cfg['noemail'] : 0); + if (!$this->noemail) { + $this->mail = new MODxMailer(); + if (method_exists('MODxMailer', 'init')) { + $this->mail->init($modx); + } + $this->config = $cfg; + $this->debug = $debug; + $this->applyMailConfig(); } - $this->config = $cfg; - $this->debug = $debug; - $this->applyMailConfig(); } /** @@ -43,7 +61,7 @@ public function __construct(\DocumentParser $modx, $cfg, $debug = false) */ public function addAddressToMailer($type, $addr) { - if (!empty($addr)) { + if (!$this->noemail && !empty($addr)) { $a = array_filter(array_map('trim', explode(',', $addr))); foreach ($a as $address) { switch ($type) { @@ -71,9 +89,13 @@ public function addAddressToMailer($type, $addr) */ public function attachFiles($filelist = array()) { - $contentType = "application/octetstream"; - foreach ($filelist as $file) { - $this->mail->AddAttachment($file['filepath'], $file['filename'], "base64", $contentType); + if (!$this->noemail) { + $contentType = "application/octetstream"; + foreach ($filelist as $file) { + if (is_file($file['filepath']) && is_readable($file['filepath'])) { + $this->mail->AddAttachment($file['filepath'], $file['filename'], "base64", $contentType); + } + } } return $this; @@ -86,13 +108,13 @@ public function attachFiles($filelist = array()) public function send($report) { //если отправлять некуда или незачем, то делаем вид, что отправили - if (!$this->getCFGDef('to') || $this->getCFGDef('noemail')) { + if (!$this->getCFGDef('to') || $this->noemail) { return true; } elseif (empty($report)) { return false; } - $this->mail->Body = $report; + $this->mail->Body = $this->getCFGDef('isHtml', 1) ? $this->mail->msgHTML($report, MODX_BASE_PATH) : $report; $result = $this->mail->send(); if ($result) { @@ -110,19 +132,19 @@ public function send($report) public function toQueue($report) { //если отправлять некуда или незачем, то делаем вид, что отправили - if (!$this->getCFGDef('to') || $this->getCFGDef('noemail')) { + if (!$this->getCFGDef('to') || $this->noemail) { return true; } elseif (empty($report)) { return false; } - $this->mail->Body = $report; + $this->mail->Body = $this->getCFGDef('isHtml', 1) ? $this->mail->msgHTML($report, MODX_BASE_PATH) : $report; $this->Body = $this->modx->removeSanitizeSeed($this->mail->Body); $this->Subject = $this->modx->removeSanitizeSeed($this->mail->Subject); try { $result = $this->mail->preSend() && $this->saveMessage(); - } catch (\phpmailerException $e) { + } catch (phpmailerException $e) { $this->mail->SetError($e->getMessage()); $result = false; @@ -141,7 +163,8 @@ public function toQueue($report) * @param string $path * @return bool */ - public function setQueuePath($path = '') { + public function setQueuePath($path = '') + { if (!empty($path)) { $this->queuePath = $path; return true; @@ -161,11 +184,8 @@ protected function saveMessage() "config" => $this->config )); $file = $this->getFileName(); - $dir = MODX_BASE_PATH . $this->queuePath; - if (!is_dir($dir)) { - @mkdir($dir); - } - $result = @file_put_contents($dir . $file, $data) !== false; + FS::getInstance()->makeDir($this->queuePath); + $result = @file_put_contents(MODX_BASE_PATH . $this->queuePath . $file, $data) !== false; if ($result) { $result = $file; } @@ -176,7 +196,8 @@ protected function saveMessage() /** * @return string */ - protected function getFileName() { + protected function getFileName() + { return $this->mail->getMessageID() . '.eml'; } @@ -188,7 +209,8 @@ public function fromQueue($file) { $result = false; $dir = MODX_BASE_PATH . $this->queuePath; - if (file_exists($dir . $file) && is_readable($dir . $file)) { + $fs = FS::getInstance(); + if ($fs->checkFile($dir)) { $message = unserialize(file_get_contents($dir . $file)); $this->config = $message['config']; $this->applyMailConfig(); @@ -197,7 +219,7 @@ public function fromQueue($file) $result = $this->mail->postSend(); if ($result) { $this->mail->setMIMEBody()->setMIMEHeader(); - @unlink($dir . $file); + FS::getInstance()->unlink($dir . $file); } } diff --git a/assets/lib/Helpers/PHPThumb.php b/assets/lib/Helpers/PHPThumb.php old mode 100755 new mode 100644 index cc08f7f809..508c892406 --- a/assets/lib/Helpers/PHPThumb.php +++ b/assets/lib/Helpers/PHPThumb.php @@ -74,10 +74,15 @@ public function optimize($file, $type = 'jpg') */ private function setOptions($options) { - $options = strtr($options, Array("," => "&", "_" => "=", '{' => '[', '}' => ']')); + $options = strtr($options, array("," => "&", "_" => "=", '{' => '[', '}' => ']')); parse_str($options, $params); + if (!is_array($params)) { + $params = array(); + } + foreach ($params as $key => $value) { $this->thumb->setParameter($key, $value); } } + } diff --git a/assets/lib/Helpers/Video.php b/assets/lib/Helpers/Video.php old mode 100755 new mode 100644 index 05c0fd616e..315826d144 --- a/assets/lib/Helpers/Video.php +++ b/assets/lib/Helpers/Video.php @@ -419,4 +419,5 @@ public static function RunTest($links = null) . "Картинка: " . $v->getImage() . "
\n"; } } + } diff --git a/assets/lib/MODxAPI/MODx.php b/assets/lib/MODxAPI/MODx.php old mode 100755 new mode 100644 index dd7507e793..207de94fc9 --- a/assets/lib/MODxAPI/MODx.php +++ b/assets/lib/MODxAPI/MODx.php @@ -3,12 +3,14 @@ include_once(MODX_BASE_PATH . 'assets/snippets/DocLister/lib/jsonHelper.class.php'); include_once(MODX_BASE_PATH . 'assets/snippets/DocLister/lib/DLCollection.class.php'); +use \Doctrine\Common\Cache\Cache; /** * Class MODxAPIhelpers */ class MODxAPIhelpers { + /** * @param $email * @param bool $dns @@ -88,7 +90,7 @@ abstract class MODxAPI extends MODxAPIhelpers protected $default_field = array(); /** - * @var null + * @var null|integer|string */ protected $id = null; @@ -142,6 +144,8 @@ abstract class MODxAPI extends MODxAPIhelpers */ private $_table = array(); + private $cache = false; + /** * MODxAPI constructor. * @param DocumentParser $modx @@ -157,6 +161,7 @@ public function __construct(DocumentParser $modx, $debug = false) $this->setDebug($debug); $this->_decodedFields = new DLCollection($this->modx); + $this->cache = isset($this->modx->cache) && $this->modx->cache instanceof Cache; } /** @@ -272,8 +277,7 @@ final public function escape($value) */ final public function invokeEvent($name, $data = array(), $flag = false) { - $flag = (isset($flag) && $flag != '') ? (bool)$flag : false; - if ($flag) { + if ((bool)$flag === true) { $this->modx->invokeEvent($name, $data); } @@ -507,8 +511,11 @@ final protected function Uset($key, $id = '') * @param array $data * @return $this */ - public function store($data = array()) { - if (is_array($data)) $this->store = $data; + public function store($data = array()) + { + if (is_array($data)) { + $this->store = $data; + } return $this; } @@ -519,9 +526,10 @@ public function store($data = array()) { * @param string $key * @return MODxAPI */ - public function rollback($key = '') { + public function rollback($key = '') + { if (!empty($key) && isset($this->store[$key])) { - $this->set($key,$this->store[$key]); + $this->set($key, $this->store[$key]); } else { $this->fromArray($this->store); } @@ -535,7 +543,8 @@ public function rollback($key = '') { * @param $key * @return bool */ - public function isChanged($key) { + public function isChanged($key) + { $flag = !isset($this->store[$key]) || (isset($this->store[$key]) && $this->store[$key] != $this->field[$key]); return $flag; @@ -742,7 +751,7 @@ public function checkUnique($table, $field, $PK = 'id') if ($where != '') { $sql = $this->query("SELECT `" . $this->escape($PK) . "` FROM " . $this->makeTable($table) . " WHERE " . $where); $id = $this->modx->db->getValue($sql); - if (is_null($id) || (!$this->newDoc && $id == $this->getID())) { + if (!$id || (!$this->newDoc && $id == $this->getID())) { $flag = true; } else { $flag = false; @@ -808,11 +817,11 @@ public function issetField($key) abstract public function edit($id); /** - * @param null $fire_events + * @param bool $fire_events * @param bool $clearCache * @return mixed */ - abstract public function save($fire_events = null, $clearCache = false); + abstract public function save($fire_events = false, $clearCache = false); /** * @param $ids @@ -1052,4 +1061,34 @@ protected function encodeFields() return $this; } + + /** + * @param mixed $data + * @param string $key + * @return bool + */ + protected function saveToCache($data, $key) + { + $out = false; + if ($this->cache) { + $out = $this->modx->cache->save($key, $data, 0); + } + + return $out; + } + + /** + * @param string $key + * @return mixed + */ + protected function loadFromCache($key) + { + $out = false; + if ($this->cache) { + $out = $this->modx->cache->fetch($key); + } + + return $out; + } + } diff --git a/assets/lib/MODxAPI/autoTable.abstract.php b/assets/lib/MODxAPI/autoTable.abstract.php old mode 100755 new mode 100644 index 15b2891c87..3ea788bf82 --- a/assets/lib/MODxAPI/autoTable.abstract.php +++ b/assets/lib/MODxAPI/autoTable.abstract.php @@ -71,16 +71,16 @@ public function edit($id) } /** - * @param null $fire_events + * @param bool $fire_events * @param bool $clearCache * @return bool|null|void */ - public function save($fire_events = null, $clearCache = false) + public function save($fire_events = false, $clearCache = false) { foreach ($this->jsonFields as $field) { - if ($this->get($field) === null - && isset($this->default_field[$field]) - && is_array($this->default_field[$field])) + if ($this->get($field) === null + && isset($this->default_field[$field]) + && is_array($this->default_field[$field])) { $this->set($field, $this->default_field[$field]); } @@ -118,11 +118,11 @@ public function save($fire_events = null, $clearCache = false) /** * @param $ids - * @param null $fire_events + * @param bool $fire_events * @return $this * @throws Exception */ - public function delete($ids, $fire_events = null) + public function delete($ids, $fire_events = false) { $_ids = $this->cleanIDs($ids, ','); if (is_array($_ids) && $_ids != array()) { diff --git a/assets/lib/MODxAPI/modManagers.php b/assets/lib/MODxAPI/modManagers.php index 4d057a6f50..536f201ae5 100755 --- a/assets/lib/MODxAPI/modManagers.php +++ b/assets/lib/MODxAPI/modManagers.php @@ -53,6 +53,11 @@ class modManagers extends MODxAPI protected $groupIds = array(); protected $mgrPermissions = array(); + /** + * @var integer + */ + private $rememberTime; + /** * MODxAPI constructor. * @param DocumentParser $modx @@ -61,10 +66,26 @@ class modManagers extends MODxAPI */ public function __construct(DocumentParser $modx, $debug = false) { + $this->setRememberTime(60 * 60 * 24 * 365 * 5); parent::__construct($modx, $debug); $this->modx->loadExtension('phpass'); } + /** + * @param $val + * @return $this + */ + protected function setRememberTime($val){ + $this->rememberTime = (int)$val; + return $this; + } + + /** + * @return integer + */ + public function getRememberTime(){ + return $this->rememberTime; + } /** * @param $key @@ -163,6 +184,11 @@ public function set($key, $value) case 'sessionid': session_regenerate_id(false); $value = session_id(); + if ($mid = $this->modx->getLoginUserID('mgr')) { + $this->modx->db->query("UPDATE {$this->makeTable('active_user_locks')} SET `sid`='{$value}' WHERE `internalKey`={$mid}"); + $this->modx->db->query("UPDATE {$this->makeTable('active_user_sessions')} SET `sid`='{$value}' WHERE `internalKey`={$mid}"); + $this->modx->db->query("UPDATE {$this->makeTable('active_users')} SET `sid`='{$value}' WHERE `internalKey`={$mid}"); + } break; case 'editedon': case 'createdon': @@ -223,7 +249,7 @@ public function save($fire_events = false, $clearCache = false) if(!$this->get('role')) { $this->log['UniqueEmail'] = 'Wrong manager role
' . print_r($this->get('role'), true) . '
'; } - + $this->set('sessionid', ''); $fld = $this->toArray(); foreach ($this->default_field['user'] as $key => $value) { @@ -290,7 +316,7 @@ public function save($fire_events = false, $clearCache = false) ), $fire_events); } - if ($this->groupIds) { + if (!empty($this->groupIds)) { $this->setUserGroups($this->id, $this->groupIds); } // TODO @@ -344,7 +370,7 @@ public function delete($ids, $fire_events = false) /** * @param int $id - * @param bool $fulltime + * @param bool|integer $fulltime * @param string $cookieName * @param bool $fire_events * @return bool @@ -458,9 +484,9 @@ public function testAuth($id, $password, $blocker, $fire_events = false) /** * @param string $cookieName - * @param null $fire_events + * @param bool $fire_events */ - public function logOut($cookieName = 'modx_remember_manager', $fire_events = null) + public function logOut($cookieName = 'modx_remember_manager', $fire_events = false) { if (!$uid = $this->modx->getLoginUserID('mgr')) { return; @@ -483,6 +509,7 @@ public function logOut($cookieName = 'modx_remember_manager', $fire_events = nul * * @param string $directive ('start' or 'destroy') * @param string $cookieName + * @param bool|integer $remember * @return modUsers * @author Raymond Irving * @author Scotty Delicious @@ -493,7 +520,7 @@ protected function SessionHandler($directive, $cookieName, $remember = true) { switch ($directive) { case 'start': - if ($this->getID()) { + if ($this->getID() !== null) { $_SESSION['usertype'] = 'manager'; $_SESSION['mgrShortname'] = $this->get('username'); $_SESSION['mgrFullname'] = $this->get('fullname'); @@ -506,7 +533,8 @@ protected function SessionHandler($directive, $cookieName, $remember = true) $_SESSION['mgrRole'] = $this->get('role'); $_SESSION['mgrPermissions'] = $this->mgrPermissions; $_SESSION['mgrDocgroups'] = $this->getDocumentGroups(); - if ($remember) { + $_SESSION['mgrToken'] = md5($this->get('sessionid')); + if (!empty($remember)) { $this->setAutoLoginCookie($cookieName, $remember); } } @@ -524,7 +552,7 @@ protected function SessionHandler($directive, $cookieName, $remember = true) unset($_SESSION['mgrLogincount']); unset($_SESSION['mgrDocgroups']); unset($_SESSION['mgrPermissions']); - + unset($_SESSION['mgrToken']); setcookie($cookieName, '', time() - 60, MODX_BASE_URL); } else { if (isset($_COOKIE[session_name()])) { @@ -551,14 +579,14 @@ public function isSecure() /** * @param $cookieName - * @param bool $remember + * @param bool|integer $remember * @return $this */ public function setAutoLoginCookie($cookieName, $remember = true) { - if (!empty($cookieName) && $this->getID()) { + if (!empty($cookieName) && $this->getID() !== null) { $secure = $this->isSecure(); - $remember = is_bool($remember) ? (60 * 60 * 24 * 365 * 5) : (int)$remember; + $remember = is_bool($remember) ? $this->getRememberTime() : (int)$remember; $cookieValue = $this->get('username'); $cookieExpires = time() + $remember; setcookie($cookieName, $cookieValue, $cookieExpires, MODX_BASE_URL, '', $secure, true); diff --git a/assets/lib/MODxAPI/modResource.php b/assets/lib/MODxAPI/modResource.php old mode 100755 new mode 100644 index 8c6b190915..7966ddddf1 --- a/assets/lib/MODxAPI/modResource.php +++ b/assets/lib/MODxAPI/modResource.php @@ -152,6 +152,7 @@ class modResource extends MODxAPI private $managerUsers = null; /** @var array группы документов */ protected $groupIds = array(); + /** * modResource constructor. * @param DocumentParser $modx @@ -189,8 +190,10 @@ public function toArrayTV($render = false) $tvTPL = APIHelpers::getkey($this->tvTpl, $tpl, array()); foreach ($tvTPL as $item) { if (isset($this->tvid[$item]) && !array_key_exists($this->tvid[$item], $out)) { - $out[$this->tvid[$item]] = $this->get($this->tvid[$item]); + $value = $this->get($this->tvid[$item]); + $out[$this->tvid[$item]] = empty($value) ? $this->tvd[$this->tvid[$item]] : $value; } + } if ($render) { foreach ($out as $key => $val) { @@ -306,7 +309,7 @@ public function get($key) $tvTPL = APIHelpers::getkey($this->tvTpl, $tpl, array()); $tvID = APIHelpers::getkey($this->tv, $key, 0); if (in_array($tvID, $tvTPL) && is_null($out)) { - $out = APIHelpers::getkey($this->tvd[$key], 'value', null); + $out = APIHelpers::getkey($this->tvd, $key, null); } } @@ -441,7 +444,7 @@ public function create($data = array()) $this->close(); $fld = array(); foreach ($this->tvd as $name => $tv) { - $fld[$name] = $tv['value']; + $fld[$name] = $tv; }; $this->store($fld); @@ -516,7 +519,7 @@ public function save($fire_events = false, $clearCache = false) $this->invokeEvent('OnBeforeDocFormSave', array( 'mode' => $this->newDoc ? "new" : "upd", - 'id' => $this->id ? $this->id : '', + 'id' => isset($this->id) ? $this->id : '', 'doc' => $this->toArray(), 'docObj' => $this ), $fire_events); @@ -614,10 +617,12 @@ public function save($fire_events = false, $clearCache = false) $this->newDoc = false; } - if ($this->groupIds) $this->setDocumentGroups($this->id, $this->groupIds); + if (!empty($this->groupIds)) { + $this->setDocumentGroups($this->id, $this->groupIds); + } $this->invokeEvent('OnDocFormSave', array( 'mode' => $this->mode, - 'id' => $this->id, + 'id' => isset($this->id) ? $this->id : '', 'doc' => $this->toArray(), 'docObj' => $this ), $fire_events); @@ -634,7 +639,8 @@ public function save($fire_events = false, $clearCache = false) * @param $tvId * @return bool */ - protected function belongsToTemplate($tvId) { + protected function belongsToTemplate($tvId) + { $template = $this->get('template'); return isset($this->tvTpl[$template]) && in_array($tvId, $this->tvTpl[$template]); @@ -797,14 +803,18 @@ public function issetField($key) */ protected function get_TV($reload = false) { - if (empty($this->modx->_TVnames) || $reload) { - $result = $this->query('SELECT `id`,`name`,`type` FROM ' . $this->makeTable('site_tmplvars')); + $this->modx->_TVnames = $this->loadFromCache('_TVnames'); + if ($this->modx->_TVnames === false || empty($this->modx->_TVnames) || $reload) { + $this->modx->_TVnames = array(); + $result = $this->query('SELECT `id`,`name`,`default_text`,`type` FROM ' . $this->makeTable('site_tmplvars')); while ($row = $this->modx->db->GetRow($result)) { $this->modx->_TVnames[$row['name']] = array( - "id" => $row['id'], - "type" => $row['type'] + "id" => $row['id'], + "type" => $row['type'], + "default" => $row['default_text'] ); } + $this->saveToCache($this->modx->_TVnames, '_TVnames'); } $arrayTypes = array('checkbox', 'listbox-multiple'); $arrayTVs = array(); @@ -815,7 +825,9 @@ protected function get_TV($reload = false) $arrayTVs[] = $name; } } - if (empty($this->tvaFields)) $this->tvaFields = $arrayTVs; + if (empty($this->tvaFields)) { + $this->tvaFields = $arrayTVs; + } $this->loadTVTemplate()->loadTVDefault(array_values($this->tv)); return $this; @@ -826,11 +838,14 @@ protected function get_TV($reload = false) */ protected function loadTVTemplate() { - $q = $this->query("SELECT `tmplvarid`, `templateid` FROM " . $this->makeTable('site_tmplvar_templates')); - $q = $this->modx->db->makeArray($q); - $this->tvTpl = array(); - foreach ($q as $item) { - $this->tvTpl[$item['templateid']][] = $item['tmplvarid']; + $this->tvTpl = $this->loadFromCache('_tvTpl'); + if ($this->tvTpl === false) { + $q = $this->query("SELECT `tmplvarid`, `templateid` FROM " . $this->makeTable('site_tmplvar_templates')); + $this->tvTpl = array(); + while ($item = $this->modx->db->getRow($q)) { + $this->tvTpl[$item['templateid']][] = $item['tmplvarid']; + } + $this->saveToCache($this->tvTpl, '_tvTpl'); } return $this; @@ -843,14 +858,10 @@ protected function loadTVTemplate() protected function loadTVDefault(array $tvId = array()) { if (is_array($tvId) && !empty($tvId)) { - $tbl_site_tmplvars = $this->makeTable('site_tmplvars'); - $fields = 'id,name,default_text as value,display,display_params,type'; - $implodeTvId = implode(',', $tvId); - $rs = $this->query("SELECT {$fields} FROM {$tbl_site_tmplvars} WHERE id IN({$implodeTvId})"); - $rows = $this->modx->db->makeArray($rs); $this->tvd = array(); - foreach ($rows as $item) { - $this->tvd[$item['name']] = $item; + foreach ($tvId as $id) { + $name = $this->tvid[$id]; + $this->tvd[$name] = $this->modx->_TVnames[$name]['default']; } } @@ -1001,7 +1012,7 @@ public function encodeField($field, $store = false) if ($this->isEncodableField($field)) { $data = $this->get($field); if ($this->isTVarrayField($field)) { - $out = is_array($data) ? implode('||', $data) : $data; + $out = is_array($data) ? implode('||', $data) : (string)$data; } else { $out = json_encode($data); } @@ -1055,7 +1066,8 @@ public function markAllDecode() /** * @param int $docId */ - public function getDocumentGroups($docId = 0) { + public function getDocumentGroups($docId = 0) + { $out = array(); $doc = $this->switchObject($docId); if (null !== $doc->getID()) { @@ -1081,7 +1093,9 @@ public function getDocumentGroups($docId = 0) { */ public function setDocumentGroups($docId = 0, $groupIds = array()) { - if (!is_array($groupIds)) return $this; + if (!is_array($groupIds)) { + return $this; + } if ($this->newDoc && $docId == 0) { $this->groupIds = $groupIds; } else { @@ -1101,5 +1115,4 @@ public function setDocumentGroups($docId = 0, $groupIds = array()) return $this; } - } diff --git a/assets/lib/MODxAPI/modUsers.php b/assets/lib/MODxAPI/modUsers.php old mode 100755 new mode 100644 index 6b26522ffe..a5a8bcbb0f --- a/assets/lib/MODxAPI/modUsers.php +++ b/assets/lib/MODxAPI/modUsers.php @@ -53,14 +53,51 @@ class modUsers extends MODxAPI protected $givenPassword = ''; protected $groupIds = array(); + /** + * @var integer + */ + private $rememberTime; + + /** + * MODxAPI constructor. + * @param DocumentParser $modx + * @param bool $debug + * @throws Exception + */ + public function __construct(DocumentParser $modx, $debug = false) + { + $this->setRememberTime(60 * 60 * 24 * 365 * 5); + parent::__construct($modx, $debug); + } + + /** + * @param $val + * @return $this + */ + protected function setRememberTime($val) + { + $this->rememberTime = (int)$val; + return $this; + } + + /** + * @return integer + */ + public function getRememberTime() + { + return $this->rememberTime; + } + /** * @param $key * @return bool */ public function issetField($key) { - return (array_key_exists($key, $this->default_field['user']) || array_key_exists($key, - $this->default_field['attribute']) || in_array($key, $this->default_field['hidden'])); + return (array_key_exists($key, $this->default_field['user']) || array_key_exists( + $key, + $this->default_field['attribute'] + ) || in_array($key, $this->default_field['hidden'])); } /** @@ -113,13 +150,7 @@ public function edit($id) $this->id = null; } else { $this->set('editedon', time()); - $result = $this->query(" - SELECT * from {$this->makeTable('web_user_attributes')} as attribute - LEFT JOIN {$this->makeTable('web_users')} as user ON user.id=attribute.internalKey - WHERE BINARY {$find}='{$this->escape($id)}' - "); - $this->field = $this->modx->db->getRow($result); - + $this->editQuery($find, $id); $this->id = empty($this->field['internalKey']) ? null : $this->get('internalKey'); $this->store($this->toArray()); unset($this->field['id']); @@ -130,6 +161,20 @@ public function edit($id) return $this; } + /** + * @param string $find + * @param string $id + */ + protected function editQuery($find, $id) + { + $result = $this->query(" + SELECT * from {$this->makeTable('web_user_attributes')} as attribute + LEFT JOIN {$this->makeTable('web_users')} as user ON user.id=attribute.internalKey + WHERE BINARY {$find}='{$this->escape($id)}' + "); + $this->field = $this->modx->db->getRow($result); + } + /** * @param string $key * @param $value @@ -146,6 +191,11 @@ public function set($key, $value) case 'sessionid': session_regenerate_id(false); $value = session_id(); + if ($mid = $this->modx->getLoginUserID('mgr')) { + $this->modx->db->query("UPDATE {$this->makeTable('active_user_locks')} SET `sid`='{$value}' WHERE `internalKey`={$mid}"); + $this->modx->db->query("UPDATE {$this->makeTable('active_user_sessions')} SET `sid`='{$value}' WHERE `internalKey`={$mid}"); + $this->modx->db->query("UPDATE {$this->makeTable('active_users')} SET `sid`='{$value}' WHERE `internalKey`={$mid}"); + } break; case 'editedon': case 'createdon': @@ -175,15 +225,19 @@ public function getPassword($pass) public function save($fire_events = false, $clearCache = false) { if ($this->get('email') == '' || $this->get('username') == '' || $this->get('password') == '') { - $this->log['EmptyPKField'] = 'Email, username or password is empty
' . print_r($this->toArray(),
-                    true) . '
'; + $this->log['EmptyPKField'] = 'Email, username or password is empty
' . print_r(
+                $this->toArray(),
+                true
+            ) . '
'; return false; } if (!$this->checkUnique('web_users', 'username')) { - $this->log['UniqueUsername'] = 'username not unique
' . print_r($this->get('username'),
-                    true) . '
'; + $this->log['UniqueUsername'] = 'username not unique
' . print_r(
+                $this->get('username'),
+                true
+            ) . '
'; return false; } @@ -207,8 +261,10 @@ public function save($fire_events = false, $clearCache = false) if ($this->newDoc) { $SQL = "INSERT into {$this->makeTable('web_users')} SET " . implode(', ', $this->set['user']); } else { - $SQL = "UPDATE {$this->makeTable('web_users')} SET " . implode(', ', - $this->set['user']) . " WHERE id = " . $this->id; + $SQL = "UPDATE {$this->makeTable('web_users')} SET " . implode( + ', ', + $this->set['user'] + ) . " WHERE id = " . $this->id; } $this->query($SQL); } @@ -217,26 +273,9 @@ public function save($fire_events = false, $clearCache = false) $this->id = $this->modx->db->getInsertId(); } - foreach ($this->default_field['attribute'] as $key => $value) { - $tmp = $this->get($key); - if ($this->newDoc && (!is_int($tmp) && $tmp == '')) { - $this->field[$key] = $value; - } - $this->Uset($key, 'attribute'); - unset($fld[$key]); - } - if (!empty($this->set['attribute'])) { - if ($this->newDoc) { - $this->set('internalKey', $this->id)->Uset('internalKey', 'attribute'); - $SQL = "INSERT into {$this->makeTable('web_user_attributes')} SET " . implode(', ', - $this->set['attribute']); - } else { - $SQL = "UPDATE {$this->makeTable('web_user_attributes')} SET " . implode(', ', - $this->set['attribute']) . " WHERE internalKey = " . $this->getID(); - } - $this->query($SQL); - } + $this->saveQuery($fld); unset($fld['id']); + foreach ($fld as $key => $value) { if ($value == '' || !$this->isChanged($key)) { continue; @@ -258,9 +297,11 @@ public function save($fire_events = false, $clearCache = false) 'username' => $this->get('username') ), $fire_events); } - - if ($this->groupIds) $this->setUserGroups($this->id, $this->groupIds); - + + if (!empty($this->groupIds)) { + $this->setUserGroups($this->id, $this->groupIds); + } + $this->invokeEvent('OnWebSaveUser', array( 'userObj' => $this, 'mode' => $this->newDoc ? "new" : "upd", @@ -275,6 +316,36 @@ public function save($fire_events = false, $clearCache = false) return $this->id; } + /** + * @param array $fld + */ + protected function saveQuery(array &$fld) + { + foreach ($this->default_field['attribute'] as $key => $value) { + $tmp = $this->get($key); + if ($this->newDoc && (!is_int($tmp) && $tmp == '')) { + $this->field[$key] = $value; + } + $this->Uset($key, 'attribute'); + unset($fld[$key]); + } + if (!empty($this->set['attribute'])) { + if ($this->newDoc) { + $this->set('internalKey', $this->id)->Uset('internalKey', 'attribute'); + $SQL = "INSERT into {$this->makeTable('web_user_attributes')} SET " . implode( + ', ', + $this->set['attribute'] + ); + } else { + $SQL = "UPDATE {$this->makeTable('web_user_attributes')} SET " . implode( + ', ', + $this->set['attribute'] + ) . " WHERE internalKey = " . $this->getID(); + } + $this->query($SQL); + } + } + /** * @param $ids * @param bool $fire_events @@ -283,10 +354,7 @@ public function save($fire_events = false, $clearCache = false) public function delete($ids, $fire_events = false) { if ($this->edit($ids)) { - $flag = $this->query(" - DELETE user,attribute FROM {$this->makeTable('web_user_attributes')} as attribute - LEFT JOIN {$this->makeTable('web_users')} as user ON user.id=attribute.internalKey - WHERE attribute.internalKey='{$this->escape($this->getID())}'"); + $flag = $this->deleteQuery(); $this->query("DELETE FROM {$this->makeTable('web_user_settings')} WHERE webuser='{$this->getID()}'"); $this->query("DELETE FROM {$this->makeTable('web_groups')} WHERE webuser='{$this->getID()}'"); $this->invokeEvent('OnWebDeleteUser', array( @@ -304,9 +372,17 @@ public function delete($ids, $fire_events = false) return $flag; } + protected function deleteQuery() + { + return $this->query(" + DELETE user,attribute FROM {$this->makeTable('web_user_attributes')} as attribute + LEFT JOIN {$this->makeTable('web_users')} as user ON user.id=attribute.internalKey + WHERE attribute.internalKey='{$this->escape($this->getID())}'"); + } + /** * @param int $id - * @param bool $fulltime + * @param bool|integer $fulltime * @param string $cookieName * @param bool $fire_events * @return bool @@ -369,8 +445,7 @@ public function testAuth($id, $password, $blocker, $fire_events = false) } $flag = $pluginFlag = false; - if ( - (null !== $tmp->getID()) && (!$blocker || ($blocker && !$tmp->checkBlock($id))) + if ((null !== $tmp->getID()) && (!$blocker || ($blocker && !$tmp->checkBlock($id))) ) { $eventResult = $this->getInvokeEventResult('OnWebAuthentication', array( 'userObj' => $this, @@ -396,7 +471,7 @@ public function testAuth($id, $password, $blocker, $fire_events = false) } /** - * @param bool $fulltime + * @param bool|integer $fulltime * @param string $cookieName * @return bool */ @@ -404,20 +479,21 @@ public function AutoLogin($fulltime = true, $cookieName = 'WebLoginPE', $fire_ev { $flag = false; if (isset($_COOKIE[$cookieName])) { - $cookie = explode('|', $_COOKIE[$cookieName], 3); + $cookie = explode('|', $_COOKIE[$cookieName], 4); if (isset($cookie[0], $cookie[1], $cookie[2]) && strlen($cookie[0]) == 32 && strlen($cookie[1]) == 32) { + if (!$fulltime && isset($cookie[4])) { + $fulltime = (int)$cookie[4]; + } $this->close(); $q = $this->modx->db->query("SELECT id FROM " . $this->makeTable('web_users') . " WHERE md5(username)='{$this->escape($cookie[0])}'"); $id = $this->modx->db->getValue($q); - if ( - $this->edit($id) - && null !== $this->getID() - && $this->get('password') == $cookie[1] - && $this->get('sessionid') == $cookie[2] + if ($this->edit($id) + && null !== $this->getID() + && $this->get('password') == $cookie[1] + && $this->get('sessionid') == $cookie[2] && !$this->checkBlock($this->getID()) ) { $flag = $this->authUser($this->getID(), $fulltime, $cookieName, $fire_events); - } } } @@ -427,9 +503,9 @@ public function AutoLogin($fulltime = true, $cookieName = 'WebLoginPE', $fire_ev /** * @param string $cookieName - * @param null $fire_events + * @param bool $fire_events */ - public function logOut($cookieName = 'WebLoginPE', $fire_events = null) + public function logOut($cookieName = 'WebLoginPE', $fire_events = false) { if (!$uid = $this->modx->getLoginUserID('web')) { return; @@ -450,6 +526,7 @@ public function logOut($cookieName = 'WebLoginPE', $fire_events = null) * * @param string $directive ('start' or 'destroy') * @param string $cookieName + * @param bool|integer $remember * @return modUsers * @author Raymond Irving * @author Scotty Delicious @@ -460,7 +537,7 @@ protected function SessionHandler($directive, $cookieName, $remember = true) { switch ($directive) { case 'start': - if ($this->getID()) { + if ($this->getID() !== null) { $_SESSION['webShortname'] = $this->get('username'); $_SESSION['webFullname'] = $this->get('fullname'); $_SESSION['webEmail'] = $this->get('email'); @@ -474,7 +551,7 @@ protected function SessionHandler($directive, $cookieName, $remember = true) $_SESSION['webUsrConfigSet'] = array(); $_SESSION['webUserGroupNames'] = $this->getUserGroups(); $_SESSION['webDocgroups'] = $this->getDocumentGroups(); - if ($remember) { + if (!empty($remember)) { $this->setAutoLoginCookie($cookieName, $remember); } } @@ -521,14 +598,14 @@ public function isSecure() /** * @param $cookieName - * @param bool $remember + * @param bool|integer $remember * @return $this */ public function setAutoLoginCookie($cookieName, $remember = true) { - if (!empty($cookieName) && $this->getID()) { + if (!empty($cookieName) && $this->getID() !== null) { $secure = $this->isSecure(); - $remember = is_bool($remember) ? (60 * 60 * 24 * 365 * 5) : (int)$remember; + $remember = is_bool($remember) ? $this->getRememberTime() : (int)$remember; $cookieValue = array(md5($this->get('username')), $this->get('password'), $this->get('sessionid'), $remember); $cookieValue = implode('|', $cookieValue); $cookieExpires = time() + $remember; @@ -554,7 +631,6 @@ public function getDocumentGroups($userID = 0) INNER JOIN {$webgroup_access} as `uga` ON `uga`.`webgroup`=`ug`.`webgroup` WHERE `ug`.`webuser` = " . $user->getID(); $out = $this->modx->db->getColumn('documentgroup', $this->query($sql)); - } unset($user); @@ -592,7 +668,9 @@ public function getUserGroups($userID = 0) */ public function setUserGroups($userID = 0, $groupIds = array()) { - if (!is_array($groupIds)) return $this; + if (!is_array($groupIds)) { + return $this; + } if ($this->newDoc && $userID == 0) { $this->groupIds = $groupIds; } else { diff --git a/assets/lib/Module/Action.php b/assets/lib/Module/Action.php old mode 100755 new mode 100644 index eea27058be..f06b6189f9 --- a/assets/lib/Module/Action.php +++ b/assets/lib/Module/Action.php @@ -179,4 +179,5 @@ public static function getClassTable() { return self::$classTable; } + } diff --git a/assets/lib/Module/Helper.php b/assets/lib/Module/Helper.php old mode 100755 new mode 100644 index 04b4931407..14d23f85f1 --- a/assets/lib/Module/Helper.php +++ b/assets/lib/Module/Helper.php @@ -152,4 +152,5 @@ public static function readFileLine($path, $callback, array $callbackParams = ar return array('line' => $i, 'add' => $total); } + } diff --git a/assets/lib/SimpleTab/controller.abstract.php b/assets/lib/SimpleTab/controller.abstract.php old mode 100755 new mode 100644 index fdff015317..544b36a986 --- a/assets/lib/SimpleTab/controller.abstract.php +++ b/assets/lib/SimpleTab/controller.abstract.php @@ -171,4 +171,5 @@ public function getLanguageCode() return isset($modx_lang_attribute) ? $modx_lang_attribute : null; } + } diff --git a/assets/lib/SimpleTab/plugin.class.php b/assets/lib/SimpleTab/plugin.class.php old mode 100755 new mode 100644 index 78cba82d99..0b9b663881 --- a/assets/lib/SimpleTab/plugin.class.php +++ b/assets/lib/SimpleTab/plugin.class.php @@ -65,8 +65,11 @@ public function __construct($modx, $lang_attribute = 'en') $this->params['template'] = is_array($doc) ? end($doc) : null; } //overload plugin and class properties - $_params = $modx->parseProperties('&template=;;' . $this->params['template'] . ' &id=;;' . $this->params['id'], - $modx->event->activePlugin, 'plugin'); + $_params = $modx->parseProperties( + '&template=;;' . $this->params['template'] . ' &id=;;' . $this->params['id'], + $modx->event->activePlugin, + 'plugin' + ); foreach ($_params as $key => $value) { if (property_exists($this, $key)) { $this->$key = $value; @@ -99,8 +102,10 @@ public function checkPermissions() $templates = isset($this->params['templates']) ? explode(',', $this->params['templates']) : false; $roles = isset($this->params['roles']) ? explode(',', $this->params['roles']) : false; - $tplFlag = ($this->checkTemplate && !$templates || ($templates && !in_array($this->params['template'], - $templates))); + $tplFlag = ($this->checkTemplate && !$templates || ($templates && !in_array( + $this->params['template'], + $templates + ))); $documents = isset($this->params['documents']) ? explode(',', $this->params['documents']) : false; $docFlag = ($this->checkId && $tplFlag) ? !($documents && in_array($this->params['id'], $documents)) : $tplFlag; @@ -184,8 +189,10 @@ public function render() if ($output !== false) { $ph = $this->getTplPlaceholders(); $ph['js'] = $this->renderJS($this->jsListDefault, $ph) . $this->renderJS($this->jsListCustom, $ph); - $ph['styles'] = $this->renderJS($this->cssListDefault, $ph) . $this->renderJS($this->cssListCustom, - $ph); + $ph['styles'] = $this->renderJS($this->cssListDefault, $ph) . $this->renderJS( + $this->cssListCustom, + $ph + ); $output = $this->DLTemplate->parseChunk('@CODE:' . $output, $ph); } @@ -250,4 +257,5 @@ public function registerEvents($events = array(), $eventsType = '6') } } } + } diff --git a/assets/lib/SimpleTab/table.abstract.php b/assets/lib/SimpleTab/table.abstract.php old mode 100755 new mode 100644 index 7fb616756a..dd2d57f45c --- a/assets/lib/SimpleTab/table.abstract.php +++ b/assets/lib/SimpleTab/table.abstract.php @@ -129,7 +129,7 @@ public function deleteThumb($url, $cache = false) if ($cache) { return; } - $thumbsCache = \APIhelpers::getkey($this->params,'thumbsCache',$this->thumbsCache); + $thumbsCache = \APIhelpers::getkey($this->params, 'thumbsCache', $this->thumbsCache); $thumb = $thumbsCache . $url; if ($this->fs->checkFile($thumb)) { $this->deleteThumb($thumb, true); @@ -138,7 +138,7 @@ public function deleteThumb($url, $cache = false) /** * @param $ids - * @param null $fire_events + * @param bool $fire_events * @return $this */ public function delete($ids, $fire_events = false) @@ -152,7 +152,7 @@ public function delete($ids, $fire_events = false) /** * @param $ids * @param $rid - * @param null $fire_events + * @param bool $fire_events * @return $this */ public function deleteAll($ids, $rid, $fire_events = false) @@ -207,27 +207,51 @@ public function reorder($source, $target, $point, $rid, $orderDir) /* more refactoring needed */ if ($targetIndex < $sourceIndex) { if (($point == 'top' && $orderDir == 'asc') || ($point == 'bottom' && $orderDir == 'desc')) { - $this->modx->db->update("`{$this->indexName}`=`{$this->indexName}`+1", $table, - "`{$this->indexName}`>={$targetIndex} AND `{$this->indexName}`<{$sourceIndex} AND `{$this->rfName}`={$rid}"); - $rows = $this->modx->db->update("`{$this->indexName}`={$targetIndex}", $table, - "`{$this->pkName}`={$sourceId}"); + $this->modx->db->update( + "`{$this->indexName}`=`{$this->indexName}`+1", + $table, + "`{$this->indexName}`>={$targetIndex} AND `{$this->indexName}`<{$sourceIndex} AND `{$this->rfName}`={$rid}" + ); + $rows = $this->modx->db->update( + "`{$this->indexName}`={$targetIndex}", + $table, + "`{$this->pkName}`={$sourceId}" + ); } elseif (($point == 'bottom' && $orderDir == 'asc') || ($point == 'top' && $orderDir == 'desc')) { - $this->modx->db->update("`{$this->indexName}`=`{$this->indexName}`+1", $table, - "`{$this->indexName}`>{$targetIndex} AND `{$this->indexName}`<{$sourceIndex} AND `{$this->rfName}`={$rid}"); - $rows = $this->modx->db->update("`{$this->indexName}`=1+{$targetIndex}", $table, - "`{$this->pkName}`={$sourceId}"); + $this->modx->db->update( + "`{$this->indexName}`=`{$this->indexName}`+1", + $table, + "`{$this->indexName}`>{$targetIndex} AND `{$this->indexName}`<{$sourceIndex} AND `{$this->rfName}`={$rid}" + ); + $rows = $this->modx->db->update( + "`{$this->indexName}`=1+{$targetIndex}", + $table, + "`{$this->pkName}`={$sourceId}" + ); } } else { if (($point == 'bottom' && $orderDir == 'asc') || ($point == 'top' && $orderDir == 'desc')) { - $this->modx->db->update("`{$this->indexName}`=`{$this->indexName}`-1", $table, - "`{$this->indexName}`<={$targetIndex} AND `{$this->indexName}`>={$sourceIndex} AND `{$this->rfName}`={$rid}"); - $rows = $this->modx->db->update("`{$this->indexName}`={$targetIndex}", $table, - "`{$this->pkName}`={$sourceId}"); + $this->modx->db->update( + "`{$this->indexName}`=`{$this->indexName}`-1", + $table, + "`{$this->indexName}`<={$targetIndex} AND `{$this->indexName}`>={$sourceIndex} AND `{$this->rfName}`={$rid}" + ); + $rows = $this->modx->db->update( + "`{$this->indexName}`={$targetIndex}", + $table, + "`{$this->pkName}`={$sourceId}" + ); } elseif (($point == 'top' && $orderDir == 'asc') || ($point == 'bottom' && $orderDir == 'desc')) { - $this->modx->db->update("`{$this->indexName}`=`{$this->indexName}`-1", $table, - "`{$this->indexName}`<{$targetIndex} AND `{$this->indexName}`>={$sourceIndex} AND `{$this->rfName}`={$rid}"); - $rows = $this->modx->db->update("`{$this->indexName}`=-1+{$targetIndex}", $table, - "`{$this->pkName}`={$sourceId}"); + $this->modx->db->update( + "`{$this->indexName}`=`{$this->indexName}`-1", + $table, + "`{$this->indexName}`<{$targetIndex} AND `{$this->indexName}`>={$sourceIndex} AND `{$this->rfName}`={$rid}" + ); + $rows = $this->modx->db->update( + "`{$this->indexName}`=-1+{$targetIndex}", + $table, + "`{$this->pkName}`={$sourceId}" + ); } } @@ -272,6 +296,9 @@ public function getParams() */ public function setParams($params = array()) { - if (is_array($params)) $this->params = $params; + if (is_array($params)) { + $this->params = $params; + } } + } diff --git a/assets/lib/class.modxRTEbridge.php b/assets/lib/class.modxRTEbridge.php index 5fb858fe9a..f32d9b65c1 100755 --- a/assets/lib/class.modxRTEbridge.php +++ b/assets/lib/class.modxRTEbridge.php @@ -1,6 +1,6 @@ modxRTEbridge)) $modx->modxRTEbridge = array(); - + // Init language before bridge so bridge can alter translations via $this->setLang() $this->initLang($basePath); @@ -72,11 +72,11 @@ public function __construct($editorKey = NULL, $bridgeConfig=array(), $tvOptions // Modx default WYSIWYG-params $modxParamsArr = array( - 'theme', 'skin', 'entermode', 'element_format', 'schema', 'css_selectors', + 'theme', 'skin', 'skintheme', 'entermode', 'element_format', 'schema', 'css_selectors', 'custom_plugins', 'custom_buttons1', 'custom_buttons2', 'custom_buttons3', 'custom_buttons4', 'template_docs', 'template_chunks' ); - + // Add defaultCheckbox-Values for user-settings $settingsRows = array(); include($basePath . 'gsettings/gsettings.rows.inc.php'); @@ -87,7 +87,7 @@ public function __construct($editorKey = NULL, $bridgeConfig=array(), $tvOptions $this->modxParams[$param . '_useglobal'] = !empty($editorConfig[$useGlobalName]) || (isset($editorConfig[$useGlobalName]) && is_null($editorConfig[$useGlobalName])) ? '1' : '0'; } } - + // Add custom settings from bridge foreach ($this->gSettingsCustom as $param => $row) { if (!in_array($param, $modxParamsArr)) $modxParamsArr[] = $param; @@ -123,6 +123,7 @@ public function __construct($editorKey = NULL, $bridgeConfig=array(), $tvOptions $this->pluginParams['editorVersion'] = isset($bridgeConfig['editorVersion']) ? $bridgeConfig['editorVersion'] : 'No editorVersion set'; $this->pluginParams['editorLogo'] = isset($bridgeConfig['editorLogo']) ? $bridgeConfig['editorLogo'] : ''; $this->pluginParams['skinsDirectory'] = isset($bridgeConfig['skinsDirectory']) && !empty($bridgeConfig['skinsDirectory']) ? trim($bridgeConfig['skinsDirectory'], "/") . "/" : ''; + $this->pluginParams['skinthemeDirectory'] = isset($bridgeConfig['skinthemeDirectory']) && !empty($bridgeConfig['skinthemeDirectory']) ? trim($bridgeConfig['skinthemeDirectory'], "/") . "/" : ''; $this->pluginParams['base_path'] = $basePath; $this->pluginParams['base_url'] = $baseUrl; } @@ -232,7 +233,7 @@ public function getEditorScript() // Allows bridging elements+TV-options etc before looping $this->renderBridgeParams('initBridge'); - + // Now loop through tvs foreach ($this->pluginParams['elements'] as $selector) { @@ -270,15 +271,15 @@ public function getEditorScript() } } else { - // No elements given - create Config-Object only + // No elements given - create Config-Object only $this->theme = $this->tvOptions['theme']; $this->initTheme('noselector'); $this->renderBridgeParams('noselector'); - + // Prepare config output $ph = $this->prepareDefaultPlaceholders(); $ph = array_merge($ph, $this->customPlaceholders, $this->mergeParamArrays()); // Big list.. - + if (!defined($this->editorKey . '_INIT_CONFIG_' . $this->theme)) { define($this->editorKey . '_INIT_CONFIG_' . $this->theme, 1); $output .= file_get_contents("{$this->pluginParams['base_path']}tpl/tpl.{$this->editorKey}.config.html") ."\n"; @@ -304,23 +305,27 @@ public function getEditorScript() /** * @return array */ - public function prepareDefaultPlaceholders($selector='') + public function prepareDefaultPlaceholders($selector='', $render=true) { global $modx; - $ph['configString'] = $this->renderConfigString(); - $ph['configRawString'] = $this->renderConfigRawString(); + if($render) { + $ph['configString'] = $this->renderConfigString(); + $ph['configRawString'] = $this->renderConfigRawString(); + } $ph['editorKey'] = $this->editorKey; $ph['themeKey'] = $this->theme; $ph['selector'] = $selector; $ph['documentIdentifier'] = $modx->documentIdentifier; + $ph['base_path'] = MODX_BASE_PATH; + $ph['base_url'] = MODX_BASE_URL; $ph['manager_path'] = MGR_DIR; $ph['site_manager_url'] = MODX_MANAGER_URL; $ph['which_browser'] = !empty($modx->config['which_browser']) ? $modx->config['which_browser'] : 'mcpuk'; return $ph; } - + // Init/load theme public function initTheme($selector) { @@ -329,7 +334,7 @@ public function initTheme($selector) $this->theme = isset($this->tvOptions[$selector]['theme']) ? $this->tvOptions[$selector]['theme'] : $this->theme; // Load theme for user or webuser - if ($modx->isBackend() || (intval($_GET['quickmanagertv']) == 1 || isset($_SESSION['mgrValidated']))) { + if ($modx->isBackend() || ((int)$_GET['quickmanagertv'] == 1 || isset($_SESSION['mgrValidated']))) { // User is logged into Manager // Load base first to assure Modx settings like entermode, editor_css_path are given set, can be overwritten in custom theme include("{$this->pluginParams['base_path']}theme/theme.{$this->editorKey}.base.inc.php"); @@ -345,7 +350,7 @@ public function initTheme($selector) $this->pluginParams['language'] = !isset($this->pluginParams['language']) ? $this->lang('lang_code') : $this->pluginParams['language']; } } - + // Call bridge-functions and receive optional bridged-values // $selector = "initBridge" allows executing bridging function without modifying $this->themeConfig public function renderBridgeParams($selector) @@ -373,7 +378,10 @@ public function renderBridgeParams($selector) // Renders String for initialization via JS public function renderConfigString() { + global $modx; + $config = array(); + $defaultPhs = $this->prepareDefaultPlaceholders('',false); // Build config-string as per themeConfig $raw = ''; @@ -383,6 +391,8 @@ public function renderConfigString() $value = $this->determineValue($key, $conf); if ($value === NULL) { continue; }; // Skip none-allowed empty settings + $value = is_string($value) ? $modx->parseText($value, $defaultPhs) : $value; // Allow default-placeholders like [+which_browser+] in theme-param-values + // Escape quotes if (!is_array($value) && strpos($value, "'") !== false && !in_array($conf['type'], array('raw','object','obj')) ) $value = str_replace("'", "\\'", $value); @@ -438,8 +448,8 @@ public function renderConfigRawString() return $raw; } - - // Get final value of editor-config + + // Get final value of editor-config public function determineValue($key, $conf=NULL) { if($conf == NULL) { $conf = $this->themeConfig[$key]; }; @@ -518,6 +528,9 @@ public function getModxSettings() // Prepare setting "skin" $ph['skin_options'] = $this->getSkinNames(); + // Prepare setting "skin-theme" + $ph['skintheme_options'] = $this->getSkinThemeNames(); + // Prepare setting "entermode_options" $entermode = !empty($ph[$this->editorKey . '_entermode']) ? $ph[$this->editorKey . '_entermode'] : 'p'; $ph['entermode_options'] = '
'; @@ -569,9 +582,9 @@ public function getModxSettings() if ($row == NULL) { continue; }; // Skip disabled config-settings - + $row = array_merge($this->langArr, $row); - + $row['name'] = $this->editorKey . '_' . $name; $row['editorKey'] = $this->editorKey; $row['title'] = $this->lang($row['title']); @@ -580,7 +593,7 @@ public function getModxSettings() // Prepare displaying of default values $row['default'] = isset($this->gSettingsDefaultValues[$name]) ? '' . $this->lang('default') . '' . $this->gSettingsDefaultValues[$name] . '' : ''; - + // Prepare Default-Checkboxes for user-settings if(in_array($modx->manager->action, array(11,12)) && isset($row['defaultCheckbox']) && $row['defaultCheckbox']) { $useGlobalName = $name . '_useglobal'; @@ -590,7 +603,7 @@ public function getModxSettings() } else { $row['defaultCheckbox'] = ''; } - + // Nested parsing $output = $settingsRowTpl; $bt=md5(''); @@ -599,7 +612,7 @@ public function getModxSettings() $output = $this->parsePlaceholders($output, $row); // Replace general translations $output = $this->parsePlaceholders($output, $ph); // Replace values / settings } - + $ph['rows'] .= $output . "\n"; }; @@ -612,12 +625,12 @@ public function getModxSettings() return $settingsBody; } - + public function parsePlaceholders($content, $ph) { foreach($ph as $key=>$value) $content = str_replace('[+'.$key.'+]', $value, $content); return $content; } - + // Replace all translation-placeholders public function replaceTranslations($output) { @@ -657,6 +670,8 @@ public function getThemeNames() $file = str_replace($themeDir, '', $file); $file = str_replace('theme.' . $this->editorKey . '.', '', $file); + if(in_array($file,array('index.html'))) continue; + $theme = trim(str_replace('.inc.php', '', $file)); if ($theme == 'base') continue; // Why should user select base-theme? $label = $this->lang("theme_{$theme}", true) ? $this->lang("theme_{$theme}") : $theme; // Get optional translation or show raw themeKey @@ -715,6 +730,36 @@ public function getSkinNames() return is_array($option) ? implode("\n", $option) : ''; } + public function getSkinThemeNames() + { + global $modx; + $params = $this->pluginParams; + + $themeDir = "{$params['base_path']}{$params['skinthemeDirectory']}"; + + switch ($modx->manager->action) { + case '11': + case '12': + case '119': + $selected = $this->selected(empty($params[$this->editorKey . '_skintheme'])); + $option[] = ''; + break; + } + + foreach (glob("{$themeDir}*") as $theme) { + //$file = str_replace('\\', '/', $file); + $theme = str_replace($themeDir, '', $theme); + + if(in_array($theme,array('index.html'))) continue; + + $selected = $this->selected($theme == $this->modxParams['skintheme']); + + $option[] = '"; + } + + return isset($option) && is_array($option) ? implode("\n", $option) : ''; + } + public function selected($cond = false) { if ($cond !== false) return ' selected="selected"'; @@ -767,14 +812,14 @@ public function initLang($basePath) public function mergeParamArrays() { $p = array(); - foreach($this->pluginParams as $param=>$value) { $p['pp.'.$param] = is_array($value) ? join(',',$value) : $value; }; - foreach($this->modxParams as $param=>$value) { $p['mp.'.$param] = is_array($value) ? join(',',$value) : $value; }; + foreach($this->pluginParams as $param=>$value) { $p['pp.'.$param] = is_array($value) ? implode(',',$value) : $value; }; + foreach($this->modxParams as $param=>$value) { $p['mp.'.$param] = is_array($value) ? implode(',',$value) : $value; }; foreach($this->themeConfig as $param=>$arr) { if (isset($arr['force'])) $p['tc.' . $param] = $arr['force']; elseif (isset($arr['bridged'])) $p['tc.' . $param] = $arr['bridged']; else $p['tc.' . $param] = $arr['value']; }; - foreach($this->gSettingsDefaultValues as $param=>$value) { $p['gd.'.$param] = is_array($value) ? join(',',$value) : $value; }; + foreach($this->gSettingsDefaultValues as $param=>$value) { $p['gd.'.$param] = is_array($value) ? implode(',',$value) : $value; }; foreach($this->langArr as $param=>$value) { $p['l.'.$param] = $value; }; return $p; } @@ -821,14 +866,14 @@ public function parseEditableIds($source, $attrContentEditable=false) { if(!isset($_SESSION['mgrValidated'])) return $source; $attrContentEditable = $attrContentEditable == true ? ' contenteditable="true"' : ''; - + $matchPhs = '~\[\*#(.*?)\*\]~'; // match [*#content*] / content preg_match_all($matchPhs, $source, $editableIds); - + $this->setEditableIds($editableIds); - + $source = preg_replace($matchPhs, '
[*$1*]
', $source); - + return $source; } @@ -896,7 +941,7 @@ public function renderDebugMessages($placeholderArr) { if($this->debug) { $output .= "")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(p(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=o("meta","?>"),"meta"):(j=a.eat("/")?"closeTag":"openTag",b.tokenize=m,"tag bracket");if("&"==d){var e;return e=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),e?"atom":"error"}return a.eatWhile(/[^&<]/),null}function m(a,b){var c=a.next();if(">"==c||"/"==c&&a.eat(">"))return b.tokenize=l,j=">"==c?"endTag":"selfcloseTag","tag bracket";if("="==c)return j="equals",null;if("<"==c){b.tokenize=l,b.state=t,b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=n(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=m;break}return"string"};return b.isInAttribute=!0,b}function o(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=l;break}c.next()}return a}}function p(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=p(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=l;break}return c.tokenize=p(a-1),c.tokenize(b,c)}}return"meta"}}function q(a,b,c){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c,(g.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function r(a){a.context&&(a.context=a.context.prev)}function s(a,b){for(var c;;){if(!a.context)return;if(c=a.context.tagName,!g.contextGrabbers.hasOwnProperty(c)||!g.contextGrabbers[c].hasOwnProperty(b))return;r(a)}}function t(a,b,c){return"openTag"==a?(c.tagStart=b.column(),u):"closeTag"==a?v:t}function u(a,b,c){return"word"==a?(c.tagName=b.current(),k="tag",y):(k="error",u)}function v(a,b,c){if("word"==a){var d=b.current();return c.context&&c.context.tagName!=d&&g.implicitlyClosed.hasOwnProperty(c.context.tagName)&&r(c),c.context&&c.context.tagName==d||g.matchClosing===!1?(k="tag",w):(k="tag error",x)}return k="error",x}function w(a,b,c){return"endTag"!=a?(k="error",w):(r(c),t)}function x(a,b,c){return k="error",w(a,b,c)}function y(a,b,c){if("word"==a)return k="attribute",z;if("endTag"==a||"selfcloseTag"==a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,"selfcloseTag"==a||g.autoSelfClosers.hasOwnProperty(d)?s(c,d):(s(c,d),c.context=new q(c,d,e==c.indented)),t}return k="error",y}function z(a,b,c){return"equals"==a?A:(g.allowMissing||(k="error"),y(a,b,c))}function A(a,b,c){return"string"==a?B:"word"==a&&g.allowUnquoted?(k="string",y):(k="error",y(a,b,c))}function B(a,b,c){return"string"==a?B:y(a,b,c)}var f=d.indentUnit,g={},h=e.htmlMode?b:c;for(var i in h)g[i]=h[i];for(var i in e)g[i]=e[i];var j,k;return l.isInText=!0,{startState:function(a){var b={tokenize:l,state:t,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;j=null;var c=b.tokenize(a,b);return(c||j)&&"comment"!=c&&(k=null,b.state=b.state(j||c,a,b),k&&(c="error"==k?c+" error":k)),c},indent:function(b,c,d){var e=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+f;if(e&&e.noIndent)return a.Pass;if(b.tokenize!=m&&b.tokenize!=l)return d?d.match(/^(\s*)/)[0].length:0;if(b.tagName)return g.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+f*(g.multilineTagIndentFactor||1);if(g.alignCDATA&&/$/,blockCommentStart:"",configuration:g.htmlMode?"html":"xml",helperType:g.htmlMode?"html":"xml",skipAttribute:function(a){a.state==A&&(a.state=y)}}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})}); \ No newline at end of file +(function(mod){if(typeof exports=="object"&&typeof module=="object") +mod(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd) +define(["../../lib/codemirror"],mod);else +mod(CodeMirror);})(function(CodeMirror){"use strict";var htmlConfig={autoSelfClosers:{'area':true,'base':true,'br':true,'col':true,'command':true,'embed':true,'frame':true,'hr':true,'img':true,'input':true,'keygen':true,'link':true,'meta':true,'param':true,'source':true,'track':true,'wbr':true,'menuitem':true},implicitlyClosed:{'dd':true,'li':true,'optgroup':true,'option':true,'p':true,'rp':true,'rt':true,'tbody':true,'td':true,'tfoot':true,'th':true,'tr':true},contextGrabbers:{'dd':{'dd':true,'dt':true},'dt':{'dd':true,'dt':true},'li':{'li':true},'option':{'option':true,'optgroup':true},'optgroup':{'optgroup':true},'p':{'address':true,'article':true,'aside':true,'blockquote':true,'dir':true,'div':true,'dl':true,'fieldset':true,'footer':true,'form':true,'h1':true,'h2':true,'h3':true,'h4':true,'h5':true,'h6':true,'header':true,'hgroup':true,'hr':true,'menu':true,'nav':true,'ol':true,'p':true,'pre':true,'section':true,'table':true,'ul':true},'rp':{'rp':true,'rt':true},'rt':{'rp':true,'rt':true},'tbody':{'tbody':true,'tfoot':true},'td':{'td':true,'th':true},'tfoot':{'tbody':true},'th':{'td':true,'th':true},'thead':{'tbody':true,'tfoot':true},'tr':{'tr':true}},doNotIndent:{"pre":true},allowUnquoted:true,allowMissing:true,caseFold:true} +var xmlConfig={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,allowMissingTagName:false,caseFold:false} +CodeMirror.defineMode("xml",function(editorConf,config_){var indentUnit=editorConf.indentUnit +var config={} +var defaults=config_.htmlMode?htmlConfig:xmlConfig +for(var prop in defaults)config[prop]=defaults[prop] +for(var prop in config_)config[prop]=config_[prop] +var type,setStyle;function inText(stream,state){function chain(parser){state.tokenize=parser;return parser(stream,state);} +var ch=stream.next();if(ch=="<"){if(stream.eat("!")){if(stream.eat("[")){if(stream.match("CDATA["))return chain(inBlock("atom","]]>"));else return null;}else if(stream.match("--")){return chain(inBlock("comment","-->"));}else if(stream.match("DOCTYPE",true,true)){stream.eatWhile(/[\w\._\-]/);return chain(doctype(1));}else{return null;}}else if(stream.eat("?")){stream.eatWhile(/[\w\._\-]/);state.tokenize=inBlock("meta","?>");return"meta";}else{type=stream.eat("/")?"closeTag":"openTag";state.tokenize=inTag;return"tag bracket";}}else if(ch=="&"){var ok;if(stream.eat("#")){if(stream.eat("x")){ok=stream.eatWhile(/[a-fA-F\d]/)&&stream.eat(";");}else{ok=stream.eatWhile(/[\d]/)&&stream.eat(";");}}else{ok=stream.eatWhile(/[\w\.\-:]/)&&stream.eat(";");} +return ok?"atom":"error";}else{stream.eatWhile(/[^&<]/);return null;}} +inText.isInText=true;function inTag(stream,state){var ch=stream.next();if(ch==">"||(ch=="/"&&stream.eat(">"))){state.tokenize=inText;type=ch==">"?"endTag":"selfcloseTag";return"tag bracket";}else if(ch=="="){type="equals";return null;}else if(ch=="<"){state.tokenize=inText;state.state=baseState;state.tagName=state.tagStart=null;var next=state.tokenize(stream,state);return next?next+" tag error":"tag error";}else if(/[\'\"]/.test(ch)){state.tokenize=inAttribute(ch);state.stringStartCol=stream.column();return state.tokenize(stream,state);}else{stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word";}} +function inAttribute(quote){var closure=function(stream,state){while(!stream.eol()){if(stream.next()==quote){state.tokenize=inTag;break;}} +return"string";};closure.isInAttribute=true;return closure;} +function inBlock(style,terminator){return function(stream,state){while(!stream.eol()){if(stream.match(terminator)){state.tokenize=inText;break;} +stream.next();} +return style;};} +function doctype(depth){return function(stream,state){var ch;while((ch=stream.next())!=null){if(ch=="<"){state.tokenize=doctype(depth+1);return state.tokenize(stream,state);}else if(ch==">"){if(depth==1){state.tokenize=inText;break;}else{state.tokenize=doctype(depth-1);return state.tokenize(stream,state);}}} +return"meta";};} +function Context(state,tagName,startOfLine){this.prev=state.context;this.tagName=tagName;this.indent=state.indented;this.startOfLine=startOfLine;if(config.doNotIndent.hasOwnProperty(tagName)||(state.context&&state.context.noIndent)) +this.noIndent=true;} +function popContext(state){if(state.context)state.context=state.context.prev;} +function maybePopContext(state,nextTagName){var parentTagName;while(true){if(!state.context){return;} +parentTagName=state.context.tagName;if(!config.contextGrabbers.hasOwnProperty(parentTagName)||!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)){return;} +popContext(state);}} +function baseState(type,stream,state){if(type=="openTag"){state.tagStart=stream.column();return tagNameState;}else if(type=="closeTag"){return closeTagNameState;}else{return baseState;}} +function tagNameState(type,stream,state){if(type=="word"){state.tagName=stream.current();setStyle="tag";return attrState;}else if(config.allowMissingTagName&&type=="endTag"){setStyle="tag bracket";return attrState(type,stream,state);}else{setStyle="error";return tagNameState;}} +function closeTagNameState(type,stream,state){if(type=="word"){var tagName=stream.current();if(state.context&&state.context.tagName!=tagName&&config.implicitlyClosed.hasOwnProperty(state.context.tagName)) +popContext(state);if((state.context&&state.context.tagName==tagName)||config.matchClosing===false){setStyle="tag";return closeState;}else{setStyle="tag error";return closeStateErr;}}else if(config.allowMissingTagName&&type=="endTag"){setStyle="tag bracket";return closeState(type,stream,state);}else{setStyle="error";return closeStateErr;}} +function closeState(type,_stream,state){if(type!="endTag"){setStyle="error";return closeState;} +popContext(state);return baseState;} +function closeStateErr(type,stream,state){setStyle="error";return closeState(type,stream,state);} +function attrState(type,_stream,state){if(type=="word"){setStyle="attribute";return attrEqState;}else if(type=="endTag"||type=="selfcloseTag"){var tagName=state.tagName,tagStart=state.tagStart;state.tagName=state.tagStart=null;if(type=="selfcloseTag"||config.autoSelfClosers.hasOwnProperty(tagName)){maybePopContext(state,tagName);}else{maybePopContext(state,tagName);state.context=new Context(state,tagName,tagStart==state.indented);} +return baseState;} +setStyle="error";return attrState;} +function attrEqState(type,stream,state){if(type=="equals")return attrValueState;if(!config.allowMissing)setStyle="error";return attrState(type,stream,state);} +function attrValueState(type,stream,state){if(type=="string")return attrContinuedState;if(type=="word"&&config.allowUnquoted){setStyle="string";return attrState;} +setStyle="error";return attrState(type,stream,state);} +function attrContinuedState(type,stream,state){if(type=="string")return attrContinuedState;return attrState(type,stream,state);} +return{startState:function(baseIndent){var state={tokenize:inText,state:baseState,indented:baseIndent||0,tagName:null,tagStart:null,context:null} +if(baseIndent!=null)state.baseIndent=baseIndent +return state},token:function(stream,state){if(!state.tagName&&stream.sol()) +state.indented=stream.indentation();if(stream.eatSpace())return null;type=null;var style=state.tokenize(stream,state);if((style||type)&&style!="comment"){setStyle=null;state.state=state.state(type||style,stream,state);if(setStyle) +style=setStyle=="error"?style+" error":setStyle;} +return style;},indent:function(state,textAfter,fullLine){var context=state.context;if(state.tokenize.isInAttribute){if(state.tagStart==state.indented) +return state.stringStartCol+1;else +return state.indented+indentUnit;} +if(context&&context.noIndent)return CodeMirror.Pass;if(state.tokenize!=inTag&&state.tokenize!=inText) +return fullLine?fullLine.match(/^(\s*)/)[0].length:0;if(state.tagName){if(config.multilineTagIndentPastTag!==false) +return state.tagStart+state.tagName.length+2;else +return state.tagStart+indentUnit*(config.multilineTagIndentFactor||1);} +if(config.alignCDATA&&/$/,blockCommentStart:"",configuration:config.htmlMode?"html":"xml",helperType:config.htmlMode?"html":"xml",skipAttribute:function(state){if(state.state==attrValueState) +state.state=attrState}};});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")) +CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true});}); \ No newline at end of file diff --git a/assets/plugins/codemirror/cm/search-compressed.js b/assets/plugins/codemirror/cm/search-compressed.js index 30e3f0d198..9ccb241b87 100755 --- a/assets/plugins/codemirror/cm/search-compressed.js +++ b/assets/plugins/codemirror/cm/search-compressed.js @@ -1,11 +1,209 @@ -(function(){function l(){this.overlay=this.posFrom=this.posTo=this.query=null}function d(a){return a.state.search||(a.state.search=new l)}function j(a,b,j){return a.getSearchCursor(b,j,"string"==typeof b&&b==b.toLowerCase())}function b(a){var b=a.match(/^\/(.*)\/([a-z]*)$/);return b?RegExp(b[1],-1==b[2].indexOf("i")?"":"i"):a}function e(a,j){var c=d(a);if(c.query)return f(a,j);var g=function(g){a.operation(function(){if(g&&!c.query){c.query=b(g);a.removeOverlay(c.overlay);var h;var d=c.query;h="string"== -typeof d?{token:function(a){if(a.match(d))return"searching";a.next();a.skipTo(d.charAt(0))||a.skipToEnd()}}:{token:function(a){if(a.match(d))return"searching";for(;!a.eol()&&!(a.next(),a.match(d,!1)););}};c.overlay=h;a.addOverlay(c.overlay);c.posFrom=c.posTo=a.getCursor();f(a,j)}})};a.openDialog?a.openDialog(h,g):g(prompt("Search for:",""))}function f(a,b){a.operation(function(){var c=d(a),g=j(a,c.query,b?c.posFrom:c.posTo);if(!g.find(b)&&(g=j(a,c.query,b?CodeMirror.Pos(a.lastLine()):CodeMirror.Pos(a.firstLine(), -0)),!g.find(b)))return;a.setSelection(g.from(),g.to());c.posFrom=g.from();c.posTo=g.to()})}function k(a){a.operation(function(){var b=d(a);b.query&&(b.query=null,a.removeOverlay(b.overlay))})}function m(a,d){var h=function(c){if(c){c=b(c);var h=function(b){if(d)a.operation(function(){for(var h=j(a,c);h.findNext();)if("string"!=typeof c){var g=a.getRange(h.from(),h.to()).match(c);h.replace(b.replace(/\$(\d)/,function(a,b){return g[b]}))}else h.replace(b)});else{k(a);var h=j(a,c,a.getCursor()),e=function(){var d= -h.from(),f;if(!(f=h.findNext()))if(h=j(a,c),!(f=h.findNext())||d&&h.from().line==d.line&&h.from().ch==d.ch)return;a.setSelection(h.from(),h.to());d=[function(){var a=f;h.replace("string"==typeof c?b:b.replace(/\$(\d)/,function(b,c){return a[c]}));e()},e];if(a.openConfirm)a.openConfirm(g,d);else if(confirm("Replace?"))d[0]()};e()}};a.openDialog?a.openDialog(n,h):h(prompt("Replace with:",""))}};a.openDialog?a.openDialog(c,h):h(prompt("Replace:",""))}var h='Search: (Use /re/ syntax for regexp search)', -c='Replace: (Use /re/ syntax for regexp search)',n='With: ',g="Replace? ";CodeMirror.commands.find=function(a){k(a);e(a)};CodeMirror.commands.findNext=e;CodeMirror.commands.findPrev=function(a){e(a,!0)};CodeMirror.commands.clearSearch=k;CodeMirror.commands.replace=m;CodeMirror.commands.replaceAll=function(a){m(a,!0)}})();(function(){function l(j,b,e,f){this.atOccurrence=!1;this.doc=j;null==f&&"string"==typeof b&&(f=!1);e=e?j.clipPos(e):d(0,0);this.pos={from:e,to:e};if("string"!=typeof b)b.global||(b=RegExp(b.source,b.ignoreCase?"ig":"g")),this.matches=function(h,c){if(h){b.lastIndex=0;for(var e=j.getLine(c.line).slice(0,c.ch),g=0,a,f;;){b.lastIndex=g;g=b.exec(e);if(!g)break;a=g;f=a.index;g=a.index+(a[0].length||1);if(g==e.length)break}(g=a&&a[0].length||0)||(0==f&&0==e.length?a=void 0:f!=j.getLine(c.line).length&& -g++)}else b.lastIndex=c.ch,e=j.getLine(c.line),g=(a=b.exec(e))&&a[0].length||0,f=a&&a.index,f+g!=e.length&&!g&&(g=1);if(a&&g)return{from:d(c.line,f),to:d(c.line,f+g),match:a}};else{f&&(b=b.toLowerCase());var k=f?function(b){return b.toLowerCase()}:function(b){return b},m=b.split("\n");this.matches=1==m.length?b.length?function(h,c){var e=k(j.getLine(c.line)),g=b.length,a;if(h?c.ch>=g&&-1!=(a=e.lastIndexOf(b,c.ch-g)):-1!=(a=e.indexOf(b,c.ch)))return{from:d(c.line,a),to:d(c.line,a+g)}}:function(){}: -function(b,c){var e=c.line,g=b?m.length-1:0,a=m[g],f=k(j.getLine(e)),l=b?f.indexOf(a)+a.length:f.lastIndexOf(a);if(!(b?l>=c.ch||l!=a.length:l<=c.ch||l!=f.length-a.length))for(;!(b?!e:e==j.lineCount()-1);){f=k(j.getLine(e+=b?-1:1));a=m[b?--g:++g];if(0=h&&e()},200)});CodeMirror.on(c,"focus",function(){++h})}})})(); \ No newline at end of file +(function(mod){if(typeof exports=="object"&&typeof module=="object") +mod(require("../../lib/codemirror"),require("../dialog/dialog"));else if(typeof define=="function"&&define.amd) +define(["../../lib/codemirror","../dialog/dialog"],mod);else +mod(CodeMirror);})(function(CodeMirror){"use strict";function dialog(cm,text,shortText,deflt,f){if(cm.openDialog)cm.openDialog(text,f,{value:deflt,selectValueOnOpen:true});else f(prompt(shortText,deflt));} +var jumpDialog='Jump to line: (Use line:column or scroll% syntax)';function interpretLine(cm,string){var num=Number(string) +if(/^[-+]/.test(string))return cm.getCursor().line+num +else return num-1} +CodeMirror.commands.jumpToLine=function(cm){var cur=cm.getCursor();dialog(cm,jumpDialog,"Jump to line:",(cur.line+1)+":"+cur.ch,function(posStr){if(!posStr)return;var match;if(match=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr)){cm.setCursor(interpretLine(cm,match[1]),Number(match[2]))}else if(match=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)){var line=Math.round(cm.lineCount()*Number(match[1])/ 100);if(/^[-+]/.test(match[1]))line=cur.line+line+1;cm.setCursor(line-1,cur.ch);}else if(match=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr)){cm.setCursor(interpretLine(cm,match[1]),cur.ch);}});};CodeMirror.keyMap["default"]["Alt-G"]="jumpToLine";});(function(mod){if(typeof exports=="object"&&typeof module=="object") +mod(require("../../lib/codemirror"),require("./matchesonscrollbar"));else if(typeof define=="function"&&define.amd) +define(["../../lib/codemirror","./matchesonscrollbar"],mod);else +mod(CodeMirror);})(function(CodeMirror){"use strict";var defaults={style:"matchhighlight",minChars:2,delay:100,wordsOnly:false,annotateScrollbar:false,showToken:false,trim:true} +function State(options){this.options={} +for(var name in defaults) +this.options[name]=(options&&options.hasOwnProperty(name)?options:defaults)[name] +this.overlay=this.timeout=null;this.matchesonscroll=null;this.active=false;} +CodeMirror.defineOption("highlightSelectionMatches",false,function(cm,val,old){if(old&&old!=CodeMirror.Init){removeOverlay(cm);clearTimeout(cm.state.matchHighlighter.timeout);cm.state.matchHighlighter=null;cm.off("cursorActivity",cursorActivity);cm.off("focus",onFocus)} +if(val){var state=cm.state.matchHighlighter=new State(val);if(cm.hasFocus()){state.active=true +highlightMatches(cm)}else{cm.on("focus",onFocus)} +cm.on("cursorActivity",cursorActivity);}});function cursorActivity(cm){var state=cm.state.matchHighlighter;if(state.active||cm.hasFocus())scheduleHighlight(cm,state)} +function onFocus(cm){var state=cm.state.matchHighlighter +if(!state.active){state.active=true +scheduleHighlight(cm,state)}} +function scheduleHighlight(cm,state){clearTimeout(state.timeout);state.timeout=setTimeout(function(){highlightMatches(cm);},state.options.delay);} +function addOverlay(cm,query,hasBoundary,style){var state=cm.state.matchHighlighter;cm.addOverlay(state.overlay=makeOverlay(query,hasBoundary,style));if(state.options.annotateScrollbar&&cm.showMatchesOnScrollbar){var searchFor=hasBoundary?new RegExp("\\b"+query+"\\b"):query;state.matchesonscroll=cm.showMatchesOnScrollbar(searchFor,false,{className:"CodeMirror-selection-highlight-scrollbar"});}} +function removeOverlay(cm){var state=cm.state.matchHighlighter;if(state.overlay){cm.removeOverlay(state.overlay);state.overlay=null;if(state.matchesonscroll){state.matchesonscroll.clear();state.matchesonscroll=null;}}} +function highlightMatches(cm){cm.operation(function(){var state=cm.state.matchHighlighter;removeOverlay(cm);if(!cm.somethingSelected()&&state.options.showToken){var re=state.options.showToken===true?/[\w$]/:state.options.showToken;var cur=cm.getCursor(),line=cm.getLine(cur.line),start=cur.ch,end=start;while(start&&re.test(line.charAt(start-1)))--start;while(end=state.options.minChars) +addOverlay(cm,selection,false,state.options.style);});} +function isWord(cm,from,to){var str=cm.getRange(from,to);if(str.match(/^\w+$/)!==null){if(from.ch>0){var pos={line:from.line,ch:from.ch-1};var chr=cm.getRange(pos,from);if(chr.match(/\W/)===null)return false;} +if(to.ch=this.gap.to)break;if(match.to.line>=this.gap.from)this.matches.splice(i--,1);} +var cursor=this.cm.getSearchCursor(this.query,CodeMirror.Pos(this.gap.from,0),this.caseFold);var maxMatches=this.options&&this.options.maxMatches||MAX_MATCHES;while(cursor.findNext()){var match={from:cursor.from(),to:cursor.to()};if(match.from.line>=this.gap.to)break;this.matches.splice(i++,0,match);if(this.matches.length>maxMatches)break;} +this.gap=null;};function offsetLine(line,changeStart,sizeChange){if(line<=changeStart)return line;return Math.max(changeStart,line+sizeChange);} +SearchAnnotation.prototype.onChange=function(change){var startLine=change.from.line;var endLine=CodeMirror.changeEnd(change).line;var sizeChange=endLine-change.to.line;if(this.gap){this.gap.from=Math.min(offsetLine(this.gap.from,startLine,sizeChange),change.from.line);this.gap.to=Math.max(offsetLine(this.gap.to,startLine,sizeChange),change.from.line);}else{this.gap={from:change.from.line,to:endLine+1};} +if(sizeChange)for(var i=0;icm.cursorCoords(to,"window").top) +(hiding=dialog).style.opacity=.4})};persistentDialog(cm,queryDialog,q,searchNext,function(event,query){var keyName=CodeMirror.keyName(event) +var extra=cm.getOption('extraKeys'),cmd=(extra&&extra[keyName])||CodeMirror.keyMap[cm.getOption("keyMap")][keyName] +if(cmd=="findNext"||cmd=="findPrev"||cmd=="findPersistentNext"||cmd=="findPersistentPrev"){CodeMirror.e_stop(event);startSearch(cm,getSearchState(cm),query);cm.execCommand(cmd);}else if(cmd=="find"||cmd=="findPersistent"){CodeMirror.e_stop(event);searchNext(query,event);}});if(immediate&&q){startSearch(cm,state,q);findNext(cm,rev);}}else{dialog(cm,queryDialog,"Search for:",q,function(query){if(query&&!state.query)cm.operation(function(){startSearch(cm,state,query);state.posFrom=state.posTo=cm.getCursor();findNext(cm,rev);});});}} +function findNext(cm,rev,callback){cm.operation(function(){var state=getSearchState(cm);var cursor=getSearchCursor(cm,state.query,rev?state.posFrom:state.posTo);if(!cursor.find(rev)){cursor=getSearchCursor(cm,state.query,rev?CodeMirror.Pos(cm.lastLine()):CodeMirror.Pos(cm.firstLine(),0));if(!cursor.find(rev))return;} +cm.setSelection(cursor.from(),cursor.to());cm.scrollIntoView({from:cursor.from(),to:cursor.to()},20);state.posFrom=cursor.from();state.posTo=cursor.to();if(callback)callback(cursor.from(),cursor.to())});} +function clearSearch(cm){cm.operation(function(){var state=getSearchState(cm);state.lastQuery=state.query;if(!state.query)return;state.query=state.queryText=null;cm.removeOverlay(state.overlay);if(state.annotate){state.annotate.clear();state.annotate=null;}});} +var replaceQueryDialog=' (Use /re/ syntax for regexp search)';var replacementQueryDialog='With: ';var doReplaceConfirm='Replace? ';function replaceAll(cm,query,text){cm.operation(function(){for(var cursor=getSearchCursor(cm,query);cursor.findNext();){if(typeof query!="string"){var match=cm.getRange(cursor.from(),cursor.to()).match(query);cursor.replace(text.replace(/\$(\d)/g,function(_,i){return match[i];}));}else cursor.replace(text);}});} +function replace(cm,all){if(cm.getOption("readOnly"))return;var query=cm.getSelection()||getSearchState(cm).lastQuery;var dialogText=''+(all?'Replace all:':'Replace:')+'';dialog(cm,dialogText+replaceQueryDialog,dialogText,query,function(query){if(!query)return;query=parseQuery(query);dialog(cm,replacementQueryDialog,"Replace with:","",function(text){text=parseString(text) +if(all){replaceAll(cm,query,text)}else{clearSearch(cm);var cursor=getSearchCursor(cm,query,cm.getCursor("from"));var advance=function(){var start=cursor.from(),match;if(!(match=cursor.findNext())){cursor=getSearchCursor(cm,query);if(!(match=cursor.findNext())||(start&&cursor.from().line==start.line&&cursor.from().ch==start.ch))return;} +cm.setSelection(cursor.from(),cursor.to());cm.scrollIntoView({from:cursor.from(),to:cursor.to()});confirmDialog(cm,doReplaceConfirm,"Replace?",[function(){doReplace(match);},advance,function(){replaceAll(cm,query,text)}]);};var doReplace=function(match){cursor.replace(typeof query=="string"?text:text.replace(/\$(\d)/g,function(_,i){return match[i];}));advance();};advance();}});});} +CodeMirror.commands.find=function(cm){clearSearch(cm);doSearch(cm);};CodeMirror.commands.findPersistent=function(cm){clearSearch(cm);doSearch(cm,false,true);};CodeMirror.commands.findPersistentNext=function(cm){doSearch(cm,false,true,true);};CodeMirror.commands.findPersistentPrev=function(cm){doSearch(cm,true,true,true);};CodeMirror.commands.findNext=doSearch;CodeMirror.commands.findPrev=function(cm){doSearch(cm,true);};CodeMirror.commands.clearSearch=clearSearch;CodeMirror.commands.replace=replace;CodeMirror.commands.replaceAll=function(cm){replace(cm,true);};});(function(mod){if(typeof exports=="object"&&typeof module=="object") +mod(require("../../lib/codemirror")) +else if(typeof define=="function"&&define.amd) +define(["../../lib/codemirror"],mod) +else +mod(CodeMirror)})(function(CodeMirror){"use strict" +var Pos=CodeMirror.Pos +function regexpFlags(regexp){var flags=regexp.flags +return flags!=null?flags:(regexp.ignoreCase?"i":"") ++(regexp.global?"g":"") ++(regexp.multiline?"m":"")} +function ensureGlobal(regexp){return regexp.global?regexp:new RegExp(regexp.source,regexpFlags(regexp)+"g")} +function maybeMultiline(regexp){return /\\s|\\n|\n|\\W|\\D|\[\^/.test(regexp.source)} +function searchRegexpForward(doc,regexp,start){regexp=ensureGlobal(regexp) +for(var line=start.line,ch=start.ch,last=doc.lastLine();line<=last;line++,ch=0){regexp.lastIndex=ch +var string=doc.getLine(line),match=regexp.exec(string) +if(match) +return{from:Pos(line,match.index),to:Pos(line,match.index+match[0].length),match:match}}} +function searchRegexpForwardMultiline(doc,regexp,start){if(!maybeMultiline(regexp))return searchRegexpForward(doc,regexp,start) +regexp=ensureGlobal(regexp) +var string,chunk=1 +for(var line=start.line,last=doc.lastLine();line<=last;){for(var i=0;i=first;line--,ch=-1){var string=doc.getLine(line) +if(ch>-1)string=string.slice(0,ch) +var match=lastMatchIn(string,regexp) +if(match) +return{from:Pos(line,match.index),to:Pos(line,match.index+match[0].length),match:match}}} +function searchRegexpBackwardMultiline(doc,regexp,start){regexp=ensureGlobal(regexp) +var string,chunk=1 +for(var line=start.line,first=doc.firstLine();line>=first;){for(var i=0;i>1 +var len=foldFunc(orig.slice(0,mid)).length +if(len==pos)return mid +else if(len>pos)max=mid +else min=mid+1}} +function searchStringForward(doc,query,start,caseFold){if(!query.length)return null +var fold=caseFold?doFold:noFold +var lines=fold(query).split(/\r|\n\r?/) +search:for(var line=start.line,ch=start.ch,last=doc.lastLine()+1-lines.length;line<=last;line++,ch=0){var orig=doc.getLine(line).slice(ch),string=fold(orig) +if(lines.length==1){var found=string.indexOf(lines[0]) +if(found==-1)continue search +var start=adjustPos(orig,string,found,fold)+ch +return{from:Pos(line,adjustPos(orig,string,found,fold)+ch),to:Pos(line,adjustPos(orig,string,found+lines[0].length,fold)+ch)}}else{var cutFrom=string.length-lines[0].length +if(string.slice(cutFrom)!=lines[0])continue search +for(var i=1;i=first;line--,ch=-1){var orig=doc.getLine(line) +if(ch>-1)orig=orig.slice(0,ch) +var string=fold(orig) +if(lines.length==1){var found=string.lastIndexOf(lines[0]) +if(found==-1)continue search +return{from:Pos(line,adjustPos(orig,string,found,fold)),to:Pos(line,adjustPos(orig,string,found+lines[0].length,fold))}}else{var lastLine=lines[lines.length-1] +if(string.slice(0,lastLine.length)!=lastLine)continue search +for(var i=1,start=line-lines.length+1;i0)break +ranges.push({anchor:cur.from(),head:cur.to()})} +if(ranges.length) +this.setSelections(ranges,0)})}); \ No newline at end of file diff --git a/assets/plugins/codemirror/cm/theme/ambiance.css b/assets/plugins/codemirror/cm/theme/ambiance.css index bce3446494..782fca43f5 100755 --- a/assets/plugins/codemirror/cm/theme/ambiance.css +++ b/assets/plugins/codemirror/cm/theme/ambiance.css @@ -11,7 +11,7 @@ .cm-s-ambiance .cm-def { color: #aac6e3; } .cm-s-ambiance .cm-variable { color: #ffb795; } .cm-s-ambiance .cm-variable-2 { color: #eed1b3; } -.cm-s-ambiance .cm-variable-3 { color: #faded3; } +.cm-s-ambiance .cm-variable-3, .cm-s-ambiance .cm-type { color: #faded3; } .cm-s-ambiance .cm-property { color: #eed1b3; } .cm-s-ambiance .cm-operator { color: #fa8d6a; } .cm-s-ambiance .cm-comment { color: #555; font-style:italic; } diff --git a/assets/plugins/codemirror/cm/theme/cobalt.css b/assets/plugins/codemirror/cm/theme/cobalt.css index d88223ed80..bbbda3b543 100755 --- a/assets/plugins/codemirror/cm/theme/cobalt.css +++ b/assets/plugins/codemirror/cm/theme/cobalt.css @@ -15,7 +15,7 @@ .cm-s-cobalt span.cm-string { color: #3ad900; } .cm-s-cobalt span.cm-meta { color: #ff9d00; } .cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } -.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; } +.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def, .cm-s-cobalt .cm-type { color: white; } .cm-s-cobalt span.cm-bracket { color: #d8d8d8; } .cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } .cm-s-cobalt span.cm-link { color: #845dc4; } diff --git a/assets/plugins/codemirror/cm/theme/eclipse.css b/assets/plugins/codemirror/cm/theme/eclipse.css index 1bde460e90..800d603f6d 100755 --- a/assets/plugins/codemirror/cm/theme/eclipse.css +++ b/assets/plugins/codemirror/cm/theme/eclipse.css @@ -5,7 +5,7 @@ .cm-s-eclipse span.cm-def { color: #00f; } .cm-s-eclipse span.cm-variable { color: black; } .cm-s-eclipse span.cm-variable-2 { color: #0000C0; } -.cm-s-eclipse span.cm-variable-3 { color: #0000C0; } +.cm-s-eclipse span.cm-variable-3, .cm-s-eclipse span.cm-type { color: #0000C0; } .cm-s-eclipse span.cm-property { color: black; } .cm-s-eclipse span.cm-operator { color: black; } .cm-s-eclipse span.cm-comment { color: #3F7F5F; } diff --git a/assets/plugins/codemirror/cm/theme/erlang-dark.css b/assets/plugins/codemirror/cm/theme/erlang-dark.css index 65fe4814c1..8c8a4171a6 100755 --- a/assets/plugins/codemirror/cm/theme/erlang-dark.css +++ b/assets/plugins/codemirror/cm/theme/erlang-dark.css @@ -27,7 +27,7 @@ .cm-s-erlang-dark span.cm-tag { color: #9effff; } .cm-s-erlang-dark span.cm-variable { color: #50fe50; } .cm-s-erlang-dark span.cm-variable-2 { color: #e0e; } -.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; } +.cm-s-erlang-dark span.cm-variable-3, .cm-s-erlang-dark span.cm-type { color: #ccc; } .cm-s-erlang-dark span.cm-error { color: #9d1e15; } .cm-s-erlang-dark .CodeMirror-activeline-background { background: #013461; } diff --git a/assets/plugins/codemirror/cm/theme/index.html b/assets/plugins/codemirror/cm/theme/index.html new file mode 100644 index 0000000000..cfb7d0fe18 --- /dev/null +++ b/assets/plugins/codemirror/cm/theme/index.html @@ -0,0 +1,2 @@ +

Unauthorized access

+You're not allowed to access file folder \ No newline at end of file diff --git a/assets/plugins/codemirror/cm/theme/lesser-dark.css b/assets/plugins/codemirror/cm/theme/lesser-dark.css index 690c183d7b..b2ec418fdb 100755 --- a/assets/plugins/codemirror/cm/theme/lesser-dark.css +++ b/assets/plugins/codemirror/cm/theme/lesser-dark.css @@ -27,7 +27,7 @@ Ported to CodeMirror by Peter Kroon .cm-s-lesser-dark span.cm-def { color: white; } .cm-s-lesser-dark span.cm-variable { color:#D9BF8C; } .cm-s-lesser-dark span.cm-variable-2 { color: #669199; } -.cm-s-lesser-dark span.cm-variable-3 { color: white; } +.cm-s-lesser-dark span.cm-variable-3, .cm-s-lesser-dark span.cm-type { color: white; } .cm-s-lesser-dark span.cm-property { color: #92A75C; } .cm-s-lesser-dark span.cm-operator { color: #92A75C; } .cm-s-lesser-dark span.cm-comment { color: #666; } diff --git a/assets/plugins/codemirror/cm/theme/midnight.css b/assets/plugins/codemirror/cm/theme/midnight.css index e41f10560f..17ed39c8bc 100755 --- a/assets/plugins/codemirror/cm/theme/midnight.css +++ b/assets/plugins/codemirror/cm/theme/midnight.css @@ -12,8 +12,6 @@ color: #D1EDFF; } -.cm-s-midnight.CodeMirror { border-top: 1px solid black; border-bottom: 1px solid black; } - .cm-s-midnight div.CodeMirror-selected { background: #314D67; } .cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); } .cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); } diff --git a/assets/plugins/codemirror/cm/theme/monokai.css b/assets/plugins/codemirror/cm/theme/monokai.css index 7c8a4c5d00..b5edd13fe6 100755 --- a/assets/plugins/codemirror/cm/theme/monokai.css +++ b/assets/plugins/codemirror/cm/theme/monokai.css @@ -21,7 +21,7 @@ .cm-s-monokai span.cm-variable { color: #f8f8f2; } .cm-s-monokai span.cm-variable-2 { color: #9effff; } -.cm-s-monokai span.cm-variable-3 { color: #66d9ef; } +.cm-s-monokai span.cm-variable-3, .cm-s-monokai span.cm-type { color: #66d9ef; } .cm-s-monokai span.cm-def { color: #fd971f; } .cm-s-monokai span.cm-bracket { color: #f8f8f2; } .cm-s-monokai span.cm-tag { color: #f92672; } diff --git a/assets/plugins/codemirror/cm/theme/night.css b/assets/plugins/codemirror/cm/theme/night.css index 4dbb86624a..f631bf42c7 100755 --- a/assets/plugins/codemirror/cm/theme/night.css +++ b/assets/plugins/codemirror/cm/theme/night.css @@ -10,16 +10,15 @@ .cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } .cm-s-night .CodeMirror-cursor { border-left: 1px solid white; } -.cm-s-night span.cm-comment { color: #6900a1; } +.cm-s-night span.cm-comment { color: #8900d1; } .cm-s-night span.cm-atom { color: #845dc4; } .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } .cm-s-night span.cm-keyword { color: #599eff; } .cm-s-night span.cm-string { color: #37f14a; } .cm-s-night span.cm-meta { color: #7678e2; } .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } -.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } +.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def, .cm-s-night span.cm-type { color: white; } .cm-s-night span.cm-bracket { color: #8da6ce; } -.cm-s-night span.cm-comment { color: #6900a1; } .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } .cm-s-night span.cm-link { color: #845dc4; } .cm-s-night span.cm-error { color: #9d1e15; } diff --git a/assets/plugins/codemirror/cm/theme/rubyblue.css b/assets/plugins/codemirror/cm/theme/rubyblue.css index 76d33e7798..1f181b06ec 100755 --- a/assets/plugins/codemirror/cm/theme/rubyblue.css +++ b/assets/plugins/codemirror/cm/theme/rubyblue.css @@ -15,7 +15,7 @@ .cm-s-rubyblue span.cm-string { color: #F08047; } .cm-s-rubyblue span.cm-meta { color: #F0F; } .cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } -.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; } +.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def, .cm-s-rubyblue span.cm-type { color: white; } .cm-s-rubyblue span.cm-bracket { color: #F0F; } .cm-s-rubyblue span.cm-link { color: #F4C20B; } .cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } diff --git a/assets/plugins/codemirror/cm/theme/solarized.css b/assets/plugins/codemirror/cm/theme/solarized.css index 7882c93763..fcd1d70de6 100755 --- a/assets/plugins/codemirror/cm/theme/solarized.css +++ b/assets/plugins/codemirror/cm/theme/solarized.css @@ -4,7 +4,7 @@ http://ethanschoonover.com/solarized */ /* -Solarized color pallet +Solarized color palette http://ethanschoonover.com/solarized/img/solarized-palette.png */ @@ -34,7 +34,7 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png } .cm-s-solarized.cm-s-dark { color: #839496; - background-color: #002b36; + background-color: #002b36; text-shadow: #002b36 0 1px; } .cm-s-solarized.cm-s-light { @@ -57,7 +57,7 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png .cm-s-solarized .cm-variable { color: #839496; } .cm-s-solarized .cm-variable-2 { color: #b58900; } -.cm-s-solarized .cm-variable-3 { color: #6c71c4; } +.cm-s-solarized .cm-variable-3, .cm-s-solarized .cm-type { color: #6c71c4; } .cm-s-solarized .cm-property { color: #2aa198; } .cm-s-solarized .cm-operator { color: #6c71c4; } @@ -87,7 +87,6 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png text-decoration: underline; text-decoration-style: dotted; } -.cm-s-solarized .cm-strong { color: #eee; } .cm-s-solarized .cm-error, .cm-s-solarized .cm-invalidchar { color: #586e75; @@ -113,32 +112,34 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png box-shadow: inset 7px 0 12px -6px #000; } -/* Gutter border and some shadow from it */ +/* Remove gutter border */ .cm-s-solarized .CodeMirror-gutters { - border-right: 1px solid; + border-right: 0; } /* Gutter colors and line number styling based of color scheme (dark / light) */ /* Dark */ .cm-s-solarized.cm-s-dark .CodeMirror-gutters { - background-color: #002b36; - border-color: #00232c; + background-color: #073642; } .cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: #586e75; text-shadow: #021014 0 -1px; } /* Light */ .cm-s-solarized.cm-s-light .CodeMirror-gutters { - background-color: #fdf6e3; - border-color: #eee8d5; + background-color: #eee8d5; +} + +.cm-s-solarized.cm-s-light .CodeMirror-linenumber { + color: #839496; } /* Common */ .cm-s-solarized .CodeMirror-linenumber { - color: #586e75; padding: 0 5px; } .cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; } @@ -149,15 +150,19 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png color: #586e75; } +/* Cursor */ .cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; } -/* -Active line. Negative margin compensates left padding of the text in the -view-port -*/ +/* Fat cursor */ +.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #77ee77; } +.cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #77ee77; } +.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; } +.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; } + +/* Active line */ .cm-s-solarized.cm-s-dark .CodeMirror-activeline-background { - background: rgba(255, 255, 255, 0.10); + background: rgba(255, 255, 255, 0.06); } .cm-s-solarized.cm-s-light .CodeMirror-activeline-background { - background: rgba(0, 0, 0, 0.10); + background: rgba(0, 0, 0, 0.06); } diff --git a/assets/plugins/codemirror/cm/theme/twilight.css b/assets/plugins/codemirror/cm/theme/twilight.css index d342b899f6..b2b1b2aa93 100755 --- a/assets/plugins/codemirror/cm/theme/twilight.css +++ b/assets/plugins/codemirror/cm/theme/twilight.css @@ -14,7 +14,7 @@ .cm-s-twilight .cm-number { color: #ca7841; } /**/ .cm-s-twilight .cm-def { color: #8DA6CE; } .cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ -.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/ +.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def, .cm-s-twilight span.cm-type { color: #607392; } /**/ .cm-s-twilight .cm-operator { color: #cda869; } /**/ .cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ .cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ diff --git a/assets/plugins/codemirror/cm/theme/vibrant-ink.css b/assets/plugins/codemirror/cm/theme/vibrant-ink.css index ac4ec6d87a..b13ecf2164 100755 --- a/assets/plugins/codemirror/cm/theme/vibrant-ink.css +++ b/assets/plugins/codemirror/cm/theme/vibrant-ink.css @@ -16,7 +16,7 @@ .cm-s-vibrant-ink .cm-number { color: #FFEE98; } .cm-s-vibrant-ink .cm-def { color: #8DA6CE; } .cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D; } -.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D; } +.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def, .cm-s-vibrant span.cm-type { color: #FFC66D; } .cm-s-vibrant-ink .cm-operator { color: #888; } .cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } .cm-s-vibrant-ink .cm-string { color: #A5C25C; } diff --git a/assets/plugins/codemirror/cm/theme/xq-dark.css b/assets/plugins/codemirror/cm/theme/xq-dark.css index e3bd960bbb..7da1a0f705 100755 --- a/assets/plugins/codemirror/cm/theme/xq-dark.css +++ b/assets/plugins/codemirror/cm/theme/xq-dark.css @@ -36,7 +36,7 @@ THE SOFTWARE. .cm-s-xq-dark span.cm-def { color: #FFF; text-decoration:underline; } .cm-s-xq-dark span.cm-variable { color: #FFF; } .cm-s-xq-dark span.cm-variable-2 { color: #EEE; } -.cm-s-xq-dark span.cm-variable-3 { color: #DDD; } +.cm-s-xq-dark span.cm-variable-3, .cm-s-xq-dark span.cm-type { color: #DDD; } .cm-s-xq-dark span.cm-property {} .cm-s-xq-dark span.cm-operator {} .cm-s-xq-dark span.cm-comment { color: gray; } diff --git a/assets/plugins/codemirror/cm/theme/xq-light.css b/assets/plugins/codemirror/cm/theme/xq-light.css index 8d2fcb667b..7b182ea997 100755 --- a/assets/plugins/codemirror/cm/theme/xq-light.css +++ b/assets/plugins/codemirror/cm/theme/xq-light.css @@ -26,7 +26,7 @@ THE SOFTWARE. .cm-s-xq-light span.cm-def { text-decoration:underline; } .cm-s-xq-light span.cm-variable { color: black; } .cm-s-xq-light span.cm-variable-2 { color:black; } -.cm-s-xq-light span.cm-variable-3 { color: black; } +.cm-s-xq-light span.cm-variable-3, .cm-s-xq-light span.cm-type { color: black; } .cm-s-xq-light span.cm-property {} .cm-s-xq-light span.cm-operator {} .cm-s-xq-light span.cm-comment { color: #0080FF; font-style: italic; } diff --git a/assets/plugins/codemirror/codemirror.plugin.php b/assets/plugins/codemirror/codemirror.plugin.php index 4f36ccfd79..e8b981b250 100755 --- a/assets/plugins/codemirror/codemirror.plugin.php +++ b/assets/plugins/codemirror/codemirror.plugin.php @@ -149,11 +149,11 @@ define('INIT_CODEMIRROR', 1); $output = <<< HEREDOC + - @@ -162,7 +162,8 @@ {$emmet}{$search} - + + ':i=g.settings.video_template_callback?g.settings.video_template_callback(j):'"}return i};return{dataToHtml:g}}),g("l",["8"],function(a){return a("tinymce.util.Promise")}),g("i",["k","l"],function(a,b){var c=function(a,c,d){var e={};return new b(function(b,f){var g=function(d){return d.html&&(e[a.source1]=d),b({url:a.source1,html:d.html?d.html:c(a)})};e[a.source1]?g(e[a.source1]):d({url:a.source1},g,f)})},d=function(a,c){return new b(function(b){b({html:c(a),url:a.source1})})},e=function(b){return function(c){return a.dataToHtml(b,c)}},f=function(a,b){var f=a.settings.media_url_resolver;return f?c(b,e(a),f):d(b,e(a))};return{getEmbedHtml:f}}),g("j",[],function(){var a=function(a,b){a.state.set("oldVal",a.value()),b.state.set("oldVal",b.value())},b=function(a,b){var c=a.find("#width")[0],d=a.find("#height")[0],e=a.find("#constrain")[0];c&&d&&e&&b(c,d,e.checked())},c=function(b,c,d){var e=b.state.get("oldVal"),f=c.state.get("oldVal"),g=b.value(),h=c.value();d&&e&&f&&g&&h&&(g!==e?(h=Math.round(g/e*h),isNaN(h)||c.value(h)):(g=Math.round(h/f*g),isNaN(g)||b.value(g))),a(b,c)},d=function(c){b(c,a)},e=function(a){b(a,c)},f=function(a){var b=function(){a(function(a){e(a)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}};return{createUi:f,syncSize:d,updateSize:e}}),g("7",["g","h","6","i","f","3","d","j"],function(a,b,c,d,e,f,g,h){var i=g.ie&&g.ie<=8?"onChange":"onInput",j=function(a){return function(b){var c=b&&b.msg?"Media embed handler error: "+b.msg:"Media embed handler threw unknown error.";a.notificationManager.open({type:"error",text:c})}},k=function(a){var c=a.selection.getNode(),d=c.getAttribute("data-ephox-embed-iri");return d?{source1:d,"data-ephox-embed-iri":d,width:e.getMaxWidth(c),height:e.getMaxHeight(c)}:c.getAttribute("data-mce-object")?b.htmlToData(a.settings.media_scripts,a.serializer.serialize(c,{selection:!0})):{}},l=function(a){var b=a.selection.getNode();if(b.getAttribute("data-mce-object")||b.getAttribute("data-ephox-embed-iri"))return a.selection.getContent()},m=function(a,c){return function(d){var e=d.html,g=a.find("#embed")[0],i=f.extend(b.htmlToData(c.settings.media_scripts,e),{source1:d.url});a.fromJSON(i),g&&(g.value(e),h.updateSize(a))}},n=function(a,b){var c,d,e=a.dom.select("img[data-mce-object]");for(c=0;c=0;d--)b[c]===e[d]&&e.splice(d,1);a.selection.select(e[0])},o=function(a,b){var c=a.dom.select("img[data-mce-object]");a.insertContent(b),n(a,c),a.nodeChanged()},p=function(a,b){var e=a.toJSON();e.embed=c.updateHtml(e.embed,e),e.embed?o(b,e.embed):d.getEmbedHtml(b,e).then(function(a){o(b,a.html)})["catch"](j(b))},q=function(a,b){f.each(b,function(b,c){a.find("#"+c).value(b)})},r=function(a){var e,g,n=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){d.getEmbedHtml(a,e.toJSON()).then(m(e,a))["catch"](j(a))},1)},onchange:function(b){d.getEmbedHtml(a,e.toJSON()).then(m(e,a))["catch"](j(a)),q(e,b.meta)},onbeforecall:function(a){a.meta=e.toJSON()}}],o=[],r=function(a){a(e),g=e.toJSON(),e.find("#embed").value(c.updateHtml(g.embed,g))};if(a.settings.media_alt_source!==!1&&o.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),a.settings.media_poster!==!1&&o.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),a.settings.media_dimensions!==!1){var s=h.createUi(r);n.push(s)}g=k(a);var t={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:l(a),multiline:!0,rows:5,label:"Source"},u=function(){g=f.extend({},b.htmlToData(a.settings.media_scripts,this.value())),this.parent().parent().fromJSON(g)};t[i]=u,e=a.windowManager.open({title:"Insert/edit media",data:g,bodyType:"tabpanel",body:[{title:"General",type:"form",items:n},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},t]},{title:"Advanced",type:"form",items:o}],onSubmit:function(){h.updateSize(e),p(e,a)}}),h.syncSize(e)};return{showDialog:r}}),g("0",["1","2","3","4","5","6","7"],function(a,b,c,d,e,f,g){var h=function(b){b.on("ResolveName",function(a){var b;1===a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),b.on("preInit",function(){var f=b.schema.getSpecialElements();c.each("video audio iframe object".split(" "),function(a){f[a]=new RegExp("]*>","gi")});var g=b.schema.getBoolAttrs();c.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){g[a]={}}),b.parser.addNodeFilter("iframe,video,audio,object,embed,script",d.placeHolderConverter(b)),b.serializer.addAttributeFilter("data-mce-object",function(c,d){for(var f,g,h,i,j,k,l,m,n=c.length;n--;)if(f=c[n],f.parent){for(l=f.attr(d),g=new a(l,1),"audio"!==l&&"script"!==l&&(m=f.attr("class"),m&&m.indexOf("mce-preview-object")!==-1?g.attr({width:f.firstChild.attr("width"),height:f.firstChild.attr("height")}):g.attr({width:f.attr("width"),height:f.attr("height")})),g.attr({style:f.attr("style")}),i=f.attributes,h=i.length;h--;){var o=i[h].name;0===o.indexOf("data-mce-p-")&&g.attr(o.substr(11),i[h].value)}"script"===l&&g.attr("type","text/javascript"),j=f.attr("data-mce-html"),j&&(k=new a("#text",3),k.raw=!0,k.value=e.sanitize(b,unescape(j)),g.append(k)),f.replace(g)}})}),b.on("click keyup",function(){var a=b.selection.getNode();a&&b.dom.hasClass(a,"mce-preview-object")&&b.dom.getAttrib(a,"data-mce-selected")&&a.setAttribute("data-mce-selected","2")}),b.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!==b&&"script"!==b||a.preventDefault()}),b.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(f.updateHtml(b,{width:a.width,height:a.height})))))}),this.showDialog=function(){g.showDialog(b)},b.addButton("media",{tooltip:"Insert/edit media",onclick:this.showDialog,stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),b.addMenuItem("media",{icon:"media",text:"Media",onclick:this.showDialog,context:"insert",prependToContext:!0}),b.on("setContent",function(){b.$("span.mce-preview-object").each(function(a,c){var d=b.$(c);0===d.find("span.mce-shim",c).length&&d.append('')})}),b.addCommand("mceMedia",this.showDialog)};return b.add("media",h),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i"},i=function(a){var b='';return a.poster&&(b+=''),b+=""},j=function(a,b){return b?b(a):'"},k=function(a,b){return b?b(a):'"},l=function(a){return''},m=function(m,n){var o=a.extend({},n);if(!o.source1&&(a.extend(o,c.htmlToData(b.getScripts(m),o.embed)),!o.source1))return"";if(o.source2||(o.source2=""),o.poster||(o.poster=""),o.source1=m.convertURL(o.source1,"source"),o.source2=m.convertURL(o.source2,"source"),o.source1mime=d.guess(o.source1),o.source2mime=d.guess(o.source2),o.poster=m.convertURL(o.poster,"poster"),a.each(f.urlPatterns,function(a){var b,c,d=a.regex.exec(o.source1);if(d){for(c=a.url,b=0;d[b];b++)c=c.replace("$"+b,function(){return d[b]});o.source1=c,o.type=a.type,o.allowFullscreen=a.allowFullscreen,o.width=o.width||a.w,o.height=o.height||a.h}}),o.embed)return e.updateHtml(o.embed,o,!0);var p=g.getVideoScriptMatch(b.getScripts(m),o.source1);p&&(o.type="script",o.width=p.width,o.height=p.height);var q=b.getAudioTemplateCallback(m),r=b.getVideoTemplateCallback(m);return o.width=o.width||300,o.height=o.height||150,a.each(o,function(a,b){o[b]=m.dom.encode(a)}),"iframe"===o.type?h(o):"application/x-shockwave-flash"===o.source1mime?i(o):o.source1mime.indexOf("audio")!==-1?j(o,q):"script"===o.type?l(o):k(o,r)};return{dataToHtml:m}}),g("i",["q","g","r"],function(a,b,c){var d={},e=function(b,c,e){return new a(function(a,f){var g=function(e){return e.html&&(d[b.source1]=e),a({url:b.source1,html:e.html?e.html:c(b)})};d[b.source1]?g(d[b.source1]):e({url:b.source1},g,f)})},f=function(b,c){return new a(function(a){a({html:c(b),url:b.source1})})},g=function(a){return function(b){return c.dataToHtml(a,b)}},h=function(a,c){var d=b.getUrlResolver(a);return d?e(c,g(a),d):f(c,g(a))},i=function(a){return d.hasOwnProperty(a)};return{getEmbedHtml:h,isCached:i}}),g("o",[],function(){var a=function(a,b){a.state.set("oldVal",a.value()),b.state.set("oldVal",b.value())},b=function(a,b){var c=a.find("#width")[0],d=a.find("#height")[0],e=a.find("#constrain")[0];c&&d&&e&&b(c,d,e.checked())},c=function(b,c,d){var e=b.state.get("oldVal"),f=c.state.get("oldVal"),g=b.value(),h=c.value();d&&e&&f&&g&&h&&(g!==e?(h=Math.round(g/e*h),isNaN(h)||c.value(h)):(g=Math.round(h/f*g),isNaN(g)||b.value(g))),a(b,c)},d=function(c){b(c,a)},e=function(a){b(a,c)},f=function(a){var b=function(){a(function(a){e(a)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}};return{createUi:f,syncSize:d,updateSize:e}}),g("9",["f","b","g","h","i","j","e","o"],function(a,b,c,d,e,f,g,h){var i=a.ie&&a.ie<=8?"onChange":"onInput",j=function(a){return function(b){var c=b&&b.msg?"Media embed handler error: "+b.msg:"Media embed handler threw unknown error.";a.notificationManager.open({type:"error",text:c})}},k=function(a){var b=a.selection.getNode(),e=b.getAttribute("data-ephox-embed-iri");return e?{source1:e,"data-ephox-embed-iri":e,width:f.getMaxWidth(b),height:f.getMaxHeight(b)}:b.getAttribute("data-mce-object")?d.htmlToData(c.getScripts(a),a.serializer.serialize(b,{selection:!0})):{}},l=function(a){var b=a.selection.getNode();if(b.getAttribute("data-mce-object")||b.getAttribute("data-ephox-embed-iri"))return a.selection.getContent()},m=function(a,e){return function(f){var g=f.html,i=a.find("#embed")[0],j=b.extend(d.htmlToData(c.getScripts(e),g),{source1:f.url});a.fromJSON(j),i&&(i.value(g),h.updateSize(a))}},n=function(a,b){var c,d,e=a.dom.select("img[data-mce-object]");for(c=0;c=0;d--)b[c]===e[d]&&e.splice(d,1);a.selection.select(e[0])},o=function(a,b){var c=a.dom.select("img[data-mce-object]");a.insertContent(b),n(a,c),a.nodeChanged()},p=function(a,b){var c=a.toJSON();c.embed=g.updateHtml(c.embed,c),c.embed&&e.isCached(c.source1)?o(b,c.embed):e.getEmbedHtml(b,c).then(function(a){o(b,a.html)})["catch"](j(b))},q=function(a,c){b.each(c,function(b,c){a.find("#"+c).value(b)})},r=function(a){var f,n,o=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){e.getEmbedHtml(a,f.toJSON()).then(m(f,a))["catch"](j(a))},1)},onchange:function(b){e.getEmbedHtml(a,f.toJSON()).then(m(f,a))["catch"](j(a)),q(f,b.meta)},onbeforecall:function(a){a.meta=f.toJSON()}}],r=[],s=function(a){a(f),n=f.toJSON(),f.find("#embed").value(g.updateHtml(n.embed,n))};if(c.hasAltSource(a)&&r.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),c.hasPoster(a)&&r.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),c.hasDimensions(a)){var t=h.createUi(s);o.push(t)}n=k(a);var u={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:l(a),multiline:!0,rows:5,label:"Source"},v=function(){n=b.extend({},d.htmlToData(c.getScripts(a),this.value())),this.parent().parent().fromJSON(n)};u[i]=v,f=a.windowManager.open({title:"Insert/edit media",data:n,bodyType:"tabpanel",body:[{title:"General",type:"form",items:o},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},u]},{title:"Advanced",type:"form",items:r}],onSubmit:function(){h.updateSize(f),p(f,a)}}),h.syncSize(f)};return{showDialog:r}}),g("2",["9"],function(a){var b=function(b){var c=function(){a.showDialog(b)};return{showDialog:c}};return{get:b}}),g("3",["9"],function(a){var b=function(b){var c=function(){a.showDialog(b)};b.addCommand("mceMedia",c)};return{register:b}}),g("a",["8"],function(a){return a("tinymce.html.Node")}),g("d",["l","m","k","b","g"],function(a,b,c,d,e){var f=function(d,f){if(e.shouldFilterHtml(d)===!1)return f;var g,h=new c;return new a({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){h.comment(a)},cdata:function(a){h.cdata(a)},text:function(a,b){h.text(a,b)},start:function(a,b,c){if(g=!0,"script"!==a&&"noscript"!==a){for(var e=0;e]*>","gi")});var g=e.schema.getBoolAttrs();b.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){g[a]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",c.placeHolderConverter(e)),e.serializer.addAttributeFilter("data-mce-object",function(b,c){for(var f,g,h,i,j,k,l,m,n=b.length;n--;)if(f=b[n],f.parent){for(l=f.attr(c),g=new a(l,1),"audio"!==l&&"script"!==l&&(m=f.attr("class"),m&&m.indexOf("mce-preview-object")!==-1?g.attr({width:f.firstChild.attr("width"),height:f.firstChild.attr("height")}):g.attr({width:f.attr("width"),height:f.attr("height")})),g.attr({style:f.attr("style")}),i=f.attributes,h=i.length;h--;){var o=i[h].name;0===o.indexOf("data-mce-p-")&&g.attr(o.substr(11),i[h].value)}"script"===l&&g.attr("type","text/javascript"),j=f.attr("data-mce-html"),j&&(k=new a("#text",3),k.raw=!0,k.value=d.sanitize(e,unescape(j)),g.append(k)),f.replace(g)}})}),e.on("setContent",function(){e.$("span.mce-preview-object").each(function(a,b){var c=e.$(b);0===c.find("span.mce-shim",b).length&&c.append('')})})};return{setup:e}}),g("5",[],function(){var a=function(a){a.on("ResolveName",function(a){var b;1===a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)})};return{setup:a}}),g("6",["e"],function(a){var b=function(b){b.on("click keyup",function(){var a=b.selection.getNode();a&&b.dom.hasClass(a,"mce-preview-object")&&b.dom.getAttrib(a,"data-mce-selected")&&a.setAttribute("data-mce-selected","2")}),b.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!==b&&"script"!==b||a.preventDefault()}),b.on("objectResized",function(b){var c,d=b.target;d.getAttribute("data-mce-object")&&(c=d.getAttribute("data-mce-html"),c&&(c=unescape(c),d.setAttribute("data-mce-html",escape(a.updateHtml(c,{width:b.width,height:b.height})))))})};return{setup:b}}),g("7",[],function(){var a=function(a){a.addButton("media",{tooltip:"Insert/edit media",cmd:"mceMedia",stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),a.addMenuItem("media",{icon:"media",text:"Media",cmd:"mceMedia",context:"insert",prependToContext:!0})};return{register:a}}),g("0",["1","2","3","4","5","6","7"],function(a,b,c,d,e,f,g){return a.add("media",function(a){return c.register(a),g.register(a),e.setup(a),d.setup(a),f.setup(a),b.get(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/nonbreaking/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/nonbreaking/plugin.min.js index 42ecaebd73..6bc2083db8 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/nonbreaking/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/nonbreaking/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i ':" "),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;d ':" ";c.insertContent(a(e,d)),c.dom.setAttrib(c.dom.select("span.mce-nbsp"),"data-mce-bogus","1")};return{insertNbsp:c}}),g("2",["6"],function(a){var b=function(b){b.addCommand("mceNonBreaking",function(){a.insertNbsp(b,1)})};return{register:b}}),g("7",[],function(){var a=function(a){var b=a.getParam("nonbreaking_force_tab",0);return"boolean"==typeof b?b===!0?3:0:b};return{getKeyboardSpaces:a}}),g("3",["7","6"],function(a,b){var c=function(c){var d=a.getKeyboardSpaces(c);d>0&&c.on("keydown",function(a){if(9===a.keyCode){if(a.shiftKey)return;a.preventDefault(),b.insertNbsp(c,d)}})};return{setup:c}}),g("4",[],function(){var a=function(a){a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"})};return{register:a}}),g("0",["1","2","3","4"],function(a,b,c,d){return a.add("nonbreaking",function(a){b.register(a),d.register(a),c.setup(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/noneditable/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/noneditable/plugin.min.js index 30cb9f6218..5d639f55d7 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/noneditable/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/noneditable/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0?h.charAt(d-1):"";if('"'===e)return b;if(">"===e){var f=h.lastIndexOf("<",d);if(f!==-1){var g=h.substring(f,d);if(g.indexOf('contenteditable="false"')!==-1)return b}}return''+a.dom.encode("string"==typeof c[1]?c[1]:c[0])+""}var e=g.length,h=c.content,i=b.trim(f);if("raw"!=c.format){for(;e--;)h=h.replace(g[e],d);c.content=h}}var e,f,g,h="contenteditable";e=" "+b.trim(a.getParam("noneditable_editable_class","mceEditable"))+" ",f=" "+b.trim(a.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";var i=c(e),j=c(f);g=a.getParam("noneditable_regexp"),g&&!g.length&&(g=[g]),a.on("PreInit",function(){g&&a.on("BeforeSetContent",d),a.parser.addAttributeFilter("class",function(a){for(var b,c=a.length;c--;)b=a[c],i(b)?b.attr(h,"true"):j(b)&&b.attr(h,"false")}),a.serializer.addAttributeFilter(h,function(a){for(var b,c=a.length;c--;)b=a[c],(i(b)||j(b))&&(g&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):b.attr(h,null))})})}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0?b.charAt(f-1):"";if('"'===g)return d;if(">"===g){var h=b.lastIndexOf("<",f);if(h!==-1){var i=b.substring(h,f);if(i.indexOf('contenteditable="false"')!==-1)return d}}return''+a.dom.encode("string"==typeof e[1]?e[1]:e[0])+""}},e=function(a,c,e){var f=c.length,g=e.content;if("raw"!==e.format){for(;f--;)g=g.replace(c[f],d(a,g,b.getNonEditableClass(a)));e.content=g}},f=function(d){var f,g,h="contenteditable";f=" "+a.trim(b.getEditableClass(d))+" ",g=" "+a.trim(b.getNonEditableClass(d))+" ";var i=c(f),j=c(g),k=b.getNonEditableRegExps(d);d.on("PreInit",function(){k.length>0&&d.on("BeforeSetContent",function(a){e(d,k,a)}),d.parser.addAttributeFilter("class",function(a){for(var b,c=a.length;c--;)b=a[c],i(b)?b.attr(h,"true"):j(b)&&b.attr(h,"false")}),d.serializer.addAttributeFilter(h,function(a){for(var b,c=a.length;c--;)b=a[c],(i(b)||j(b))&&(k.length>0&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):b.attr(h,null))})})};return{setup:f}}),g("0",["1","2"],function(a,b){return a.add("noneditable",function(a){b.setup(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/pagebreak/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/pagebreak/plugin.min.js index 5f38120408..e7da9ce9cf 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/pagebreak/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/pagebreak/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i"),e=new RegExp(d.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),f='';a.addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("

"+f+"

"):a.insertContent(f)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(b){"IMG"==b.target.nodeName&&a.dom.hasClass(b.target,c)&&(b.name="pagebreak")}),a.on("click",function(b){b=b.target,"IMG"===b.nodeName&&a.dom.hasClass(b,c)&&a.selection.select(b)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(e,f)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var c,e,f=b.length;f--;)if(c=b[f],e=c.attr("class"),e&&e.indexOf("mce-pagebreak")!==-1){var g=c.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=d,g.raw=!0,c.remove();continue}c.type=3,c.value=d,c.raw=!0}})})}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i")},b=function(a){return a.getParam("pagebreak_split_block",!1)};return{getSeparatorHtml:a,shouldSplitBlock:b}}),g("4",["1","8"],function(a,b){var c=function(){return"mce-pagebreak"},d=function(){return''},e=function(a){var c=b.getSeparatorHtml(a),e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi");a.on("BeforeSetContent",function(a){a.content=a.content.replace(e,d())}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(d){for(var e,f,g=d.length;g--;)if(e=d[g],f=e.attr("class"),f&&f.indexOf("mce-pagebreak")!==-1){var h=e.parent;if(a.schema.getBlockElements()[h.name]&&b.shouldSplitBlock(a)){h.type=3,h.value=c,h.raw=!0,e.remove();continue}e.type=3,e.value=c,e.raw=!0}})})};return{setup:e,getPlaceholderHtml:d,getPageBreakClass:c}}),g("3",["4"],function(a){var b=function(b){b.addCommand("mcePageBreak",function(){b.settings.pagebreak_split_block?b.insertContent("

"+a.getPlaceholderHtml()+"

"):b.insertContent(a.getPlaceholderHtml())})};return{register:b}}),g("5",["4"],function(a){var b=function(b){b.on("ResolveName",function(c){"IMG"===c.target.nodeName&&b.dom.hasClass(c.target,a.getPageBreakClass())&&(c.name="pagebreak")})};return{setup:b}}),g("6",[],function(){var a=function(a){a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"})};return{register:a}}),g("0",["1","2","3","4","5","6"],function(a,b,c,d,e,f){return b.add("pagebreak",function(a){c.register(a),f.register(a),d.setup(a),e.setup(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/paste/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/paste/plugin.min.js index 5bbb85d7c0..8d9ebc98a7 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/paste/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/paste/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i",c=function(a){return b+a},d=function(a){return a.replace(b,"")},e=function(a){return a.indexOf(b)!==-1};return{mark:c,unmark:d,isMarked:e,internalHtmlMime:function(){return a}}}),g("g",["6"],function(a){return a("tinymce.html.DomParser")}),g("h",["6"],function(a){return a("tinymce.html.Schema")}),g("d",["a","g","h"],function(a,b,c){function d(b,c){return a.each(c,function(a){b=a.constructor==RegExp?b.replace(a,""):b.replace(a[0],a[1])}),b}function e(e){function f(a){var b=a.name,c=a;if("br"===b)return void(i+="\n");if(j[b]&&(i+=" "),k[b])return void(i+=" ");if(3==a.type&&(i+=a.value),!a.shortEnded&&(a=a.firstChild))do f(a);while(a=a.next);l[b]&&c.next&&(i+="\n","p"==b&&(i+="\n"))}var g=new c,h=new b({},g),i="",j=g.getShortEndedElements(),k=a.makeMap("script noscript style textarea video audio iframe object"," "),l=g.getBlockElements();return e=d(e,[//g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/|/g,[/( ?)\u00a0<\/span>( ?)/g,b],/
/g,/
$/i])}function g(a){var b=0;return function(){return a+b++}}var h=function(){return navigator.userAgent.indexOf(" Edge/")!==-1};return{filter:d,innerText:e,trimHtml:f,createIdGenerator:g,isMsEdge:h}}),g("3",["8","c","d"],function(a,b,c){var d=function(){},e=function(b){return a.iOS===!1&&void 0!==b&&"function"==typeof b.setData&&c.isMsEdge()!==!0},f=function(a,c,d){if(!e(a))return!1;try{return a.clearData(),a.setData("text/html",c),a.setData("text/plain",d),a.setData(b.internalHtmlMime(),c),!0}catch(a){return!1}},g=function(a,b,c,d){f(a.clipboardData,b.html,b.text)?(a.preventDefault(),d()):c(b.html,d)},h=function(a){return function(c,d){var e=b.mark(c),f=a.dom.create("div",{contenteditable:"false"}),g=a.dom.create("div",{contenteditable:"true"},e);a.dom.setStyles(f,{position:"fixed",left:"-3000px",width:"1000px",overflow:"hidden"}),f.appendChild(g),a.dom.add(a.getBody(),f);var h=a.selection.getRng();g.focus();var i=a.dom.createRng();i.selectNodeContents(g),a.selection.setRng(i),setTimeout(function(){f.parentNode.removeChild(f),a.selection.setRng(h),d()},0)}},i=function(a){return{html:a.selection.getContent({contextual:!0}),text:a.selection.getContent({format:"text"})}},j=function(a){return function(b){a.selection.isCollapsed()===!1&&g(b,i(a),h(a),function(){a.execCommand("Delete")})}},k=function(a){return function(b){a.selection.isCollapsed()===!1&&g(b,i(a),h(a),d)}},l=function(a){a.on("cut",j(a)),a.on("copy",k(a))};return{register:l}}),g("k",["6"],function(a){return a("tinymce.html.Entities")}),g("e",["k"],function(a){var b=function(a){return!/<(?:(?!\/?(?:div|p|br))[^>]*|(?:div|p|br)\s+\w[^>]+)>/.test(a)},c=function(a){return a.replace(/\r?\n/g,"
")},d=function(b,c){var d,e=[],f="<"+b;if("object"==typeof c){for(d in c)c.hasOwnProperty(d)&&e.push(d+'="'+a.encodeAllRaw(c[d])+'"');e.length&&(f+=" "+e.join(" "))}return f+">"},e=function(a,b,c){var e,f,g,h=a.split(/\r?\n/),i=0,j=h.length,k=[],l=[],m=d(b,c),n="";if(1===h.length)return a;for(;i")),k=[]),f&&i++;return 1===l.length?l[0]:m+l.join(n+m)+n},f=function(a,b,d){return b?e(a,b,d):c(a)};return{isPlainText:b,convert:f,toBRs:c,toBlockElements:e}}),g("f",["a"],function(a){var b=function(a){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(a)},c=function(a){return b(a)&&/.(gif|jpe?g|png)$/.test(a)},d=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.insertContent('')}),!0},e=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.execCommand("mceInsertLink",!1,b)}),!0},f=function(a,c,d){return!(a.selection.isCollapsed()!==!1||!b(c))&&e(a,c,d)},g=function(a,b,e){return!!c(b)&&d(a,b,e)},h=function(a,b){return a.insertContent(b,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),!0},i=function(b,c){a.each([f,g,h],function(a){return a(b,c,h)!==!0})},j=function(a,b){a.settings.smart_paste===!1?h(a,b):i(a,b)};return{isImageUrl:c,isAbsoluteUrl:b,insertContent:j}}),g("2",["7","8","9","a","b","3","c","e","f","d"],function(a,b,c,d,e,f,g,h,i,j){return function(f){function k(a,b){var c,d,e=f.dom;if(d=b||g.isMarked(a),a=g.unmark(a),c=f.fire("BeforePastePreProcess",{content:a,internal:d}),c=f.fire("PastePreProcess",c),a=c.content,!c.isDefaultPrevented()){if(f.hasEventListeners("PastePostProcess")&&!c.isDefaultPrevented()){var h=e.add(f.getBody(),"div",{style:"display:none"},a);c=f.fire("PastePostProcess",{node:h,internal:d}),e.remove(h),a=c.node.innerHTML}c.isDefaultPrevented()||i.insertContent(f,a)}}function l(a){a=f.dom.encode(a).replace(/\r\n/g,"\n"),a=h.convert(a,f.settings.forced_root_block,f.settings.forced_root_block_attrs),k(a,!1)}function m(){function a(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[C.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=d.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=d.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),d.remove(c)),b.length?b[0]:void 0}}var c,d=f.dom,e=f.getBody(),g=f.dom.getViewPort(f.getWin()),h=g.y,i=20;if(C=f.selection.getRng(),f.inline&&(c=f.selection.getScrollContainer(),c&&c.scrollTop>0&&(h=c.scrollTop)),C.getClientRects){var j=a(C);if(j)i=h+(j.top-d.getPos(e).y);else{i=h;var k=C.startContainer;k&&(3==k.nodeType&&k.parentNode!=e&&(k=k.parentNode),1==k.nodeType&&(i=d.getPos(k,c||e).y))}}B=d.add(f.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},H),(b.ie||b.gecko)&&d.setStyle(B,"left","rtl"==d.getStyle(e,"direction",!0)?65535:-65535),d.bind(B,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),B.focus(),f.selection.select(B,!0)}function n(){if(B){for(var a;a=f.dom.get("mcepastebin");)f.dom.remove(a),f.dom.unbind(a);C&&f.selection.setRng(C)}B=C=null}function o(){var a,b,c,d,e="";for(a=f.dom.select("div[id=mcepastebin]"),b=0;b0&&c.indexOf(I)==-1&&(b["text/plain"]=c)}if(a.types)for(var d=0;d',!1)}else k('',!1)}function v(a,b){function c(c){var d,e,f,g=!1;if(c)for(d=0;d0}function z(a){return e.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function A(){function a(a,b,c,d){var e,g;return y(a,"text/html")?e=a["text/html"]:(e=o(),e==H&&(c=!0)),e=j.trimHtml(e),B&&B.firstChild&&"mcepastebin"===B.firstChild.id&&(c=!0),n(),g=d===!1&&h.isPlainText(e),e.length&&!g||(c=!0),c&&(e=y(a,"text/plain")&&g?a["text/plain"]:j.innerText(e)),e==H?void(b||f.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?l(e):k(e,d))}function d(a){var b=a["text/plain"];return!!b&&0===b.indexOf("file://")}f.on("keydown",function(a){function c(a){z(a)&&!a.isDefaultPrevented()&&n()}if(z(a)&&!a.isDefaultPrevented()){if(D=a.shiftKey&&86==a.keyCode,D&&b.webkit&&navigator.userAgent.indexOf("Version/")!=-1)return;if(a.stopImmediatePropagation(),F=(new Date).getTime(),b.ie&&D)return a.preventDefault(),void f.fire("paste",{ieFake:!0});n(),m(),f.once("keyup",c),f.once("paste",function(){f.off("keyup",c)})}});var e=function(){return C||f.selection.getRng()};f.on("paste",function(d){var h=(new Date).getTime(),i=q(d),j=(new Date).getTime()-h,k=(new Date).getTime()-F-j<1e3,l="text"==E.pasteFormat||D,p=y(i,g.internalHtmlMime());return D=!1,d.isDefaultPrevented()||w(d)?void n():!r(i)&&v(d,e())?void n():(k||d.preventDefault(),!b.ie||k&&!d.ieFake||y(i,"text/html")||(m(),f.dom.bind(B,"paste",function(a){a.stopPropagation()}),f.getDoc().execCommand("Paste",!1,null),i["text/html"]=o()),void(y(i,"text/html")?(d.preventDefault(),a(i,k,l,p)):c.setEditorTimeout(f,function(){a(i,k,l,p)},0)))}),f.on("dragstart dragend",function(a){G="dragstart"==a.type}),f.on("drop",function(a){var b,e;if(e=x(a),!a.isDefaultPrevented()&&!G){b=p(a.dataTransfer);var h=y(b,g.internalHtmlMime());if((r(b)&&!d(b)||!v(a,e))&&e&&f.settings.paste_filter_drop!==!1){var i=b["mce-internal"]||b["text/html"]||b["text/plain"];i&&(a.preventDefault(),c.setEditorTimeout(f,function(){f.undoManager.transact(function(){b["mce-internal"]&&f.execCommand("Delete"),f.selection.setRng(e),i=j.trimHtml(i),b["text/html"]?k(i,h):l(i)})}))}}}),f.on("dragover dragend",function(a){f.settings.paste_data_images&&a.preventDefault()})}var B,C,D,E=this,F=0,G=!1,H="%MCEPASTEBIN%",I="data:text/mce-internal,",J=j.createIdGenerator("mceclip");E.pasteHtml=k,E.pasteText=l,E.pasteImageData=v,f.on("preInit",function(){A(),f.parser.addNodeFilter("img",function(a,c,d){function e(a){return a.data&&a.data.paste===!0}function g(a){a.attr("data-mce-object")||k===b.transparentSrc||a.remove()}function h(a){return 0===a.indexOf("webkit-fake-url")}function i(a){return 0===a.indexOf("data:")}if(!f.settings.paste_data_images&&e(d))for(var j=a.length;j--;){var k=a[j].attributes.map.src;k&&(h(k)?g(a[j]):!f.settings.allow_html_data_urls&&i(k)&&g(a[j]))}})})}}),g("i",["6"],function(a){return a("tinymce.html.Serializer")}),g("j",["6"],function(a){return a("tinymce.html.Node")}),g("5",["a","g","h","i","j","d"],function(a,b,c,d,e,f){function g(a){return/1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n]+id="?docs-internal-[^>]*>/gi,""),q=q.replace(/
/gi,""),o=k.paste_retain_style_properties,o&&(p=a.makeMap(o.split(/[, ]/))),k.paste_enable_default_filters!==!1&&g(l.content)){l.wordContent=!0,q=f.filter(q,[//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var r=k.paste_word_valid_elements;r||(r="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var s=new c({valid_elements:r,valid_children:"-li[p]"});a.each(s.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var t=new b({},s);t.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",n(b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),t.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),t.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),t.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&c.indexOf("#_msocom_")!=-1)b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var u=t.parse(q);k.paste_convert_word_fake_lists!==!1&&m(u),l.content=new d({validate:k.validate},s).serialize(u)}})}return j.isWordContent=g,j}),g("4",["8","a","5","d"],function(a,b,c,d){"use strict";return function(e){function f(a){e.on("BeforePastePreProcess",function(b){b.content=a(b.content)})}function g(a){e.on("PastePostProcess",function(b){a(b.node)})}function h(a){if(!c.isWordContent(a))return a;var f=[];b.each(e.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:
 [\\s\\r\\n]+|
)*(<\\/?("+f.join("|")+")[^>]*>)(?:
 [\\s\\r\\n]+|
)*","g");return a=d.filter(a,[[g,"$1"]]),a=d.filter(a,[[/

/g,"

"],[/
/g," "],[/

/g,"
"]])}function i(a){if(c.isWordContent(a))return a;var b=e.settings.paste_webkit_styles;if(e.settings.paste_remove_styles_if_webkit===!1||"all"==b)return a;if(b&&(b=b.split(/[, ]/)),b){var d=e.dom,f=e.selection.getNode();a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,c,e,g){var h=d.parseStyle(d.decode(e),"span"),i={};if("none"===b)return c+g;for(var j=0;j]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return a=a.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}function j(a){e.$("a",a).find("font,u").each(function(a,b){e.dom.remove(b,!0)})}a.webkit&&f(i),a.ie&&(f(h),g(j))}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){var f;return a.add("paste",function(g){function h(){return f||g.settings.paste_plaintext_inform===!1}function i(){if("text"==k.pasteFormat)k.pasteFormat="html",g.fire("PastePlainTextToggle",{state:!1});else if(k.pasteFormat="text",g.fire("PastePlainTextToggle",{state:!0}),!h()){var a=g.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");g.notificationManager.open({text:a,type:"info"}),f=!0}g.focus()}function j(){var a=this;a.active("text"===k.pasteFormat),g.on("PastePlainTextToggle",function(b){a.active(b.state)})}var k,l=this,m=g.settings;return/(^|[ ,])powerpaste([, ]|$)/.test(m.plugins)&&a.get("powerpaste")?void("undefined"!=typeof console&&console.log&&console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option.")):(l.clipboard=k=new b(g),l.quirks=new d(g),l.wordFilter=new e(g),g.settings.paste_as_text&&(l.clipboard.pasteFormat="text"),m.paste_preprocess&&g.on("PastePreProcess",function(a){m.paste_preprocess.call(l,l,a)}),m.paste_postprocess&&g.on("PastePostProcess",function(a){m.paste_postprocess.call(l,l,a)}),g.addCommand("mceInsertClipboardContent",function(a,b){b.content&&l.clipboard.pasteHtml(b.content,b.internal),b.text&&l.clipboard.pasteText(b.text)}),g.settings.paste_block_drop&&g.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),g.settings.paste_data_images||g.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),g.addCommand("mceTogglePlainTextPaste",i),g.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:i,onPostRender:j}),g.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:k.pasteFormat,onclick:i,onPostRender:j}),void c.register(g))}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i",c=function(a){return b+a},d=function(a){return a.replace(b,"")},e=function(a){return a.indexOf(b)!==-1};return{mark:c,unmark:d,isMarked:e,internalHtmlMime:function(){return a}}}),g("x",["c"],function(a){return a("tinymce.html.Entities")}),g("o",["j","x"],function(a,b){var c=function(a){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(a)},d=function(a){return a.replace(/\r?\n/g,"
")},e=function(a,c){var d,e=[],f="<"+a;if("object"==typeof c){for(d in c)c.hasOwnProperty(d)&&e.push(d+'="'+b.encodeAllRaw(c[d])+'"');e.length&&(f+=" "+e.join(" "))}return f+">"},f=function(b,c,d){var f=b.split(/\n\n/),g=e(c,d),h="",i=a.map(f,function(a){return a.split(/\n/).join("
")}),j=function(a){return g+a+h};return 1===i.length?i[0]:a.map(i,j).join("")},g=function(a,b,c){return b?f(a,b,c):d(a)};return{isPlainText:c,convert:g,toBRs:d,toBlockElements:f}}),g("p",["j","h"],function(a,b){return function(c){var d,e="%MCEPASTEBIN%",f=function(){function a(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1===f.nodeType){for(e=f.childNodes[d.startOffset];e&&3===e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"===e.tagName&&(c=h.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=h.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),h.remove(c)),b.length?b[0]:void 0}}var f,g,h=c.dom,i=c.getBody(),j=c.dom.getViewPort(c.getWin()),k=j.y,l=20;if(d=c.selection.getRng(),c.inline&&(g=c.selection.getScrollContainer(),g&&g.scrollTop>0&&(k=g.scrollTop)),d.getClientRects){var m=a(d);if(m)l=k+(m.top-h.getPos(i).y);else{l=k;var n=d.startContainer;n&&(3===n.nodeType&&n.parentNode!==i&&(n=n.parentNode),1===n.nodeType&&(l=h.getPos(n,g||i).y))}}f=c.dom.add(c.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+l+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"},e),(b.ie||b.gecko)&&h.setStyle(f,"left","rtl"===h.getStyle(i,"direction",!0)?65535:-65535),h.bind(f,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),f.focus(),c.selection.select(f,!0)},g=function(){if(h()){for(var a;a=c.dom.get("mcepastebin");)c.dom.remove(a),c.dom.unbind(a);d&&c.selection.setRng(d)}d=null},h=function(){return c.dom.get("mcepastebin")},i=function(){var b,d,e,f,g,h=function(a,b){a.appendChild(b),c.dom.remove(b,!0)};for(d=a.grep(c.getBody().childNodes,function(a){return"mcepastebin"===a.id}),b=d.shift(),a.each(d,function(a){h(b,a)}),f=c.dom.select("div[id=mcepastebin]",b),e=f.length-1;e>=0;e--)g=c.dom.create("div"),b.insertBefore(g,f[e]),h(g,f[e]);return b?b.innerHTML:""},j=function(){return d},k=function(a){return a===e},l=function(a){return a&&"mcepastebin"===a.id},m=function(){var a=h();return l(a)&&k(a.innerHTML)};return{create:f,remove:g,getEl:h,getHtml:i,getLastRng:j,isDefault:m,isDefaultContent:k}}}),g("y",["c"],function(a){return a("tinymce.html.DomParser")}),g("z",["c"],function(a){return a("tinymce.html.Node")}),g("10",["c"],function(a){return a("tinymce.html.Schema")}),g("11",["c"],function(a){return a("tinymce.html.Serializer")}),g("s",["g","y","10","j"],function(a,b,c,d){function e(a,b){return d.each(b,function(b){a=b.constructor===RegExp?a.replace(b,""):a.replace(b[0],b[1])}),a}function f(a){function f(a){var b=a.name,c=a;if("br"===b)return void(i+="\n");if(j[b]&&(i+=" "),k[b])return void(i+=" ");if(3===a.type&&(i+=a.value),!a.shortEnded&&(a=a.firstChild))do f(a);while(a=a.next);l[b]&&c.next&&(i+="\n","p"===b&&(i+="\n"))}var g=new c,h=new b({},g),i="",j=g.getShortEndedElements(),k=d.makeMap("script noscript style textarea video audio iframe object"," "),l=g.getBlockElements();return a=e(a,[//g]),f(h.parse(a)),i}function g(a){function b(a,b,c){return b||c?"\xa0":" "}return a=e(a,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/|/g,[/( ?)\u00a0<\/span>( ?)/g,b],/
/g,/
$/i])}function h(a){var b=0;return function(){return a+b++}}var i=function(){return a.userAgent.indexOf(" Edge/")!==-1};return{filter:e,innerText:f,trimHtml:g,createIdGenerator:h,isMsEdge:i}}),g("v",["y","z","10","11","j","m","s"],function(a,b,c,d,e,f,g){function h(a){return/1&&g.attr("start",""+f),a.wrap(g)),a.name="li",i>k&&h&&h.lastChild.append(g),k=i,e(a),d(a,/^\u00a0+/),d(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),d(a,/^\u00a0+/)}for(var g,h,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n/gi,/]+id="?docs-internal-[^>]*>/gi,//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var m=f.getWordValidElements(b),n=new c({valid_elements:m,valid_children:"-li[p]"});e.each(n.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var o=new a({},n);o.addAttributeFilter("style",function(a){for(var c,d=a.length;d--;)c=a[d],c.attr("style",l(b,j,c,c.attr("style"))),"span"===c.name&&c.parent&&!c.attributes.length&&c.unwrap()}),o.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),o.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),o.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&c.indexOf("#_msocom_")!==-1)b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var p=o.parse(h);return f.shouldConvertWordFakeLists(b)&&k(p),h=new d({validate:b.settings.validate},n).serialize(p)},n=function(a,b){return f.shouldUseDefaultFilters(a)?m(a,b):b};return{preProcess:n,isWordContent:h}}),g("q",["l","v"],function(a,b){var c=function(a,b){return{content:a,cancelled:b}},d=function(b,d,e,f){var g=b.dom.create("div",{style:"display:none"},d),h=a.firePastePostProcess(b,g,e,f);return c(h.node.innerHTML,h.isDefaultPrevented())},e=function(b,e,f,g){var h=a.firePastePreProcess(b,e,f,g);return b.hasEventListeners("PastePostProcess")&&!h.isDefaultPrevented()?d(b,h.content,f,g):c(h.content,h.isDefaultPrevented())},f=function(a,c,d){var f=b.isWordContent(c),g=f?b.preProcess(a,c):c;return e(a,g,d,f)};return{process:f}}),g("r",["j","m"],function(a,b){var c=function(a){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(a)},d=function(a){return c(a)&&/.(gif|jpe?g|png)$/.test(a)},e=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.insertContent('')}),!0},f=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.execCommand("mceInsertLink",!1,b)}),!0},g=function(a,b,d){return!(a.selection.isCollapsed()!==!1||!c(b))&&f(a,b,d)},h=function(a,b,c){return!!d(b)&&e(a,b,c)},i=function(a,c){return a.insertContent(c,{merge:b.shouldMergeFormats(a),paste:!0}),!0},j=function(b,c){a.each([g,h,i],function(a){return a(b,c,i)!==!0})},k=function(a,c){b.isSmartPasteEnabled(a)===!1?i(a,c):j(a,c)};return{isImageUrl:d,isAbsoluteUrl:c,insertContent:k}}),g("6",["f","g","d","h","i","j","k","l","m","n","o","p","q","r","s"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return function(p){function q(a,b){var c=b?b:j.isMarked(a),d=m.process(p,j.unmark(a),c);d.cancelled===!1&&n.insertContent(p,d.content)}function r(a){a=p.dom.encode(a).replace(/\r\n/g,"\n"),a=k.convert(a,p.settings.forced_root_block,p.settings.forced_root_block_attrs),q(a,!1)}function s(a){var b={};if(a){if(a.getData){var c=a.getData("Text");c&&c.length>0&&c.indexOf(I)===-1&&(b["text/plain"]=c)}if(a.types)for(var d=0;d',!1)}else q('',!1)}function z(a,b){function d(d){var e,f,g,h=!1;if(d)for(e=0;e0}function C(a){return g.metaKeyPressed(a)&&86===a.keyCode||a.shiftKey&&45===a.keyCode}function D(){function a(a,b,c,d){var e,f;return B(a,"text/html")?e=a["text/html"]:(e=H.getHtml(),d=d?d:j.isMarked(e),H.isDefaultContent(e)&&(c=!0)),e=o.trimHtml(e),H.remove(),f=d===!1&&k.isPlainText(e),e.length&&!f||(c=!0),c&&(e=B(a,"text/plain")&&f?a["text/plain"]:o.innerText(e)),H.isDefaultContent(e)?void(b||p.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?r(e):q(e,d))}p.on("keydown",function(a){function c(a){C(a)&&!a.isDefaultPrevented()&&H.remove()}if(C(a)&&!a.isDefaultPrevented()){if(E=a.shiftKey&&86===a.keyCode,E&&d.webkit&&b.userAgent.indexOf("Version/")!==-1)return;if(a.stopImmediatePropagation(),G=(new Date).getTime(),d.ie&&E)return a.preventDefault(),void h.firePaste(p,!0);H.remove(),H.create(),p.once("keyup",c),p.once("paste",function(){p.off("keyup",c)})}});var c=function(){return H.getLastRng()||p.selection.getRng()};p.on("paste",function(b){var f=(new Date).getTime(),g=t(b),h=(new Date).getTime()-f,i=(new Date).getTime()-G-h<1e3,k="text"===F.pasteFormat||E,l=B(g,j.internalHtmlMime());return E=!1,b.isDefaultPrevented()||A(b)?void H.remove():!u(g)&&z(b,c())?void H.remove():(i||b.preventDefault(),!d.ie||i&&!b.ieFake||B(g,"text/html")||(H.create(),p.dom.bind(H.getEl(),"paste",function(a){a.stopPropagation()}),p.getDoc().execCommand("Paste",!1,null),g["text/html"]=H.getHtml()),void(B(g,"text/html")?(b.preventDefault(),l||(l=j.isMarked(g["text/html"])),a(g,i,k,l)):e.setEditorTimeout(p,function(){a(g,i,k,l)},0)))})}var E,F=this,G=0,H=new l(p),I="data:text/mce-internal,",J=o.createIdGenerator("mceclip");F.pasteFormat=i.isPasteAsTextEnabled(p)?"text":"html",F.pasteHtml=q,F.pasteText=r,F.pasteImageData=z,F.getDataTransferItems=s,F.hasHtmlOrText=u,F.hasContentType=B,p.on("preInit",function(){D(),p.parser.addNodeFilter("img",function(a,b,c){function e(a){return a.data&&a.data.paste===!0}function f(a){a.attr("data-mce-object")||j===d.transparentSrc||a.remove()}function g(a){return 0===a.indexOf("webkit-fake-url")}function h(a){return 0===a.indexOf("data:")}if(!p.settings.paste_data_images&&e(c))for(var i=a.length;i--;){var j=a[i].attributes.map.src;j&&(g(j)?f(a[i]):!p.settings.allow_html_data_urls&&h(j)&&f(a[i]))}})})}}),h("t",setTimeout),g("7",["t","h","n","s"],function(a,b,c,d){var e=function(){},f=function(a){return b.iOS===!1&&void 0!==a&&"function"==typeof a.setData&&d.isMsEdge()!==!0},g=function(a,b,d){if(!f(a))return!1;try{return a.clearData(),a.setData("text/html",b),a.setData("text/plain",d),a.setData(c.internalHtmlMime(),b),!0}catch(a){return!1}},h=function(a,b,c,d){g(a.clipboardData,b.html,b.text)?(a.preventDefault(),d()):c(b.html,d)},i=function(b){return function(d,e){var f=c.mark(d),g=b.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),h=b.dom.create("div",{contenteditable:"true"},f);b.dom.setStyles(g,{position:"fixed",left:"-3000px",width:"1000px",overflow:"hidden"}),g.appendChild(h),b.dom.add(b.getBody(),g);var i=b.selection.getRng();h.focus();var j=b.dom.createRng();j.selectNodeContents(h),b.selection.setRng(j),a(function(){g.parentNode.removeChild(g),b.selection.setRng(i),e()},0)}},j=function(a){return{html:a.selection.getContent({contextual:!0}),text:a.selection.getContent({format:"text"})}},k=function(b){return function(c){b.selection.isCollapsed()===!1&&h(c,j(b),i(b),function(){a(function(){b.execCommand("Delete")},0)})}},l=function(a){return function(b){a.selection.isCollapsed()===!1&&h(b,j(a),i(a),e)}},m=function(a){a.on("cut",k(a)),a.on("copy",l(a))};return{register:m}}),g("u",["c"],function(a){return a("tinymce.dom.RangeUtils")}),g("8",["u","i","m","n","s"],function(a,b,c,d,e){var f=function(b,c){return a.getCaretRangeFromPoint(c.clientX,c.clientY,b.getDoc())},g=function(a){var b=a["text/plain"];return!!b&&0===b.indexOf("file://")},h=function(a,b){a.focus(),a.selection.setRng(b)},i=function(a,i,j){c.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),c.shouldPasteDataImages(a)||a.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),a.on("drop",function(k){var l,m;if(m=f(a,k),!k.isDefaultPrevented()&&!j.get()){l=i.getDataTransferItems(k.dataTransfer);var n=i.hasContentType(l,d.internalHtmlMime());if((i.hasHtmlOrText(l)&&!g(l)||!i.pasteImageData(k,m))&&m&&c.shouldFilterDrop(a)){var o=l["mce-internal"]||l["text/html"]||l["text/plain"];o&&(k.preventDefault(),b.setEditorTimeout(a,function(){a.undoManager.transact(function(){l["mce-internal"]&&a.execCommand("Delete"),h(a,m),o=e.trimHtml(o),l["text/html"]?i.pasteHtml(o,n):i.pasteText(o)})}))}}}),a.on("dragstart",function(a){j.set(!0)}),a.on("dragover dragend",function(b){c.shouldPasteDataImages(a)&&j.get()===!1&&(b.preventDefault(),h(a,f(a,b))),"dragend"===b.type&&j.set(!1)})};return{setup:i}}),g("9",["m"],function(a){var b=function(b){var c=b.plugins.paste,d=a.getPreProcess(b);d&&b.on("PastePreProcess",function(a){d.call(c,c,a)});var e=a.getPostProcess(b);e&&b.on("PastePostProcess",function(a){e.call(c,c,a)})};return{setup:b}}),g("a",["h","j","m","s","v"],function(a,b,c,d,e){function f(a,b){a.on("PastePreProcess",function(c){c.content=b(a,c.content,c.internal,c.wordContent)})}function g(a,b){a.on("PastePostProcess",function(c){b(a,c.node)})}function h(a,c){if(!e.isWordContent(c))return c;var f=[];b.each(a.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:
 [\\s\\r\\n]+|
)*(<\\/?("+f.join("|")+")[^>]*>)(?:
 [\\s\\r\\n]+|
)*","g");return c=d.filter(c,[[g,"$1"]]),c=d.filter(c,[[/

/g,"

"],[/
/g," "],[/

/g,"
"]])}function i(a,b,d,e){if(e||d)return b;var f=c.getWebkitStyles(a);if(c.shouldRemoveWebKitStyles(a)===!1||"all"===f)return b;if(f&&(f=f.split(/[, ]/)),f){var g=a.dom,h=a.selection.getNode();b=b.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,b,c,d){var e=g.parseStyle(g.decode(c),"span"),i={};if("none"===f)return b+d;for(var j=0;j]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return b=b.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}function j(a,b){a.$("a",b).find("font,u").each(function(b,c){a.dom.remove(c,!0)})}var k=function(b){a.webkit&&f(b,i),a.ie&&(f(b,h),g(b,j))};return{setup:k}}),h("12",Array),h("13",Error),g("w",["12","13"],function(a,b){var c=function(){},d=function(a){return function(){return a()}},e=function(a,b){return function(){return a(b.apply(null,arguments))}},f=function(a){return function(){return a}},g=function(a){return a},h=function(a,b){return a===b},i=function(b){for(var c=new a(arguments.length-1),d=1;d",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var b,f="";f+='',c.each(a.contentCSS,function(b){f+=''});var g=d.body_id||"tinymce";g.indexOf("=")!=-1&&(g=a.getParam("body_id","","hash"),g=g[a.id]||g);var h=d.body_class||"";h.indexOf("=")!=-1&&(h=a.getParam("body_class","","hash"),h=h[a.id]||"");var i=' ',j=a.settings.directionality?' dir="'+a.settings.directionality+'"':"";if(b=""+f+'"+a.getContent()+i+"",e)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(b);else{var k=this.getEl("body").firstChild.contentWindow.document;k.open(),k.write(b),k.close()}}})}),a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i',g&&(e+='"),a.each(c.contentCSS,function(a){e+=''});var h=c.settings.body_id||"tinymce";h.indexOf("=")!==-1&&(h=c.getParam("body_id","","hash"),h=h[c.id]||h);var i=c.settings.body_class||"";i.indexOf("=")!==-1&&(i=c.getParam("body_class","","hash"),i=i[c.id]||"");var j=' ',k=c.settings.directionality?' dir="'+c.settings.directionality+'"':"";return d=""+e+'"+c.getContent()+j+""},d=function(a,b,d){var e=c(a);if(d)b.src="data:text/html;charset=utf-8,"+encodeURIComponent(e);else{var f=b.contentWindow.document;f.open(),f.write(e),f.close()}};return{getPreviewHtml:c,injectIframeContent:d}}),g("5",["6","7","8","9"],function(a,b,c,d){var e=function(b){var e=!a.ie,f='",g=c.getPreviewDialogWidth(b),h=c.getPreviewDialogHeight(b);b.windowManager.open({title:"Preview",width:g,height:h,html:f,buttons:{text:"Close",onclick:function(a){a.control.parent().parent().close()}},onPostRender:function(a){var c=a.control.getEl("body").firstChild;d.injectIframeContent(b,c,e)}})};return{open:e}}),g("2",["5"],function(a){var b=function(b){b.addCommand("mcePreview",function(){a.open(b)})};return{register:b}}),g("3",[],function(){var a=function(a){a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})};return{register:a}}),g("0",["1","2","3"],function(a,b,c){return a.add("preview",function(a){b.register(a),c.register(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/print/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/print/plugin.min.js index eccf5ad221..6192028676 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/print/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/print/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function h(b){var c;if(3===b.nodeType)return b.data;if(o[b.nodeName]&&!n[b.nodeName])return"";if(c="",a(b))return"\n";if((n[b.nodeName]||p[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=h(b);while(b=b.nextSibling);return c}function i(b,c,d){var e,f,g,h,i=[],j=0,k=b,l=c.shift(),m=0;a:for(;;){if((n[k.nodeName]||p[k.nodeName]||a(k))&&j++,3===k.nodeType&&(!f&&k.length+j>=l[1]?(f=k,h=l[1]-j):e&&i.push(k),!e&&k.length+j>l[0]&&(e=k,g=l[0]-j),j+=k.length),e&&f){if(k=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:i,match:l[2],matchIndex:m}),j-=f.length-h,e=null,f=null,i=[],l=c.shift(),m++,!l)break}else if(o[k.nodeName]&&!n[k.nodeName]||!k.firstChild){if(k.nextSibling){k=k.nextSibling;continue}}else if(!a(k)){k=k.firstChild;continue}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===b)break a;k=k.parentNode}}}function j(a){var b;if("function"!=typeof a){var c=a.nodeType?a:m.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(m.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=m.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndex0}var l=this,m=-1;l.init=function(a){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d,separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:d}),a.addCommand("SearchReplace",d),a.shortcuts.add("Meta+F","",d)},l.find=function(a,b,c){a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),a=c?"\\b"+a+"\\b":a;var d=f(new RegExp(a,b?"g":"gi"));return d&&(m=-1,m=i(!0)),d},l.next=function(){var a=i(!0);a!==-1&&(m=a)},l.prev=function(){var a=i(!1);a!==-1&&(m=a)},l.replace=function(c,d,f){var i,n,o,p,q,r,s=m;for(d=d!==!1,o=a.getBody(),n=b.grep(b.toArray(o.getElementsByTagName("span")),k),i=0;im&&n[i].setAttribute("data-mce-index",q-1)}return a.undoManager.add(),m=s,d?(r=h(s+1).length>0,l.next()):(r=h(s-1).length>0,l.prev()),!f&&r},l.done=function(c){var d,f,h,i;for(f=b.toArray(a.getBody().getElementsByTagName("span")),d=0;d0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function h(b){var c;if(3===b.nodeType)return b.data;if(o[b.nodeName]&&!n[b.nodeName])return"";if(c="",a(b))return"\n";if((n[b.nodeName]||p[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=h(b);while(b=b.nextSibling);return c}function i(b,c,d){var e,f,g,h,i=[],j=0,k=b,l=c.shift(),m=0;a:for(;;){if((n[k.nodeName]||p[k.nodeName]||a(k))&&j++,3===k.nodeType&&(!f&&k.length+j>=l[1]?(f=k,h=l[1]-j):e&&i.push(k),!e&&k.length+j>l[0]&&(e=k,g=l[0]-j),j+=k.length),e&&f){if(k=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:i,match:l[2],matchIndex:m}),j-=f.length-h,e=null,f=null,i=[],l=c.shift(),m++,!l)break}else if(o[k.nodeName]&&!n[k.nodeName]||!k.firstChild){if(k.nextSibling){k=k.nextSibling;continue}}else if(!a(k)){k=k.firstChild;continue}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===b)break a;k=k.parentNode}}}function j(a){var b;if("function"!=typeof a){var c=a.nodeType?a:m.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(m.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=m.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndex0},m=function(b,d,f,g,i){var m,n,q,r,s,t,u=d.get();for(g=g!==!1,q=b.getBody(),n=a.grep(a.toArray(q.getElementsByTagName("span")),l),m=0;md.get()&&n[m].setAttribute("data-mce-index",s-1)}return d.set(u),g?(t=o(b,d),j(b,d)):(t=p(b,d),k(b,d)),!i&&t},n=function(b,d,f){var g,h,i,j;for(h=a.toArray(b.getBody().getElementsByTagName("span")),g=0;g0},p=function(a,b){return f(a,b.get()-1).length>0};return{done:n,find:i,next:j,prev:k,replace:m,hasNext:o,hasPrev:p}}),g("3",["7"],function(a){var b=function(b,c){var d=function(d){return a.done(b,c,d)},e=function(d,e,f){return a.find(b,c,d,e,f)},f=function(){return a.next(b,c)},g=function(){return a.prev(b,c)},h=function(d,e,f){return a.replace(b,c,d,e,f)};return{done:d,find:e,next:f,prev:g,replace:h}};return{get:b}}),g("8",["9","7"],function(a,b){var c=function(c,d){function e(){i.statusbar.find("#next").disabled(b.hasNext(c,d)===!1),i.statusbar.find("#prev").disabled(b.hasPrev(c,d)===!1)}function f(){c.windowManager.alert("Could not find the specified string.",function(){i.find("#find")[0].focus()})}var g,h={};c.undoManager.add(),g=a.trim(c.selection.getContent({format:"text"}));var i=c.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){c.focus(),b.done(c,d),c.undoManager.add()},onSubmit:function(a){var g,j,k,l;return a.preventDefault(),j=i.find("#case").checked(),l=i.find("#words").checked(),k=i.find("#find").value(),k.length?h.text===k&&h.caseState===j&&h.wholeWord===l?b.hasNext(c,d)?(b.next(c,d),void e()):void f():(g=b.find(c,d,k,j,l),g||f(),i.statusbar.items().slice(1).disabled(0===g),e(),void(h={text:k,caseState:j,wholeWord:l})):(b.done(c,d,!1),void i.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){i.submit()}},{text:"Replace",disabled:!0,onclick:function(){b.replace(c,d,i.find("#replace").value())||(i.statusbar.items().slice(1).disabled(!0),d.set(-1),h={})}},{text:"Replace all",disabled:!0,onclick:function(){b.replace(c,d,i.find("#replace").value(),!0,!0),i.statusbar.items().slice(1).disabled(!0),h={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){b.prev(c,d),e()}},{text:"Next",name:"next",disabled:!0,onclick:function(){b.next(c,d),e()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:g},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})};return{open:c}}),g("4",["8"],function(a){var b=function(b,c){b.addCommand("SearchReplace",function(){a.open(b,c)})};return{register:b}}),g("5",["8"],function(a){var b=function(b,c){return function(){a.open(b,c)}},c=function(a,c){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:b(a,c),separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",onclick:b(a,c)}),a.shortcuts.add("Meta+F","",b(a,c))};return{register:c}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("searchreplace",function(b){var f=a(-1);return d.register(b,f),e.register(b,f),c.get(b,f)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/spellchecker/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/spellchecker/plugin.min.js index 60c8bc42ba..74c5544d20 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/spellchecker/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/spellchecker/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(y[l.nodeName]&&!x[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=A[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(B.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=B.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndex0&&d.insertNode(c.dom.doc.createTextNode(b)),d}function u(){return A.splice(0,A.length),o(),this}var v,w,x,y,z,A=[],B=c.dom;return x=c.schema.getBlockElements(),y=c.schema.getWhiteSpaceElements(),z=c.schema.getShortEndedElements(),w=e(b),{text:w,matches:A,each:l,filter:k,reset:u,matchFromElement:p,elementFromMatch:q,find:n,add:r,wrap:m,unwrap:o,replace:t,rangeFromMatch:s,indexOf:j}}}),h("9",tinymce.util.Tools.resolve),g("2",["9"],function(a){return a("tinymce.PluginManager")}),g("3",["9"],function(a){return a("tinymce.util.Tools")}),g("4",["9"],function(a){return a("tinymce.ui.Menu")}),g("5",["9"],function(a){return a("tinymce.dom.DOMUtils")}),g("6",["9"],function(a){return a("tinymce.util.XHR")}),g("7",["9"],function(a){return a("tinymce.util.URI")}),g("8",["9"],function(a){return a("tinymce.util.JSON")}),g("0",["1","2","3","4","5","6","7","8"],function(a,b,c,d,e,f,g,h){return b.add("spellchecker",function(i,j){function k(){return F.textMatcher||(F.textMatcher=new a(i.getBody(),i)),F.textMatcher}function l(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function m(a){for(var b in a)return!1;return!0}function n(a,b){var f=[],g=B[a];c.each(g,function(a){f.push({text:a,onclick:function(){i.insertContent(i.dom.encode(a)),i.dom.remove(b),s()}})}),f.push({text:"-"}),E&&f.push({text:"Add to Dictionary",onclick:function(){t(a,b)}}),f.push.apply(f,[{text:"Ignore",onclick:function(){u(a,b)}},{text:"Ignore all",onclick:function(){u(a,b,!0)}}]),D=new d({items:f,context:"contextmenu",onautohide:function(a){a.target.className.indexOf("spellchecker")!=-1&&a.preventDefault()},onhide:function(){D.remove(),D=null}}),D.renderTo(document.body);var h=e.DOM.getPos(i.getContentAreaContainer()),j=i.dom.getPos(b[0]),k=i.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),h.x+=j.x,h.y+=j.y,D.moveTo(h.x,h.y+b[0].offsetHeight)}function o(){return i.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function p(a,b,d,e){var k={method:a,lang:G.spellchecker_language},l="";k["addToDictionary"==a?"word":"text"]=b,c.each(k,function(a,b){l&&(l+="&"),l+=b+"="+encodeURIComponent(a)}),f.send({url:new g(j).toAbsolute(G.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:l,success:function(a){if(a=h.parse(a))a.error?e(a.error):d(a);else{var b=i.translate("Server response wasn't proper JSON.");e(b)}},error:function(){var a=i.translate("The spelling service was not found: (")+G.spellchecker_rpc_url+i.translate(")");e(a)}})}function q(a,b,c,d){var e=G.spellchecker_callback||p;e.call(F,a,b,c,d)}function r(){function a(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1),v()}v()||(i.setProgressState(!0),q("spellcheck",k().text,z,a),i.focus())}function s(){i.dom.select("span.mce-spellchecker-word").length||v()}function t(a,b){i.setProgressState(!0),q("addToDictionary",a,function(){i.setProgressState(!1),i.dom.remove(b,!0),s()},function(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1)})}function u(a,b,d){i.selection.collapse(),d?c.each(i.dom.select("span.mce-spellchecker-word"),function(b){b.getAttribute("data-mce-word")==a&&i.dom.remove(b,!0)}):i.dom.remove(b,!0),s()}function v(){if(k().reset(),F.textMatcher=null,C)return C=!1,i.fire("SpellcheckEnd"),!0}function w(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function x(a){var b,d=[];if(b=c.toArray(i.getBody().getElementsByTagName("span")),b.length)for(var e=0;e0){var d=i.dom.createRng();d.setStartBefore(c[0]),d.setEndAfter(c[c.length-1]),i.selection.setRng(d),n(b.getAttribute("data-mce-word"),c)}}}),i.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:r,selectable:!0,onPostRender:function(){var a=this;a.active(C),i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}});var I={tooltip:"Spellcheck",onclick:r,onPostRender:function(){var a=this;i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}};A.length>1&&(I.type="splitbutton",I.menu=A,I.onshow=y,I.onselect=function(a){G.spellchecker_language=a.control.settings.data}),i.addButton("spellchecker",I),i.addCommand("mceSpellCheck",r),i.on("remove",function(){D&&(D.remove(),D=null)}),i.on("change",s),this.getTextMatcher=k,this.getWordCharPattern=o,this.markErrors=z,this.getLanguage=function(){return G.spellchecker_language},G.spellchecker_language=G.spellchecker_language||G.language||"en"}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return a.getParam("spellchecker_wordchar_pattern",b)};return{getLanguages:a,getLanguage:b,getRpcUrl:c,getSpellcheckerCallback:d,getSpellcheckerWordcharPattern:e}}),g("c",["9"],function(a){return a("tinymce.util.Tools")}),g("g",["9"],function(a){return a("tinymce.util.URI")}),g("h",["9"],function(a){return a("tinymce.util.XHR")}),g("i",[],function(){var a=function(a){return a.fire("SpellcheckStart")},b=function(a){return a.fire("SpellcheckEnd")};return{fireSpellcheckStart:a,fireSpellcheckEnd:b}}),g("j",[],function(){function a(a){return a&&1===a.nodeType&&"false"===a.contentEditable}return function(b,c){function d(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:a.index,end:a.index+a[0].length,text:a[0],data:b}}function e(b){var c;if(3===b.nodeType)return b.data;if(z[b.nodeName]&&!y[b.nodeName])return"";if(a(b))return"\n";if(c="",(y[b.nodeName]||A[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=e(b);while(b=b.nextSibling);return c}function f(b,c,d){var e,f,g,h,i,j=[],k=0,l=b,m=0;c=c.slice(0),c.sort(function(a,b){return a.start-b.start}),i=c.shift();a:for(;;){if((y[l.nodeName]||A[l.nodeName]||a(l))&&k++,3===l.nodeType&&(!f&&l.length+k>=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(z[l.nodeName]&&!y[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=B[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(C.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=C.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndex0&&d.insertNode(c.dom.doc.createTextNode(b)),d}function v(){return B.splice(0,B.length),p(),this}var w,x,y,z,A,B=[],C=c.dom;return y=c.schema.getBlockElements(),z=c.schema.getWhiteSpaceElements(),A=c.schema.getShortEndedElements(),x=e(b),{text:x,matches:B,each:m,filter:l,reset:v,matchFromElement:q,elementFromMatch:r,find:o,add:s,wrap:n,unwrap:p,replace:u,rangeFromMatch:t,indexOf:k}}}),g("b",["c","g","h","i","6","j"],function(a,b,c,d,e,f){var g=function(a,b){if(!b.get()){var c=new f(a.getBody(),a);b.set(c)}return b.get()},h=function(a){for(var b in a)return!1;return!0},i=function(d,f,g){return function(h,i,j,k){var l={method:h,lang:g.get()},m="";l["addToDictionary"===h?"word":"text"]=i,a.each(l,function(a,b){m&&(m+="&"),m+=b+"="+encodeURIComponent(a)}),c.send({url:new b(f).toAbsolute(e.getRpcUrl(d)),type:"post",content_type:"application/x-www-form-urlencoded",data:m,success:function(a){if(a=JSON.parse(a))a.error?k(a.error):j(a);else{var b=d.translate("Server response wasn't proper JSON.");k(b)}},error:function(){var a=d.translate("The spelling service was not found: (")+e.getRpcUrl(d)+d.translate(")");k(a)}})}},j=function(a,b,c,d,f,g,h){var j=e.getSpellcheckerCallback(a),k=j?j:i(a,b,c);k.call(a.plugins.spellchecker,d,f,g,h)},k=function(a,b,c,d,e,f){if(!o(a,c,d)){var h=function(b){a.notificationManager.open({text:b,type:"error"}),a.setProgressState(!1),o(a,c,d)},i=function(b){r(a,c,d,e,b)};a.setProgressState(!0),j(a,b,f,"spellcheck",g(a,d).text,i,h),a.focus()}},l=function(a,b,c){a.dom.select("span.mce-spellchecker-word").length||o(a,b,c)},m=function(a,b,c,d,e,f){a.setProgressState(!0),j(a,b,"addToDictionary",e,function(){a.setProgressState(!1),a.dom.remove(f,!0),l(a,c,d)},function(b){a.notificationManager.open({text:b,type:"error"}),a.setProgressState(!1)})},n=function(b,c,d,e,f,g){b.selection.collapse(),g?a.each(b.dom.select("span.mce-spellchecker-word"),function(a){a.getAttribute("data-mce-word")===e&&b.dom.remove(a,!0)}):b.dom.remove(f,!0),l(b,c,d)},o=function(a,b,c){if(g(a,c).reset(),c.set(null),b.get())return b.set(!1),d.fireSpellcheckEnd(a),!0},p=function(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b},q=function(b,c){var d,e=[];if(d=a.toArray(b.getBody().getElementsByTagName("span")),d.length)for(var f=0;f1&&(m.type="splitbutton",m.menu=k,m.onshow=e(a),m.onselect=function(a){i.set(a.control.settings.data)}),a.addButton("spellchecker",m),a.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:l,selectable:!0,onPostRender:function(){var b=this;b.active(g.get()),a.on("SpellcheckStart SpellcheckEnd",function(){b.active(g.get())})}})};return{register:g}}),h("d",document),g("e",["9"],function(a){return a("tinymce.dom.DOMUtils")}),g("f",["9"],function(a){return a("tinymce.ui.Factory")}),g("8",["d","e","f","c","6","b"],function(a,b,c,d,e,f){var g,h=function(e,h,i,j,k,l,m){var n=[],o=i.get().suggestions[l];d.each(o,function(a){n.push({text:a,onclick:function(){e.insertContent(e.dom.encode(a)),e.dom.remove(m),f.checkIfFinished(e,j,k)}})}),n.push({text:"-"});var p=i.get().hasDictionarySupport;p&&n.push({text:"Add to Dictionary",onclick:function(){f.addToDictionary(e,h,j,k,l,m)}}),n.push.apply(n,[{text:"Ignore",onclick:function(){f.ignoreWord(e,j,k,l,m)}},{text:"Ignore all",onclick:function(){f.ignoreWord(e,j,k,l,m,!0)}}]),g=c.create("menu",{items:n,context:"contextmenu",onautohide:function(a){a.target.className.indexOf("spellchecker")!==-1&&a.preventDefault()},onhide:function(){g.remove(),g=null}}),g.renderTo(a.body);var q=b.DOM.getPos(e.getContentAreaContainer()),r=e.dom.getPos(m[0]),s=e.dom.getRoot();"BODY"===s.nodeName?(r.x-=s.ownerDocument.documentElement.scrollLeft||s.scrollLeft,r.y-=s.ownerDocument.documentElement.scrollTop||s.scrollTop):(r.x-=s.scrollLeft,r.y-=s.scrollTop),q.x+=r.x,q.y+=r.y,g.moveTo(q.x,q.y+m[0].offsetHeight)},i=function(a,b,c,d,e){a.on("click",function(g){var i=g.target;if("mce-spellchecker-word"===i.className){g.preventDefault();var j=f.findSpansByIndex(a,f.getElmIndex(i));if(j.length>0){var k=a.dom.createRng();k.setStartBefore(j[0]),k.setEndAfter(j[j.length-1]),a.selection.setRng(k),h(a,b,c,d,e,i.getAttribute("data-mce-word"),j)}}})};return{setup:i}}),g("0",["1","2","3","4","5","6","7","8"],function(a,b,c,d,e,f,g,h){return b.add("spellchecker",function(b,i){if(c.hasProPlugin(b)===!1){var j=a(!1),k=a(f.getLanguage(b)),l=a(null),m=a({});return g.register(b,i,j,l,k,m),h.setup(b,i,m,j,l),e.register(b,i,j,l,m,k),d.get(b,j,m,l,i)}}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/tabfocus/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/tabfocus/plugin.min.js index b0c95f827b..235125eb67 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/tabfocus/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/tabfocus/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0){for(l=h+1;l=0;l--)if(g(j[l]))return j[l];return null}var h,j,k,l;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(k=c.explode(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==k.length&&(k[1]=k[0],k[0]=":prev"),j=b.shiftKey?":prev"==k[0]?g(-1):i.get(k[0]):":next"==k[1]?g(1):i.get(k[1]))){var m=d.get(j.id||j.name);j.id&&m?m.focus():e.setTimeout(function(){f.webkit||window.focus(),j.focus()},10),b.preventDefault()}}var i=b.DOM;a.on("init",function(){a.inline&&i.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",g),f.gecko?a.on("keypress keydown",h):a.on("keydown",h)})}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0){for(o=l+1;o=0;o--)if(e(m[o]))return m[o];return null}var l,m,n,o;if(!(j.keyCode!==g.TAB||j.ctrlKey||j.altKey||j.metaKey||j.isDefaultPrevented())&&(n=f.explode(h.getTabFocus(b)),1===n.length&&(n[1]=n[0],n[0]=":prev"),m=j.shiftKey?":prev"===n[0]?k(-1):i.get(n[0]):":next"===n[1]?k(1):i.get(n[1]))){var p=c.get(m.id||m.name);m.id&&p?p.focus():e.setTimeout(function(){d.webkit||a.focus(),m.focus()},10),j.preventDefault()}}b.on("init",function(){b.inline&&i.setAttrib(b.getBody(),"tabIndex",null),b.on("keyup",j),d.gecko?b.on("keypress keydown",k):b.on("keydown",k)})};return{setup:k}}),g("0",["1","2"],function(a,b){return a.add("tabfocus",function(a){b.setup(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/table/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/table/plugin.min.js index 4465e49dee..2724378bf2 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/table/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/table/plugin.min.js @@ -1,2 +1,5 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i9)&&(b.hasChildNodes()||(b.innerHTML='
'))}var c=function(a){return function(b,c){b&&(c=parseInt(c,10),1===c||0===c?b.removeAttribute(a,1):b.setAttribute(a,c,1))}},d=function(a){return function(b){return parseInt(b.getAttribute(a)||1,10)}};return{setColSpan:c("colSpan"),setRowSpan:c("rowspan"),getColSpan:d("colSpan"),getRowSpan:d("rowSpan"),setSpanVal:function(a,b,d){c(b)(a,d)},getSpanVal:function(a,b){return d(b)(a)},paddCell:b}}),g("d",["4","c"],function(a,b){var c=function(a,b,c){return a[c]?a[c][b]:null},d=function(a,b,d){var e=c(a,b,d);return e?e.elm:null},e=function(a,b,e,f){var g,h,i=0,j=d(a,b,e);for(g=e;(f>0?g=0)&&(h=c(a,b,g),j===h.elm);g+=f)i++;return i},f=function(a,b,c){for(var d,e=a[c],f=b;f'),!1},"childNodes"),d=q(d,!1),p(d),g(d,"rowSpan",1),g(d,"colSpan",1),f?d.appendChild(f):c.paddCell(d),d}function z(){var a,b=ca.createRng();return e(ca.select("tr",i),function(a){0===a.cells.length&&ca.remove(a)}),0===ca.select("tr",i).length?(b.setStartBefore(i),b.setEndBefore(i),ba.setRng(b),void ca.remove(i)):(e(ca.select("thead,tbody,tfoot",i),function(a){0===a.rows.length&&ca.remove(a)}),n(),void(_&&(a=Z[Math.min(Z.length-1,_.y)],a&&(ba.select(a[Math.min(a.length-1,_.x)].elm,!0),ba.collapse(!0)))))}function A(a,b,c,d){var e,f,g,h,i;for(e=Z[b][a].elm.parentNode,g=1;g<=c;g++)if(e=ca.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=Z[b+g][f].elm,i.parentNode==e){for(h=1;h<=d;h++)ca.insertAfter(y(i),i);break}if(f==-1)for(h=1;h<=d;h++)e.insertBefore(y(e.cells[0]),e.cells[0])}}function B(){e(Z,function(a,b){e(a,function(a,c){var d,e,h;if(u(a)&&(a=a.elm,d=f(a,"colspan"),e=f(a,"rowspan"),d>1||e>1)){for(g(a,"rowSpan",1),g(a,"colSpan",1),h=0;hc)&&d.push(a[e]);return d}function D(b){return a.grep(b,function(a){return a.real===!1})}function E(a){for(var b=[],c=0;c1&&(x=1),g(o,"colSpan",w),g(o,"rowSpan",x),m=i;m<=k;m++)for(l=h;l<=j;l++)Z[m]&&Z[m][l]&&(b=Z[m][l].elm,b!=o&&(q=a.grep(b.childNodes),e(q,function(a){o.appendChild(a)}),q.length&&(q=a.grep(o.childNodes),s=0,e(q,function(a){"BR"==a.nodeName&&s++0&&Z[b-1][h]&&(l=Z[b-1][h].elm,m=f(l,"rowSpan"),m>1)){g(l,"rowSpan",m+1);continue}}else if(m=f(c,"rowspan"),m>1){g(c,"rowSpan",m+1);continue}k=y(c),g(k,"colSpan",c.colSpan),j.appendChild(k),d=c}j.hasChildNodes()&&(a?i.parentNode.insertBefore(j,i):ca.insertAfter(j,i))}}function J(a,b){b=b||v().length||1;for(var c=0;c1?g(c,"colSpan",b-1):ca.remove(c)}),b.push(d))})}),z()}function P(){function a(a){var b,c;e(a.cells,function(a){var c=f(a,"rowSpan");c>1&&(g(a,"rowSpan",c-1),b=T(a),A(b.x,b.y,1,1))}),b=T(a.cells[0]),e(Z[b.y],function(a){var b;a=a.elm,a!=c&&(b=f(a,"rowSpan"),b<=1?ca.remove(a):g(a,"rowSpan",b-1),c=a)})}var b;b=v(),l(i)&&b.length==i.rows.length||(e(b.reverse(),function(b){a(b)}),z())}function Q(){var a=v();if(!l(i)||a.length!=i.rows.length)return ca.remove(a),z(),a}function R(){var a=v();return e(a,function(b,c){a[c]=q(b,!0)}),a}function S(b,c){var h,i,j,l=[];b&&(h=d.splitAt(Z,_.x,_.y,c),i=h.row,a.each(h.cells,p),j=a.map(b,function(a){return a.cloneNode(!0)}),e(j,function(a,b,d){var h,j,k,m,n=a.cells.length,q=0;for(o(a),h=0;h1&&(q--,b+k>d.length?(k=d.length-b,g(j,"rowSpan",k),l.push(d.length-1)):l.push(b+k-1)),p(j);for(e(l,function(a){b<=a&&q++}),h=q;h<$;h++)a.appendChild(y(a.cells[n-1]));for(h=$;h1?g(j,"colSpan",m-1):ca.remove(j);c?i.parentNode.insertBefore(a,i):i=ca.insertAfter(a,i)}),k())}function T(a){var b;return e(Z,function(c,d){return e(c,function(c,e){if(c.elm==a)return b={x:e,y:d},!1}),!b}),b}function U(a){_=T(a)}function V(){var a,b;return a=b=0,e(Z,function(c,d){e(c,function(c,e){var f,g;u(c)&&(c=Z[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function W(a){var b,c,d,e,f,g,h,i,j,l;if(aa=T(a),_&&aa){for(b=Math.min(_.x,aa.x),c=Math.min(_.y,aa.y),d=Math.max(_.x,aa.x),e=Math.max(_.y,aa.y),f=d,g=e,l=c;l<=e;l++)for(j=b;j<=d;j++)a=Z[l][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&l+i>g&&(g=l+i));for(k(),l=c;l<=g;l++)for(j=b;j<=f;j++)Z[l][j]&&ca.setAttrib(Z[l][j].elm,"data-mce-selected","1")}}function X(a,b){var c,d,e;c=T(a),d=c.y*$+c.x;do{if(d+=b,e=r(d%$,Math.floor(d/$)),!e)break;if(e.elm!=a)return ba.select(e.elm,!0),ca.isEmpty(e.elm)&&ba.collapse(!0),!0}while(e.elm==a);return!1}function Y(b){if(_){var c=d.splitAt(Z,_.x,_.y,b);a.each(c.cells,p)}}var Z,$,_,aa,ba=h.selection,ca=ba.dom;i=i||ca.getParent(ba.getStart(!0),"table"),n(),j=j||ca.getParent(ba.getStart(!0),"th,td"),j&&(_=T(j),aa=V(),j=r(_.x,_.y)),a.extend(this,{deleteTable:x,split:B,merge:H,insertRow:I,insertRows:J,insertCol:K,insertCols:L,splitCols:Y,deleteCols:O,deleteRows:P,cutRows:Q,copyRows:R,pasteRows:S,getPos:T,setStartCell:U,setEndCell:W,moveRelIdx:X,refresh:n})}}),g("7",["6","1","4"],function(a,b,c){return function(d,e){function f(a){d.getBody().style.webkitUserSelect="",(a||p)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),p=!1)}function g(a,b){return!(!a||!b)&&a===o.getParent(b,"table")}function h(b){var c,f,h=b.target;if(!m&&!n&&h!==l&&(l=h,k&&j)){if(f=o.getParent(h,"td,th"),g(k,f)||(f=o.getParent(k,"td,th")),j===f&&!p)return;if(e(!0),g(k,f)){b.preventDefault(),i||(i=new a(d,k,j),d.getBody().style.webkitUserSelect="none"),i.setEndCell(f),p=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(a){}}}}var i,j,k,l,m,n,o=d.dom,p=!0,q=function(){j=i=k=l=null,e(!1)};return d.on("SelectionChange",function(a){p&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||m||n||(f(),j=o.getParent(a.target,"td,th"),k=o.getParent(j,"table"))}),d.on("mouseover",h),d.on("remove",function(){o.unbind(d.getDoc(),"mouseover",h),f()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,h,k,l=d.selection;if(j){if(i&&(d.getBody().style.webkitUserSelect=""),f=o.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=o.createRng(),h=f[0],e.setStartBefore(h),e.setEndAfter(h),a(h,1),g=new b(h,o.getParent(f[0],"table"));do if("TD"==h.nodeName||"TH"==h.nodeName){if(!o.getAttrib(h,"data-mce-selected"))break;k=h}while(h=g.next());a(k),l.setRng(e)}d.nodeChanged(),q()}}),d.on("KeyUp Drop SetContent",function(a){f("setcontent"==a.type),q(),m=!1}),d.on("ObjectResizeStart ObjectResized",function(a){m="objectresized"!=a.type}),d.on("dragstart",function(){n=!0}),d.on("drop dragend",function(){n=!1}),{clear:f}}}),g("8",["4","2"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;if(a)return function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;d1?p={width:"",height:"",scope:"","class":"",align:"",style:"",type:o.nodeName.toLowerCase()}:(p={width:g(r.getStyle(o,"width")||r.getAttrib(o,"width")),height:g(r.getStyle(o,"height")||r.getAttrib(o,"height")),scope:r.getAttrib(o,"scope"),"class":r.getAttrib(o,"class")},p.type=o.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(o,"align"+a)&&(p.align=a)}),c("top middle bottom".split(" "),function(a){d.formatter.matchNode(o,"valign"+a)&&(p.valign=a)}),m(r,p,o)),d.settings.table_cell_class_list&&(q={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_cell_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"td",classes:[a.value]})})})});var t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},q]};d.settings.table_cell_advtab!==!1?d.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:p,body:[{title:"General",type:"form",items:t},f(r)],onsubmit:n}):d.windowManager.open({title:"Cell properties",data:p,body:t,onsubmit:n})}},o.row=function(){function b(a,b,c){(1===u.length||c)&&t.setAttrib(a,b,c)}function e(a,b,c){(1===u.length||c)&&t.setStyle(a,b,c)}function j(){var f,g,j;l(t,this),r=a.extend(r,this.toJSON()),d.undoManager.transact(function(){var a=r.type;c(u,function(c){b(c,"scope",r.scope),b(c,"style",r.style),b(c,"class",r["class"]),e(c,"height",h(r.height)),a!==c.parentNode.nodeName.toLowerCase()&&(f=t.getParent(c,"table"),g=c.parentNode,j=t.select(a,f)[0],j||(j=t.create(a),f.firstChild?f.insertBefore(j,f.firstChild):f.appendChild(j)),j.appendChild(c),g.hasChildNodes()||t.remove(g)),1===u.length&&i(c),r.align&&d.formatter.apply("align"+r.align,{},c)}),d.focus()})}var n,o,p,q,r,s,t=d.dom,u=[];n=d.dom.getParent(d.selection.getStart(),"table"),o=d.dom.getParent(d.selection.getStart(),"td,th"),c(n.rows,function(a){c(a.cells,function(b){if(t.getAttrib(b,"data-mce-selected")||b==o)return u.push(a),!1})}),p=u[0],p&&(u.length>1?r={height:"",scope:"","class":"",align:"",type:p.parentNode.nodeName.toLowerCase()}:(r={height:g(t.getStyle(p,"height")||t.getAttrib(p,"height")),scope:t.getAttrib(p,"scope"),"class":t.getAttrib(p,"class")},r.type=p.parentNode.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(r.align=a)}),m(t,r,p)),d.settings.table_row_class_list&&(q={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_row_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"tr",classes:[a.value]})})})}),s={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},q]},d.settings.table_row_advtab!==!1?d.windowManager.open({title:"Row properties",data:r,bodyType:"tabpanel",body:[{title:"General",type:"form",items:s},f(t)],onsubmit:j}):d.windowManager.open({title:"Row properties",data:r,body:s,onsubmit:j}))}}}),g("9",["4","5"],function(a,b){var c;return function(d){function e(a,b){return{index:a,y:d.dom.getPos(b).y}}function f(a,b){return{index:a,y:d.dom.getPos(b).y+b.offsetHeight}}function g(a,b){return{index:a,x:d.dom.getPos(b).x}}function h(a,b){return{index:a,x:d.dom.getPos(b).x+b.offsetWidth}}function i(){var a=d.getBody().dir;return"rtl"===a}function j(){return d.inline}function k(){return j?d.getBody().ownerDocument.body:d.getBody()}function l(a,b){return i()?h(a,b):g(a,b)}function m(a,b){return i()?g(a,b):h(a,b)}function n(a,b){return o(a,"width")/o(b,"width")*100}function o(a,b){var c=d.dom.getStyle(a,b,!0),e=parseInt(c,10);return e}function p(a){var b=o(a,"width"),c=o(a.parentElement,"width");return b/c*100}function q(a,b){var c=o(a,"width");return b/c*100}function r(a,b){var c=o(a.parentElement,"width");return b/c*100}function s(a,b,c){for(var d=[],e=1;e0?s(e,f,g):[],k=h.length>0?s(l,m,h):[];w(j,a.offsetWidth,i),x(k,a.offsetHeight,i)}function F(a,b,c,d){if(b<0||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g0?e:f}function I(b,c,d){for(var e=C(b),f=a.map(e,function(a){return l(a.colIndex,a.element).x}),g=[],h=0;h1?F(f,h):H(e[h].element,c,d);j=j?j:va,g.push(j)}return g}function J(a){var b=G(a,"height"),c=parseInt(b,10);return Q(b)&&(c=0),!isNaN(c)&&c>0?c:o(a,"height")}function K(b){for(var c=D(b),d=a.map(c,function(a){return e(a.rowIndex,a.element).y}),f=[],g=0;g1?F(d,g):J(c[g].element);i=i?i:wa,f.push(i)}return f}function L(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&c=1&&S(c,b,a)}else if(_(ia)){var g=parseInt(d.dom.getAttrib(ia,pa),10),h=d.dom.getPos(ia).y;a=parseInt(d.dom.getAttrib(ia,oa),10),b=h-g,Math.abs(b)>=1&&T(c,b,a)}u(c),d.nodeChanged()}}function Z(a,b){ha=ha?ha:W(),ga=!0,d.dom.addClass(a,xa),ia=a,X(ha,b),d.dom.add(k(),ha)}function $(a){return d.dom.hasClass(a,qa)}function _(a){return d.dom.hasClass(a,ma)}function aa(a){ja=void 0!==ja?ja:a.clientX;var b=a.clientX-ja;ja=a.clientX;var c=d.dom.getPos(ia).x;d.dom.setStyle(ia,"left",c+b+"px")}function ba(a){ka=void 0!==ka?ka:a.clientY;var b=a.clientY-ka;ka=a.clientY;var c=d.dom.getPos(ia).y;d.dom.setStyle(ia,"top",c+b+"px")}function ca(a){ja=void 0,Z(a,aa)}function da(a){ka=void 0,Z(a,ba)}function ea(a){var b=a.target,e=d.getBody();if(d.$.contains(e,c)||c===e)if($(b)){a.preventDefault();var f=d.dom.getPos(b).x;d.dom.setAttrib(b,ta,f),ca(b)}else if(_(b)){a.preventDefault();var g=d.dom.getPos(b).y;d.dom.setAttrib(b,pa,g),da(b)}else t()}var fa,ga,ha,ia,ja,ka,la="mce-resize-bar",ma="mce-resize-bar-row",na="row-resize",oa="data-row",pa="data-initial-top",qa="mce-resize-bar-col",ra="col-resize",sa="data-col",ta="data-initial-left",ua=4,va=10,wa=10,xa="mce-resize-bar-dragging",ya=new RegExp(/(\d+(\.\d+)?%)/),za=new RegExp(/px|em/); -return d.on("init",function(){d.dom.bind(k(),"mousedown",ea)}),d.on("ObjectResized",function(b){var c=b.target;if("TABLE"===c.nodeName){var e=[];a.each(c.rows,function(b){a.each(b.cells,function(a){var b=d.dom.getStyle(a,"width",!0);e.push({cell:a,width:b})})}),a.each(e,function(a){d.dom.setStyle(a.cell,"width",a.width),d.dom.setAttrib(a.cell,"width",null)})}}),d.on("mouseover",function(a){if(!ga){var b=d.dom.getParent(a.target,"table");("TABLE"===a.target.nodeName||b)&&(c=b,u(b))}}),d.on("keydown",function(a){switch(a.keyCode){case b.LEFT:case b.RIGHT:case b.UP:case b.DOWN:t()}}),d.on("remove",function(){t(),d.dom.unbind(k(),"mousedown",ea)}),{adjustWidth:S,adjustHeight:T,clearBars:t,drawBars:E,determineDeltas:L,getTableGrid:z,getTableDetails:y,getWidths:I,getPixelHeights:K,isPercentageBasedSize:Q,isPixelBasedSize:R,recalculateWidths:N,recalculateCellHeights:O,recalculateRowHeights:P}}}),g("e",["b"],function(a){return a("tinymce.util.Delay")}),g("a",["5","e","2","4","c"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(f===-1){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){if(c+=g(a,"colspan"),d=e,c>b)return!1}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?" ":'
'):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}function n(){var b="\ufeff",c=function(a){return h.dom.isEmpty(a)||a.firstChild===a.lastChild&&f(a.firstChild)},d=function(a){return a&&"CAPTION"==a.nodeName&&"TABLE"==a.parentNode.nodeName},e=function(a,b){var c=b.firstChild;do if(c===a)return!0;while(c=c.firstChild);return!1},f=function(a){if(3===a.nodeType){if(a.data===b)return!0;a=a.parentNode}return 1===a.nodeType&&a.hasAttribute("data-mce-caret")},g=function(a){var b=h.selection.getRng();return!b.startOffset&&!b.startContainer.previousSibling&&e(b.startContainer,a)},i=function(a,c){var d;d=c?h.dom.create("p",{"data-mce-caret":"after","data-mce-bogus":"all"},'
'):a.ownerDocument.createTextNode(b),a.appendChild(d)},j=function(a,d){var e=a.lastChild,g=h.selection.getRng(),j=g.startContainer,k=g.startOffset;c(a)?(a.innerHTML=b,j=a.lastChild,k=0):f(e)||i(a,h.dom.isBlock(e)),h.selection.setCursorLocation(j,k)},k=function(a){var b=h.selection.getRng(),c=h.dom.createRng(),d=a.firstChild;b.commonAncestorContainer===a.parentNode&&e(b.startContainer,a)&&(c.setStart(a,0),1===d.nodeType?c.setEnd(a,a.childNodes.length):c.setEnd(d,d.nodeValue.length),h.selection.setRng(c))};h.on("keydown",function(b){if(!(b.keyCode!==a.DELETE&&b.keyCode!==a.BACKSPACE||b.isDefaultPrevented())){var e=h.dom.getParent(h.selection.getStart(),"caption");d(e)&&(h.selection.isCollapsed()?(j(e),(c(e)||b.keyCode===a.BACKSPACE&&g(e))&&b.preventDefault()):(k(e),h.undoManager.transact(function(){h.execCommand("Delete"),j(e)}),b.preventDefault()))}})}n(),m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),g("0",["1","2","3","4","5","6","7","8","9","a"],function(a,b,c,d,e,f,g,h,i,j){function k(a){function c(b){return function(){a.execCommand(b)}}function d(c,d){var e,f,g,h;for(g='',e=0;e",f=0;f"+(b.ie&&b.ie<10?" ":"
")+"";g+=""}return g+="
",a.undoManager.transact(function(){a.insertContent(g),h=a.dom.get("__mce"),a.dom.setAttrib(h,"id",null),a.$("tr",h).each(function(b,c){a.fire("newrow",{node:c}),a.$("th,td",c).each(function(b,c){a.fire("newcell",{node:c})})}),a.dom.setAttribs(h,a.settings.table_default_attributes||{}),a.dom.setStyles(h,a.settings.table_default_styles||{})}),h}function k(b,c,d){function e(){var e,f,g,h={},i=0;f=a.dom.select("td[data-mce-selected],th[data-mce-selected]"),e=f[0],e||(e=a.selection.getStart()),d&&f.length>0?(l(f,function(a){return h[a.parentNode.parentNode.nodeName]=1}),l(h,function(a){i+=a}),g=1!==i):g=!a.dom.getParent(e,c),b.disabled(g),a.selection.selectorChanged(c,function(a){b.disabled(!a)})}a.initialized?e():a.on("init",e)}function m(){k(this,"table")}function n(){k(this,"td,th")}function o(){k(this,"td,th",!0)}function p(){var a="";a='';for(var b=0;b<10;b++){a+="";for(var c=0;c<10;c++)a+='';a+=""}return a+="
",a+=''}function q(b,c,d){var e,f,g,h,i,j=d.getEl().getElementsByTagName("table")[0],k=d.isRtl()||"tl-tr"==d.parent().rel;for(j.nextSibling.innerHTML=b+1+" x "+(c+1),k&&(b=9-b),f=0;f<10;f++)for(e=0;e<10;e++)h=j.rows[f].childNodes[e].firstChild,i=(k?e>=b:e<=b)&&f<=c,a.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function r(){a.addButton("tableprops",{title:"Table properties",onclick:z.tableProps,icon:"table"}),a.addButton("tabledelete",{title:"Delete table",onclick:c("mceTableDelete")}),a.addButton("tablecellprops",{title:"Cell properties",onclick:c("mceTableCellProps")}),a.addButton("tablemergecells",{title:"Merge cells",onclick:c("mceTableMergeCells")}),a.addButton("tablesplitcells",{title:"Split cell",onclick:c("mceTableSplitCells")}),a.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:c("mceTableInsertRowBefore")}),a.addButton("tableinsertrowafter",{title:"Insert row after",onclick:c("mceTableInsertRowAfter")}),a.addButton("tabledeleterow",{title:"Delete row",onclick:c("mceTableDeleteRow")}),a.addButton("tablerowprops",{title:"Row properties",onclick:c("mceTableRowProps")}),a.addButton("tablecutrow",{title:"Cut row",onclick:c("mceTableCutRow")}),a.addButton("tablecopyrow",{title:"Copy row",onclick:c("mceTableCopyRow")}),a.addButton("tablepasterowbefore",{title:"Paste row before",onclick:c("mceTablePasteRowBefore")}),a.addButton("tablepasterowafter",{title:"Paste row after",onclick:c("mceTablePasteRowAfter")}),a.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:c("mceTableInsertColBefore")}),a.addButton("tableinsertcolafter",{title:"Insert column after",onclick:c("mceTableInsertColAfter")}),a.addButton("tabledeletecol",{title:"Delete column",onclick:c("mceTableDeleteCol")})}function s(b){var c=a.dom.is(b,"table")&&a.getBody().contains(b);return c}function t(){var b=a.settings.table_toolbar;""!==b&&b!==!1&&(b||(b="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),a.addContextToolbar(s,b))}function u(){return w}function v(a){w=a}var w,x,y=this,z=new h(a);!a.settings.object_resizing||a.settings.table_resize_bars===!1||a.settings.object_resizing!==!0&&"table"!==a.settings.object_resizing||(x=i(a)),a.settings.table_grid===!1?a.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",onclick:z.table}):a.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),z.table())},onshow:function(){q(0,0,this.menu.items()[0])},onhide:function(){var b=this.menu.items()[0].getEl().getElementsByTagName("a");a.dom.removeClass(b,"mce-active"),a.dom.addClass(b[0],"mce-active")},menu:[{type:"container",html:p(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(q(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(b){var c=this;"A"==b.target.tagName.toUpperCase()&&(b.preventDefault(),b.stopPropagation(),c.parent().cancel(),a.undoManager.transact(function(){d(c.lastX+1,c.lastY+1)}),a.addVisual())}}]}),a.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:m,onclick:z.tableProps}),a.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:m,cmd:"mceTableDelete"}),a.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:c("mceTableCellProps"),onPostRender:n},{text:"Merge cells",onclick:c("mceTableMergeCells"),onPostRender:o},{text:"Split cell",onclick:c("mceTableSplitCells"),onPostRender:n}]}),a.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:c("mceTableInsertRowBefore"),onPostRender:n},{text:"Insert row after",onclick:c("mceTableInsertRowAfter"),onPostRender:n},{text:"Delete row",onclick:c("mceTableDeleteRow"),onPostRender:n},{text:"Row properties",onclick:c("mceTableRowProps"),onPostRender:n},{text:"-"},{text:"Cut row",onclick:c("mceTableCutRow"),onPostRender:n},{text:"Copy row",onclick:c("mceTableCopyRow"),onPostRender:n},{text:"Paste row before",onclick:c("mceTablePasteRowBefore"),onPostRender:n},{text:"Paste row after",onclick:c("mceTablePasteRowAfter"),onPostRender:n}]}),a.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:c("mceTableInsertColBefore"),onPostRender:n},{text:"Insert column after",onclick:c("mceTableInsertColAfter"),onPostRender:n},{text:"Delete column",onclick:c("mceTableDeleteCol"),onPostRender:n}]});var A=[];l("inserttable tableprops deletetable | cell row column".split(" "),function(b){"|"==b?A.push({text:"-"}):A.push(a.menuItems[b])}),a.addButton("table",{type:"menubutton",title:"Table",menu:A}),b.isIE||a.on("click",function(b){b=b.target,"TABLE"===b.nodeName&&(a.selection.select(b),a.nodeChanged())}),y.quirks=new j(a),a.on("Init",function(){y.cellSelection=new g(a,function(a){a&&x&&x.clearBars()}),y.resizeBars=x}),a.on("PreInit",function(){a.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),l({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(b){var c;c=a.dom.getParent(a.selection.getStart(),"th,td"),a.dom.select("td[data-mce-selected],th[data-mce-selected]").length?b.merge():z.merge(b,c)},mceTableInsertRowBefore:function(a){a.insertRows(!0)},mceTableInsertRowAfter:function(a){a.insertRows()},mceTableInsertColBefore:function(a){a.insertCols(!0)},mceTableInsertColAfter:function(a){a.insertCols()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){w=a.cutRows()},mceTableCopyRow:function(a){w=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(w,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(w)},mceSplitColsBefore:function(a){a.splitCols(!0)},mceSplitColsAfter:function(a){a.splitCols(!1)},mceTableDelete:function(a){x&&x.clearBars(),a.deleteTable()}},function(b,c){a.addCommand(c,function(){var c=new f(a);c&&(b(c),a.execCommand("mceRepaint"),y.cellSelection.clear())})}),l({mceInsertTable:z.table,mceTableProps:function(){z.table(!0)},mceTableRowProps:z.row,mceTableCellProps:z.cell},function(b,c){a.addCommand(c,function(a,c){b(c)})}),r(),t(),a.settings.table_tab_navigation!==!1&&a.on("keydown",function(b){var c,d,g,h=a.selection.getStart();if(b.keyCode===e.TAB){if(a.dom.getParent(h,"LI,DT,DD"))return;c=a.dom.getParent(h,"th,td"),c&&(b.preventDefault(),d=new f(a),g=b.shiftKey?-1:1,a.undoManager.transact(function(){!d.moveRelIdx(c,g)&&g>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,g))}))}}),y.insertTable=d,y.setClipboardRows=v,y.getClipboardRows=u}var l=d.each;return c.add("table",k),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e0&&e.unsuppMessage(m);var n={};return a.each(h,function(a){n[a]=b.constant(f[a])}),a.each(i,function(a){n[a]=b.constant(g.prototype.hasOwnProperty.call(f,a)?d.some(f[a]):d.none())}),n}}}),g("1k",["1u","1v"],function(a,b){return{immutable:a,immutableBag:b}}),g("2c",["1k"],function(a){var b=a.immutable("width","height"),c=a.immutable("rows","columns"),d=a.immutable("row","column"),e=a.immutable("x","y"),f=a.immutable("element","rowspan","colspan"),g=a.immutable("element","rowspan","colspan","isNew"),h=a.immutable("element","rowspan","colspan","row","column"),i=a.immutable("element","cells","section"),j=a.immutable("element","isNew"),k=a.immutable("element","cells","section","isNew"),l=a.immutable("cells","section"),m=a.immutable("details","section"),n=a.immutable("startRow","startCol","finishRow","finishCol");return{dimensions:b,grid:c,address:d,coords:e,extended:h,detail:f,detailnew:g,rowdata:i,elementnew:j,rowdatanew:k,rowcells:l,rowdetails:m,bounds:n}}),g("21",[],function(){return"undefined"==typeof console&&(console={log:function(){}}),console}),h("23",document),g("l",["f","g","1q","21","23"],function(a,b,c,d,e){var f=function(a,b){var c=b||e,f=c.createElement("div");if(f.innerHTML=a,!f.hasChildNodes()||f.childNodes.length>1)throw d.error("HTML does not have a single root node",a),"HTML must have a single root node";return i(f.childNodes[0])},g=function(a,b){var c=b||e,d=c.createElement(a);return i(d)},h=function(a,b){var c=b||e,d=c.createTextNode(a);return i(d)},i=function(b){if(null===b||void 0===b)throw new c("Node cannot be null or undefined");return{dom:a.constant(b)}},j=function(a,c,d){return b.from(a.dom().elementFromPoint(c,d)).map(i)};return{fromHtml:f,fromTag:g,fromText:h,fromDom:i,fromPoint:j}}),g("20",[],function(){return{ATTRIBUTE:2,CDATA_SECTION:4,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,ELEMENT:1,TEXT:3,PROCESSING_INSTRUCTION:7,ENTITY_REFERENCE:5,ENTITY:6,NOTATION:12}}),g("27",["e","g","l","20","1q","23"],function(a,b,c,d,e,f){var g=d.ELEMENT,h=d.DOCUMENT,i=function(a,b){var c=a.dom();if(c.nodeType!==g)return!1;if(void 0!==c.matches)return c.matches(b);if(void 0!==c.msMatchesSelector)return c.msMatchesSelector(b);if(void 0!==c.webkitMatchesSelector)return c.webkitMatchesSelector(b);if(void 0!==c.mozMatchesSelector)return c.mozMatchesSelector(b);throw new e("Browser lacks native selectors")},j=function(a){return a.nodeType!==g&&a.nodeType!==h||0===a.childElementCount},k=function(b,d){var e=void 0===d?f:d.dom();return j(e)?[]:a.map(e.querySelectorAll(b),c.fromDom)},l=function(a,d){var e=void 0===d?f:d.dom();return j(e)?b.none():b.from(e.querySelector(a)).map(c.fromDom)};return{all:k,is:i,one:l}}),g("24",[],function(){var a=function(a,b){var c=[],d=function(a){return c.push(a),b(a)},e=b(a);do e=e.bind(d);while(e.isSome());return c};return{toArray:a}}),g("5t",[],function(){var a="undefined"!=typeof window?window:Function("return this;")();return a}),g("4y",["5t"],function(a){var b=function(b,c){for(var d=void 0!==c?c:a,e=0;e0&&b0?c.some(e[0]):c.none()},i=function(b,c){var d=a.bind(b.all(),function(a){return a.cells()});return a.filter(d,c)},j=function(c){var g={},h=[],i=c.length,j=0;a.each(c,function(b,c){var i=[];a.each(b.cells(),function(a,b){for(var h=0;void 0!==g[f(c,h)];)h++;for(var k=d.extended(a.element(),a.rowspan(),a.colspan(),c,h),l=0;l0})},v=function(a){var b={},c=a.dom();if(i.isSupported(c))for(var d=0;d0&&b.before(a,d),e(a)};return{empty:d,remove:e,unwrap:f}}),g("h",["e","1t","1k","1w","1x","1y","r","22","l","12","13","27"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=c.immutable("minRow","minCol","maxRow","maxCol"),n=function(a,c){var d=a.grid().columns(),e=a.grid().rows(),f=e,g=d,h=0,i=0;return b.each(a.access(),function(a){if(c(a)){var b=a.row(),d=b+a.rowspan()-1,e=a.column(),j=e+a.colspan()-1;bh&&(h=d),ei&&(i=j)}}),m(f,g,h,i)},o=function(a,b,c){var d=a[c].element(),e=i.fromTag("td");j.append(e,i.fromTag("br"));var f=b?j.append:j.prepend;f(d,e)},p=function(a,b,c,d){for(var f=b.grid().columns(),g=b.grid().rows(),h=0;hc.maxRow()||jc.maxCol())){var k=e.getAt(b,h,j).filter(d).isNone();k?o(a,i,h):i=!0}},q=function(b,c){var d=a.filter(f.firstLayer(b,"tr"),function(a){return 0===a.dom().childElementCount});a.each(d,k.remove),c.minCol()!==c.maxCol()&&c.minRow()!==c.maxRow()||a.each(f.firstLayer(b,"th,td"),function(a){g.remove(a,"rowspan"),g.remove(a,"colspan")}),g.remove(b,"width"),g.remove(b,"height"),h.remove(b,"width"),h.remove(b,"height")},r=function(b,c){var g=function(a){return l.is(a.element(),c)},h=d.fromTable(b),i=e.generate(h),j=n(i,g),m="th:not("+c+"),td:not("+c+")",o=f.filterFirstLayer(b,"th,td",function(a){return l.is(a,m)});return a.each(o,k.remove),p(h,i,j,g), +q(b,j),b};return{extract:r}}),g("k",["r","l","12","28","13","1m"],function(a,b,c,d,e,f){var g=function(a,c){return b.fromDom(a.dom().cloneNode(c))},h=function(a){return g(a,!1)},i=function(a){return g(a,!0)},j=function(c,d){var e=b.fromTag(d),f=a.clone(c);return a.setAll(e,f),e},k=function(a,b){var c=j(a,b),e=f.children(i(a));return d.append(c,e),c},l=function(a,b){var g=j(a,b);c.before(a,g);var h=f.children(a);return d.append(g,h),e.remove(a),g};return{shallow:h,shallowAs:j,deep:i,copy:k,mutate:l}}),g("3p",["26","g","1q"],function(a,b,c){return function(d,e){var f=function(a){if(!d(a))throw new c("Can only get "+e+" value of a "+e+" node");return j(a).getOr("")},g=function(a){try{return h(a)}catch(a){return b.none()}},h=function(a){return d(a)?b.from(a.dom().nodeValue):b.none()},i=a.detect().browser,j=i.isIE()&&10===i.version.major?g:h,k=function(a,b){if(!d(a))throw new c("Can only set raw "+e+" value of a "+e+" node");a.dom().nodeValue=b};return{get:f,getOption:j,set:k}}}),g("1l",["n","3p"],function(a,b){var c=b(a.isText,"text"),d=function(a){return c.get(a)},e=function(a){return c.getOption(a)},f=function(a,b){c.set(a,b)};return{get:d,getOption:e,set:f}}),g("2b",["e","n","1l","1m"],function(a,b,c,d){var e=function(a){return"img"===b.name(a)?1:c.getOption(a).fold(function(){return d.children(a).length},function(a){return a.length})},f=function(a,b){return e(a)===b},g=function(a,b){return 0===b},h="\xa0",i=function(a){return c.getOption(a).filter(function(a){return 0!==a.trim().length||a.indexOf(h)>-1}).isSome()},j=["img","br"],k=function(c){var d=i(c);return d||a.contains(j,b.name(c))};return{getEnd:e,isEnd:f,isStart:g,isCursorPosition:k}}),g("1d",["g","2a","1m","2b"],function(a,b,c,d){var e=function(a){return b.descendant(a,d.isCursorPosition)},f=function(a){return g(a,d.isCursorPosition)},g=function(b,d){var e=function(b){for(var f=c.children(b),g=f.length-1;g>=0;g--){var h=f[g];if(d(h))return a.some(h);var i=e(h);if(i.isSome())return i}return a.none()};return e(b)};return{first:e,last:f}}),g("i",["e","1t","1c","12","k","l","n","r","22","y","1m","1d"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(){var a=f.fromTag("td");return d.append(a,f.fromTag("br")),a},n=function(a,c,d){var f=e.copy(a,c);return b.each(d,function(a,b){null===a?h.remove(f,b):h.set(f,b,a)}),f},o=function(a){return a},p=function(a){return function(){return f.fromTag("tr",a.dom())}},q=function(b,f,g){var h=l.first(b);return h.map(function(h){var i=g.join(","),k=j.ancestors(h,i,function(a){return c.eq(a,b)});return a.foldr(k,function(a,b){var c=e.shallow(b);return d.append(a,c),c},f)}).getOr(f)},r=function(a,b,c){var e=function(b){var e=k.owner(b.element()),h=f.fromTag(g.name(b.element()),e.dom()),j=c.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),l=j.length>0?q(b.element(),h,j):h;return d.append(l,f.fromTag("br")),i.copy(b.element(),h),i.remove(h,"height"),1!==b.colspan()&&i.remove(b.element(),"width"),a(b.element(),h),h};return{row:p(b),cell:e,replace:n,gap:m}},s=function(a){return{row:p(a),cell:m,replace:o,gap:m}};return{cellOperations:r,paste:s}}),g("m",["e","l","1m","23"],function(a,b,c,d){var e=function(a,e){var f=e||d,g=f.createElement("div");return g.innerHTML=a,c.children(b.fromDom(g))},f=function(c,d){return a.map(c,function(a){return b.fromTag(a,d)})},g=function(c,d){return a.map(c,function(a){return b.fromText(a,d)})},h=function(c){return a.map(c,b.fromDom)};return{fromHtml:e,fromTags:f,fromText:g,fromDom:h}}),g("5v",[],function(){return["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"]}),g("56",["5v","e","f","r","1c","22","l","12","28","n","29","2a","13","y","t","1l","1m"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){return function(){var r=function(a){return g.fromDom(a.dom().cloneNode(!1))},s=function(c){return!!j.isElement(c)&&("body"===j.name(c)||b.contains(a,j.name(c)))},t=function(a){return!!j.isElement(a)&&b.contains(["br","img","hr","input"],j.name(a))},u=function(a,b){return a.dom().compareDocumentPosition(b.dom())},v=function(a,b){var c=d.clone(a);d.setAll(b,c)};return{up:c.constant({selector:o.ancestor,closest:o.closest,predicate:l.ancestor,all:q.parents}),down:c.constant({selector:n.descendants,predicate:k.descendants}),styles:c.constant({get:f.get,getRaw:f.getRaw,set:f.set,remove:f.remove}),attrs:c.constant({get:d.get,set:d.set,remove:d.remove,copyTo:v}),insert:c.constant({before:h.before,after:h.after,afterAll:i.after,append:h.append,appendAll:i.append,prepend:h.prepend,wrap:h.wrap}),remove:c.constant({unwrap:m.unwrap,remove:m.remove}),create:c.constant({nu:g.fromTag,clone:r,text:g.fromText}),query:c.constant({comparePosition:u,prevSibling:q.prevSibling,nextSibling:q.nextSibling}),property:c.constant({children:q.children,name:j.name,parent:q.parent,isText:j.isText,isComment:j.isComment,isElement:j.isElement,getText:p.get,setText:p.set,isBoundary:s,isEmptyTag:t}),eq:e.eq,is:e.is}}}),g("5w",["e","f","g","1k"],function(a,b,c,d){var e=d.immutable("left","right"),f=function(c,d,e){var f=c.property().children(d),g=a.findIndex(f,b.curry(c.eq,e));return g.map(function(a){return{before:b.constant(f.slice(0,a)),after:b.constant(f.slice(a+1))}})},g=function(a,b,c){return f(a,b,c).map(function(c){var d=a.create().clone(b);return a.insert().appendAll(d,c.after()),a.insert().after(b,d),e(b,d)})},h=function(a,b,c){return f(a,b,c).map(function(d){var f=a.create().clone(b);return a.insert().appendAll(f,d.before().concat([c])),a.insert().appendAll(b,d.after()),a.insert().before(b,f),e(f,b)})},i=function(a,b,e,f){var g=d.immutable("first","second","splits"),h=function(b,d,i){var j=g(b,c.none(),i);return e(b)?g(b,d,i):a.property().parent(b).bind(function(d){return f(a,d,b).map(function(a){var b=[{first:a.left,second:a.right}],f=e(d)?d:a.left();return h(f,c.some(a.right()),i.concat(b))}).getOr(j)})};return h(b,c.none(),[])};return{breakToLeft:h,breakToRight:g,breakPath:i}}),g("5x",["e","f","g"],function(a,b,c){var d=function(a,b,c,d){var e=c[0],f=c.slice(1);return d(a,b,e,f)},e=function(a,b,e){return e.length>0?d(a,b,e,f):c.none()},f=function(b,c,d,e){var f=c(b,d);return a.foldr(e,function(a,d){var e=c(b,d);return g(b,a,e)},f)},g=function(a,c,d){return c.bind(function(c){return d.filter(b.curry(a.eq,c))})};return{oneAll:e}}),g("5y",["e","f","g","3v"],function(a,b,c,d){var e=function(a,c){return b.curry(a.eq,c)},f=function(b,f,g,h){var i=b.property().children(f);if(b.eq(f,g[0]))return c.some([g[0]]);if(b.eq(f,h[0]))return c.some([h[0]]);var j=function(c){var d=a.reverse(c),g=a.findIndex(d,e(b,f)).getOr(-1),h=g=a.startCol()&&e<=a.finishRow()&&f>=a.startRow()},e=function(a,b){return b.column()>=a.startCol()&&b.column()+b.colspan()-1<=a.finishCol()&&b.row()>=a.startRow()&&b.row()+b.rowspan()-1<=a.finishRow()},f=function(d,f){for(var g=!0,h=a.curry(e,f),i=f.startRow();i<=f.finishRow();i++)for(var j=f.startCol();j<=f.finishCol();j++)g=g&&c.getAt(d,i,j).exists(h);return g?b.some(f):b.none()};return{inSelection:d,isWithin:e,isRectangular:f}}),g("41",["2c","1x","58","1c","3v"],function(a,b,c,d,e){var f=function(b,c){return a.bounds(e.min(b.row(),c.row()),e.min(b.column(),c.column()),e.max(b.row()+b.rowspan()-1,c.row()+c.rowspan()-1),e.max(b.column()+b.colspan()-1,c.column()+c.colspan()-1))},g=function(a,c,e){var g=b.findItem(a,c,d.eq),h=b.findItem(a,e,d.eq);return g.bind(function(a){return h.map(function(b){return f(a,b)})})},h=function(a,b,d){return g(a,b,d).bind(function(b){return c.isRectangular(a,b)})};return{getAnyBox:g,getBox:h}}),g("40",["e","f","1x","58","41","1c"],function(a,b,c,d,e,f){var g=function(a,b,d,e){return c.findItem(a,b,f.eq).bind(function(b){var f=d>0?b.row()+b.rowspan()-1:b.row(),g=e>0?b.column()+b.colspan()-1:b.column(),h=c.getAt(a,f+d,g+e);return h.map(function(a){return a.element()})})},h=function(f,g,h){return e.getAnyBox(f,g,h).map(function(e){var g=c.filterItems(f,b.curry(d.inSelection,e));return a.map(g,function(a){return a.element()})})},i=function(a,b){var d=function(a,b){return f.contains(b,a)};return c.findItem(a,b,d).bind(function(a){return a.element()})};return{moveBy:g,intercepts:h,parentCell:i}}),g("3q",["j","1w","1x","40","41","1c"],function(a,b,c,d,e,f){var g=function(b,c,e){return a.table(b).bind(function(a){var f=k(a);return d.moveBy(f,b,c,e)})},h=function(a,b,c){var e=k(a);return d.intercepts(e,b,c)},i=function(a,b,c,e,g){var h=k(a),i=f.eq(a,c)?b:d.parentCell(h,b),j=f.eq(a,g)?e:d.parentCell(h,e);return d.intercepts(h,i,j)},j=function(a,b,c){var d=k(a);return e.getBox(d,b,c)},k=function(a){var d=b.fromTable(a);return c.generate(d)};return{moveBy:g,intercepts:h,nestedIntercepts:i,getBox:j}}),g("3l",["e","f","g","3z","3q","1c","y","t","27"],function(a,b,c,d,e,f,g,h,i){var j=function(a,b){return h.ancestor(a,"table")},k=function(a,b,g){return f.eq(a,b)?c.some([a]):j(a,g).bind(function(c){return j(b,g).bind(function(i){return f.eq(c,i)?e.intercepts(c,a,b):f.contains(c,i)?e.nestedIntercepts(c,a,c,b,i):f.contains(i,c)?e.nestedIntercepts(i,a,c,b,i):d.ancestors(a,b).shared().bind(function(d){return h.closest(d,"table",g).bind(function(d){return e.nestedIntercepts(d,a,c,b,i)})})})})},l=function(a,b){var d=g.descendants(a,b);return d.length>0?c.some(d):c.none()},m=function(b,c){return a.find(b,function(a){return i.is(a,c)})},n=function(a,c,e){return h.descendant(a,c).bind(function(c){return h.descendant(a,e).bind(function(a){return d.sharedOne(j,[c,a]).map(function(d){return{first:b.constant(c),last:b.constant(a),table:b.constant(d)}})})})},o=function(a,c){return h.ancestor(a,"table").bind(function(d){return h.descendant(d,c).bind(function(c){return k(c,a).map(function(d){return{boxes:b.constant(d),start:b.constant(c),finish:b.constant(a)}})})})},p=function(a,b,c,d,f){return m(a,f).bind(function(a){return e.moveBy(a,b,c).bind(function(a){return o(a,d)})})};return{identify:k,retrieve:l,shiftSelection:p,getEdges:n}}),g("1o",["3l","g","3q","1c","t"],function(a,b,c,d,e){var f=function(b,c){return a.retrieve(b,c)},g=function(f,g,h){return a.getEdges(f,g,h).bind(function(a){var g=function(a){return d.eq(f,a)},h=e.ancestor(a.first(),"thead,tfoot,tbody,table",g),i=e.ancestor(a.last(),"thead,tfoot,tbody,table",g);return h.bind(function(e){return i.bind(function(f){return d.eq(e,f)?c.getBox(a.table(),a.first(),a.last()):b.none()})})})};return{retrieve:f,retrieveBox:g}}),g("9",["f"],function(a){var b="data-mce-selected",c="td["+b+"],th["+b+"]",d="["+b+"]",e="data-mce-first-selected",f="td["+e+"],th["+e+"]",g="data-mce-last-selected",h="td["+g+"],th["+g+"]";return{selected:a.constant(b),selectedSelector:a.constant(c),attributeSelector:a.constant(d),firstSelected:a.constant(e),firstSelectedSelector:a.constant(f),lastSelected:a.constant(g),lastSelectedSelector:a.constant(h)}}),g("2g",["e","1t","1z","1p","1q","21"],function(a,b,c,d,e,f){var g=function(g){if(!c.isArray(g))throw new e("cases must be an array");if(0===g.length)throw new e("there must be at least one case");var h=[],i={};return a.each(g,function(j,k){var l=b.keys(j);if(1!==l.length)throw new e("one and only one name per case");var m=l[0],n=j[m];if(void 0!==i[m])throw new e("duplicate key detected:"+m);if("cata"===m)throw new e("cannot have a case named cata (sorry)");if(!c.isArray(n))throw new e("case arguments must be an array");h.push(m),i[m]=function(){var c=arguments.length;if(c!==n.length)throw new e("Wrong number of arguments to case "+m+". Expected "+n.length+" ("+n+"), got "+c);for(var i=new d(c),j=0;j1||e.has(a,"colspan")&&parseInt(e.get(a,"colspan"),10)>1},g=h(a,c);return g.length>0&&b.forall(g,f)?d.some(g):d.none()},j=function(b,e){return g.cata(e.get(),d.none,function(e,g){return 0===e.length?d.none():a.retrieveBox(b,f.firstSelectedSelector(),f.lastSelectedSelector()).bind(function(a){return e.length>1?d.some({bounds:c.constant(a),cells:c.constant(e)}):d.none()})},d.none)};return{mergable:j,unmergable:i,selection:h}}),g("o",["f","g","1k","2f"],function(a,b,c,d){var e=function(c){return{element:a.constant(c),mergable:b.none,unmergable:b.none,selection:a.constant([c])}},f=function(b,c,e){return{element:a.constant(e),mergable:a.constant(d.mergable(c,b)),unmergable:a.constant(d.unmergable(e,b)),selection:a.constant(d.selection(e,b))}},g=function(a){return e(a)},h=c.immutable("element","clipboard","generators"),i=function(c,e,f,g,h){return{element:a.constant(f),mergable:b.none,unmergable:b.none,selection:a.constant(d.selection(f,c)),clipboard:a.constant(g),generators:a.constant(h)}};return{noMenu:e,forMenu:f,notCell:g,paste:h,pasteRows:i}}),g("2",["e","f","g","h","i","j","k","l","m","n","o","9","p"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=function(a){return f.table(a[0]).map(g.deep).map(function(a){return[d.extract(a,l.attributeSelector())]})},o=function(a,b){return a.selection.serializer.serialize(b.dom(),{})},p=function(d,g,l,p){d.on("BeforeGetContent",function(c){var e=function(b){c.preventDefault(),n(b).each(function(b){c.content=a.map(b,function(a){return o(d,a)}).join("")})};c.selection===!0&&m.cata(g.get(),b.noop,e,b.noop)}),d.on("BeforeSetContent",function(b){if(b.selection===!0&&b.paste===!0){var g=c.from(d.dom.getParent(d.selection.getStart(),"th,td"));g.each(function(c){var g=h.fromDom(c),m=f.table(g);m.bind(function(c){var f=a.filter(i.fromHtml(b.content),function(a){return"meta"!==j.name(a)});if(1===f.length&&"table"===j.name(f[0])){b.preventDefault();var m=h.fromDom(d.getDoc()),n=e.paste(m),o=k.paste(g,f[0],n);l.pasteCells(c,o).each(function(a){d.selection.setRng(a),d.focus(),p.clear(c)})}})})}})};return{registerEvents:p}}),g("2h",["r","22","l","12","28"],function(a,b,c,d,e){var f=function(){return c.fromTag("table")},g=function(){return c.fromTag("tbody")},h=function(){return c.fromTag("tr")},i=function(){return c.fromTag("th")},j=function(){return c.fromTag("td")},k=function(k,l,m,n){var o=f();b.setAll(o,{"border-collapse":"collapse",width:"100%"}),a.set(o,"border","1");var p=g();d.append(o,p);for(var q=[],r=0;rd?b-d:0;return e};return{set:g,get:h,getOuter:i,aggregate:j,max:k}}}),g("43",["35","22","59"],function(a,b,c){var d=c("height",function(b){return a.inBody(b)?b.dom().getBoundingClientRect().height:b.dom().offsetHeight}),e=function(a,b){d.set(a,b)},f=function(a){return d.get(a)},g=function(a){return d.getOuter(a)},h=function(a,c){var e=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],f=d.max(a,c,e);b.set(a,"max-height",f+"px")};return{set:e,get:f,getOuter:g,setMax:h}}),g("44",["22","59"],function(a,b){var c=b("width",function(a){return a.dom().offsetWidth}),d=function(a,b){c.set(a,b)},e=function(a){return c.get(a)},f=function(a){return c.getOuter(a)},g=function(b,d){var e=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],f=c.max(b,d,e);a.set(b,"max-width",f+"px")};return{set:d,get:e,getOuter:f,setMax:g}}),g("42",["26","22","43","44"],function(a,b,c,d){var e=a.detect(),f=function(){return e.browser.isIE()||e.browser.isEdge()},g=function(a,b){var c=parseFloat(a);return isNaN(c)?b:c},h=function(a,c,d){return g(b.get(a,c),d)},i=function(a){var c=h(a,"padding-top",0),d=h(a,"padding-bottom",0),e=h(a,"border-top-width",0),f=h(a,"border-bottom-width",0),g=a.dom().getBoundingClientRect().height,i=b.get(a,"box-sizing"),j=e+f;return"border-box"===i?g:g-c-d-j},j=function(a){return h(a,"width",d.get(a))},k=function(a){return f()?i(a):h(a,"height",c.get(a))};return{getWidth:j,getHeight:k}}),g("2i",["f","g","3x","j","42","n","r","22","43","44","3v","2e"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=/(\d+(\.\d+)?)(\w|%)*/,n=/(\d+(\.\d+)?)%/,o=/(\d+(\.\d+)?)px|em/,p=function(a,b){h.set(a,"width",b+"px")},q=function(a,b){h.set(a,"width",b+"%")},r=function(a,b){h.set(a,"height",b+"px")},s=function(a){return h.getRaw(a,"height").getOrThunk(function(){return e.getHeight(a)+"px"})},t=function(a,b,c,e){var f=d.table(a).map(function(a){var d=c(a);return k.floor(b/100*d)}).getOr(b);return e(a,f),f},u=function(a,b,d,e){var g=l(a,10);return c.endsWith(a,"%")&&"table"!==f.name(b)?t(b,g,d,e):g},v=function(a){var b=s(a);return b?u(b,a,i.get,r):i.get(a)},w=function(a,b,c){var d=c(a),e=x(a,b);return d/e},x=function(a,b){return g.has(a,b)?l(g.get(a,b),10):1},y=function(a){var c=h.getRaw(a,"width");return c.fold(function(){return b.from(g.get(a,"width"))},function(a){return b.some(a)})},z=function(a,b){return a/b.pixelWidth()*100},A=function(a,b,c){if(n.test(b)){var d=n.exec(b);return parseFloat(d[1],10)}var e=j.get(a),f=l(e,10);return z(f,c)},B=function(a,b){var c=y(a);return c.fold(function(){var c=j.get(a),d=l(c,10);return z(d,b)},function(c){return A(a,c,b)})},C=function(a,b){return a/100*b.pixelWidth()},D=function(a,b,c){if(o.test(b)){var d=o.exec(b);return l(d[1],10)}if(n.test(b)){var e=n.exec(b),f=parseFloat(e[1],10);return C(f,c)}var g=j.get(a);return l(g,10)},E=function(a,b){var c=y(a);return c.fold(function(){var b=j.get(a),c=l(b,10);return c},function(c){return D(a,c,b)})},F=function(a){return w(a,"rowspan",v)},G=function(c){var d=y(c);return d.bind(function(c){if(m.test(c)){var d=m.exec(c);return b.some({width:a.constant(d[1]),unit:a.constant(d[3])})}return b.none()})},H=function(a,b,c){h.set(a,"width",b+c)};return{percentageBasedSizeRegex:a.constant(n),pixelBasedSizeRegex:a.constant(o),setPixelWidth:p,setPercentageWidth:q,setHeight:r,getPixelWidth:E,getPercentageWidth:B,getGenericWidth:G,setGenericWidth:H,getHeight:F,getRawWidth:y}}),g("u",["2i"],function(a){var b=function(b,c){var d=a.getGenericWidth(b);d.each(function(d){var e=d.width()/2;a.setGenericWidth(b,e,d.unit()),a.setGenericWidth(c,e,d.unit())})};return{halve:b}}),g("30",["f"],function(a){var b=function(c,d){var e=function(a,e){return b(c+a,d+e)};return{left:a.constant(c),top:a.constant(d),translate:e}};return b}),g("45",["f","1c","l","n","2a","23"],function(a,b,c,d,e,f){var g=function(d,g){var h=g||c.fromDom(f.documentElement);return e.ancestor(d,a.curry(b.eq,h)).isSome()},h=function(a){var b=a.dom();return b===b.window?a:d.isDocument(a)?b.defaultView||b.parentWindow:null};return{attached:g,windowOf:h}}),g("2z",["30","45","l"],function(a,b,c){var d=function(b){var c=b.getBoundingClientRect();return a(c.left,c.top)},e=function(a,b){return void 0!==a?a:void 0!==b?b:0},f=function(a){var d=a.dom().ownerDocument,f=d.body,g=b.windowOf(c.fromDom(d)),i=d.documentElement,j=e(g.pageYOffset,i.scrollTop),k=e(g.pageXOffset,i.scrollLeft),l=e(i.clientTop,f.clientTop),m=e(i.clientLeft,f.clientLeft);return h(a).translate(k-m,j-l)},g=function(b){var c=b.dom();return a(c.offsetLeft,c.offsetTop)},h=function(e){var f=e.dom(),g=f.ownerDocument,h=g.body,i=c.fromDom(g.documentElement);return h===f?a(h.offsetLeft,h.offsetTop):b.attached(e,i)?d(f):a(0,0)};return{absolute:f,relative:g,viewport:h}}),g("34",["e","f","1k","43","2z","44"],function(a,b,c,d,e,f){var g=c.immutable("row","y"),h=c.immutable("col","x"),i=function(a){var b=e.absolute(a);return b.left()+f.getOuter(a)},j=function(a){return e.absolute(a).left()},k=function(a,b){return h(a,j(b))},l=function(a,b){return h(a,i(b))},m=function(a){return e.absolute(a).top()},n=function(a,b){return g(a,m(b))},o=function(a,b){return g(a,m(b)+d.getOuter(b))},p=function(b,c,d){if(0===d.length)return[];var e=a.map(d.slice(1),function(a,c){return a.map(function(a){return b(c,a)})}),f=d[d.length-1].map(function(a){return c(d.length-1,a)});return e.concat([f])},q=function(a,b){return-a},r={delta:b.identity,positions:b.curry(p,n,o),edge:m},s={delta:b.identity,edge:j,positions:b.curry(p,k,l)},t={delta:q,edge:i,positions:b.curry(p,l,k)};return{height:r,rtl:t,ltr:s}}),g("2j",["34"],function(a){return{ltr:a.ltr,rtl:a.rtl}}),g("v",["2j"],function(a){return function(b){var c=function(c){return b(c).isRtl()?a.rtl:a.ltr},d=function(a,b){return c(b).delta(a,b)},e=function(a,b){return c(b).positions(a,b)},f=function(a){return c(a).edge(a)};return{delta:d,edge:f,positions:e}}}),g("w",["1w","1x"],function(a,b){var c=function(c){var d=a.fromTable(c),e=b.generate(d);return e.grid()};return{getGridSize:c}}),g("46",[],function(){var a=function(b){var c=b,d=function(){return c},e=function(a){c=a},f=function(){return a(d())};return{get:d,set:e,clone:f}};return a}),g("47",["e","f","1t","1z","3r","1q"],function(a,b,c,d,e,f){var g=function(a,b){return h(a,b,{validate:d.isFunction,label:"function"})},h=function(b,d,g){if(0===d.length)throw new f("You must specify at least one required field.");return e.validateStrArr("required",d),e.checkDupes(d),function(f){var h=c.keys(f),i=a.forall(d,function(b){return a.contains(h,b)});i||e.reqMessage(d,h),b(d,h);var j=a.filter(d,function(a){return!g.validate(f[a],a)});return j.length>0&&e.invalidTypeMessage(j,g.label),f}},i=function(b,c){var d=a.filter(c,function(c){return!a.contains(b,c)});d.length>0&&e.unsuppMessage(d)},j=b.noop;return{exactly:b.curry(g,i),ensure:b.curry(g,j),ensureWith:b.curry(h,j)}}),g("2k",["e","f","g","46","47","r","22","2e"],function(a,b,c,d,e,f,g,h){var i=function(a){var c=f.has(a,"colspan")?h(f.get(a,"colspan"),10):1,d=f.has(a,"rowspan")?h(f.get(a,"rowspan"),10):1;return{element:b.constant(a),colspan:b.constant(c),rowspan:b.constant(d)}},j=function(a,b){m(a);var e=d(c.none()),f=void 0!==b?b:i,g=function(b){return a.cell(b)},h=function(a){var b=f(a);return g(b)},j=function(a){var b=h(a);return e.get().isNone()&&e.set(c.some(b)),k=c.some({item:a,replacement:b}),b},k=c.none(),l=function(a,b){return k.fold(function(){return j(a)},function(c){return b(a,c.item)?c.replacement:j(a)})};return{getOrInit:l,cursor:e.get}},k=function(b,e){return function(f){var g=d(c.none());m(f);var h=[],i=function(b,c){return a.find(h,function(a){return c(a.item,b)})},j=function(a){var d=f.replace(a,e,{scope:b});return h.push({item:a,sub:d}),g.get().isNone()&&g.set(c.some(d)),d},k=function(a,b){return i(a,b).fold(function(){return j(a)},function(c){return b(a,c.item)?c.sub:j(a)})};return{replaceOrInit:k,cursor:g.get}}},l=function(a){m(a);var e=d(c.none()),f=function(d){return e.get().isNone()&&e.set(c.some(d)),function(){var c=a.cell({element:b.constant(d),colspan:b.constant(1),rowspan:b.constant(1)});return g.remove(c,"width"),g.remove(d,"width"),c}};return{combine:f,cursor:e.get}},m=e.exactly(["cell","row","replace","gap"]);return{modification:j,transform:k,merging:l}}),g("5a",["e"],function(a){var b=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],c=function(b,c){var d=b.property().name(c);return a.contains(["ol","ul"],d)},d=function(c,d){var e=c.property().name(d);return a.contains(b,e)},e=function(b,c){var d=b.property().name(c);return a.contains(["address","pre","p","h1","h2","h3","h4","h5","h6"],d)},f=function(b,c){var d=b.property().name(c);return a.contains(["h1","h2","h3","h4","h5","h6"],d)},g=function(b,c){return a.contains(["div","li","td","th","blockquote","body","caption"],b.property().name(c))},h=function(b,c){return a.contains(["br","img","hr","input"],b.property().name(c))},i=function(a,b){return"iframe"===a.property().name(b)},j=function(a,b){return!(d(a,b)||h(a,b))&&"li"!==a.property().name(b)};return{isBlock:d,isList:c,isFormatting:e,isHeading:f,isContainer:g,isEmptyTag:h,isFrame:i,isInline:j}}),g("48",["56","5a"],function(a,b){var c=a(),d=function(a){return b.isBlock(c,a)},e=function(a){return b.isList(c,a)},f=function(a){return b.isFormatting(c,a)},g=function(a){return b.isHeading(c,a)},h=function(a){return b.isContainer(c,a)},i=function(a){return b.isEmptyTag(c,a)},j=function(a){return b.isFrame(c,a)},k=function(a){return b.isInline(c,a)};return{isBlock:d,isList:e,isFormatting:f,isHeading:g,isContainer:h,isEmptyTag:i,isFrame:j,isInline:k}}),g("2l",["e","48","1c","28","13","l","n","1l","2a","1m","1d"],function(a,b,c,d,e,f,g,h,i,j,k){var l=function(l){var m=function(a){return"br"===g.name(a)},n=function(b){return a.forall(b,function(a){return m(a)||g.isText(a)&&0===h.get(a).trim().length})},o=function(a){return"li"===g.name(a)||i.ancestor(a,b.isList).isSome()},p=function(a){return j.nextSibling(a).map(function(a){return!!b.isBlock(a)||(b.isEmptyTag(a)?"img"!==g.name(a):void 0)}).getOr(!1)},q=function(a){return k.last(a).bind(function(d){var e=p(d);return j.parent(d).map(function(g){return e===!0||o(g)||m(d)||b.isBlock(g)&&!c.eq(a,g)?[]:[f.fromTag("br")]})}).getOr([])},r=function(){var b=a.bind(l,function(a){var b=j.children(a);return n(b)?[]:b.concat(q(a))});return 0===b.length?[f.fromTag("br")]:b},s=r();e.empty(l[0]),d.append(l[0],s)};return{merge:l}}),g("2m",["e","2c"],function(a,b){var c=function(a,b,c){var d=a.cells(),f=d.slice(0,b),g=d.slice(b),h=f.concat([c]).concat(g);return e(a,h)},d=function(a,b,c){var d=a.cells();d[b]=c},e=function(a,c){return b.rowcells(c,a.section())},f=function(c,d){var e=c.cells(),f=a.map(e,d);return b.rowcells(f,c.section())},g=function(a,b){return a.cells()[b]},h=function(a,b){return g(a,b).element()},i=function(a){return a.cells().length};return{addCell:c,setCells:e,mutateCell:d,getCell:g,getCellElement:h,mapCells:f,cellLength:i}}),g("49",["1z","1p","1q"],function(a,b,c){var d=function(a,b){return b},e=function(b,c){var d=a.isObject(b)&&a.isObject(c);return d?g(b,c):c},f=function(a){return function(){for(var d=new b(arguments.length),e=0;e0?n(a,b):o(b)},q=[],r=[],s=[];return a.each(h,function(a){switch(a.section()){case"thead":q.push(a);break;case"tbody":r.push(a);break;case"tfoot":s.push(a)}}),p(q,"thead"),p(r,"tbody"),p(s,"tfoot"),{newRows:b.constant(l),newCells:b.constant(m)}},m=function(b){var c=a.map(b,function(b){var c=h.shallow(b.element());return a.each(b.cells(),function(a){var b=h.deep(a.element());k(b,"colspan",a.colspan(),1),k(b,"rowspan",a.rowspan(),1),e.append(c,b)}),c});return c};return{render:l,copy:m}}),g("5g",["e","g","3m","3v"],function(a,b,c,d){var e=function(a,b){for(var c=[],d=0;d=e.length-1)return b.none();var g=e[f].fold(function(){var b=a.reverse(e.slice(0,f));return c.findMap(b,function(a,b){return a.map(function(a){return{value:a,delta:b+1}})})},function(a){return b.some({value:a,delta:0})}),h=e[f+1].fold(function(){var a=e.slice(f+1);return c.findMap(a,function(a,b){return a.map(function(a){return{value:a,delta:b+1}})})},function(a){return b.some({value:a,delta:1})});return g.bind(function(a){return h.map(function(b){var c=b.delta+a.delta;return d.abs(b.value-a.value)/c})})};return{repeat:e,range:f,unique:g,deduce:h}}),g("5b",["e","f","g","1x","5g"],function(a,b,c,d,e){var f=function(c){var f=c.grid(),h=e.range(0,f.columns()),i=e.range(0,f.rows());return a.map(h,function(e){var f=function(){return a.bind(i,function(a){return d.getAt(c,a,e).filter(function(a){return a.column()===e}).fold(b.constant([]),function(a){return[a]})})},h=function(a){return 1===a.colspan()},j=function(){return d.getAt(c,0,e)};return g(f,h,j)})},g=function(b,d,e){var f=b(),g=a.find(f,d),h=g.orThunk(function(){return c.from(f[0]).orThunk(e)});return h.map(function(a){return a.element()})},h=function(c){var f=c.grid(),h=e.range(0,f.rows()),i=e.range(0,f.columns());return a.map(h,function(e){var f=function(){return a.bind(i,function(a){return d.getAt(c,e,a).filter(function(a){return a.row()===e}).fold(b.constant([]),function(a){return[a]})})},h=function(a){return 1===a.rowspan()},j=function(){return d.getAt(c,e,0)};return g(f,h,j)})};return{columns:f,rows:h}}),g("5c",["r","22","l"],function(a,b,c){var d=function(d,e,f,g,h){var i=c.fromTag("div");return b.setAll(i,{position:"absolute",left:e-g/2+"px",top:f+"px",height:h+"px",width:g+"px"}),a.set(i,"data-column",d),i},e=function(d,e,f,g,h){var i=c.fromTag("div");return b.setAll(i,{position:"absolute",left:e+"px",top:f-h/2+"px",height:h+"px",width:g+"px"}),a.set(i,"data-row",d),i};return{col:d,row:e}}),g("5d",[],function(){var a=function(a){var b=a.replace(/\./g,"-"),c=function(a){return b+"-"+a};return{resolve:c}};return{css:a}}),g("4k",["5d"],function(a){var b=a.css("ephox-snooker");return{resolve:b.resolve}}),g("4m",[],function(){return function(a,b,c){var d=c||!1,e=function(){b(),d=!0},f=function(){a(),d=!1},g=function(){var a=d?f:e;a()},h=function(){return d};return{on:e,off:f,toggle:g,isOn:h}}}),g("5e",["e","r"],function(a,b){var c=function(a,c){var d=b.get(a,c);return void 0===d||""===d?[]:d.split(" ")},d=function(a,d,e){var f=c(a,d),g=f.concat([e]);b.set(a,d,g.join(" "))},e=function(d,e,f){var g=a.filter(c(d,e),function(a){return a!==f});g.length>0?b.set(d,e,g.join(" ")):b.remove(d,e)};return{read:c,add:d,remove:e}}),g("4n",["e","5e"],function(a,b){var c=function(a){return void 0!==a.dom().classList},d=function(a){return b.read(a,"class")},e=function(a,c){return b.add(a,"class",c)},f=function(a,c){return b.remove(a,"class",c)},g=function(b,c){a.contains(d(b),c)?f(b,c):e(b,c)};return{get:d,add:e,remove:f,toggle:g,supports:c}}),g("3n",["4m","r","4n"],function(a,b,c){var d=function(a,b){c.supports(a)?a.dom().classList.add(b):c.add(a,b)},e=function(a){var d=c.supports(a)?a.dom().classList:c.get(a);0===d.length&&b.remove(a,"class")},f=function(a,b){if(c.supports(a)){var d=a.dom().classList;d.remove(b)}else c.remove(a,b);e(a)},g=function(a,b){return c.supports(a)?a.dom().classList.toggle(b):c.toggle(a,b)},h=function(b,d){var e=c.supports(b),f=b.dom().classList,g=function(){e?f.remove(d):c.remove(b,d)},h=function(){e?f.add(d):c.add(b,d)};return a(g,h,i(b,d))},i=function(a,b){return c.supports(a)&&a.dom().classList.contains(b)};return{add:d,remove:f,toggle:g,toggler:h,has:i}}),g("4b",["e","5b","1w","1x","5c","4k","12","13","3n","22","y","43","2z","44"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o=f.resolve("resizer-bar"),p=f.resolve("resizer-rows"),q=f.resolve("resizer-cols"),r=7,s=function(b){var c=k.descendants(b.parent(),"."+o);a.each(c,h.remove)},t=function(b,c,d){var e=b.origin();a.each(c,function(a,c){a.each(function(a){var c=d(e,a);i.add(c,o),g.append(b.parent(),c)})})},u=function(a,b,c,d){t(a,b,function(a,b){var f=e.col(b.col(),b.x()-a.left(),c.top()-a.top(),r,d);return i.add(f,q),f})},v=function(a,b,c,d){t(a,b,function(a,b){var f=e.row(b.row(),c.left()-a.left(),b.y()-a.top(),d,r);return i.add(f,p),f})},w=function(a,b,c,d,e,f){var g=m.absolute(b),h=c.length>0?e.positions(c,b):[];v(a,h,g,n.getOuter(b));var i=d.length>0?f.positions(d,b):[];u(a,i,g,l.getOuter(b))},x=function(a,e,f,g){s(a,e);var h=c.fromTable(e),i=d.generate(h),j=b.rows(i),k=b.columns(i);w(a,e,j,k,f,g)},y=function(b,c){var d=k.descendants(b.parent(),"."+o);a.each(d,c)},z=function(a){y(a,function(a){j.set(a,"display","none")})},A=function(a){y(a,function(a){j.set(a,"display","block")})},B=function(a){return i.has(a,p)},C=function(a){return i.has(a,q)};return{refresh:x,hide:z,show:A,destroy:s,isRowBar:B,isColBar:C}}),g("2n",["e","49","f","g","3m","2c","j","1w","2p","1x","2v","34","4b","1c","1m"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=function(a,b){return i.toGrid(a,b,!1)},q=function(b,c){var d=function(a){var b=e.findMap(a,function(a){return o.parent(a.element()).map(function(a){var b=o.parent(a).isNone();return f.elementnew(a,b)})});return b.getOrThunk(function(){return f.elementnew(c.row(),!0)})};return a.map(b,function(a){var b=d(a.details());return f.rowdatanew(b.element(),a.details(),a.section(),b.isNew())})},r=function(a,b){var c=i.toDetails(a,n.eq);return q(c,b)},s=function(b,c){var d=a.flatten(a.map(b.all(),function(a){return a.cells()}));return a.find(d,function(a){return n.eq(c,a.element())})},t=function(a,b,e,f,g){return function(i,o,q,s,t){var u=h.fromTable(o),v=j.generate(u),w=b(v,q).map(function(b){var d=p(v,s),e=a(d,b,n.eq,g(s)),f=r(e.grid(),s);return{grid:c.constant(f),cursor:e.cursor}});return w.fold(function(){return d.none()},function(a){var b=k.render(o,a.grid());return e(o,a.grid(),t),f(o),m.refresh(i,o,l.height,t),d.some({cursor:a.cursor,newRows:b.newRows,newCells:b.newCells})})}},u=function(a,b){return g.cell(b.element()).bind(function(b){return s(a,b)})},v=function(a,c){return g.cell(c.element()).bind(function(d){return s(a,d).map(function(a){return b.merge(a,{generators:c.generators,clipboard:c.clipboard})})})},w=function(c,f){var h=a.map(f.selection(),function(a){return g.cell(a).bind(function(a){return s(c,a)})}),i=e.cat(h);return i.length>0?d.some(b.merge({cells:i},{generators:f.generators,clipboard:f.clipboard})):d.none()},x=function(a,b){return b.mergable()},y=function(a,b){return b.unmergable()},z=function(b,c){var f=a.map(c.selection(),function(a){return g.cell(a).bind(function(a){return s(b,a)})}),h=e.cat(f);return h.length>0?d.some(h):d.none()};return{run:t,toDetailList:r,onCell:u,onCells:z,onPaste:v,onPasteRows:w,onMergable:x,onUnmergable:y}}),g("5f",["f","g"],function(a,b){var c=function(d){var e=function(a){return d===a},f=function(a){return c(d)},g=function(a){return c(d)},h=function(a){return c(a(d))},i=function(a){a(d)},j=function(a){return a(d)},k=function(a,b){return b(d)},l=function(a){return a(d)},m=function(a){return a(d)},n=function(){return b.some(d)};return{is:e,isValue:a.constant(!0),isError:a.constant(!1),getOr:a.constant(d),getOrThunk:a.constant(d),getOrDie:a.constant(d),or:f,orThunk:g,fold:k,map:h,each:i,bind:j,exists:l,forall:m,toOption:n}},d=function(c){var e=function(a){return a()},f=function(){return a.die(c)()},g=function(a){return a},h=function(a){return a()},i=function(a){return d(c)},j=function(a){return d(c)},k=function(a,b){return a(c)};return{is:a.constant(!1),isValue:a.constant(!1),isError:a.constant(!0),getOr:a.identity,getOrThunk:e,getOrDie:f,or:g,orThunk:h,fold:k,map:i,each:a.noop,bind:j,exists:a.constant(!1),forall:a.constant(!0),toOption:b.none}};return{value:c,error:d}}),g("4c",["e","f","5f","2c","2m","5g","1p","1q","3v"],function(a,b,c,d,e,f,g,h,i){var j=function(a,d,f){if(a.row()>=d.length||a.column()>e.cellLength(d[0]))return c.error("invalid start address out of table bounds, row: "+a.row()+", column: "+a.column());var g=d.slice(a.row()),h=g[0].cells().slice(a.column()),i=e.cellLength(f[0]),j=f.length;return c.value({rowDelta:b.constant(g.length-j),colDelta:b.constant(h.length-i)})},k=function(a,c){var d=e.cellLength(a[0]),f=e.cellLength(c[0]);return{rowDelta:b.constant(0),colDelta:b.constant(d-f)}},l=function(b,c){return a.map(b,function(){return d.elementnew(c.cell(),!0)})},m=function(a,b,c){return a.concat(f.repeat(b,function(b){return e.setCells(a[a.length-1],l(a[a.length-1].cells(),c))}))},n=function(b,c,d){return a.map(b,function(a){return e.setCells(a,a.cells().concat(l(f.range(0,c),d)))})},o=function(a,c,d){var e=c.colDelta()<0?n:b.identity,f=c.rowDelta()<0?m:b.identity,g=e(a,i.abs(c.colDelta()),d),h=f(g,i.abs(c.rowDelta()),d);return h};return{measure:j,measureWidth:k,tailor:o}}),g("2q",["e","g","2c","2m"],function(a,b,c,d){var e=function(a,b,e,f){if(0===a.length)return a;for(var g=b.startRow();g<=b.finishRow();g++)for(var h=b.startCol();h<=b.finishCol();h++)d.mutateCell(a[g],h,c.elementnew(f(),!1));return a},f=function(a,b,e,f){for(var g=!0,h=0;h0&&f1&&d.cellLength(i)>1&&(e>0&&h(d.getCellElement(i,e-1))||e0&&h(d.getCellElement(b[c-1],e))||c0&&d0&&e0})},i=function(a,b,c){return a.slice(0,b).concat(a.slice(c+1))};return{insertRowAt:d,insertColumnAt:e,splitCellIntoColumns:f,splitCellIntoRows:g,deleteRowsAt:i,deleteColumnsAt:h}}),g("2s",["e","2c","2m"],function(a,b,c){var d=function(d,e,f,g){var h=function(b){return a.exists(e,function(a){return f(b.element(),a.element())})};return a.map(d,function(a){return c.mapCells(a,function(a){return h(a)?b.elementnew(g(a.element(),f),!0):a})})},e=function(a,b,d,e){return void 0!==c.getCellElement(a[b],d)&&b>0&&e(c.getCellElement(a[b-1],d),c.getCellElement(a[b],d))},f=function(a,b,d){return b>0&&d(c.getCellElement(a,b-1),c.getCellElement(a,b))},g=function(b,g,h,i){var j=a.bind(b,function(a,d){var i=e(b,d,g,h)||f(a,g,h);return i?[]:[c.getCell(a,g)]});return d(b,j,h,i)},h=function(b,c,g,h){var i=b[c],j=a.bind(i.cells(),function(a,d){var h=e(b,c,d,g)||f(i,d,g);return h?[]:[a]});return d(b,j,g,h)};return{replaceColumn:g,replaceRow:h}}),g("5h",[],function(){var a=function(){return f(function(a,b,c,d,e){return a()})},b=function(a){return f(function(b,c,d,e,f){return c(a)})},c=function(a,b){return f(function(c,d,e,f,g){return e(a,b)})},d=function(a,b,c){return f(function(d,e,f,g,h){return g(a,b,c)})},e=function(a,b){return f(function(c,d,e,f,g){return g(a,b)})},f=function(a){return{fold:a}};return{none:a,only:b,left:c,middle:d,right:e}}),g("4d",["e","f","5h","3v"],function(a,b,c,d){var e=function(a,b){return 0===a.length?c.none():1===a.length?c.only(0):0===b?c.left(0,1):b===a.length-1?c.right(b-1,b):b>0&&b=0){var c=d.max(h.minCellWidth(),i[b]-g);return k(i.slice(0,a)).concat([g,c-i[b]]).concat(k(i.slice(b+1)))}var e=d.max(h.minCellWidth(),i[a]+g),f=i[a]-e;return k(i.slice(0,a)).concat([e-i[a],f]).concat(k(i.slice(b+1)))},o=n,p=function(a,b,c){return n(b,c)},q=function(a,b){if(g>=0)return k(i.slice(0,b)).concat([g]);var c=d.max(h.minCellWidth(),i[b]+g);return k(i.slice(0,b)).concat([c-i[b]])};return j.fold(l,m,o,p,q)};return{determine:f}}),g("4h",["f","r","22","2e"],function(a,b,c,d){var e=function(a,c){return b.has(a,c)&&d(b.get(a,c),10)>1},f=function(a){return e(a,"colspan")},g=function(a){return e(a,"rowspan")},h=function(a,b){return d(c.get(a,b),10)};return{hasColspan:f,hasRowspan:g,minWidth:a.constant(10),minHeight:a.constant(10),getInt:h}}),g("4e",["e","f","5b","2i","4h","5g","22"],function(a,b,c,d,e,f,g){var h=function(a,b,c){return g.getRaw(a,b).fold(function(){return c(a)+"px"},function(a){return a})},i=function(a){return h(a,"width",d.getPixelWidth)},j=function(a){return h(a,"height",d.getHeight)},k=function(d,g,h,i,j){var k=c.columns(d),l=a.map(k,function(a){return a.map(g.edge)});return a.map(k,function(a,c){var d=a.filter(b.not(e.hasColspan));return d.fold(function(){var a=f.deduce(l,c);return i(a)},function(a){return h(a,j)})})},l=function(a){return a.map(function(a){return a+"px"}).getOr("")},m=function(a,b){return k(a,b,i,l)},n=function(a,b,c){return k(a,b,d.getPercentageWidth,function(a){return a.fold(function(){return c.minCellWidth()},function(a){return a/c.pixelWidth()*100})},c)},o=function(a,b,c){return k(a,b,d.getPixelWidth,function(a){return a.getOrThunk(c.minCellWidth)},c)},p=function(d,g,h,i){var j=c.rows(d),k=a.map(j,function(a){return a.map(g.edge)});return a.map(j,function(a,c){var d=a.filter(b.not(e.hasRowspan));return d.fold(function(){var a=f.deduce(k,c);return i(a)},function(a){return h(a)})})},q=function(a,b){return p(a,b,d.getHeight,function(a){return a.getOrThunk(e.minHeight)})},r=function(a,b){return p(a,b,j,l)};return{getRawWidths:m,getPixelWidths:o,getPercentageWidths:n,getPixelHeights:q,getRawHeights:r}}),g("4f",["e","f","1x","2e"],function(a,b,c,d){var e=function(a,b,c){for(var d=0,e=a;e0&&e.setElementWidth(b,l)};return{adjustWidth:n,adjustHeight:o,adjustWidthTo:p}}),g("x",["e","f","g","1k","2k","2c","2l","j","1w","2m","2n","2o","2p","1x","2q","2r","2s","2t","13"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){var t=function(a){var b=h.cells(a);0===b.length&&s.remove(a)},u=d.immutable("grid","cursor"),v=function(a,b,c){return w(a,b,c).orThunk(function(){return w(a,0,0)})},w=function(a,b,d){return c.from(a[b]).bind(function(a){return c.from(a.cells()[d]).bind(function(a){return c.from(a.element())})})},x=function(a,b,c){return u(a,w(a,b,c))},y=function(b){return a.foldl(b,function(b,c){return a.exists(b,function(a){return a.row()===c.row()})?b:b.concat([c])},[]).sort(function(a,b){return a.row()-b.row()})},z=function(b){return a.foldl(b,function(b,c){return a.exists(b,function(a){return a.column()===c.column()})?b:b.concat([c])},[]).sort(function(a,b){return a.column()-b.column()})},A=function(a,b,c,d){var e=b.row(),f=b.row(),g=p.insertRowAt(a,f,e,c,d.getOrInit);return x(g,f,b.column())},B=function(b,c,d,e){var f=c[0].row(),g=c[0].row(),h=y(c),i=a.foldl(h,function(a,b){return p.insertRowAt(a,g,f,d,e.getOrInit)},b);return x(i,g,c[0].column())},C=function(a,b,c,d){var e=b.row(),f=b.row()+b.rowspan(),g=p.insertRowAt(a,f,e,c,d.getOrInit);return x(g,f,b.column())},D=function(b,c,d,e){var f=y(c),g=f[f.length-1].row(),h=f[f.length-1].row()+f[f.length-1].rowspan(),i=a.foldl(f,function(a,b){return p.insertRowAt(a,h,g,d,e.getOrInit)},b);return x(i,h,c[0].column())},E=function(a,b,c,d){var e=b.column(),f=b.column(),g=p.insertColumnAt(a,f,e,c,d.getOrInit);return x(g,b.row(),f)},F=function(b,c,d,e){var f=z(c),g=f[0].column(),h=f[0].column(),i=a.foldl(f,function(a,b){return p.insertColumnAt(a,h,g,d,e.getOrInit)},b);return x(i,c[0].row(),h)},G=function(a,b,c,d){var e=b.column(),f=b.column()+b.colspan(),g=p.insertColumnAt(a,f,e,c,d.getOrInit);return x(g,b.row(),f)},H=function(b,c,d,e){var f=c[c.length-1].column(),g=c[c.length-1].column()+c[c.length-1].colspan(),h=z(c),i=a.foldl(h,function(a,b){return p.insertColumnAt(a,g,f,d,e.getOrInit)},b);return x(i,c[0].row(),g)},I=function(a,b,c,d){var e=q.replaceRow(a,b.row(),c,d.replaceOrInit);return x(e,b.row(),b.column())},J=function(a,b,c,d){var e=q.replaceColumn(a,b.column(),c,d.replaceOrInit);return x(e,b.row(),b.column())},K=function(a,b,c,d){var e=q.replaceRow(a,b.row(),c,d.replaceOrInit);return x(e,b.row(),b.column())},L=function(a,b,c,d){var e=q.replaceColumn(a,b.column(),c,d.replaceOrInit);return x(e,b.row(),b.column())},M=function(a,b,c,d){var e=p.splitCellIntoColumns(a,b.row(),b.column(),c,d.getOrInit);return x(e,b.row(),b.column())},N=function(a,b,c,d){var e=p.splitCellIntoRows(a,b.row(),b.column(),c,d.getOrInit);return x(e,b.row(),b.column())},O=function(a,b,c,d){var e=z(b),f=p.deleteColumnsAt(a,e[0].column(),e[e.length-1].column()),g=v(f,b[0].row(),b[0].column());return u(f,g)},P=function(a,b,c,d){var e=y(b),f=p.deleteRowsAt(a,e[0].row(),e[e.length-1].row()),g=v(f,b[0].row(),b[0].column());return u(f,g)},Q=function(a,d,e,f){var h=d.cells();g.merge(h);var i=o.merge(a,d.bounds(),e,b.constant(h[0]));return u(i,c.from(h[0]))},R=function(b,d,e,f){var g=a.foldr(d,function(a,b){return o.unmerge(a,b,e,f.combine(b))},b);return u(g,c.from(d[0]))},S=function(a,b,d,e){var g=function(a,b){var c=i.fromTable(a),d=n.generate(c);return m.toGrid(d,b,!0)},h=g(b.clipboard(),b.generators()),j=f.address(b.row(),b.column()),k=l.merge(j,a,h,b.generators(),d);return k.fold(function(){return u(a,c.some(b.element()))},function(a){var c=v(a,b.row(),b.column());return u(a,c)})},T=function(a,b,c){var d=i.fromPastedRows(a,c),e=n.generate(d);return m.toGrid(e,b,!0)},U=function(a,b,c,d){var e=a[b.cells[0].row()],f=b.cells[0].row(),g=T(b.clipboard(),b.generators(),e),h=l.insert(f,a,g,b.generators(),c),i=v(h,b.cells[0].row(),b.cells[0].column());return u(h,i)},V=function(a,b,c,d){var e=a[b.cells[0].row()],f=b.cells[b.cells.length-1].row()+b.cells[b.cells.length-1].rowspan(),g=T(b.clipboard(),b.generators(),e),h=l.insert(f,a,g,b.generators(),c),i=v(h,b.cells[0].row(),b.cells[0].column());return u(h,i)},W=r.adjustWidthTo;return{insertRowBefore:k.run(A,k.onCell,b.noop,b.noop,e.modification),insertRowsBefore:k.run(B,k.onCells,b.noop,b.noop,e.modification),insertRowAfter:k.run(C,k.onCell,b.noop,b.noop,e.modification),insertRowsAfter:k.run(D,k.onCells,b.noop,b.noop,e.modification),insertColumnBefore:k.run(E,k.onCell,W,b.noop,e.modification),insertColumnsBefore:k.run(F,k.onCells,W,b.noop,e.modification),insertColumnAfter:k.run(G,k.onCell,W,b.noop,e.modification),insertColumnsAfter:k.run(H,k.onCells,W,b.noop,e.modification),splitCellIntoColumns:k.run(M,k.onCell,W,b.noop,e.modification),splitCellIntoRows:k.run(N,k.onCell,b.noop,b.noop,e.modification),eraseColumns:k.run(O,k.onCells,W,t,e.modification),eraseRows:k.run(P,k.onCells,b.noop,t,e.modification),makeColumnHeader:k.run(J,k.onCell,b.noop,b.noop,e.transform("row","th")),unmakeColumnHeader:k.run(L,k.onCell,b.noop,b.noop,e.transform(null,"td")),makeRowHeader:k.run(I,k.onCell,b.noop,b.noop,e.transform("col","th")),unmakeRowHeader:k.run(K,k.onCell,b.noop,b.noop,e.transform(null,"td")),mergeCells:k.run(Q,k.onMergable,b.noop,b.noop,e.merging),unmergeCells:k.run(R,k.onUnmergable,W,b.noop,e.merging),pasteCells:k.run(S,k.onPaste,W,b.noop,e.modification),pasteRowsBefore:k.run(U,k.onPasteRows,b.noop,b.noop,e.modification),pasteRowsAfter:k.run(V,k.onPasteRows,b.noop,b.noop,e.modification)}}),g("z",["1c","l"],function(a,b){var c=function(a){return b.fromDom(a.getBody())},d=function(b){return function(d){return a.eq(d,c(b))}},e=function(a){return a?a.replace(/px$/,""):""},f=function(a){return/^[0-9]+$/.test(a)&&(a+="px"),a};return{getBody:c,getIsRoot:d,addSizeSuffix:f,removePxSuffix:e}}),g("2u",["22"],function(a){var b=function(a,b){return function(d){return"rtl"===c(d)?b:a}},c=function(b){return"rtl"===a.get(b,"direction")?"rtl":"ltr"};return{onDirection:b,getDirection:c}}),g("10",["f","2u"],function(a,b){var c={isRtl:a.constant(!1)},d={isRtl:a.constant(!0)},e=function(a){var e=b.getDirection(a);return"rtl"===e?d:c};return{directionAt:e}}),g("4",["e","f","g","u","v","i","w","x","l","n","r","y","z","10"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){return function(o,p){var q,r=function(a){return"table"===j.name(m.getBody(a))},s=function(a){var b=g.getGridSize(a);return r(o)===!1||b.rows()>1},t=function(a){var b=g.getGridSize(a);return r(o)===!1||b.columns()>1},u=function(a){return o.fire("newrow",{node:a.dom()}),a.dom()},v=function(a){return o.fire("newcell",{node:a.dom()}),a.dom()};o.settings.table_clone_elements!==!1&&("string"==typeof o.settings.table_clone_elements?q=o.settings.table_clone_elements.split(/[ ,]/):Array.isArray(o.settings.table_clone_elements)&&(q=o.settings.table_clone_elements));var w=c.from(q),x=function(b,d,g,h){return function(j,m){var p=l.descendants(j,"td[data-mce-style],th[data-mce-style]");a.each(p,function(a){k.remove(a,"data-mce-style")});var q=h(),r=i.fromDom(o.getDoc()),s=e(n.directionAt),t=f.cellOperations(g,r,w);return d(j)?b(q,j,m,t,s).bind(function(b){return a.each(b.newRows(),function(a){u(a)}),a.each(b.newCells(),function(a){v(a)}),b.cursor().map(function(a){var b=o.dom.createRng();return b.setStart(a.dom(),0),b.setEnd(a.dom(),0),b})}):c.none()}},y=x(h.eraseRows,s,b.noop,p),z=x(h.eraseColumns,t,b.noop,p),A=x(h.insertRowsBefore,b.always,b.noop,p),B=x(h.insertRowsAfter,b.always,b.noop,p),C=x(h.insertColumnsBefore,b.always,d.halve,p),D=x(h.insertColumnsAfter,b.always,d.halve,p),E=x(h.mergeCells,b.always,b.noop,p),F=x(h.unmergeCells,b.always,b.noop,p),G=x(h.pasteRowsBefore,b.always,b.noop,p),H=x(h.pasteRowsAfter,b.always,b.noop,p),I=x(h.pasteCells,b.always,b.noop,p);return{deleteRow:y,deleteColumn:z,insertRowsBefore:A,insertRowsAfter:B,insertColumnsBefore:C,insertColumnsAfter:D,mergeCells:E,unmergeCells:F,pasteRowsBefore:G,pasteRowsAfter:H,pasteCells:I}}}),g("11",["1w","2n","2p","1x","2v"],function(a,b,c,d,e){var f=function(f,g,h){var i=a.fromTable(f),j=d.generate(i),k=b.onCells(j,g);return k.map(function(a){var d=c.toGrid(j,h,!1),f=d.slice(a[0].row(),a[a.length-1].row()+a[a.length-1].rowspan()),g=b.toDetailList(f,h);return e.copy(g)})};return{copyRows:f}}),g("14",["d"],function(a){return a("tinymce.util.Tools")}),g("2w",["d"],function(a){return a("tinymce.Env")}),g("2x",["14"],function(a){var b=function(a,b,c){var d,e=a.select("td,th",b),f=function(b,d){for(var e=0;e',c.insertBefore(h,c.firstChild)),e.unApplyAlign(a,c),i.align&&e.applyAlign(a,c,i.align),a.focus(),a.addVisual()})},l=function(b,c){var d,e,f,h,j,l=b.dom,m={};c===!0?(d=l.getParent(b.selection.getStart(),"table"),d&&(m=i(b,d))):(e={label:"Cols",name:"cols"},f={label:"Rows",name:"rows"}),b.settings.table_class_list&&(m["class"]&&(m["class"]=m["class"].replace(/\s*mce\-item\-table\s*/g,"")),h={name:"class",type:"listbox",label:"Class",values:g.buildListItems(b.settings.table_class_list,function(a){a.value&&(a.textStyle=function(){return b.formatter.getCssText({block:"table",classes:[a.value]})})})}),j={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:b.settings.table_appearance_options!==!1?[e,f,{label:"Width",name:"width",onchange:a.curry(g.updateStyleField,b)},{label:"Height",name:"height",onchange:a.curry(g.updateStyleField,b)},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[e,f,{label:"Width",name:"width",onchange:a.curry(g.updateStyleField,b)},{label:"Height",name:"height",onchange:a.curry(g.updateStyleField,b)}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},h]},b.settings.table_advtab!==!1?b.windowManager.open({title:"Table properties",data:m,bodyType:"tabpanel",body:[{title:"General",type:"form",items:j},g.createStyleForm(b)],onsubmit:a.curry(k,b,d)}):b.windowManager.open({title:"Table properties",data:m,body:j,onsubmit:a.curry(k,b,d)})};return{open:l}}),g("16",["f","14","2x","z","2y"],function(a,b,c,d,e){function f(a,f,g){function i(a,b,c){c&&l.setAttrib(a,b,c)}function j(a,b,c){c&&l.setStyle(a,b,c)}var k,l=a.dom;e.updateStyleField(a,g),k=g.control.rootControl.toJSON(),a.undoManager.transact(function(){b.each(f,function(b){i(b,"scope",k.scope),i(b,"style",k.style),i(b,"class",k["class"]),j(b,"height",d.addSizeSuffix(k.height)),k.type!==b.parentNode.nodeName.toLowerCase()&&h(a.dom,b,k.type),1===f.length&&c.unApplyAlign(a,b),k.align&&c.applyAlign(a,b,k.align)}),a.focus()})}var g=function(a,c){var d=a.dom,f={height:d.getStyle(c,"height")||d.getAttrib(c,"height"),scope:d.getAttrib(c,"scope"),"class":d.getAttrib(c,"class")};return f.type=c.parentNode.nodeName.toLowerCase(),b.each("left center right".split(" "),function(b){a.formatter.matchNode(c,"align"+b)&&(f.align=b)}),a.settings.table_row_advtab!==!1&&b.extend(f,e.extractAdvancedStyles(d,c)),f},h=function(a,b,c){var d=a.getParent(b,"table"),e=b.parentNode,f=a.select(c,d)[0];f||(f=a.create(c),d.firstChild?"CAPTION"===d.firstChild.nodeName?a.insertAfter(f,d.firstChild):d.insertBefore(f,d.firstChild):d.appendChild(f)),f.appendChild(b),e.hasChildNodes()||a.remove(e)},i=function(c){var d,h,i,j,k,l,m=c.dom,n=[];d=c.dom.getParent(c.selection.getStart(),"table"),h=c.dom.getParent(c.selection.getStart(),"td,th"),b.each(d.rows,function(a){b.each(a.cells,function(b){if(m.getAttrib(b,"data-mce-selected")||b==h)return n.push(a),!1})}),i=n[0],i&&(k=n.length>1?{height:"",scope:"","class":"",align:"",type:i.parentNode.nodeName.toLowerCase()}:g(c,i),c.settings.table_row_class_list&&(j={name:"class",type:"listbox",label:"Class",values:e.buildListItems(c.settings.table_row_class_list,function(a){a.value&&(a.textStyle=function(){return c.formatter.getCssText({block:"tr",classes:[a.value]})})})}),l={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},j]},c.settings.table_row_advtab!==!1?c.windowManager.open({title:"Row properties",data:k,bodyType:"tabpanel",body:[{title:"General",type:"form",items:l},e.createStyleForm(m)],onsubmit:a.curry(f,c,n)}):c.windowManager.open({title:"Row properties",data:k,body:l,onsubmit:a.curry(f,c,n)}))};return{open:i}}),g("17",["f","14","2x","z","2y"],function(a,b,c,d,e){var f=function(a,b){a.style.cssText+=";"+b},g=function(a,c){var d=a.dom,f={width:d.getStyle(c,"width")||d.getAttrib(c,"width"),height:d.getStyle(c,"height")||d.getAttrib(c,"height"),scope:d.getAttrib(c,"scope"),"class":d.getAttrib(c,"class")};return f.type=c.nodeName.toLowerCase(),b.each("left center right".split(" "),function(b){a.formatter.matchNode(c,"align"+b)&&(f.align=b)}),b.each("top middle bottom".split(" "),function(b){a.formatter.matchNode(c,"valign"+b)&&(f.valign=b)}),a.settings.table_cell_advtab!==!1&&b.extend(f,e.extractAdvancedStyles(d,c)),f},h=function(a,g,h){function i(a,b,c){c&&l.setAttrib(a,b,c)}function j(a,b,c){c&&l.setStyle(a,b,c)}var k,l=a.dom;e.updateStyleField(a,h),k=h.control.rootControl.toJSON(),a.undoManager.transact(function(){b.each(g,function(b){i(b,"scope",k.scope),1===g.length?i(b,"style",k.style):f(b,k.style),i(b,"class",k["class"]),j(b,"width",d.addSizeSuffix(k.width)),j(b,"height",d.addSizeSuffix(k.height)),k.type&&b.nodeName.toLowerCase()!==k.type&&(b=l.rename(b,k.type)),1===g.length&&(c.unApplyAlign(a,b),c.unApplyVAlign(a,b)),k.align&&c.applyAlign(a,b,k.align),k.valign&&c.applyVAlign(a,b,k.valign)}),a.focus()})},i=function(b){var c,d,f,i=[];if(i=b.dom.select("td[data-mce-selected],th[data-mce-selected]"),c=b.dom.getParent(b.selection.getStart(),"td,th"),!i.length&&c&&i.push(c),c=c||i[0]){d=i.length>1?{width:"",height:"",scope:"","class":"",align:"",style:"",type:c.nodeName.toLowerCase()}:g(b,c),b.settings.table_cell_class_list&&(f={name:"class",type:"listbox",label:"Class",values:e.buildListItems(b.settings.table_cell_class_list,function(a){a.value&&(a.textStyle=function(){return b.formatter.getCssText({block:"td",classes:[a.value]})})})});var j={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width",onchange:a.curry(e.updateStyleField,b)},{label:"Height",name:"height",onchange:a.curry(e.updateStyleField,b)},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},f]};b.settings.table_cell_advtab!==!1?b.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:d,body:[{title:"General",type:"form",items:j},e.createStyleForm(b)],onsubmit:a.curry(h,b,i)}):b.windowManager.open({title:"Cell properties",data:d,body:j,onsubmit:a.curry(h,b,i)})}};return{open:i}}),g("5",["e","f","g","11","i","j","12","13","k","l","14","z","o","15","16","17"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q=k.each,r=c.none(),s=function(){return r.fold(function(){},function(b){return a.map(b,function(a){return a.dom()})})},t=function(b){var d=a.map(b,j.fromDom);r=c.from(d)},u=function(k,s,t,u){var v=l.getIsRoot(k),w=function(){var a=j.fromDom(k.dom.getParent(k.selection.getStart(),"th,td")),c=f.table(a,v);c.filter(b.not(v)).each(function(a){var b=j.fromText("");g.after(a,b),h.remove(a);var c=k.dom.createRng();c.setStart(b.dom(),0),c.setEnd(b.dom(),0),k.selection.setRng(c)})},x=function(){return j.fromDom(k.dom.getParent(k.selection.getStart(),"th,td"))},y=function(a){return f.table(a,v)},z=function(a){var b=x(),c=y(b);c.each(function(c){var d=m.forMenu(u,c,b);a(c,d).each(function(a){k.selection.setRng(a),k.focus(),t.clear(c)})})},A=function(a){var f=x(),g=y(f);return g.bind(function(a){var g=j.fromDom(k.getDoc()),h=m.forMenu(u,a,f),i=e.cellOperations(b.noop,g,c.none());return d.copyRows(a,h,i)})},B=function(b){r.each(function(c){var d=a.map(c,function(a){return i.deep(a)}),f=x(),g=y(f);g.bind(function(a){var c=j.fromDom(k.getDoc()),g=e.paste(c),h=m.pasteRows(u,a,f,d,g);b(a,h).each(function(b){k.selection.setRng(b),k.focus(),t.clear(a)})})})};q({mceTableSplitCells:function(){z(s.unmergeCells)},mceTableMergeCells:function(){z(s.mergeCells)},mceTableInsertRowBefore:function(){z(s.insertRowsBefore)},mceTableInsertRowAfter:function(){z(s.insertRowsAfter)},mceTableInsertColBefore:function(){z(s.insertColumnsBefore)},mceTableInsertColAfter:function(){z(s.insertColumnsAfter)},mceTableDeleteCol:function(){z(s.deleteColumn)},mceTableDeleteRow:function(){z(s.deleteRow)},mceTableCutRow:function(a){r=A(),z(s.deleteRow)},mceTableCopyRow:function(a){r=A()},mceTablePasteRowBefore:function(a){B(s.pasteRowsBefore)},mceTablePasteRowAfter:function(a){B(s.pasteRowsAfter)},mceTableDelete:w},function(a,b){k.addCommand(b,a)}),q({mceInsertTable:b.curry(n.open,k),mceTableProps:b.curry(n.open,k,!0),mceTableRowProps:b.curry(o.open,k),mceTableCellProps:b.curry(p.open,k)},function(a,b){k.addCommand(b,function(b,c){a(c)})})};return{registerCommands:u,getClipboardRows:s,setClipboardRows:t}}),g("18",["f","g","l","2z","30"],function(a,b,c,d,e){var f=function(d){var f=b.from(d.dom().documentElement).map(c.fromDom).getOr(d);return{parent:a.constant(f),view:a.constant(d),origin:a.constant(e(0,0))}},g=function(b,c){var e=a.curry(d.absolute,c);return{parent:a.constant(c),view:a.constant(b),origin:e}},h=function(b,c){return{parent:a.constant(c),view:a.constant(b),origin:a.constant(e(0,0))}};return{only:f,detached:g,body:h}}),g("31",["e","1k"],function(a,b){return function(c){var d=b.immutable.apply(null,c),e=[],f=function(a){if(void 0===a)throw"Event bind error: undefined handler";e.push(a)},g=function(b){e=a.filter(e,function(a){return a!==b})},h=function(){var b=d.apply(null,arguments);a.each(e,function(a){a(b)})};return{bind:f,unbind:g,trigger:h}}}),g("32",["1t"],function(a){var b=function(b){var c=a.map(b,function(a){return{bind:a.bind,unbind:a.unbind}}),d=a.map(b,function(a){return a.trigger});return{registry:c,trigger:d}};return{create:b}}),g("5z",["47"],function(a){var b=a.exactly(["compare","extract","mutate","sink"]),c=a.exactly(["element","start","stop","destroy"]),d=a.exactly(["forceDrop","drop","move","delayDrop"]);return{mode:b,sink:c,api:d}}),g("68",["5d"],function(a){var b=a.css("ephox-dragster");return{resolve:b.resolve}}),g("60",["68","49","3n","22","l","13"],function(a,b,c,d,e,f){return function(g){var h=b.merge({layerClass:a.resolve("blocker")},g),i=e.fromTag("div");d.setAll(i,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),c.add(i,a.resolve("blocker")),c.add(i,h.layerClass);var j=function(){return i},k=function(){f.remove(i)};return{element:j,destroy:k}}}),g("5l",["f","l"],function(a,b){var c=function(b,c,d,e,f,g,h){return{target:a.constant(b),x:a.constant(c),y:a.constant(d),stop:e,prevent:f,kill:g,raw:a.constant(h)}},d=function(d,e){return function(f){if(d(f)){var g=b.fromDom(f.target),h=function(){f.stopPropagation()},i=function(){f.preventDefault()},j=a.compose(i,h),k=c(g,f.clientX,f.clientY,h,i,j,f);e(k)}}},e=function(b,c,e,f,g){var i=d(e,f);return b.dom().addEventListener(c,i,g),{unbind:a.curry(h,b,c,i,g)}},f=function(a,b,c,d){return e(a,b,c,d,!1)},g=function(a,b,c,d){return e(a,b,c,d,!0)},h=function(a,b,c,d){a.dom().removeEventListener(b,c,d)};return{bind:f,capture:g}}),g("4l",["f","5l"],function(a,b){var c=a.constant(!0),d=function(a,d,e){return b.bind(a,d,c,e)},e=function(a,d,e){return b.capture(a,d,c,e)};return{bind:d,capture:e}}),g("5i",["5z","60","g","30","4l","12","13"],function(a,b,c,d,e,f,g){var h=function(a,b){return d(b.left()-a.left(),b.top()-a.top())},i=function(a){return c.some(d(a.x(),a.y()))},j=function(a,b){a.mutate(b.left(),b.top())},k=function(c,d){var h=b(d),i=e.bind(h.element(),"mousedown",c.forceDrop),j=e.bind(h.element(),"mouseup",c.drop),k=e.bind(h.element(),"mousemove",c.move),l=e.bind(h.element(),"mouseout",c.delayDrop),m=function(){h.destroy(),j.unbind(),k.unbind(),l.unbind(),i.unbind()},n=function(a){f.append(a,h.element())},o=function(){g.remove(h.element())};return a.sink({element:h.element,start:n,stop:o,destroy:m})};return a.mode({compare:h,extract:i,sink:k,mutate:j})}),g("69",["g","31","32"],function(a,b,c){return function(){var d=a.none(),e=function(){d=a.none()},f=function(b,c){var e=d.map(function(a){return b.compare(a,c)});return d=a.some(c),e},g=function(a,b){var c=b.extract(a);c.each(function(a){var c=f(b,a);c.each(function(a){h.trigger.move(a)})})},h=c.create({move:b(["info"])});return{onEvent:g,reset:e,events:h.registry}}}),g("6a",["f"],function(a){return function(b){var c=function(a,b){};return{onEvent:c,reset:a.noop}}}),g("61",["69","6a"],function(a,b){return function(){var c=b(),d=a(),e=c,f=function(){e.reset(),e=d},g=function(){e.reset(),e=c},h=function(a,b){e.onEvent(a,b)},i=function(){return e===d};return{on:f,off:g,isOn:i,onEvent:h,events:d.events}}}),h("6b",clearTimeout),h("6c",setTimeout),g("62",["6b","6c"],function(a,b){var c=function(c,d){var e=null,f=null,g=function(){null!==e&&(a(e),e=null,f=null)},h=function(){f=arguments,null===e&&(e=b(function(){c.apply(null,f),e=null,f=null},d))};return{cancel:g,throttle:h}},d=function(c,d){var e=null,f=function(){null!==e&&(a(e),e=null)},g=function(){var a=arguments;null===e&&(e=b(function(){c.apply(null,a),e=null,a=null},d))};return{cancel:f,throttle:g}},e=function(c,d){var e=null,f=function(){null!==e&&(a(e),e=null)},g=function(){var f=arguments;null!==e&&a(e),e=b(function(){c.apply(null,f),e=null,f=null},d)};return{cancel:f,throttle:g}};return{adaptable:c,first:d,last:e}}),g("5j",["5z","61","62","31","32","1p"],function(a,b,c,d,e,f){var g=function(g,h,i){var j=!1,k=e.create({start:d([]),stop:d([])}),l=b(),m=function(){t.stop(),l.isOn()&&(l.off(),k.trigger.stop())},n=c.last(m,200),o=function(a){t.start(a),l.on(),k.trigger.start()},p=function(a,b){n.cancel(),l.onEvent(a,h)};l.events.move.bind(function(a){h.mutate(g,a.info())});var q=function(){j=!0},r=function(){j=!1},s=function(a){return function(){var b=f.prototype.slice.call(arguments,0);if(j)return a.apply(null,b)}},t=h.sink(a.api({forceDrop:m,drop:s(m),move:s(p),delayDrop:s(n.throttle)}),i),u=function(){t.destroy()};return{element:t.element,go:o,on:q,off:r,destroy:u,events:k.registry}};return{setup:g}}),g("4i",["5i","5j","1p"],function(a,b,c){var d=function(c,d){var e=void 0!==d?d:{},f=void 0!==e.mode?e.mode:a;return b.setup(c,f,d)};return{transform:d}}),g("5k",["31","32"],function(a,b){return function(){var c=b.create({drag:a(["xDelta","yDelta"])}),d=function(a,b){c.trigger.drag(a,b)};return{mutate:d,events:c.registry}}}),g("4j",["g","31","32","5k"],function(a,b,c,d){return function(){var e=c.create({drag:b(["xDelta","yDelta","target"])}),f=a.none(),g=d();g.events.drag.bind(function(a){f.each(function(b){e.trigger.drag(a.xDelta(),a.yDelta(),b)})});var h=function(b){f=a.some(b)},i=function(){return f};return{assign:h,get:i,mutate:g.mutate,events:e.registry}}}),g("4o",["t"],function(a){var b=function(b){return a.first(b).isSome()},c=function(b,c,d){return a.ancestor(b,c,d).isSome()},d=function(b,c){return a.sibling(b,c).isSome()},e=function(b,c){return a.child(b,c).isSome()},f=function(b,c){return a.descendant(b,c).isSome()},g=function(b,c,d){return a.closest(b,c,d).isSome()};return{any:b,ancestor:c,sibling:d,child:e,descendant:f,closest:g}}),g("33",["4i","f","g","31","32","4j","4b","4k","4h","1c","4l","35","n","r","3n","22","4o","t","2e"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){var t=h.resolve("resizer-bar-dragging");return function(h,u,v){var w=f(),x=a.transform(w,{}),y=c.none(),z=function(a,b){return c.from(n.get(a,b))};w.events.drag.bind(function(a){z(a.target(),"data-row").each(function(b){var c=i.getInt(a.target(),"top");p.set(a.target(),"top",c+a.yDelta()+"px")}),z(a.target(),"data-column").each(function(b){var c=i.getInt(a.target(),"left");p.set(a.target(),"left",c+a.xDelta()+"px")})});var A=function(a,b){var c=i.getInt(a,b),d=s(n.get(a,"data-initial-"+b),10);return c-d};x.events.stop.bind(function(){w.get().each(function(a){y.each(function(b){z(a,"data-row").each(function(c){var d=A(a,"top");n.remove(a,"data-initial-top"),H.trigger.adjustHeight(b,d,s(c,10))}),z(a,"data-column").each(function(c){var d=A(a,"left");n.remove(a,"data-initial-left"),H.trigger.adjustWidth(b,d,s(c,10))}),g.refresh(h,b,v,u)})})});var B=function(a,b){H.trigger.startAdjust(),w.assign(a),n.set(a,"data-initial-"+b,s(p.get(a,b),10)),o.add(a,t),p.set(a,"opacity","0.2"),x.go(h.parent())},C=k.bind(h.parent(),"mousedown",function(a){g.isRowBar(a.target())&&B(a.target(),"top"),g.isColBar(a.target())&&B(a.target(),"left")}),D=function(a){return j.eq(a,h.view())},E=k.bind(h.view(),"mouseover",function(a){"table"===m.name(a.target())||q.ancestor(a.target(),"table",D)?(y="table"===m.name(a.target())?c.some(a.target()):r.ancestor(a.target(),"table",D),y.each(function(a){g.refresh(h,a,v,u)})):l.inBody(a.target())&&g.destroy(h)}),F=function(){C.unbind(),E.unbind(),x.destroy(),g.destroy(h)},G=function(a){g.refresh(h,a,v,u)},H=e.create({adjustHeight:d(["table","delta","row"]),adjustWidth:d(["table","delta","column"]),startAdjust:d([])});return{destroy:F,refresh:G,on:x.on,off:x.off,hideBars:b.curry(g.hide,h),showBars:b.curry(g.show,h),events:H.registry}}}),g("19",["31","32","2t","33","34"],function(a,b,c,d,e){return function(f,g){var h=e.height,i=d(f,g,h),j=b.create({beforeResize:a(["table"]),afterResize:a(["table"]),startDrag:a([])});return i.events.adjustHeight.bind(function(a){j.trigger.beforeResize(a.table());var b=h.delta(a.delta(),a.table());c.adjustHeight(a.table(),b,a.row(),h),j.trigger.afterResize(a.table())}),i.events.startAdjust.bind(function(a){j.trigger.startDrag()}),i.events.adjustWidth.bind(function(a){j.trigger.beforeResize(a.table());var b=g.delta(a.delta(),a.table());c.adjustWidth(a.table(),b,a.column(),g),j.trigger.afterResize(a.table())}),{on:i.on,off:i.off,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:j.registry}}}),g("1a",["18","12","13","35","l","22","z"],function(a,b,c,d,e,f,g){var h=function(){var a=e.fromTag("div");return f.setAll(a,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),b.append(d.body(),a),a},i=function(b,c){return b.inline?a.body(g.getBody(b),h()):a.only(e.fromDom(b.getDoc()))},j=function(a,b){a.inline&&c.remove(b.parent())};return{get:i,remove:j}}),g("6",["e","g","18","v","19","l","r","y","1a","10","14"],function(a,b,c,d,e,f,g,h,i,j,k){return function(l){var m,n,o=b.none(),p=b.none(),q=b.none(),r=/(\d+(\.\d+)?)%/,s=function(a){return"TABLE"===a.nodeName},t=function(a){return l.dom.getStyle(a,"width")||l.dom.getAttrib(a,"width")},u=function(){return p},v=function(){return q.getOr(c.only(f.fromDom(l.getBody())))},w=function(){p.each(function(a){a.destroy()}),q.each(function(a){i.remove(l,a)})};return l.on("init",function(){var c=d(j.directionAt),f=i.get(l);if(q=b.some(f),l.settings.object_resizing&&l.settings.table_resize_bars!==!1&&(l.settings.object_resizing===!0||"table"===l.settings.object_resizing)){var k=e(f,c);k.on(),k.events.startDrag.bind(function(a){o=b.some(l.selection.getRng())}),k.events.afterResize.bind(function(b){var c=b.table(),d=h.descendants(c,"td[data-mce-style],th[data-mce-style]");a.each(d,function(a){g.remove(a,"data-mce-style")}),o.each(function(a){l.selection.setRng(a),l.focus()}),l.undoManager.add()}),p=b.some(k)}}),l.on("ObjectResizeStart",function(a){s(a.target)&&(m=a.width,n=t(a.target))}),l.on("ObjectResized",function(a){if(s(a.target)){var b=a.target;if(r.test(n)){var c=parseFloat(r.exec(n)[1],10),d=a.width*c/m;l.dom.setStyle(b,"width",d+"%")}else{var e=[];k.each(b.rows,function(a){k.each(a.cells,function(a){var b=l.dom.getStyle(a,"width",!0);e.push({cell:a,width:b})})}),k.each(e,function(a){l.dom.setStyle(a.cell,"width",a.width),l.dom.setAttrib(a.cell,"width",null)})}}}),{lazyResize:u,lazyWire:v,destroy:w}}}),g("36",[],function(){var a=function(a){return e(function(b,c,d,e){return b(a)})},b=function(a){return e(function(b,c,d,e){return c(a)})},c=function(a,b){return e(function(c,d,e,f){return e(a,b)})},d=function(a){return e(function(b,c,d,e){return e(a)})},e=function(a){return{fold:a}};return{none:a,first:b,middle:c,last:d}}),g("1b",["e","f","36","j","1c"],function(a,b,c,d,e){var f=function(c,f){return d.table(c,f).bind(function(f){var g=d.cells(f),h=a.findIndex(g,function(a){return e.eq(c,a)});return h.map(function(a){return{index:b.constant(a),all:b.constant(g)}})})},g=function(a,b){var d=f(a,b);return d.fold(function(){return c.none(a)},function(b){return b.index()+1=0?c.middle(a,b.all()[b.index()-1]):c.first(a)})};return{next:g,prev:h}}),g("37",["2g","f"],function(a,b){var c=a.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),d=function(a,b,c,d){return a.fold(b,c,d)},e=function(a){return a.fold(b.identity,b.identity,b.identity)};return{before:c.before,on:c.on,after:c.after,cata:d,getStart:e}}),g("1e",["2g","1k","l","1m","37"],function(a,b,c,d,e){var f=a.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),g=b.immutable("start","soffset","finish","foffset"),h=function(a){return f.exact(a.start(),a.soffset(),a.finish(),a.foffset())},i=function(a){return a.match({domRange:function(a){return c.fromDom(a.startContainer)},relative:function(a,b){return e.getStart(a)},exact:function(a,b,c,d){return a}})},j=function(a){var b=i(a);return d.defaultView(b)};return{domRange:f.domRange,relative:f.relative,exact:f.exact,exactFromRange:h,range:g,getWin:j}}),g("38",["1c","l","1m"],function(a,b,c){var d=function(a,b,d,e){var f=c.owner(a),g=f.dom().createRange();return g.setStart(a.dom(),b),g.setEnd(d.dom(),e),g},e=function(a,c,e,f){var g=d(a,c,e,f);return b.fromDom(g.commonAncestorContainer)},f=function(b,c,e,f){var g=d(b,c,e,f),h=a.eq(b,e)&&c===f;return g.collapsed&&!h};return{after:f,commonAncestorContainer:e}}),g("39",["e","l","23"],function(a,b,c){var d=function(d,e){var f=e||c,g=f.createDocumentFragment();return a.each(d,function(a){g.appendChild(a.dom())}),b.fromDom(g)};return{fromElements:d}}),g("3a",["f","g","1c","l"],function(a,b,c,d){var e=function(a,b){var c=a.document.createRange();return f(c,b),c},f=function(a,b){a.selectNodeContents(b.dom())},g=function(a,b){return b.compareBoundaryPoints(a.END_TO_START,a)<1&&b.compareBoundaryPoints(a.START_TO_END,a)>-1},h=function(a){return a.document.createRange()},i=function(a,b){b.fold(function(b){a.setStartBefore(b.dom())},function(b,c){a.setStart(b.dom(),c)},function(b){a.setStartAfter(b.dom())})},j=function(a,b){b.fold(function(b){a.setEndBefore(b.dom())},function(b,c){a.setEnd(b.dom(),c)},function(b){a.setEndAfter(b.dom())})},k=function(a,b){o(a),a.insertNode(b.dom())},l=function(a,b,d,e){return c.eq(a,d)&&b===e},m=function(a,b,c){var d=a.document.createRange();return i(d,b),j(d,c),d},n=function(a,b,c,d,e){var f=a.document.createRange();return f.setStart(b.dom(),c),f.setEnd(d.dom(),e),f},o=function(a){a.deleteContents()},p=function(a){var b=a.cloneContents();return d.fromDom(b)},q=function(b){return{left:a.constant(b.left),top:a.constant(b.top),right:a.constant(b.right),bottom:a.constant(b.bottom),width:a.constant(b.width),height:a.constant(b.height)}},r=function(a){var c=a.getClientRects(),d=c.length>0?c[0]:a.getBoundingClientRect();return d.width>0||d.height>0?b.some(d).map(q):b.none()},s=function(a){var c=a.getBoundingClientRect();return c.width>0||c.height>0?b.some(c).map(q):b.none()},t=function(a){return a.toString()};return{create:h,replaceWith:k,selectNodeContents:e,selectNodeContentsUsing:f,isCollapsed:l,relativeToNative:m,exactToNative:n,deleteContents:o,cloneFragment:p,getFirstRect:r,getBounds:s,isWithin:g,toString:t}}),g("1n",["2g","f","g","3b","l","3a"],function(a,b,c,d,e,f){var g=a.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),h=function(a,b,c){return b(e.fromDom(c.startContainer),c.startOffset,e.fromDom(c.endContainer),c.endOffset)},i=function(a,e){return e.match({domRange:function(a){return{ltr:b.constant(a),rtl:c.none}},relative:function(b,e){return{ltr:d.cached(function(){return f.relativeToNative(a,b,e)}),rtl:d.cached(function(){return c.some(f.relativeToNative(a,e,b))})}},exact:function(b,e,g,h){return{ltr:d.cached(function(){return f.exactToNative(a,b,e,g,h)}),rtl:d.cached(function(){return c.some(f.exactToNative(a,g,h,b,e))})}}})},j=function(a,b){var c=b.ltr();if(c.collapsed){var d=b.rtl().filter(function(a){return a.collapsed===!1});return d.map(function(a){return g.rtl(e.fromDom(a.endContainer),a.endOffset,e.fromDom(a.startContainer),a.startOffset)}).getOrThunk(function(){return h(a,g.ltr,c)})}return h(a,g.ltr,c)},k=function(a,b){var c=i(a,b);return j(a,c)},l=function(a,b){var c=k(a,b);return c.match({ltr:function(b,c,d,e){var f=a.document.createRange();return f.setStart(b.dom(),c),f.setEnd(d.dom(),e),f},rtl:function(b,c,d,e){var f=a.document.createRange();return f.setStart(d.dom(),e),f.setEnd(b.dom(),c),f}})};return{ltr:g.ltr,rtl:g.rtl,diagnose:k,asLtrRange:l}}),g("5m",["3v"],function(a){var b=function(b,c,d,e,f){if(0===f)return 0;if(c===e)return f-1;for(var g=e,h=1;hi.bottom);else{if(dg)return h-1;g=j}}return 0},c=function(a,b,c){return b>=a.left&&b<=a.right&&c>=a.top&&c<=a.bottom};return{inRect:c,searchForPoint:b}}),g("5n",["g","3m","1l","5m","3v"],function(a,b,c,d,e){var f=function(a,b,e,f,g){var h=function(c){var d=a.dom().createRange();return d.setStart(b.dom(),c),d.collapse(!0),d},i=function(a){var b=h(a);return b.getBoundingClientRect()},j=c.get(b).length,k=d.searchForPoint(i,e,f,g.right,j);return h(k)},g=function(c,e,g,h){var i=c.dom().createRange();i.selectNode(e.dom());var j=i.getClientRects(),k=b.findMap(j,function(b){return d.inRect(b,g,h)?a.some(b):a.none()});return k.map(function(a){return f(c,e,g,h,a)})};return{locate:g}}),g("4p",["g","3m","n","1m","5m","5n","3v"],function(a,b,c,d,e,f,g){var h=function(c,f,g,h){var j=c.dom().createRange(),k=d.children(f);return b.findMap(k,function(b){return j.selectNode(b.dom()),e.inRect(j.getBoundingClientRect(),g,h)?i(c,b,g,h):a.none()})},i=function(a,b,d,e){var g=c.isText(b)?f.locate:h;return g(a,b,d,e)},j=function(a,b,c,d){var e=a.dom().createRange();e.selectNode(b.dom());var f=e.getBoundingClientRect(),h=g.max(f.left,g.min(f.right,c)),j=g.max(f.top,g.min(f.bottom,d));return i(a,b,h,j)};return{locate:j}}),g("4q",["g","1m","1d"],function(a,b,c){var d=!0,e=!1,f=function(a,b){return b-a.left0){var d=b.getRangeAt(0),e=b.getRangeAt(b.rangeCount-1);return a.some(f.range(c.fromDom(d.startContainer),d.startOffset,c.fromDom(e.endContainer),e.endOffset))}return a.none(); +},t=function(d){var e=c.fromDom(d.anchorNode),g=c.fromDom(d.focusNode);return b.after(e,d.anchorOffset,g,d.focusOffset)?a.some(f.range(c.fromDom(d.anchorNode),d.anchorOffset,c.fromDom(d.focusNode),d.focusOffset)):s(d)},u=function(a,b){var c=g.selectNodeContents(a,b);l(a,c)},v=function(a,b){var d=g.selectNodeContents(a,b);return f.range(c.fromDom(d.startContainer),d.startOffset,c.fromDom(d.endContainer),d.endOffset)},w=function(b){var c=b.getSelection();return c.rangeCount>0?t(c):a.none()},x=function(a){return w(a).map(function(a){return f.exact(a.start(),a.soffset(),a.finish(),a.foffset())})},y=function(a,b){var c=h.asLtrRange(a,b);return g.getFirstRect(c)},z=function(a,b){var c=h.asLtrRange(a,b);return g.getBounds(c)},A=function(a,b,c){return i.fromPoint(a,b,c)},B=function(a,b){var c=h.asLtrRange(a,b);return g.toString(c)},C=function(a){var b=a.getSelection();b.removeAllRanges()},D=function(a,b){var c=h.asLtrRange(a,b);return g.cloneFragment(c)},E=function(a,b,c){var e=h.asLtrRange(a,b),f=d.fromElements(c,a.document);g.replaceWith(e,f)},F=function(a,b){var c=h.asLtrRange(a,b);g.deleteContents(c)};return{setExact:p,getExact:w,get:x,setRelative:q,toNative:r,setToElement:u,clear:C,clone:D,replace:E,deleteAt:F,forElement:v,getFirstRect:y,getBounds:z,getAtPoint:A,findWithin:n,getAsString:B}}),g("1g",["d"],function(a){return a("tinymce.util.VK")}),g("7",["e","g","1b","j","1c","l","n","y","t","1d","1e","1f","1g","z","o"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=function(a,b,d,e){return t(a,b,c.next(d),e)},q=function(a,b,d,e){return t(a,b,c.prev(d),e)},r=function(a,b){var c=k.exact(b,0,b,0);return l.toNative(c)},s=function(b,c){var d=h.descendants(c,"tr");return a.last(d).bind(function(a){return i.descendant(a,"td,th").map(function(a){return r(b,a)})})},t=function(a,c,e,f,g){return e.fold(b.none,b.none,function(b,c){return j.first(c).map(function(b){return r(a,b)})},function(b){return d.table(b,c).bind(function(c){var d=o.noMenu(b);return a.undoManager.transact(function(){f.insertRowsAfter(c,d)}),s(a,c)})})},u=["table","li","dl"],v=function(b,c,h,i){if(b.keyCode===m.TAB){var j=n.getBody(c),k=function(b){var c=g.name(b);return e.eq(b,j)||a.contains(u,c)},l=c.selection.getRng();if(l.collapsed){var o=f.fromDom(l.startContainer);d.cell(o,k).each(function(a){b.preventDefault();var d=b.shiftKey?q:p,e=d(c,k,a,h,i);e.each(function(a){c.selection.setRng(a)})})}}};return{handle:v}}),g("3f",["1k"],function(a){var b=a.immutable("selection","kill");return{response:b}}),g("1j",[],function(){var a=function(a){return function(b){return b===a}},b=a(38),c=a(40),d=function(a){return a>=37&&a<=40};return{ltr:{isBackward:a(37),isForward:a(39)},rtl:{isBackward:a(39),isForward:a(37)},isUp:b,isDown:c,isNavigation:d}});g("4r",["f","l","37","1n"],function(a,b,c,d){var e=function(c,e){var f=d.asLtrRange(c,e);return{start:a.constant(b.fromDom(f.startContainer)),soffset:a.constant(f.startOffset),finish:a.constant(b.fromDom(f.endContainer)),foffset:a.constant(f.endOffset)}},f=function(b,d,e,f){return{start:a.constant(c.on(b,d)),finish:a.constant(c.on(e,f))}};return{convertToRange:e,makeSitus:f}});g("3g",["4r","f","1t","g","l","1e","37","1f"],function(a,b,c,d,e,f,g,h){return function(i){var j=function(a,b){return d.from(i.document.elementFromPoint(a,b)).map(e.fromDom)},k=function(a){return a.dom().getBoundingClientRect()},l=function(a,d,e,g){var j=f.exact(a,d,e,g);return h.getFirstRect(i,j).map(function(a){return c.map(a,b.apply)})},m=function(){return h.get(i).map(function(b){return a.convertToRange(i,b)})},n=function(b){var c=f.relative(b.start(),b.finish());return a.convertToRange(i,c)},o=function(a,c){return h.getAtPoint(i,a,c).map(function(a){return{start:b.constant(g.on(a.start(),a.soffset())),finish:b.constant(g.on(a.finish(),a.foffset()))}})},p=function(){h.clear(i)},q=function(a){h.setToElement(i,a)},r=function(a){h.setExact(i,a.start(),a.soffset(),a.finish(),a.foffset())},s=function(a,b){h.setRelative(i,a,b)},t=function(){return i.innerHeight},u=function(){return i.scrollY},v=function(a,b){i.scrollBy(a,b)};return{elementFromPoint:j,getRect:k,getRangedRect:l,getSelection:m,fromSitus:n,situsFromPoint:o,clearSelection:p,setSelection:r,setRelativeSelection:s,selectContents:q,getInnerHeight:t,getScrollY:u,scrollBy:v}}}),g("3h",["3f","3l","4r","f","g","1c","t","2b","1e","37"],function(a,b,c,d,e,f,g,h,i,j){var k=function(a,b,c,d,h,i,j){return f.eq(c,h)&&d===i?e.none():g.closest(c,"td,th",b).bind(function(c){return g.closest(h,"td,th",b).bind(function(d){return l(a,b,c,d,j)})})},l=function(d,g,i,j,k){if(!f.eq(i,j)){var l=b.identify(i,j,g).getOr([]);if(l.length>0)return k(d,l,i,j),e.some(a.response(e.some(c.makeSitus(i,0,i,h.getEnd(i))),!0))}return e.none()},m=function(a,c,d,e,f){var g=function(a){return f.clear(d),f.selectRange(d,a.boxes(),a.start(),a.finish()),a.boxes()};return b.shiftSelection(e,a,c,f.firstSelectedSelector(),f.lastSelectedSelector()).map(g)};return{sync:k,detect:l,update:m}}),g("5o",["1k"],function(a){var b=a.immutableBag(["left","top","right","bottom"],[]),c=function(a,c){return b({left:a.left(),top:a.top()+c,right:a.right(),bottom:a.bottom()+c})},d=function(a,c){return b({left:a.left(),top:a.top()-c,right:a.right(),bottom:a.bottom()-c})},e=function(a,c){var d=a.bottom()-a.top();return b({left:a.left(),top:c-d,right:a.right(),bottom:c})},f=function(a,c){var d=a.bottom()-a.top();return b({left:a.left(),top:c,right:a.right(),bottom:c+d})},g=function(a,c,d){return b({left:a.left()+c,top:a.top()+d,right:a.right()+c,bottom:a.bottom()+d})},h=function(a){return a.top()},i=function(a){return a.bottom()},j=function(a){return"("+a.left()+", "+a.top()+") -> ("+a.right()+", "+a.bottom()+")"};return{nu:b,moveUp:d,moveDown:c,moveBottomTo:e,moveTopTo:f,getTop:h,getBottom:i,translate:g,toString:j}}),g("5p",["5o","g","n","2b"],function(a,b,c,d){var e=function(a,c,e){return e>=0&&e0?a.getRangedRect(c,e-1,c,e):b.none()},f=function(b){return a.nu({left:b.left,top:b.top,right:b.right,bottom:b.bottom})},g=function(a,c){return b.some(a.getRect(c))},h=function(a,d,h){return c.isElement(d)?g(a,d,h).map(f):c.isText(d)?e(a,d,h).map(f):b.none()},i=function(a,e){return c.isElement(e)?g(a,e).map(f):c.isText(e)?a.getRangedRect(e,0,e,d.getEnd(e)).map(f):b.none()};return{getBoxAt:h,getEntireBox:i}}),g("64",["e","g","1k"],function(a,b,c){var d=c.immutable("item","mode"),e=function(a,b,c,e){var g=void 0!==e?e:f;return a.property().parent(b).map(function(a){return d(a,g)})},f=function(a,b,c,e){var f=void 0!==e?e:g;return c.sibling(a,b).map(function(a){return d(a,f)})},g=function(a,b,c,e){var f=void 0!==e?e:g,h=a.property().children(b),i=c.first(h);return i.map(function(a){return d(a,f)})},h=[{current:e,next:f,fallback:b.none()},{current:f,next:g,fallback:b.some(e)},{current:g,next:g,fallback:b.some(f)}],i=function(b,c,d,e,f){var g=void 0!==f?f:h,j=a.find(g,function(a){return a.current===d});return j.bind(function(a){return a.current(b,c,e,a.next).orThunk(function(){return a.fallback.bind(function(a){return i(b,c,a,e)})})})};return{backtrack:e,sidestep:f,advance:g,go:i}}),g("65",["g"],function(a){var b=function(){var b=function(a,b){return a.query().prevSibling(b)},c=function(b){return b.length>0?a.some(b[b.length-1]):a.none()};return{sibling:b,first:c}},c=function(){var b=function(a,b){return a.query().nextSibling(b)},c=function(b){return b.length>0?a.some(b[0]):a.none()};return{sibling:b,first:c}};return{left:b,right:c}}),g("63",["g","64","65"],function(a,b,c){var d=function(c,e,f,g,h,i){var j=b.go(c,e,g,h);return j.bind(function(b){return i(b.item())?a.none():f(b.item())?a.some(b.item()):d(c,b.item(),f,b.mode(),h,i)})},e=function(a,e,f,g){return d(a,e,f,b.sidestep,c.left(),g)},f=function(a,e,f,g){return d(a,e,f,b.sidestep,c.right(),g)};return{left:e,right:f}}),g("5q",["f","63","64","65"],function(a,b,c,d){var e=function(a,b){return 0===a.property().children(b).length},f=function(b,c,d){return h(b,c,a.curry(e,b),d)},g=function(b,c,d){return i(b,c,a.curry(e,b),d)},h=function(a,c,d,e){return b.left(a,c,d,e)},i=function(a,c,d,e){return b.right(a,c,d,e)},j=function(){return{left:d.left,right:d.right}},k=function(a,b,d,e,f){return c.go(a,b,d,e,f)};return{before:f,after:g,seekLeft:h,seekRight:i,walkers:j,walk:k,backtrack:c.backtrack,sidestep:c.sidestep,advance:c.advance}}),g("4w",["56","5q"],function(a,b){var c=a(),d=function(a,d,e){return b.gather(c,a,d,e)},e=function(a,d){return b.before(c,a,d)},f=function(a,d){return b.after(c,a,d)},g=function(a,d,e){return b.seekLeft(c,a,d,e)},h=function(a,d,e){return b.seekRight(c,a,d,e)},i=function(){return b.walkers()},j=function(a,d,e,f){return b.walk(c,a,d,e,f)};return{gather:d,before:e,after:f,seekLeft:g,seekRight:h,walkers:i,walk:j}}),g("4u",["5o","5p","2g","f","g","4w","48","n","2a","3v"],function(a,b,c,d,e,f,g,h,i,j){var k=5,l=100,m=c.generate([{none:[]},{retry:["caret"]}]),n=function(a,b){return a.left()b.right()},o=function(a,c,e){return i.closest(c,g.isBlock).fold(d.constant(!1),function(c){return b.getEntireBox(a,c).exists(function(a){return n(e,a)})})},p=function(b,c,d,e,f){var g=a.moveDown(f,k);return j.abs(d.bottom()-e.bottom())<1?m.retry(g):d.top()>f.bottom()?m.retry(g):d.top()===f.bottom()?m.retry(a.moveDown(f,1)):o(b,c,f)?m.retry(a.translate(g,k,0)):m.none()},q=function(b,c,d,e,f){var g=a.moveUp(f,k);return j.abs(d.top()-e.top())<1?m.retry(g):d.bottom()c.getInnerHeight()?e.some(a.point(b)-c.getInnerHeight()):a.point(b)<0?e.some(-a.point(b)):e.none()},z=function(a,b,c){var d=a.move(c,k),e=v(b,a,c,d,l).getOr(d);return y(a,e,b).fold(function(){return b.situsFromPoint(e.left(),a.point(e))},function(c){return b.scrollBy(0,c),b.situsFromPoint(e.left(),a.point(e)-c)})};return{tryUp:d.curry(z,r),tryDown:d.curry(z,s),ieTryUp:x,ieTryDown:w,getJumpSize:d.constant(k)}}),g("4v",["2g","3z","1c","t","2b"],function(a,b,c,d,e){var f=a.generate([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),g=function(a,b,c){var d=a.getRect(b),e=a.getRect(c);return e.right>d.left&&e.left1||1===e.length&&!c.eq(i,b))&&(h.selectRange(f,e,i,b),d.selectContents(b))})})},m=function(){i.each(j)};return{mousedown:k,mouseover:l,mouseup:m}}}),g("3k",["4u","4v","4w","1m","37"],function(a,b,c,d,e){return{down:{traverse:d.nextSibling,gather:c.after,relative:e.before,otherRetry:a.tryDown,ieRetry:a.ieTryDown,failure:b.adt.failedDown},up:{traverse:d.prevSibling,gather:c.before,relative:e.before,otherRetry:a.tryUp,ieRetry:a.ieTryUp,failure:b.adt.failedUp}}}),g("1h",["3f","1j","3g","3h","3i","3j","3k","3l","f","g","3m","1k","37"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=l.immutable("rows","cols"),o=function(a,b,d,e){var g=c(a),h=f(g,b,d,e);return{mousedown:h.mousedown,mouseover:h.mouseover,mouseup:h.mouseup}},p=function(f,l,o,p){var q=c(f),r=function(){return p.clear(l),j.none()},s=function(c,f,s,t,u,v){var w=c.raw().which,x=c.raw().shiftKey===!0,y=h.retrieve(l,p.selectedSelector()).fold(function(){return b.isDown(w)&&x?i.curry(e.select,q,l,o,g.down,t,f,p.selectRange):b.isUp(w)&&x?i.curry(e.select,q,l,o,g.up,t,f,p.selectRange):b.isDown(w)?i.curry(e.navigate,q,o,g.down,t,f,e.lastDownCheck):b.isUp(w)?i.curry(e.navigate,q,o,g.up,t,f,e.firstUpCheck):j.none},function(c){var e=function(e){return function(){var f=k.findMap(e,function(a){return d.update(a.rows(),a.cols(),l,c,p)});return f.fold(function(){return h.getEdges(l,p.firstSelectedSelector(),p.lastSelectedSelector()).map(function(c){var d=b.isDown(w)||v.isForward(w)?m.after:m.before;return q.setRelativeSelection(m.on(c.first(),0),d(c.table())),p.clear(l),a.response(j.none(),!0)})},function(b){return j.some(a.response(j.none(),!0))})}};return b.isDown(w)&&x?e([n(1,0)]):b.isUp(w)&&x?e([n(-1,0)]):v.isBackward(w)&&x?e([n(0,-1),n(-1,0)]):v.isForward(w)&&x?e([n(0,1),n(1,0)]):b.isNavigation(w)&&x===!1?r:j.none});return y()},t=function(a,c,e,f,g){return h.retrieve(l,p.selectedSelector()).fold(function(){var h=a.raw().which,i=a.raw().shiftKey===!0;return i===!1?j.none():b.isNavigation(h)?d.sync(l,o,c,e,f,g,p.selectRange):j.none()},j.none)};return{keydown:s,keyup:t}};return{mouse:o,keyboard:p}}),g("4x",["e","3n","4n","1p"],function(a,b,c,d){var e=function(c,d){a.each(d,function(a){b.add(c,a)})},f=function(c,d){a.each(d,function(a){b.remove(c,a)})},g=function(c,d){a.each(d,function(a){b.toggle(c,a)})},h=function(c,d){return a.forall(d,function(a){return b.has(c,a)})},i=function(c,d){return a.exists(d,function(a){return b.has(c,a)})},j=function(a){for(var b=a.dom().classList,c=new d(b.length),e=0;e"):s.dom.add(s.getBody(),"br"))});var d=s.selection.getRng(),e=i.fromDom(s.selection.getStart()),f=i.fromDom(d.startContainer),g=i.fromDom(d.endContainer),h=q.directionAt(e).isRtl()?c.rtl:c.ltr;A.keydown(b,f,d.startOffset,g,d.endOffset,h).each(function(a){B(b,a)}),t().each(function(a){a.showBars()})},G=function(a){var b=i.fromDom(a.target),c=function(){a.stopPropagation()},e=function(){a.preventDefault()},f=d.compose(e,c);return{target:d.constant(b),x:d.constant(a.x),y:d.constant(a.y),stop:c,prevent:e,kill:f,raw:d.constant(a)}},H=function(a){return 0===a.button},I=function(a){return void 0===a.buttons||0!==(1&a.buttons)},J=function(a){H(a)&&z.mousedown(G(a))},K=function(a){I(a)&&z.mouseover(G(a))},L=function(a){H&&z.mouseup(G(a))};s.on("mousedown",J),s.on("mouseover",K),s.on("mouseup",L),s.on("keyup",C),s.on("keydown",F),s.on("nodechange",y),v=e.some(u({mousedown:J,mouseover:K,mouseup:L,keyup:C,keydown:F}))});var x=function(){v.each(function(a){})};return{clear:w.clear,destroy:x}}}),g("a",["1o","z","9","p"],function(a,b,c,d){return function(e){var f=function(){var f=b.getBody(e);return a.retrieve(f,c.selectedSelector()).fold(function(){return void 0===e.selection.getStart()?d.none():d.single(e.selection)},function(a){return d.multiple(a)})};return{get:f}}}),g("b",["f","14","15"],function(a,b,c){var d=b.each,e=function(b){function e(a){return function(){b.execCommand(a)}}var f=[];d("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?f.push({text:"-"}):f.push(b.menuItems[a])}),b.addButton("table",{type:"menubutton",title:"Table",menu:f}),b.addButton("tableprops",{title:"Table properties",onclick:a.curry(c.open,b,!0),icon:"table"}),b.addButton("tabledelete",{title:"Delete table",onclick:e("mceTableDelete")}),b.addButton("tablecellprops",{title:"Cell properties",onclick:e("mceTableCellProps")}),b.addButton("tablemergecells",{title:"Merge cells",onclick:e("mceTableMergeCells")}),b.addButton("tablesplitcells",{title:"Split cell",onclick:e("mceTableSplitCells")}),b.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:e("mceTableInsertRowBefore")}),b.addButton("tableinsertrowafter",{title:"Insert row after",onclick:e("mceTableInsertRowAfter")}),b.addButton("tabledeleterow",{title:"Delete row",onclick:e("mceTableDeleteRow")}),b.addButton("tablerowprops",{title:"Row properties",onclick:e("mceTableRowProps")}),b.addButton("tablecutrow",{title:"Cut row",onclick:e("mceTableCutRow")}),b.addButton("tablecopyrow",{title:"Copy row",onclick:e("mceTableCopyRow")}),b.addButton("tablepasterowbefore",{title:"Paste row before",onclick:e("mceTablePasteRowBefore")}),b.addButton("tablepasterowafter",{title:"Paste row after",onclick:e("mceTablePasteRowAfter")}),b.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:e("mceTableInsertColBefore")}),b.addButton("tableinsertcolafter",{title:"Insert column after",onclick:e("mceTableInsertColAfter")}),b.addButton("tabledeletecol",{title:"Delete column",onclick:e("mceTableDeleteCol")})},f=function(a){var b=function(b){var c=a.dom.is(b,"table")&&a.getBody().contains(b);return c},c=a.settings.table_toolbar;""!==c&&c!==!1&&(c||(c="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),a.addContextToolbar(b,c))};return{addButtons:e,addToolbars:f}}),g("c",["f","e","g","j","l","3","o","15"],function(a,b,c,d,e,f,g,h){var i=function(i,j){function k(a){return function(){i.execCommand(a)}}var l=c.none(),m=[],n=[],o=[],p=[],q=function(a){a.disabled(!0)},r=function(a){a.disabled(!1)},s=function(){var a=this;m.push(a),l.fold(function(){q(a)},function(b){r(a)})},t=function(){var a=this;n.push(a),l.fold(function(){q(a)},function(b){r(a)})},u=function(){var a=this;o.push(a),l.fold(function(){q(a)},function(b){a.disabled(b.mergable().isNone())})},v=function(){var a=this;p.push(a),l.fold(function(){q(a)},function(b){a.disabled(b.unmergable().isNone())})},w=function(){l.fold(function(){b.each(m,q),b.each(n,q),b.each(o,q),b.each(p,q)},function(a){b.each(m,r),b.each(n,r),b.each(o,function(b){b.disabled(a.mergable().isNone())}),b.each(p,function(b){b.disabled(a.unmergable().isNone())})})};i.on("init",function(){i.on("nodechange",function(a){var b=c.from(i.dom.getParent(i.selection.getStart(),"th,td"));l=b.bind(function(a){var b=e.fromDom(a),c=d.table(b);return c.map(function(a){return g.forMenu(j,a,b)})}),w()})});var x=function(){var a="";a='';for(var b=0;b<10;b++){a+="";for(var c=0;c<10;c++)a+='';a+=""}return a+="
",a+=''},y=function(a,b,c,d){var e,f,g,h,i,j=d.getEl().getElementsByTagName("table")[0],k=d.isRtl()||"tl-tr"==d.parent().rel;for(j.nextSibling.innerHTML=b+1+" x "+(c+1),k&&(b=9-b),f=0;f<10;f++)for(e=0;e<10;e++)h=j.rows[f].childNodes[e].firstChild,i=(k?e>=b:e<=b)&&f<=c,a.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode},z=i.settings.table_grid===!1?{text:"Table",icon:"table",context:"table",onclick:a.curry(h.open,i)}:{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),h.open(i))},onshow:function(){y(i,0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");i.dom.removeClass(a,"mce-active"),i.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:x(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(y(i,b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),i.undoManager.transact(function(){f.insert(i,b.lastX+1,b.lastY+1)}),i.addVisual())}}]},A={text:"Table properties",context:"table",onPostRender:s,onclick:a.curry(h.open,i,!0)},B={text:"Delete table",context:"table",onPostRender:s,cmd:"mceTableDelete"},C={text:"Row",context:"table",menu:[{text:"Insert row before",onclick:k("mceTableInsertRowBefore"),onPostRender:t},{text:"Insert row after",onclick:k("mceTableInsertRowAfter"),onPostRender:t},{text:"Delete row",onclick:k("mceTableDeleteRow"),onPostRender:t},{text:"Row properties",onclick:k("mceTableRowProps"),onPostRender:t},{text:"-"},{text:"Cut row",onclick:k("mceTableCutRow"),onPostRender:t},{text:"Copy row",onclick:k("mceTableCopyRow"),onPostRender:t},{text:"Paste row before",onclick:k("mceTablePasteRowBefore"),onPostRender:t},{text:"Paste row after",onclick:k("mceTablePasteRowAfter"),onPostRender:t}]},D={text:"Column",context:"table",menu:[{text:"Insert column before",onclick:k("mceTableInsertColBefore"),onPostRender:t},{text:"Insert column after",onclick:k("mceTableInsertColAfter"),onPostRender:t},{text:"Delete column",onclick:k("mceTableDeleteCol"),onPostRender:t}]},E={separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:k("mceTableCellProps"),onPostRender:t},{text:"Merge cells",onclick:k("mceTableMergeCells"),onPostRender:u},{text:"Split cell",onclick:k("mceTableSplitCells"),onPostRender:v}]};i.addMenuItem("inserttable",z),i.addMenuItem("tableprops",A),i.addMenuItem("deletetable",B),i.addMenuItem("row",C),i.addMenuItem("column",D),i.addMenuItem("cell",E)};return{addMenuItems:i}}),g("0",["1","2","3","4","5","6","7","8","9","a","b","c"],function(a,b,c,d,e,f,g,h,i,j,k,l){function m(a){var m=this,n=f(a),o=h(a,n.lazyResize),p=d(a,n.lazyWire),q=j(a);e.registerCommands(a,p,o,q),b.registerEvents(a,q,p,o),l.addMenuItems(a,q),k.addButtons(a),k.addToolbars(a),a.on("PreInit",function(){a.serializer.addTempAttr(i.firstSelected()),a.serializer.addTempAttr(i.lastSelected())}),a.settings.table_tab_navigation!==!1&&a.on("keydown",function(b){g.handle(b,a,p,n.lazyWire)}),a.on("remove",function(){n.destroy(),o.destroy()}),m.insertTable=function(b,d){return c.insert(a,b,d)},m.setClipboardRows=e.setClipboardRows,m.getClipboardRows=e.getClipboardRows}return a.add("table",m),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/template/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/template/plugin.min.js index e097c3fdba..b9178c44f2 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/template/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/template/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i")==-1){var c="";d.each(b.contentCSS,function(a){c+=''});var e=b.settings.body_class||"";e.indexOf("=")!=-1&&(e=b.getParam("body_class","","hash"),e=e[b.id]||""),a=""+c+''+a+""}a=j(a,"template_preview_replace_values");var f=g.find("iframe")[0].getEl().contentWindow.document;f.open(),f.write(a),f.close()}var f=a.control.value();f.url?e.send({url:f.url,success:function(a){h=a,c(h)}}):(h=f.content,c(h)),g.find("#description")[0].text(a.control.value().description)}var g,h,i=[];if(!c||0===c.length){var l=b.translate("No templates defined.");return void b.notificationManager.open({text:l,type:"info"})}d.each(c,function(a){i.push({selected:!i.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),g=b.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:i,onselect:f}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){k(!1,h)},minWidth:Math.min(a.DOM.getViewPort().w,b.getParam("template_popup_width",600)),minHeight:Math.min(a.DOM.getViewPort().h,b.getParam("template_popup_height",500))}),g.find("listbox")[0].fire("select")}function h(a,c){function d(a,b){if(a=""+a,a.length0&&(f=k.create("div",null),f.appendChild(g[0].cloneNode(!0))),d.each(k.select("*",f),function(a){e(a,b.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_cdate_format",b.getLang("template.cdate_format")))),e(a,b.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_mdate_format",b.getLang("template.mdate_format")))),e(a,b.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(a.innerHTML=l)}),i(f),b.execCommand("mceInsertContent",!1,f.innerHTML),b.addVisual()}b.addCommand("mceInsertTemplate",k),b.addButton("template",{title:"Insert template",onclick:f(g)}),b.addMenuItem("template",{text:"Template",onclick:f(g),context:"insert"}),b.on("PreProcess",function(a){var c=b.dom;d.each(c.select("div",a.node),function(a){c.hasClass(a,"mceTmpl")&&(d.each(c.select("*",a),function(a){c.hasClass(a,b.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_mdate_format",b.getLang("template.mdate_format"))))}),i(a))})})}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0&&(j=l.create("div",null),j.appendChild(k[0].cloneNode(!0))),a.each(l.select("*",j),function(a){h(a,c.getCreationDateClasses(b).replace(/\s+/g,"|"))&&(a.innerHTML=d.getDateTime(b,c.getCdateFormat(b))),h(a,c.getModificationDateClasses(b).replace(/\s+/g,"|"))&&(a.innerHTML=d.getDateTime(b,c.getMdateFormat(b))),h(a,c.getSelectedContentClasses(b).replace(/\s+/g,"|"))&&(a.innerHTML=m)}),g(b,j),b.execCommand("mceInsertContent",!1,j.innerHTML),b.addVisual()};return{createTemplateList:e,replaceTemplateValues:f,replaceVals:g,insertTemplate:i}}),g("2",["6","7"],function(a,b){var c=function(c){c.addCommand("mceInsertTemplate",a.curry(b.insertTemplate,c))};return{register:c}}),g("3",["8","9","a","7"],function(a,b,c,d){var e=function(e){e.on("PreProcess",function(f){var g=e.dom,h=b.getMdateFormat(e);a.each(g.select("div",f.node),function(b){g.hasClass(b,"mceTmpl")&&(a.each(g.select("*",b),function(a){g.hasClass(a,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=c.getDateTime(e,h))}),d.replaceVals(e,b))})})};return{setup:e}}),g("b",["f","8","e","9","7"],function(a,b,c,d,e){var f=function(a,c,f){if(f.indexOf("")===-1){var g="";b.each(a.contentCSS,function(b){g+=''});var h=a.settings.body_class||"";h.indexOf("=")!==-1&&(h=a.getParam("body_class","","hash"),h=h[a.id]||""),f=""+g+''+f+""}f=e.replaceTemplateValues(a,f,d.getPreviewReplaceValues(a));var i=c.find("iframe")[0].getEl().contentWindow.document;i.open(),i.write(f),i.close()},g=function(a,g){var h,i,j=[];if(!g||0===g.length){var k=a.translate("No templates defined.");return void a.notificationManager.open({text:k,type:"info"})}b.each(g,function(a){j.push({selected:!j.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})});var l=function(b){var d=b.control.value();d.url?c.send({url:d.url,success:function(b){i=b,f(a,h,i)}}):(i=d.content,f(a,h,i)),h.find("#description")[0].text(b.control.value().description)};h=a.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:j,onselect:l}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){e.insertTemplate(a,!1,i)},minWidth:d.getDialogWidth(a),minHeight:d.getDialogHeight(a)}),h.find("listbox")[0].fire("select")};return{open:g}}),g("4",["7","b"],function(a,b){var c=function(a){return function(c){b.open(a,c)}},d=function(b){b.addButton("template",{title:"Insert template",onclick:a.createTemplateList(b.settings,c(b))}),b.addMenuItem("template",{text:"Template",onclick:a.createTemplateList(b.settings,c(b)),icon:"template",context:"insert"})};return{register:d}}),g("0",["1","2","3","4"],function(a,b,c,d){return a.add("template",function(a){d.register(a),b.register(a),c.setup(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/textcolor/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/textcolor/plugin.min.js index 4b2f012c08..89b3f62737 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/textcolor/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/textcolor/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i
'+(c?"×":"")+"
"}var c,d,g,h,i,j,k,n,o=this,p=o._id,q=0;for(n=o.settings.origin,c=f(n),c.push({text:e("No color"),color:"transparent"}),g='',h=c.length-1,j=0;j",i=0;ih?g+="":(d=c[k],g+=a(d.color,d.text));g+=""}if(b.settings.color_picker_callback){for(g+='",g+="",i=0;i
'+(d?"×":"")+"
"};for(h=d.mapColors(f),h.push({text:b.translate("No color"),color:"transparent"}),j='
',k=h.length-1,m=0;m",l=0;lk?j+="":(i=h[n],j+=q(i.color,i.text));j+=""}if(g){for(j+='",j+="",l=0;lb.start.length?-1:a.start.length0},e=function(b,e,f,g){var h,i,j=a(b);for(i=0;i0?a.splitText(d):a,a.splitText(c-d-e),a.deleteData(0,b.start.length),a.deleteData(a.data.length-b.end.length,b.end.length),a},e=function(a,b,e){var f,g,h,i,j,k,l,m,n,o,p;if(f=a.selection,g=a.dom,f.isCollapsed()&&(h=f.getRng(!0),i=h.startContainer,j=h.startOffset,l=i.data,o=e===!0?1:0,3==i.nodeType&&(n=c.findEndPattern(b,l,j,o),void 0!==n&&(k=Math.max(0,j-o),k=l.lastIndexOf(n.start,k-n.end.length-1),k!==-1&&(m=g.createRng(),m.setStart(i,k),m.setEnd(i,j-o),n=c.findPattern(b,m.toString()),n&&n.end&&!(i.data.length<=n.start.length+n.end.length))))))return p=a.formatter.get(n.format),p&&p[0].inline?(a.undoManager.transact(function(){i=d(i,n,j,k,o),a.formatter.apply(n.format,{},i)}),i):void 0},f=function(d,e){var f,g,h,i,j,k,l,m,n,o,p;if(f=d.selection,g=d.dom,f.isCollapsed()&&(l=g.getParent(f.getStart(),"p"))){for(n=new a(l,l);j=n.next();)if(3==j.nodeType){i=j;break}if(i){if(m=c.findPattern(e,i.data),!m)return;if(o=f.getRng(!0),h=o.startContainer,p=o.startOffset,i==h&&(p=Math.max(0,p-m.start.length)),b.trim(i.data).length==m.start.length)return;m.format&&(k=d.formatter.get(m.format),k&&k[0].block&&(i.deleteData(0,m.start.length),d.formatter.apply(m.format,{},i),o.setStart(h,p),o.collapse(!0),f.setRng(o))),m.cmd&&d.undoManager.transact(function(){i.deleteData(0,m.start.length),d.execCommand(m.cmd)})}}};return{applyInlineFormat:e,applyBlockFormat:f}}),g("5",["3","4"],function(a,b){function c(a,c){var d,e;e=b.applyInlineFormat(a,c,!1),e&&(d=a.dom.createRng(),d.setStart(e,e.data.length),d.setEnd(e,e.data.length),a.selection.setRng(d)),b.applyBlockFormat(a,c)}function d(a,c){var d,e,f,g,h;d=b.applyInlineFormat(a,c,!0),d&&(h=a.dom,e=d.data.slice(-1),/[\u00a0 ]/.test(e)&&(d.deleteData(d.data.length-1,1),f=h.doc.createTextNode(e),d.nextSibling?h.insertAfter(f,d.nextSibling):d.parentNode.appendChild(f),g=h.createRng(),g.setStart(f,1),g.setEnd(f,1),a.selection.setRng(g)))}var e=function(a,b,c){for(var d=0;db.start.length?-1:a.start.length0},e=function(b,e,f,g){var h,i,j=a(b);for(i=0;i0?a.splitText(d):a,a.splitText(c-d+b.end.length),a.deleteData(0,b.start.length),a.deleteData(a.data.length-b.end.length,b.end.length),a},f=function(b,c,e){if(c.collapsed!==!1){var f=c.startContainer,g=f.data,h=e===!0?1:0;if(3===f.nodeType){var i=d.findEndPattern(b,g,c.startOffset,h);if(void 0!==i){var j=g.lastIndexOf(i.end,c.startOffset-h),k=g.lastIndexOf(i.start,j-i.end.length);if(j=g.indexOf(i.end,k+i.start.length),k!==-1){var l=a.createRange();l.setStart(f,k),l.setEnd(f,j+i.end.length);var m=d.findPattern(b,l.toString());if(!(void 0===i||m!==i||f.data.length<=i.start.length+i.end.length))return{pattern:i,startOffset:k,endOffset:j}}}}}},g=function(a,b,d,f){var g=c.isArray(d.pattern.format)?d.pattern.format:[d.pattern.format],h=c.grep(g,function(b){var c=a.formatter.get(b);return c&&c[0].inline});if(0!==h.length)return a.undoManager.transact(function(){b=e(b,d.pattern,d.endOffset,d.startOffset,f),g.forEach(function(c){a.formatter.apply(c,{},b)})}),b},h=function(a,b,c){var d=a.selection.getRng(!0),e=f(b,d,c);if(e)return g(a,d.startContainer,e,c)},i=function(a,b){return h(a,b,!0)},j=function(a,b){return h(a,b,!1)},k=function(a,e){var f,g,h,i,j,k,l,m,n,o,p;if(f=a.selection,g=a.dom,f.isCollapsed()&&(l=g.getParent(f.getStart(),"p"))){for(n=new b(l,l);j=n.next();)if(3===j.nodeType){i=j;break}if(i){if(m=d.findPattern(e,i.data),!m)return;if(o=f.getRng(!0),h=o.startContainer,p=o.startOffset,i===h&&(p=Math.max(0,p-m.start.length)),c.trim(i.data).length===m.start.length)return;m.format&&(k=a.formatter.get(m.format),k&&k[0].block&&(i.deleteData(0,m.start.length),a.formatter.apply(m.format,{},i),o.setStart(h,p),o.collapse(!0),f.setRng(o))),m.cmd&&a.undoManager.transact(function(){i.deleteData(0,m.start.length),a.execCommand(m.cmd)})}}};return{patternFromRng:f,applyInlineFormatSpace:i,applyInlineFormatEnter:j,applyBlockFormat:k}}),g("9",["8","a"],function(a,b){function c(a,c){var d,e;d=b.applyInlineFormatEnter(a,c),d&&(e=a.dom.createRng(),e.setStart(d,d.data.length),e.setEnd(d,d.data.length),a.selection.setRng(e)),b.applyBlockFormat(a,c)}function d(a,c){var d,e,f,g,h;d=b.applyInlineFormatSpace(a,c),d&&(h=a.dom,e=d.data.slice(-1),/[\u00a0 ]/.test(e)&&(d.deleteData(d.data.length-1,1),f=h.doc.createTextNode(e),h.insertAfter(f,d.parentNode),g=h.createRng(),g.setStart(f,1),g.setEnd(f,1),a.selection.setRng(g)))}var e=function(a,b,c){for(var d=0;d',e="";return d+a.dom.encode(c)+e}function l(a){var b=m(a);return'
'+b+"
"}function m(a){var c,d,e,f,g="",h=i(a),l=j(h)-1;if(!h.length)return"";for(g+=k(a.headerTag,b.translate("Table of Contents")),c=0;c";else for(d=l;d
  • ";if(g+=''+e.title+"",f!==e.level&&f)for(d=e.level;d>f;d--)g+="
  • ";else g+="
  • ",f||(g+="");l=e.level}return g}var n,o=a.$,p={depth:3,headerTag:"h2",className:"mce-toc"},q=function(a){var b=0;return function(){var c=(new Date).getTime().toString(32);return a+c+(b++).toString(32)}},r=q("mcetoc_");a.on("PreInit",function(){var b=a.settings,c=parseInt(b.toc_depth,10)||0;n={depth:c>=1&&c<=9?c:p.depth,headerTag:d(b.toc_header)?b.toc_header:p.headerTag,className:b.toc_class?a.dom.encode(b.toc_class):p.className}}),a.on("PreProcess",function(a){var b=o("."+n.className,a.node);b.length&&(b.removeAttr("contentEditable"),b.find("[contenteditable]").removeAttr("contentEditable"))}),a.on("SetContent",function(){var a=o("."+n.className);a.length&&(a.attr("contentEditable",!1),a.children(":first-child").attr("contentEditable",!0))});var s=function(b){return!b.length||a.dom.getParents(b[0],".mce-offscreen-selection").length>0};a.addCommand("mceInsertToc",function(){var b=o("."+n.className);s(b)?a.insertContent(l(n)):a.execCommand("mceUpdateToc")}),a.addCommand("mceUpdateToc",function(){var b=o("."+n.className);b.length&&a.undoManager.transact(function(){b.html(m(n))})}),a.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:f}),a.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),a.addContextToolbar(e,"tocupdate"),a.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:f})}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i=1&&b<=9?b:3};return{getTocClass:a,getTocHeader:b,getTocDepth:c}}),g("b",[],function(){var a=function(a){var b=0;return function(){var c=(new Date).getTime().toString(32);return a+c+(b++).toString(32)}};return{create:a}}),g("7",["8","9","a","3","b"],function(a,b,c,d,e){var f=e.create("mcetoc_"),g=function(a){var b,c=[];for(b=1;b<=a;b++)c.push("h"+b);return c.join(",")},h=function(a){return i(a).length>0},i=function(a){var b=d.getTocClass(a),e=d.getTocHeader(a),h=g(d.getTocDepth(a)),i=a.$(h);return i.length&&/^h[1-9]$/i.test(e)&&(i=i.filter(function(c,d){return!a.dom.hasClass(d.parentNode,b)})),c.map(i,function(b){return{id:b.id?b.id:f(),level:parseInt(b.nodeName.replace(/^H/i,""),10),title:a.$.text(b),element:b}})},j=function(a){var b,c=9;for(b=0;b',e="";return d+a.DOM.encode(c)+e},l=function(a){var b=m(a);return'
    '+b+"
    "},m=function(a){var c,e,f,g,h="",l=i(a),m=j(l)-1;if(!l.length)return"";for(h+=k(d.getTocHeader(a),b.translate("Table of Contents")),c=0;c";else for(e=m;e
  • ";if(h+=''+f.title+"",g!==f.level&&g)for(e=f.level;e>g;e--)h+="
  • ";else h+="
  • ",g||(h+="");m=f.level}return h},n=function(a,b){return!b.length||a.dom.getParents(b[0],".mce-offscreen-selection").length>0},o=function(a){var b=d.getTocClass(a),c=a.$("."+b);n(a,c)?a.insertContent(l(a)):p(a)},p=function(a){var b=d.getTocClass(a),c=a.$("."+b);c.length&&a.undoManager.transact(function(){c.html(m(a))})};return{hasHeaders:h,insertToc:o,updateToc:p}}),g("2",["7"],function(a){var b=function(b){b.addCommand("mceInsertToc",function(){a.insertToc(b)}),b.addCommand("mceUpdateToc",function(){a.updateToc(b)})};return{register:b}}),g("4",["3"],function(a){var b=function(b){var c=b.$,d=a.getTocClass(b);b.on("PreProcess",function(a){var b=c("."+d,a.node);b.length&&(b.removeAttr("contentEditable"),b.find("[contenteditable]").removeAttr("contentEditable"))}),b.on("SetContent",function(){var a=c("."+d);a.length&&(a.attr("contentEditable",!1),a.children(":first-child").attr("contentEditable",!0))})};return{setup:b}}),g("5",["3","7"],function(a,b){var c=function(a){return function(c){var d=c.control;a.on("LoadContent SetContent change",function(){d.disabled(a.readonly||!b.hasHeaders(a))})}},d=function(b){return function(c){return c&&b.dom.is(c,"."+a.getTocClass(b))&&b.getBody().contains(c)}},e=function(a){a.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:c(a)}),a.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),a.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:c(a)}),a.addContextToolbar(d(a),"tocupdate")};return{register:e}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return a.add("toc",function(a){b.register(a),e.register(a),d.setup(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/visualblocks/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/visualblocks/plugin.min.js index 067eaac006..577b51074f 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/visualblocks/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/visualblocks/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e1)throw c.error("HTML does not have a single root node",a),"HTML must have a single root node";return h(f.childNodes[0])},f=function(a,b){var c=b||d,e=c.createElement(a);return h(e)},g=function(a,b){var c=b||d,e=c.createTextNode(a);return h(e)},h=function(c){if(null===c||void 0===c)throw new b("Node cannot be null or undefined");return{dom:a.constant(c)}};return{fromHtml:e,fromTag:f,fromText:g,fromDom:h}}),g("e",[],function(){var a={"\xa0":"nbsp","\xad":"shy"},b=function(a,b){var c,d="";for(c in a)d+=c;return new RegExp("["+d+"]",b?"g":"")},c=function(a){var b,c="";for(b in a)c&&(c+=","),c+="span.mce-"+a[b];return c};return{charMap:a,regExp:b(a),regExpGlobal:b(a,!0),selector:c(a),charMapToRegExp:b,charMapToSelector:c}}),g("i",[],function(){return{ATTRIBUTE:2,CDATA_SECTION:4,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,ELEMENT:1,TEXT:3,PROCESSING_INSTRUCTION:7,ENTITY_REFERENCE:5,ENTITY:6,NOTATION:12}}),g("g",["i"],function(a){var b=function(a){var b=a.dom().nodeName;return b.toLowerCase()},c=function(a){return a.dom().nodeType},d=function(a){return a.dom().nodeValue},e=function(a){return function(b){return c(b)===a}},f=function(d){return c(d)===a.COMMENT||"#comment"===b(d)},g=e(a.ELEMENT),h=e(a.TEXT),i=e(a.DOCUMENT);return{name:b,type:c,value:d,isElement:g,isText:h,isDocument:i,isComment:f}}),g("j",["e"],function(a){var b=function(b){return''+b+""};return{wrapCharWithSpan:b}}),g("f",["3","4","g","e","j"],function(a,b,c,d,e){var f=function(a){return c.isText(a)&&void 0!==c.value(a)&&d.regExp.test(c.value(a))},g=function(c,d){var e=[],f=c.dom(),h=a.map(f.childNodes,b.fromDom);return a.each(h,function(a){d(a)&&(e=e.concat([a])),e=e.concat(g(a,d))}),e},h=function(a,b){for(;a.parentNode;){if(a.parentNode===b)return a;a=a.parentNode}},i=function(a){return a.replace(d.regExpGlobal,e.wrapCharWithSpan)};return{isMatch:f,filterDescendants:g,findParentElm:h,replaceWithSpans:i}}),g("5",["e","f","3","4","g"],function(a,b,c,d,e){var f=function(a,f){var g,h,i=b.filterDescendants(d.fromDom(f),b.isMatch);c.each(i,function(c){var d=b.replaceWithSpans(e.value(c));for(h=a.dom.create("div",null,d);g=h.lastChild;)a.dom.insertAfter(g,c.dom());a.dom.remove(c.dom())})},g=function(b,d){var e=b.dom.select(a.selector,d);c.each(e,function(a){b.dom.remove(a,1)})},h=function(a){var c=a.getBody(),d=a.selection.getBookmark(),e=b.findParentElm(a.selection.getNode(),c);e=void 0!==e?e:c,g(a,e),f(a,e),a.selection.moveToBookmark(d)};return{show:f,hide:g,toggle:h}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return a.add("visualchars",function(a){var c,d=this,f=function(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})},g=b.debounce(function(){e.toggle(a)},300);a.settings.forced_root_block!==!1&&a.on("keydown",function(b){d.state===!0&&(13===b.keyCode?e.toggle(a):g())}),a.addCommand("mceVisualChars",function(){var b,f=a.getBody(),g=a.selection;c=!c,d.state=c,a.fire("VisualChars",{state:c}),b=g.getBookmark(),c===!0?e.show(a,f):e.hide(a,f),g.moveToBookmark(b)}),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:f}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:f,selectable:!0,context:"view",prependToContext:!0})}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e1)throw d.error("HTML does not have a single root node",a),"HTML must have a single root node";return i(f.childNodes[0])},g=function(a,b){var c=b||e,d=c.createElement(a);return i(d)},h=function(a,b){var c=b||e,d=c.createTextNode(a);return i(d)},i=function(b){if(null===b||void 0===b)throw new c("Node cannot be null or undefined");return{dom:a.constant(b)}},j=function(a,c,d){return b.from(a.dom().elementFromPoint(c,d)).map(i)};return{fromHtml:f,fromTag:g,fromText:h,fromDom:i,fromPoint:j}}),g("o",[],function(){return{ATTRIBUTE:2,CDATA_SECTION:4,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,ELEMENT:1,TEXT:3,PROCESSING_INSTRUCTION:7,ENTITY_REFERENCE:5,ENTITY:6,NOTATION:12}}),g("g",["o"],function(a){var b=function(a){var b=a.dom().nodeName;return b.toLowerCase()},c=function(a){return a.dom().nodeType},d=function(a){return a.dom().nodeValue},e=function(a){return function(b){return c(b)===a}},f=function(d){return c(d)===a.COMMENT||"#comment"===b(d)},g=e(a.ELEMENT),h=e(a.TEXT),i=e(a.DOCUMENT);return{name:b,type:c,value:d,isElement:g,isText:h,isDocument:i,isComment:f}}),g("p",["c"],function(a){var b=function(b){return''+b+""};return{wrapCharWithSpan:b}}),g("d",["e","f","g","c","p"],function(a,b,c,d,e){var f=function(a){return c.isText(a)&&void 0!==c.value(a)&&d.regExp.test(c.value(a))},g=function(c,d){var e=[],f=c.dom(),h=a.map(f.childNodes,b.fromDom);return a.each(h,function(a){d(a)&&(e=e.concat([a])),e=e.concat(g(a,d))}),e},h=function(a,b){for(;a.parentNode;){if(a.parentNode===b)return a;a=a.parentNode}},i=function(a){return a.replace(d.regExpGlobal,e.wrapCharWithSpan)};return{isMatch:f,filterDescendants:g,findParentElm:h,replaceWithSpans:i}}),g("a",["c","d","e","f","g"],function(a,b,c,d,e){var f=function(a,f){var g,h,i=b.filterDescendants(d.fromDom(f),b.isMatch);c.each(i,function(c){var d=b.replaceWithSpans(e.value(c));for(h=a.dom.create("div",null,d);g=h.lastChild;)a.dom.insertAfter(g,c.dom());a.dom.remove(c.dom())})},g=function(b,d){var e=b.dom.select(a.selector,d);c.each(e,function(a){b.dom.remove(a,1)})},h=function(a){var c=a.getBody(),d=a.selection.getBookmark(),e=b.findParentElm(a.selection.getNode(),c);e=void 0!==e?e:c,g(a,e),f(a,e),a.selection.moveToBookmark(d)};return{show:f,hide:g,toggle:h}}),g("8",["b","a"],function(a,b){var c=function(c,d){var e,f=c.getBody(),g=c.selection;d.set(!d.get()),a.fireVisualChars(c,d.get()),e=g.getBookmark(),d.get()===!0?b.show(c,f):b.hide(c,f),g.moveToBookmark(e)};return{toggleVisualChars:c}}),g("4",["8"],function(a){var b=function(b,c){b.addCommand("mceVisualChars",function(){a.toggleVisualChars(b,c)})};return{register:b}}),g("9",["7"],function(a){return a("tinymce.util.Delay")}),g("5",["9","a"],function(a,b){var c=function(c,d){var e=a.debounce(function(){b.toggle(c)},300);c.settings.forced_root_block!==!1&&c.on("keydown",function(a){d.get()===!0&&(13===a.keyCode?b.toggle(c):e())})};return{setup:c}}),g("6",[],function(){var a=function(a){return function(b){var c=b.control;a.on("VisualChars",function(a){c.active(a.state)})}},b=function(b){b.addButton("visualchars",{active:!1,title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:a(b)}),b.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:a(b),selectable:!0,context:"view",prependToContext:!0})};return{register:b}}),g("0",["1","2","3","4","5","6"],function(a,b,c,d,e,f){return b.add("visualchars",function(b){var g=a(!1);return d.register(b,g),f.register(b),e.setup(b,g),c.get(g)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/plugins/wordcount/plugin.min.js b/assets/plugins/tinymce4/tinymce/plugins/wordcount/plugin.min.js index 32c197c97e..0d0dd93418 100755 --- a/assets/plugins/tinymce4/tinymce/plugins/wordcount/plugin.min.js +++ b/assets/plugins/tinymce4/tinymce/plugins/wordcount/plugin.min.js @@ -1 +1 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;ia.length-1&&0!==c)&&((f!==b.ALETTER||g!==b.ALETTER)&&(e=a[c+2],(f!==b.ALETTER||g!==b.MIDLETTER&&g!==b.MIDNUMLET&&g!==b.AT||e!==b.ALETTER)&&(d=a[c-1],(f!==b.MIDLETTER&&f!==b.MIDNUMLET&&g!==b.AT||g!==b.ALETTER||d!==b.ALETTER)&&((f!==b.NUMERIC&&f!==b.ALETTER||g!==b.NUMERIC&&g!==b.ALETTER)&&((f!==b.MIDNUM&&f!==b.MIDNUMLET||g!==b.NUMERIC||d!==b.NUMERIC)&&((f!==b.NUMERIC||g!==b.MIDNUM&&g!==b.MIDNUMLET||e!==b.NUMERIC)&&(f!==b.EXTEND&&f!==b.FORMAT&&d!==b.EXTEND&&d!==b.FORMAT&&g!==b.EXTEND&&g!==b.FORMAT&&((f!==b.CR||g!==b.LF)&&(f===b.NEWLINE||f===b.CR||f===b.LF||(g===b.NEWLINE||g===b.CR||g===b.LF||(f!==b.KATAKANA||g!==b.KATAKANA)&&((g!==b.EXTENDNUMLET||f!==b.ALETTER&&f!==b.NUMERIC&&f!==b.KATAKANA&&f!==b.EXTENDNUMLET)&&((f!==b.EXTENDNUMLET||g!==b.ALETTER&&g!==b.NUMERIC&&g!==b.KATAKANA)&&f!==b.AT))))))))))))};return{isWordBoundary:c}}),g("3",["5","6","7"],function(a,b,c){var d=a.EMPTY_STRING,e=a.WHITESPACE,f=a.PUNCTUATION,g=function(a){return"http"===a||"https"===a},h=function(a,b){var c;for(c=b;c]",punctuation:"[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"},b={ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},c=[new RegExp(a.aletter),new RegExp(a.midnumlet),new RegExp(a.midletter),new RegExp(a.midnum),new RegExp(a.numeric),new RegExp(a.cr),new RegExp(a.lf),new RegExp(a.newline),new RegExp(a.extend),new RegExp(a.format),new RegExp(a.katakana),new RegExp(a.extendnumlet),new RegExp("@")],d="",e=new RegExp("^"+a.punctuation+"$"),f=/^\s+$/;return{characterIndices:b,SETS:c,EMPTY_STRING:d,PUNCTUATION:e,WHITESPACE:f}}),g("c",[],function(){var a=function(a,b,c){var d,e;if(!a)return 0;if(c=c||a,void 0!==a.length){for(d=0,e=a.length;da.length-1&&0!==c)&&((f!==b.ALETTER||g!==b.ALETTER)&&(e=a[c+2],(f!==b.ALETTER||g!==b.MIDLETTER&&g!==b.MIDNUMLET&&g!==b.AT||e!==b.ALETTER)&&(d=a[c-1],(f!==b.MIDLETTER&&f!==b.MIDNUMLET&&g!==b.AT||g!==b.ALETTER||d!==b.ALETTER)&&((f!==b.NUMERIC&&f!==b.ALETTER||g!==b.NUMERIC&&g!==b.ALETTER)&&((f!==b.MIDNUM&&f!==b.MIDNUMLET||g!==b.NUMERIC||d!==b.NUMERIC)&&((f!==b.NUMERIC||g!==b.MIDNUM&&g!==b.MIDNUMLET||e!==b.NUMERIC)&&(f!==b.EXTEND&&f!==b.FORMAT&&d!==b.EXTEND&&d!==b.FORMAT&&g!==b.EXTEND&&g!==b.FORMAT&&((f!==b.CR||g!==b.LF)&&(f===b.NEWLINE||f===b.CR||f===b.LF||(g===b.NEWLINE||g===b.CR||g===b.LF||(f!==b.KATAKANA||g!==b.KATAKANA)&&((g!==b.EXTENDNUMLET||f!==b.ALETTER&&f!==b.NUMERIC&&f!==b.KATAKANA&&f!==b.EXTENDNUMLET)&&((f!==b.EXTENDNUMLET||g!==b.ALETTER&&g!==b.NUMERIC&&g!==b.KATAKANA)&&f!==b.AT))))))))))))};return{isWordBoundary:c}}),g("8",["9","a","b"],function(a,b,c){var d=a.EMPTY_STRING,e=a.WHITESPACE,f=a.PUNCTUATION,g=function(a){return"http"===a||"https"===a},h=function(a,b){var c;for(c=b;ctr{background-color:#fafafa}.mce-container .mce-table-striped thead>tr th{font-weight:bold}.mce-container .mce-table-striped td,.mce-container .mce-table-striped th{padding:5px}.mce-container .mce-table-striped tr:nth-child(even){background-color:#fafafa}.mce-container .mce-table-striped tbody>tr:hover{background-color:#e1e1e1}.mce-branding-powered-by{background-color:#f0f0f0;position:absolute;right:0;bottom:0;width:91px;height:9px;margin-right:-1px;margin-bottom:-1px;border:1px solid #c5c5c5;border-width:1px 1px 0 1px;padding:6px 6px 0 6px;background-image:url('data:image/gif;base64,R0lGODlhXwAJAIABAIiIiAAAACH5BAEKAAEALAAAAABfAAkAAAJxhBGpy+2PUnzqGNpmPNJqDIZSJY4m+KXLF3At2V6xPFfuvMF6J6fINTnhTr9XcaRC6pKvFYlZjDIszaXRSA3ijlXo9AlWindaldSJthJ55XAz6+ZWbVCOdojP77p8J8vlUSI4SHEnaEiYqOhARdhIWAAAOw');background-repeat:no-repeat;background-position:center center}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel-bg{position:absolute;background:url('data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==')}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:rgba(0,0,0,0.2);border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#f0f0f0;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:rgba(0,0,0,0.2);border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#f0f0f0;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-edit-aria-container>.mce-container-body{display:flex}.mce-edit-aria-container>.mce-container-body .mce-edit-area{flex:1}.mce-edit-aria-container>.mce-container-body .mce-sidebar>.mce-container-body{display:flex;align-items:stretch;height:100%}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel{min-width:250px;max-width:250px;position:relative}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel>.mce-container-body{position:absolute;width:100%;height:100%;overflow:auto;top:0;left:0}.mce-sidebar-toolbar{border:0 solid rgba(0,0,0,0.2);border-left-width:1px}.mce-sidebar-toolbar .mce-btn.mce-active,.mce-sidebar-toolbar .mce-btn.mce-active:hover{border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-sidebar-toolbar .mce-btn.mce-active button,.mce-sidebar-toolbar .mce-btn.mce-active:hover button,.mce-sidebar-toolbar .mce-btn.mce-active button i,.mce-sidebar-toolbar .mce-btn.mce-active:hover button i{color:#fff;text-shadow:1px 1px none}.mce-sidebar-panel{border:0 solid rgba(0,0,0,0.2);border-left-width:1px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#FFF;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#FFF}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#FFF;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-ne,.mce-tooltip-se{margin-left:14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#F0F0F0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#CCCCCC;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ECB}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333333}.mce-notification .mce-progress .mce-bar-container{border-color:#CCCCCC}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ECB}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{position:relative;display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0;margin:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-combobox .mce-status{position:absolute;right:2px;top:50%;line-height:16px;margin-top:-8px;font-size:12px;width:15px;height:15px;text-align:center;cursor:pointer}.mce-combobox.mce-has-status input{padding-right:20px}.mce-combobox.mce-has-open .mce-status{right:37px}.mce-combobox .mce-status.mce-i-warning{color:#c09853}.mce-combobox .mce-status.mce-i-checkmark{color:#468847}.mce-menu.mce-combobox-menu{border-top:0;margin-top:0;max-height:200px}.mce-menu.mce-combobox-menu .mce-menu-item{padding:4px 6px 4px 4px;font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-sep{padding:0}.mce-menu.mce-combobox-menu .mce-text{font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-link,.mce-menu.mce-combobox-menu .mce-menu-item-link b{font-size:11px}.mce-menu.mce-combobox-menu .mce-text b{font-size:11px}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#CCC}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}.mce-menu-item-link{color:#093;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mce-menu-item-link b{color:#093}.mce-menu-item-ellipsis{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mce-menu-item:hover *,.mce-menu-item.mce-selected *,.mce-menu-item:focus *{color:white}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}div.mce-menu .mce-menu-item b{font-weight:bold}.mce-menu-item-indent-1{padding-left:20px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-3{padding-left:40px}.mce-menu-item-indent-4{padding-left:45px}.mce-menu-item-indent-5{padding-left:50px}.mce-menu-item-indent-6{padding-left:55px}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #AAA;background:#EEE;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #BBB;background:#DDD;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#BBB}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#FFF}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#ffffff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#FDFDFD}.mce-tab.mce-active{background:#FDFDFD;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-insert:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-reload:before{content:"\e906"}.mce-i-toc:before{content:"\e901"}.mce-i-checkmark:before{content:"\e033"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-insert{font-size:14px}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#BBB} \ No newline at end of file +.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#595959;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2)}.mce-statusbar>.mce-container-body{display:flex;padding-right:16px}.mce-statusbar>.mce-container-body .mce-path{flex:1}.mce-wordcount{font-size:inherit;text-transform:uppercase;padding:8px 0}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative;font-size:11px}.mce-fullscreen .mce-resizehandle{display:none}.mce-statusbar .mce-flow-layout-item{margin:0}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #c5c5c5;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:white}.mce-grid td.mce-grid-cell div{border:1px solid #c5c5c5;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#91bbe9}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#91bbe9}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#c5c5c5;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#91bbe9;background:#bdd6f2}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#8b8b8b}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-container b{font-weight:bold}.mce-container p{margin-bottom:5px}.mce-container a{cursor:pointer;color:#2276d2}.mce-container a:hover{text-decoration:underline}.mce-container ul{margin-left:15px}.mce-container .mce-table-striped{border-collapse:collapse;margin:10px}.mce-container .mce-table-striped thead>tr{background-color:#fafafa}.mce-container .mce-table-striped thead>tr th{font-weight:bold}.mce-container .mce-table-striped td,.mce-container .mce-table-striped th{padding:5px}.mce-container .mce-table-striped tr:nth-child(even){background-color:#fafafa}.mce-container .mce-table-striped tbody>tr:hover{background-color:#e1e1e1}.mce-branding{font-size:inherit;text-transform:uppercase;white-space:pre;padding:8px 0}.mce-branding a{font-size:inherit;color:inherit}.mce-top-part{position:relative}.mce-top-part::before{content:'';position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;right:0;bottom:0;left:0;pointer-events:none}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-rtl .mce-statusbar>.mce-container-body>*:last-child{padding-right:0;padding-left:10px}.mce-rtl .mce-path{text-align:right;padding-right:16px}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.5;filter:alpha(opacity=50);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#2276d2}.mce-croprect-handle-move:focus{outline:1px solid #2276d2}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel-bg{position:absolute;background:url('data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==')}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:#c5c5c5;border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:#c5c5c5;border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#fff;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#fff;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:#c5c5c5;border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#fff;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:#c5c5c5;border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#fff;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-edit-aria-container>.mce-container-body{display:flex}.mce-edit-aria-container>.mce-container-body .mce-edit-area{flex:1}.mce-edit-aria-container>.mce-container-body .mce-sidebar>.mce-container-body{display:flex;align-items:stretch;height:100%}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel{min-width:250px;max-width:250px;position:relative}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel>.mce-container-body{position:absolute;width:100%;height:100%;overflow:auto;top:0;left:0}.mce-sidebar-toolbar{border:0 solid #c5c5c5;border-left-width:1px}.mce-sidebar-toolbar .mce-btn{border-left:0;border-right:0}.mce-sidebar-toolbar .mce-btn.mce-active,.mce-sidebar-toolbar .mce-btn.mce-active:hover{background-color:#555c66}.mce-sidebar-toolbar .mce-btn.mce-active button,.mce-sidebar-toolbar .mce-btn.mce-active:hover button,.mce-sidebar-toolbar .mce-btn.mce-active button i,.mce-sidebar-toolbar .mce-btn.mce-active:hover button i{color:white;text-shadow:1px 1px none}.mce-sidebar-panel{border:0 solid #c5c5c5;border-left-width:1px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #f3f3f3;border:0 solid #c5c5c5;background-color:#fff}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;left:0;background:#FFF;border:1px solid #c5c5c5;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#c5c5c5;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#FFF}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#FFF}#mce-modal-block.mce-in{opacity:.5;filter:alpha(opacity=50);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#9b9b9b}.mce-close:hover i{color:#bdbdbd}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#FFF;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#e2e4e7}.mce-window .mce-btn:hover{border-color:#c5c5c5}.mce-window .mce-btn:focus{border-color:#2276d2}.mce-window-body .mce-btn,.mce-foot .mce-btn{border-color:#c5c5c5}.mce-foot .mce-btn.mce-primary{border-color:transparent}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1;margin-top:1px}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-ne,.mce-tooltip-se{margin-left:14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#595959}.mce-bar{display:block;width:0;height:100%;background-color:#dfdfdf;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#fff;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#c5c5c5;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0;box-sizing:border-box}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ECB}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#595959}.mce-notification .mce-progress .mce-bar-container{border-color:#c5c5c5}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#595959}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ECB}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#9b9b9b;cursor:pointer}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b3b3b3;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);background:white;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn:hover,.mce-btn:active{background:white;color:#595959;border-color:#e2e4e7}.mce-btn:focus{background:white;color:#595959;border-color:#e2e4e7}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover,.mce-btn.mce-active:focus,.mce-btn.mce-active:active{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#555c66;color:white;border-color:transparent}.mce-btn.mce-active button,.mce-btn.mce-active:hover button,.mce-btn.mce-active i,.mce-btn.mce-active:hover i{color:white}.mce-btn:hover .mce-caret{border-top-color:#b5bcc2}.mce-btn.mce-active .mce-caret,.mce-btn.mce-active:hover .mce-caret{border-top-color:white}.mce-btn button{padding:4px 6px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#595959;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:white;border:1px solid transparent;border-color:transparent;background-color:#2276d2}.mce-primary:hover,.mce-primary:focus{background-color:#1e6abc;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#1e6abc;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-primary button,.mce-primary button i{color:white;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #b5bcc2;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #b5bcc2;border-top:0}.mce-btn-flat{border:0;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-toolbar .mce-btn-group{margin:0;padding:2px 0}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:0;margin-left:2px}.mce-btn-group{margin-left:2px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:white;text-indent:-10em;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#595959;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid #2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#bdbdbd}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{position:relative;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#bdbdbd}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0;margin:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-combobox .mce-status{position:absolute;right:2px;top:50%;line-height:16px;margin-top:-8px;font-size:12px;width:15px;height:15px;text-align:center;cursor:pointer}.mce-combobox.mce-has-status input{padding-right:20px}.mce-combobox.mce-has-open .mce-status{right:37px}.mce-combobox .mce-status.mce-i-warning{color:#c09853}.mce-combobox .mce-status.mce-i-checkmark{color:#468847}.mce-menu.mce-combobox-menu{border-top:0;margin-top:0;max-height:200px}.mce-menu.mce-combobox-menu .mce-menu-item{padding:4px 6px 4px 4px;font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-sep{padding:0}.mce-menu.mce-combobox-menu .mce-text{font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-link,.mce-menu.mce-combobox-menu .mce-menu-item-link b{font-size:11px}.mce-menu.mce-combobox-menu .mce-text b{font-size:11px}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid black;background:white;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal;font-size:inherit}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#595959;font-size:inherit;text-transform:uppercase}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#555c66;color:white}.mce-path .mce-divider{display:inline;font-size:inherit}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #c5c5c5;width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #e2e4e7}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar{border:1px solid #e2e4e7}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar .mce-menubtn button span{color:#595959}.mce-menubar .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-active .mce-caret,.mce-menubar .mce-menubtn:hover .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#e2e4e7;background:white;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubar .mce-menubtn.mce-active{border-bottom:none;z-index:65537}div.mce-menubtn.mce-opened{border-bottom-color:white;z-index:65537}.mce-menubtn button{color:#595959}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 4px 6px 4px;clear:both;font-weight:normal;line-height:20px;color:#595959;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-caret{margin-top:4px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #595959}.mce-menu-item .mce-menu-shortcut{display:inline-block;padding:0 10px 0 20px;color:#aaa}.mce-menu-item .mce-ico{padding-right:4px}.mce-menu-item:hover,.mce-menu-item:focus{background:#ededee}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#aaa}.mce-menu-item:hover .mce-text,.mce-menu-item:focus .mce-text,.mce-menu-item:hover .mce-ico,.mce-menu-item:focus .mce-ico{color:#595959}.mce-menu-item.mce-selected{background:#ededee}.mce-menu-item.mce-selected .mce-text,.mce-menu-item.mce-selected .mce-ico{color:#595959}.mce-menu-item.mce-active.mce-menu-item-normal{background:#555c66}.mce-menu-item.mce-active.mce-menu-item-normal .mce-text,.mce-menu-item.mce-active.mce-menu-item-normal .mce-ico{color:white}.mce-menu-item.mce-active.mce-menu-item-checkbox .mce-ico{visibility:visible}.mce-menu-item.mce-disabled,.mce-menu-item.mce-disabled:hover{background:white}.mce-menu-item.mce-disabled:focus,.mce-menu-item.mce-disabled:hover:focus{background:#ededee}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled:hover .mce-text,.mce-menu-item.mce-disabled .mce-ico,.mce-menu-item.mce-disabled:hover .mce-ico{color:#aaa}.mce-menu-item.mce-menu-item-preview.mce-active{border-left:5px solid #555c66;background:white}.mce-menu-item.mce-menu-item-preview.mce-active .mce-text,.mce-menu-item.mce-menu-item-preview.mce-active .mce-ico{color:#595959}.mce-menu-item.mce-menu-item-preview.mce-active:hover{background:#ededee}.mce-menu-item-link{color:#093;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mce-menu-item-link b{color:#093}.mce-menu-item-ellipsis{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mce-menu-item:hover *,.mce-menu-item.mce-selected *,.mce-menu-item:focus *{color:#595959}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}div.mce-menu .mce-menu-item b{font-weight:bold}.mce-menu-item-indent-1{padding-left:20px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-3{padding-left:40px}.mce-menu-item-indent-4{padding-left:45px}.mce-menu-item-indent-5{padding-left:50px}.mce-menu-item-indent-6{padding-left:55px}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #595959;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#595959}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:180px;background:white;border:1px solid #c5c9cf;border:1px solid #e2e4e7;z-index:1002;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);max-height:500px;overflow:auto;overflow-x:hidden}.mce-menu.mce-animate{opacity:.01;transform:rotateY(10deg) rotateX(-10deg);transform-origin:left top}.mce-menu.mce-menu-align .mce-menu-shortcut,.mce-menu.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block}.mce-menu.mce-in.mce-animate{opacity:1;transform:rotateY(0) rotateX(0);transition:opacity .075s ease,transform .1s ease}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-rtl.mce-menu-align .mce-caret,.mce-rtl .mce-menu-shortcut{right:auto;left:0}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#595959}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #c5c5c5;background:#fff;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #c5c5c5;background:#e6e6e6;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{border-color:#2276d2}.mce-spacer{visibility:hidden}.mce-splitbtn:hover .mce-open{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open{border-left:1px solid transparent;padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open:focus{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open:hover,.mce-splitbtn .mce-open:active{border-left:1px solid #e2e4e7}.mce-splitbtn.mce-active:hover .mce-open{border-left:1px solid white}.mce-splitbtn.mce-opened{border-color:#e2e4e7}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px 15px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#FDFDFD}.mce-tab.mce-active{background:#FDFDFD;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-tab:focus{color:#2276d2}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#595959}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#bdbdbd}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-dropzone{border:3px dashed gray;text-align:center}.mce-dropzone span{text-transform:uppercase;display:inline-block;vertical-align:middle}.mce-dropzone:after{content:"";height:100%;display:inline-block;vertical-align:middle}.mce-dropzone.mce-disabled{opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-dropzone.mce-disabled.mce-dragenter{cursor:not-allowed}.mce-browsebutton{position:relative;overflow:hidden}.mce-browsebutton button{position:relative;z-index:1}.mce-browsebutton input{opacity:0;filter:alpha(opacity=0);zoom:1;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#595959}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-insert:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-reload:before{content:"\e906"}.mce-i-toc:before{content:"\e901"}.mce-i-checkmark:before{content:"\e033"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-insert{font-size:14px}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#BBB}/*# sourceMappingURL=skin.min.css.map */ \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/themes/inlite/theme.min.js b/assets/plugins/tinymce4/tinymce/themes/inlite/theme.min.js index 25996d2558..e2d78f5912 100755 --- a/assets/plugins/tinymce4/tinymce/themes/inlite/theme.min.js +++ b/assets/plugins/tinymce4/tinymce/themes/inlite/theme.min.js @@ -1 +1,5 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0})},e=function(b,c){var e=function(a){return"string"==typeof a?d(a,/[ ,]/):a},f=function(a,b){return a===!1?[]:b};return a.isArray(b)?b:a.isString(b)?e(b):a.isBoolean(b)?f(b,c):c},f=function(a){return function(c,d,f){var g=d in c.settings?c.settings[d]:f;return b(f,a),e(g,f)}};return{getStringOr:c(a.isString),getBoolOr:c(a.isBoolean),getNumberOr:c(a.isNumber),getHandlerOr:c(a.isFunction),getToolbarItemsOr:f(a.isArray)}}),g("7",[],function(){var a=function(a,b){return{id:a,rect:b}},b=function(a,b){for(var c=0;c",c=0;c
    ";e+="
    "}return e+="",e+="
    "},d=function(a){var b=a.dom.select("*[data-mce-id]");return b[0]},e=function(a,b,e){a.undoManager.transact(function(){var f,g;a.insertContent(c(b,e)),f=d(a),f.removeAttribute("data-mce-id"),g=a.dom.select("td,th",f),a.selection.setCursorLocation(g[0],0)})},f=function(a,b){a.execCommand("FormatBlock",!1,b)},g=function(b,c,d){var e,f;e=b.editorUpload.blobCache,f=e.create(a.uuid("mceu"),d,c),e.add(f),b.insertContent(b.dom.createHTML("img",{src:f.blobUri()}))},h=function(a){a.selection.collapse(!1)},i=function(a){a.focus(),b.unlinkSelection(a),h(a)},j=function(a,b,c){a.focus(),a.dom.setAttrib(b,"href",c),h(a)},k=function(a,b){a.execCommand("mceInsertLink",!1,{href:b}),h(a)},l=function(a,b){var c=a.dom.getParent(a.selection.getStart(),"a[href]");c?j(a,c,b):k(a,b)},m=function(a,b){0===b.trim().length?i(a):l(a,b)};return{insertTable:e,formatBlock:f,insertBlob:g,createLink:m,unlink:i}}),g("v",[],function(){var a=function(a){return/^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(a.trim())},b=function(a){return/^https?:\/\//.test(a.trim())};return{isDomainLike:a,isAbsolute:b}}),g("l",["g","j","s","p","v"],function(a,b,c,d,e){var f=function(a){a.find("textbox").eq(0).each(function(a){a.focus()})},g=function(c,d){var e=b.create(a.extend({type:"form",layout:"flex",direction:"row",padding:5,name:c,spacing:3},d));return e.on("show",function(){f(e)}),e},h=function(a,b){return b?a.show():a.hide()},i=function(a,b){return new c(function(c){a.windowManager.confirm("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){var d=a===!0?"http://"+b:b;c(d)})})},j=function(a,b){return!e.isAbsolute(b)&&e.isDomainLike(b)?i(a,b):c.resolve(b)},k=function(a,b){var c={},e=function(){a.focus(),d.unlink(a),b()},f=function(a){var b=a.meta;b&&b.attach&&(c={href:this.value(),attach:b.attach})},i=function(b){if(b.control===this){var c,d="";c=a.dom.getParent(a.selection.getStart(),"a[href]"),c&&(d=a.dom.getAttrib(c,"href")),this.fromJSON({linkurl:d}),h(this.find("#unlink"),c),this.find("#linkurl")[0].focus()}};return g("quicklink",{items:[{type:"button",name:"unlink",icon:"unlink",onclick:e,tooltip:"Remove link"},{type:"filepicker",name:"linkurl",placeholder:"Paste or type a link",filetype:"file",onchange:f},{type:"button",icon:"checkmark",subtype:"primary",tooltip:"Ok",onclick:"submit"}],onshow:i,onsubmit:function(e){j(a,e.data.linkurl).then(function(e){a.undoManager.transact(function(){e===c.href&&(c.attach(),c={}),d.createLink(a,e)}),b()})}})};return{createQuickLinkForm:k}}),g("m",["q","r"],function(a,b){var c=function(a,b){return{rect:a,position:b}},d=function(a,b){return{x:b.x,y:b.y,w:a.w,h:a.h}},e=function(b,e,f,g,h){var i,j,k;return i=a.findBestRelativePosition(h,f,g,b),f=a.clamp(f,g),i?(j=a.relativePosition(h,f,i),k=d(h,j),c(k,i)):(f=a.intersect(g,f),f?(i=a.findBestRelativePosition(h,f,g,e))?(j=a.relativePosition(h,f,i),k=d(h,j),c(k,i)):(k=d(h,f),c(k,i)):null)},f=function(a,b,c){return e(["cr-cl","cl-cr"],["bc-tc","bl-tl","br-tr"],a,b,c)},g=function(a,b,c){return e(["tc-bc","bc-tc","tl-bl","bl-tl","tr-br","br-tr"],["bc-tc","bl-tl","br-tr"],a,b,c)},h=function(a,c,d,e){var f;return"function"==typeof a?(f=a({elementRect:b.toClientRect(c),contentAreaRect:b.toClientRect(d),panelRect:b.toClientRect(e)}),b.fromClientRect(f)):e},i=function(a){return a.panelRect};return{calcInsert:f,calc:g,userConstrain:h,defaultHandler:i}}),g("c",["g","j","i","k","l","f","m","5"],function(a,b,c,d,e,f,g,h){return function(){var i,j,k=["bold","italic","|","quicklink","h2","h3","blockquote"],l=["quickimage","quicktable"],m=function(b,c){return a.map(c,function(a){return d.create(b,a.id,a.items)})},n=function(a){return h.getToolbarItemsOr(a,"selection_toolbar",k)},o=function(a){return h.getToolbarItemsOr(a,"insert_toolbar",l)},p=function(a){return a.items().length>0},q=function(c,f){var g=m(c,f).concat([d.create(c,"text",n(c)),d.create(c,"insert",o(c)),e.createQuickLinkForm(c,B)]);return b.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:a.grep(g,p),oncancel:function(){c.focus()}})},r=function(a){a&&a.show()},s=function(a,b){a.moveTo(b.x,b.y)},t=function(b,c){c=c?c.substr(0,2):"",a.each({t:"down",b:"up",c:"center"},function(a,d){b.classes.toggle("arrow-"+a,d===c.substr(0,1))}),"cr"===c?(b.classes.toggle("arrow-left",!0),b.classes.toggle("arrow-right",!1)):"cl"===c?(b.classes.toggle("arrow-left",!0),b.classes.toggle("arrow-right",!0)):a.each({l:"left",r:"right"},function(a,d){b.classes.toggle("arrow-"+a,d===c.substr(1,1))})},u=function(a,b){var c=a.items().filter("#"+b);return c.length>0&&(c[0].show(),a.reflow(),!0)},v=function(a,b,d,e){var i,k,l,m;return m=h.getHandlerOr(d,"inline_toolbar_position_handler",g.defaultHandler),i=f.getContentAreaRect(d),k=c.DOM.getRect(a.getEl()),l="insert"===b?g.calcInsert(e,i,k):g.calc(e,i,k),!!l&&(k=l.rect,j=e,s(a,g.userConstrain(m,e,i,k)),t(a,l.position),!0)},w=function(a,b,c,d){return r(a),a.items().hide(),u(a,b)?void(v(a,b,c,d)===!1&&B(a)):void B(a)},x=function(){return i.items().filter("form:visible").length>0},y=function(a,b){if(i){if(i.items().hide(),!u(i,b))return void B(i);var d,e,k,l;r(i),i.items().hide(),u(i,b),l=h.getHandlerOr(a,"inline_toolbar_position_handler",g.defaultHandler),d=f.getContentAreaRect(a),e=c.DOM.getRect(i.getEl()),k=g.calc(j,d,e),k&&(e=k.rect,s(i,g.userConstrain(l,j,d,e)),t(i,k.position))}},z=function(a,b,c,d){i||(i=q(a,d),i.renderTo(document.body).reflow().moveTo(c.x,c.y),a.nodeChanged()),w(i,b,a,c)},A=function(a,b,c){i&&v(i,b,a,c)},B=function(){i&&i.hide()},C=function(){i&&i.find("toolbar:visible").eq(0).each(function(a){a.focus(!0)})},D=function(){i&&(i.remove(),i=null)},E=function(){return i&&i.visible()&&x()};return{show:z,showForm:y,reposition:A,inForm:E,hide:B,focus:C,remove:D}}}),g("n",["s"],function(a){var b=function(b){return new a(function(a){var c=new FileReader;c.onloadend=function(){a(c.result.split(",")[1])},c.readAsDataURL(b)})};return{blobToBase64:b}}),g("o",["s"],function(a){var b=function(){return new a(function(a){var b;b=document.createElement("input"),b.type="file",b.style.position="fixed",b.style.left=0,b.style.top=0,b.style.opacity=.001,document.body.appendChild(b),b.onchange=function(b){a(Array.prototype.slice.call(b.target.files))},b.click(),b.parentNode.removeChild(b)})};return{pickFile:b}}),g("b",["c","n","o","p"],function(a,b,c,d){var e=function(a){for(var b=function(b){return function(){d.formatBlock(a,b)}},c=1;c<6;c++){var e="h"+c;a.addButton(e,{text:e.toUpperCase(),tooltip:"Heading "+c,stateSelector:e,onclick:b(e),onPostRender:function(){var a=this.getEl().firstChild.firstChild;a.style.fontWeight="bold"}})}},f=function(a,f){a.addButton("quicklink",{icon:"link",tooltip:"Insert/Edit link",stateSelector:"a[href]",onclick:function(){f.showForm(a,"quicklink")}}),a.addButton("quickimage",{icon:"image",tooltip:"Insert image",onclick:function(){c.pickFile().then(function(c){var e=c[0];b.blobToBase64(e).then(function(b){d.insertBlob(a,b,e)})})}}),a.addButton("quicktable",{icon:"table",tooltip:"Insert table",onclick:function(){f.hide(),d.insertTable(a,2,2)}}),e(a)};return{addToEditor:f}}),g("0",["1","2","3","4","5","6","7","8","9","a","b","c"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(a){var b=a.selection.getNode(),c=a.dom.getParents(b);return c},n=function(a,b,c,d){var e=function(c){return a.dom.is(c,b)};return{predicate:e,id:c,items:d}},o=function(a){var b=a.contextToolbars;return d.flatten([b?b:[],n(a,"img","image","alignleft aligncenter alignright")])},p=function(a,b){var c,d,e;return d=m(a),e=h.fromContextToolbars(b),c=g.match(a,[f.element(d[0],e),i.textSelection("text"),i.emptyTextBlock(d,"insert"),f.parent(d,e)]),c&&c.rect?c:null},q=function(a,b){var c=function(){var c=o(a),d=p(a,c);d?b.show(a,d.id,d.rect,c):b.hide()};return function(){a.removed||c()}},r=function(a,b){return function(){var c=o(a),d=p(a,c);d&&b.reposition(a,d.id,d.rect)}},s=function(a,b,c){return function(){a.removed||b.inForm()||c()}},t=function(a,b){var d=c.throttle(q(a,b),0),e=c.throttle(s(a,b,q(a,b)),0);a.on("blur hide ObjectResizeStart",b.hide),a.on("click",d),a.on("nodeChange mouseup",e),a.on("ResizeEditor keyup",d),a.on("ResizeWindow",r(a,b)),a.on("remove",b.remove),a.shortcuts.add("Alt+F10","",b.focus)},u=function(a,b){a.shortcuts.remove("meta+k"),a.shortcuts.add("meta+k","",function(){var c=o(a),d=d=g.match(a,[i.textSelection("quicklink")]);d&&b.show(a,d.id,d.rect,c)})},v=function(a,b){return j.load(a,function(){t(a,b),u(a,b)}),{}},w=function(a){throw new Error(a)};return a.add("inlite",function(a){var b=new l;k.addToEditor(a,b);var c=function(){return a.inline?v(a,b):w("inlite theme only supports inline mode.")};return{renderUI:c}}),b.appendTo(window.tinymce?window.tinymce:{}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0})},e=function(b,c){var e=function(a){return"string"==typeof a?d(a,/[ ,]/):a},f=function(a,b){return a===!1?[]:b};return a.isArray(b)?b:a.isString(b)?e(b):a.isBoolean(b)?f(b,c):c},f=function(a){return function(c,d,f){var g=d in c.settings?c.settings[d]:f;return b(f,a),e(g,f)}};return{getStringOr:c(a.isString),getBoolOr:c(a.isBoolean),getNumberOr:c(a.isNumber),getHandlerOr:c(a.isFunction),getToolbarItemsOr:f(a.isArray)}}),g("39",["8"],function(a){return a("tinymce.geom.Rect")}),g("i",["39","3a"],function(a,b){var c=function(a,b){return{rect:a,position:b}},d=function(a,b){return{x:b.x,y:b.y,w:a.w,h:a.h}},e=function(b,e,f,g,h){var i,j,k,l={x:g.x,y:g.y,w:g.w+(g.w-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e0&&(a+=" "),a+=this.prefix+this.cls[b];return a},c}),g("2g",["32"],function(a){"use strict";function b(a){for(var b,c=[],d=a.length;d--;)b=a[d],b.__checked||(c.push(b),b.__checked=1);for(d=c.length;d--;)delete c[d].__checked;return c}var c,d=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,f=/^\s*|\s*$/g,g=a.extend({init:function(a){function b(a){if(a)return a=a.toLowerCase(),function(b){return"*"===a||b.type===a}}function c(a){if(a)return function(b){return b._name===a}}function g(a){if(a)return a=a.split("."),function(b){for(var c=a.length;c--;)if(!b.classes.contains(a[c]))return!1;return!0}}function h(a,b,c){if(a)return function(d){var e=d[a]?d[a]():"";return b?"="===b?e===c:"*="===b?e.indexOf(c)>=0:"~="===b?(" "+e+" ").indexOf(" "+c+" ")>=0:"!="===b?e!=c:"^="===b?0===e.indexOf(c):"$="===b&&e.substr(e.length-c.length)===c:!!c}}function i(a){var b;if(a)return a=/(?:not\((.+)\))|(.+)/i.exec(a),a[1]?(b=k(a[1],[]),function(a){return!l(a,b)}):(a=a[2],function(b,c,d){return"first"===a?0===c:"last"===a?c===d-1:"even"===a?c%2===0:"odd"===a?c%2===1:!!b[a]&&b[a]()})}function j(a,e,j){function k(a){a&&e.push(a)}var l;return l=d.exec(a.replace(f,"")),k(b(l[1])),k(c(l[2])),k(g(l[3])),k(h(l[4],l[5],l[6])),k(i(l[7])),e.pseudo=!!l[7],e.direct=j,e}function k(a,b){var c,d,f,g=[];do if(e.exec(""),d=e.exec(a),d&&(a=d[3],g.push(d[1]),d[2])){c=d[3];break}while(d);for(c&&k(c,b),a=[],f=0;f"!=g[f]&&a.push(j(g[f],[],">"===g[f-1]));return b.push(a),b}var l=this.match;this._selectors=k(a,[])},match:function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;for(b=b||this._selectors,c=0,d=b.length;c=0;e--)for(j=g[e];o;){if(j.pseudo)for(m=o.parent().items(),k=l=m.length;k--&&m[k]!==o;);for(h=0,i=j.length;h1&&(h=b(h))}return c||(c=g.Collection),new c(h)}});return g}),g("u",["e","2g","32"],function(a,b,c){"use strict";var d,e,f=Array.prototype.push,g=Array.prototype.slice;return e={length:0,init:function(a){a&&this.add(a)},add:function(b){var c=this;return a.isArray(b)?f.apply(c,b):b instanceof d?c.add(b.toArray()):f.call(c,b),c},set:function(a){var b,c=this,d=c.length;for(c.length=0,c.add(a),b=c.length;b0}function f(a,b){var c,g;if(a===b)return!0;if(null===a||null===b)return a===b;if("object"!=typeof a||"object"!=typeof b)return a===b;if(d.isArray(b)){if(a.length!==b.length)return!1;for(c=a.length;c--;)if(!f(a[c],b[c]))return!1}if(e(a)||e(b))return a===b;g={};for(c in b){if(!f(a[c],b[c]))return!1;g[c]=!0}for(c in a)if(!g[c]&&!f(a[c],b[c]))return!1;return!0}return b.extend({Mixins:[c],init:function(b){var c,d;b=b||{};for(c in b)d=b[c],d instanceof a&&(b[c]=d.create(this,c));this.data=b},set:function(b,c){var d,e,g=this.data[b];if(c instanceof a&&(c=c.create(this,b)),"object"==typeof b){for(d in b)this.set(d,b[d]);return this}return f(g,c)||(this.data[b]=c,e={target:this,name:b,value:c,oldValue:g},this.fire("change:"+b,e),this.fire("change",e)),this},get:function(a){return this.data[a]},has:function(a){return a in this.data},bind:function(b){return a.create(this,b)},destroy:function(){this.fire("destroy")}})}),g("2b",["1e","2r"],function(a,b){var c,d={};return{add:function(e){var f=e.parent();if(f){if(!f._layout||f._layout.isNative())return;d[f._id]||(d[f._id]=f),c||(c=!0,b.requestAnimationFrame(function(){var a,b;c=!1;for(a in d)b=d[a],b.state.get("rendered")&&b.reflow();d={}},a.body))}},remove:function(a){d[a._id]&&delete d[a._id]}}}),g("10",["1e","31","32","33","e","34","35","u","36","30","2b"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";function l(a){return a._eventDispatcher||(a._eventDispatcher=new d({scope:a,toggleEvent:function(b,c){c&&d.isNative(b)&&(a._nativeEvents||(a._nativeEvents={}),a._nativeEvents[b]=!0,a.state.get("rendered")&&m(a))}})),a._eventDispatcher}function m(a){function c(b){var c=a.getParentCtrl(b.target);c&&c.fire(b.type,b)}function d(){var a=j._lastHoverCtrl;a&&(a.fire("mouseleave",{target:a.getEl()}),a.parents().each(function(a){a.fire("mouseleave",{target:a.getEl()})}),j._lastHoverCtrl=null)}function e(b){var c,d,e,f=a.getParentCtrl(b.target),g=j._lastHoverCtrl,h=0;if(f!==g){if(j._lastHoverCtrl=f,d=f.parents().toArray().reverse(),d.push(f),g){for(e=g.parents().toArray().reverse(),e.push(g),h=0;h=h;c--)g=e[c],g.fire("mouseleave",{target:g.getEl()})}for(c=h;ci.maxW?i.maxW:c,i.w=c,i.innerW=c-d),c=a.h,c!==f&&(c=ci.maxH?i.maxH:c,i.h=c,i.innerH=c-e),c=a.innerW,c!==f&&(c=ci.maxW-d?i.maxW-d:c,i.innerW=c,i.w=c+d),c=a.innerH,c!==f&&(c=ci.maxH-e?i.maxH-e:c,i.innerH=c,i.h=c+e),a.contentW!==f&&(i.contentW=a.contentW),a.contentH!==f&&(i.contentH=a.contentH),b=h._lastLayoutRect,b.x===i.x&&b.y===i.y&&b.w===i.w&&b.h===i.h||(g=n.repaintControls,g&&g.map&&!g.map[h._id]&&(g.push(h),g.map[h._id]=!0),b.x=i.x,b.y=i.y,b.w=i.w,b.h=i.h),h):i},repaint:function(){var b,c,d,e,f,g,h,i,j,k,l=this;j=a.createRange?function(a){return a}:Math.round,b=l.getEl().style,e=l._layoutRect,i=l._lastRepaintRect||{},f=l.borderBox,g=f.left+f.right,h=f.top+f.bottom,e.x!==i.x&&(b.left=j(e.x)+"px",i.x=e.x),e.y!==i.y&&(b.top=j(e.y)+"px",i.y=e.y),e.w!==i.w&&(k=j(e.w-g),b.width=(k>=0?k:0)+"px",i.w=e.w),e.h!==i.h&&(k=j(e.h-h),b.height=(k>=0?k:0)+"px",i.h=e.h),l._hasBody&&e.innerW!==i.innerW&&(k=j(e.innerW),d=l.getEl("body"),d&&(c=d.style,c.width=(k>=0?k:0)+"px"),i.innerW=e.innerW),l._hasBody&&e.innerH!==i.innerH&&(k=j(e.innerH),d=d||l.getEl("body"),d&&(c=c||d.style,c.height=(k>=0?k:0)+"px"),i.innerH=e.innerH),l._lastRepaintRect=i,l.fire("repaint",{},!1)},updateLayoutRect:function(){var a=this;a.parent()._lastRect=null,j.css(a.getEl(),{width:"",height:""}),a._layoutRect=a._lastRepaintRect=a._lastLayoutRect=null,a.initLayoutRect()},on:function(a,b){function c(a){var b,c;return"string"!=typeof a?a:function(e){return b||d.parentsAndSelf().each(function(d){var e=d.settings.callbacks;if(e&&(b=e[a]))return c=d,!1}),b?b.call(c,e):(e.action=a,void this.fire("execute",e))}}var d=this;return l(d).on(a,c(b)),d},off:function(a,b){return l(this).off(a,b),this},fire:function(a,b,c){var d=this;if(b=b||{},b.control||(b.control=d),b=l(d).fire(a,b),c!==!1&&d.parent)for(var e=d.parent();e&&!b.isPropagationStopped();)e.fire(a,b,!1),e=e.parent();return b},hasEventListeners:function(a){return l(this).has(a)},parents:function(a){var b,c=this,d=new h;for(b=c.parent();b;b=b.parent())d.add(b);return a&&(d=d.filter(a)),d},parentsAndSelf:function(a){return new h(this).add(this.parents(a))},next:function(){var a=this.parent().items();return a[a.indexOf(this)+1]},prev:function(){var a=this.parent().items();return a[a.indexOf(this)-1]},innerHtml:function(a){return this.$el.html(a),this},getEl:function(a){var c=a?this._id+"-"+a:this._id;return this._elmCache[c]||(this._elmCache[c]=b("#"+c)[0]),this._elmCache[c]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(a){}return this},blur:function(){return this.getEl().blur(),this},aria:function(a,b){var c=this,d=c.getEl(c.ariaTarget);return"undefined"==typeof b?c._aria[a]:(c._aria[a]=b,c.state.get("rendered")&&d.setAttribute("role"==a?a:"aria-"+a,b),c)},encode:function(a,b){return b!==!1&&(a=this.translate(a)),(a||"").replace(/[&<>"]/g,function(a){return"&#"+a.charCodeAt(0)+";"})},translate:function(a){return n.translate?n.translate(a):a},before:function(a){var b=this,c=b.parent();return c&&c.insert(a,c.items().indexOf(b),!0),b},after:function(a){var b=this,c=b.parent();return c&&c.insert(a,c.items().indexOf(b)),b},remove:function(){var a,c,d=this,e=d.getEl(),f=d.parent();if(d.items){var g=d.items().toArray();for(c=g.length;c--;)g[c].remove()}f&&f.items&&(a=[],f.items().each(function(b){b!==d&&a.push(b)}),f.items().set(a),f._lastRect=null),d._eventsRoot&&d._eventsRoot==d&&b(e).off();var h=d.getRoot().controlIdLookup;return h&&delete h[d._id],e&&e.parentNode&&e.parentNode.removeChild(e),d.state.set("rendered",!1),d.state.destroy(),d.fire("remove"),d},renderBefore:function(a){return b(a).before(this.renderHtml()),this.postRender(),this},renderTo:function(a){return b(a||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
    '},postRender:function(){var a,c,d,e,f,g=this,h=g.settings;g.$el=b(g.getEl()),g.state.set("rendered",!0);for(e in h)0===e.indexOf("on")&&g.on(e.substr(2),h[e]);if(g._eventsRoot){for(d=g.parent();!f&&d;d=d.parent())f=d._eventsRoot;if(f)for(e in f._nativeEvents)g._nativeEvents[e]=!0}m(g),h.style&&(a=g.getEl(),a&&(a.setAttribute("style",h.style),a.style.cssText=h.style)),g.settings.border&&(c=g.borderBox,g.$el.css({"border-top-width":c.top,"border-right-width":c.right,"border-bottom-width":c.bottom,"border-left-width":c.left}));var i=g.getRoot();i.controlIdLookup||(i.controlIdLookup={}),i.controlIdLookup[g._id]=g;for(var j in g._aria)g.aria(j,g._aria[j]);g.state.get("visible")===!1&&(g.getEl().style.display="none"),g.bindStates(),g.state.on("change:visible",function(a){var b,c=a.value;g.state.get("rendered")&&(g.getEl().style.display=c===!1?"none":"",g.getEl().getBoundingClientRect()),b=g.parent(),b&&(b._lastRect=null),g.fire(c?"show":"hide"),k.add(g)}),g.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(a){function b(a,b){var c,d,e=a;for(c=d=0;e&&e!=b&&e.nodeType;)c+=e.offsetLeft||0,d+=e.offsetTop||0,e=e.offsetParent;return{x:c,y:d}}var c,d,e,f,g,h,i=this.getEl(),j=i.parentNode,k=b(i,j);return c=k.x,d=k.y,e=i.offsetWidth,f=i.offsetHeight,g=j.clientWidth,h=j.clientHeight,"end"==a?(c-=g-e,d-=h-f):"center"==a&&(c-=g/2-e/2,d-=h/2-f/2),j.scrollLeft=c,j.scrollTop=d,this},getRoot:function(){for(var a,b=this,c=[];b;){if(b.rootControl){a=b.rootControl;break}c.push(b),a=b,b=b.parent()}a||(a=this);for(var d=c.length;d--;)c[d].rootControl=a;return a},reflow:function(){k.remove(this);var a=this.parent();return a&&a._layout&&!a._layout.isNative()&&a.reflow(),this}};return e.each("text title visible disabled active value".split(" "),function(a){s[a]=function(b){return 0===arguments.length?this.state.get(a):("undefined"!=typeof b&&this.state.set(a,b),this)}}),n=c.extend(s)}),g("24",["1e","1","30"],function(a,b,c){"use strict";function d(b,d,e){var f,g,h,i,j,k,l,m,n,o;return n=c.getViewPort(),g=c.getPos(d),h=g.x,i=g.y,b.state.get("fixed")&&"static"==c.getRuntimeStyle(a.body,"position")&&(h-=n.x,i-=n.y),f=b.getEl(),o=c.getSize(f),j=o.width,k=o.height,o=c.getSize(d),l=o.width,m=o.height,e=(e||"").split(""),"b"===e[0]&&(i+=m),"r"===e[1]&&(h+=l), +"c"===e[0]&&(i+=Math.round(m/2)),"c"===e[1]&&(h+=Math.round(l/2)),"b"===e[3]&&(i-=k),"r"===e[4]&&(h-=j),"c"===e[3]&&(i-=Math.round(k/2)),"c"===e[4]&&(h-=Math.round(j/2)),{x:h,y:i,w:j,h:k}}return{testMoveRel:function(a,b){for(var e=c.getViewPort(),f=0;f0&&g.x+g.w0&&g.y+g.he.x&&g.x+g.we.y&&g.y+g.hb?(a=b-c,a<0?0:a):a}var f=this;if(f.settings.constrainToViewport){var g=c.getViewPort(b),h=f.layoutRect();a=e(a,g.w+g.x,h.w),d=e(d,g.h+g.y,h.h)}return f.state.get("rendered")?f.layoutRect({x:a,y:d}).repaint():(f.settings.x=a,f.settings.y=d),f.fire("move",{x:a,y:d}),f}}}),g("2p",["10","24"],function(a,b){return a.extend({Mixins:[b],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var a=this,b=a.classPrefix;return'"},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.getEl().lastChild.innerHTML=a.encode(b.value)}),a._super()},repaint:function(){var a,b,c=this;a=c.getEl().style,b=c._layoutRect,a.left=b.x+"px",a.top=b.y+"px",a.zIndex=131070}})}),g("1h",["10","2p"],function(a,b){"use strict";var c,d=a.extend({init:function(a){var b=this;b._super(a),a=b.settings,b.canFocus=!0,a.tooltip&&d.tooltips!==!1&&(b.on("mouseenter",function(c){var d=b.tooltip().moveTo(-65535);if(c.control==b){var e=d.text(a.tooltip).show().testMoveRel(b.getEl(),["bc-tc","bc-tl","bc-tr"]);d.classes.toggle("tooltip-n","bc-tc"==e),d.classes.toggle("tooltip-nw","bc-tl"==e),d.classes.toggle("tooltip-ne","bc-tr"==e),d.moveRel(b.getEl(),e)}else d.hide()}),b.on("mouseleave mousedown click",function(){b.tooltip().hide()})),b.aria("label",a.ariaLabel||a.tooltip)},tooltip:function(){return c||(c=new b({type:"tooltip"}),c.renderTo()),c},postRender:function(){var a=this,b=a.settings;a._super(),a.parent()||!b.width&&!b.height||(a.initLayoutRect(),a.repaint()),b.autofocus&&a.focus()},bindStates:function(){function a(a){c.aria("disabled",a),c.classes.toggle("disabled",a)}function b(a){c.aria("pressed",a),c.classes.toggle("active",a)}var c=this;return c.state.on("change:disabled",function(b){a(b.value)}),c.state.on("change:active",function(a){b(a.value)}),c.state.get("disabled")&&a(!0),c.state.get("active")&&b(!0),c._super()},remove:function(){this._super(),c&&(c.remove(),c=null)}});return d}),g("29",["1h"],function(a){"use strict";return a.extend({Defaults:{value:0},init:function(a){var b=this;b._super(a),b.classes.add("progress"),b.settings.filter||(b.settings.filter=function(a){return Math.round(a)})},renderHtml:function(){var a=this,b=a._id,c=this.classPrefix;return'
    0%
    '},postRender:function(){var a=this;return a._super(),a.value(a.settings.value),a},bindStates:function(){function a(a){a=b.settings.filter(a),b.getEl().lastChild.innerHTML=a+"%",b.getEl().firstChild.firstChild.style.width=a+"%"}var b=this;return b.state.on("change:value",function(b){a(b.value)}),a(b.state.get("value")),b._super()}})}),g("25",["10","24","29","2r"],function(a,b,c,d){var e=function(a,b){a.getEl().lastChild.textContent=b+(a.progressBar?" "+a.progressBar.value()+"%":"")};return a.extend({Mixins:[b],Defaults:{classes:"widget notification"},init:function(a){var b=this;b._super(a),b.maxWidth=a.maxWidth,a.text&&b.text(a.text),a.icon&&(b.icon=a.icon),a.color&&(b.color=a.color),a.type&&b.classes.add("notification-"+a.type),a.timeout&&(a.timeout<0||a.timeout>0)&&!a.closeButton?b.closeButton=!1:(b.classes.add("has-close"),b.closeButton=!0),a.progressBar&&(b.progressBar=new c),b.on("click",function(a){a.target.className.indexOf(b.classPrefix+"close")!=-1&&b.close()})},renderHtml:function(){var a=this,b=a.classPrefix,c="",d="",e="",f="";return a.icon&&(c=''),f=' style="max-width: '+a.maxWidth+"px;"+(a.color?"background-color: "+a.color+';"':'"'),a.closeButton&&(d=''),a.progressBar&&(e=a.progressBar.renderHtml()),''},postRender:function(){var a=this;return d.setTimeout(function(){a.$el.addClass(a.classPrefix+"in"),e(a,a.state.get("text"))},100),a._super()},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.getEl().firstChild.innerHTML=b.value,e(a,b.value)}),a.progressBar&&(a.progressBar.bindStates(),a.progressBar.state.on("change:value",function(b){e(a,a.state.get("text"))})),a._super()},close:function(){var a=this;return a.fire("close").isDefaultPrevented()||a.remove(),a},repaint:function(){var a,b,c=this;a=c.getEl().style,b=c._layoutRect,a.left=b.x+"px",a.top=b.y+"px",a.zIndex=65534}})}),g("a",["2y","2z","e","30","25"],function(a,b,c,d,e){return function(f){var g=function(a){return a.inline?a.getElement():a.getContentAreaContainer()},h=function(){var a=g(f);return d.getSize(a).width},i=function(b){a.each(b,function(a){a.moveTo(0,0)})},j=function(b){if(b.length>0){var c=b.slice(0,1)[0],d=g(f);c.moveRel(d,"tc-tc"),a.each(b,function(a,c){c>0&&a.moveRel(b[c-1].getEl(),"bc-tc")})}},k=function(a){i(a),j(a)},l=function(a,d){var f=c.extend(a,{maxWidth:h()}),g=new e(f);return g.args=f,f.timeout>0&&(g.timer=b(function(){g.close(),d()},f.timeout)),g.on("close",function(){d()}),g.renderTo(),g},m=function(a){a.close()},n=function(a){return a.args};return{open:l,close:m,reposition:k,getArgs:n}}}),g("11",["1e","1","31"],function(a,b,c){"use strict";function d(a){var b,c,d,e,f,g,h,i,j=Math.max;return b=a.documentElement,c=a.body,d=j(b.scrollWidth,c.scrollWidth),e=j(b.clientWidth,c.clientWidth),f=j(b.offsetWidth,c.offsetWidth),g=j(b.scrollHeight,c.scrollHeight),h=j(b.clientHeight,c.clientHeight),i=j(b.offsetHeight,c.offsetHeight),{width:d").css({position:"absolute",top:0,left:0,width:q.width,height:q.height,zIndex:2147483647,opacity:1e-4,cursor:k}).appendTo(p.body),c(p).on("mousemove touchmove",m).on("mouseup touchend",l),g.start(a)},m=function(a){return e(a),a.button!==j?l(a):(a.deltaX=a.screenX-n,a.deltaY=a.screenY-o,a.preventDefault(),void g.drag(a))},l=function(a){e(a),c(p).off("mousemove touchmove",m).off("mouseup touchend",l),i.remove(),g.stop&&g.stop(a)},this.destroy=function(){c(h()).off()},c(h()).on("mousedown touchstart",k)}}),g("d",["8"],function(a){return a("tinymce.ui.Factory")}),g("1v",["1e"],function(a){"use strict";var b=function(a){return!!a.getAttribute("data-mce-tabstop")};return function(c){function d(a){return a&&1===a.nodeType}function e(a){return a=a||v,d(a)?a.getAttribute("role"):null}function f(a){for(var b,c=a||v;c=c.parentNode;)if(b=e(c))return b}function g(a){var b=v;if(d(b))return b.getAttribute("aria-"+a)}function h(a){var b=a.tagName.toUpperCase();return"INPUT"==b||"TEXTAREA"==b||"SELECT"==b}function i(a){return!(!h(a)||a.hidden)||(!!b(a)||!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(e(a)))}function j(a){function b(a){if(1==a.nodeType&&"none"!=a.style.display&&!a.disabled){i(a)&&c.push(a);for(var d=0;d=b.length&&(a=0),b[a]&&b[a].focus(),a}function n(a,b){var c=-1,d=k();b=b||j(d.getEl());for(var e=0;e=0&&(c=b.getEl(),c&&c.parentNode.removeChild(c),c=a.getEl(),c&&c.parentNode.removeChild(c)),b.parent(this)},create:function(b){var c,e=this,g=[];return f.isArray(b)||(b=[b]),f.each(b,function(b){b&&(b instanceof a||("string"==typeof b&&(b={type:b}),c=f.extend({},e.settings.defaults,b),b.type=c.type=c.type||b.type||e.settings.defaultType||(c.defaults?c.defaults.type:null),b=d.create(c)),g.push(b))}),g},renderNew:function(){var a=this;return a.items().each(function(b,c){var d;b.parent(a),b.state.get("rendered")||(d=a.getEl("body"),d.hasChildNodes()&&c<=d.childNodes.length-1?g(d.childNodes[c]).before(b.renderHtml()):g(d).append(b.renderHtml()),b.postRender(),i.add(b))}),a._layout.applyClasses(a.items().filter(":visible")),a._lastRect=null,a},append:function(a){return this.add(a).renderNew()},prepend:function(a){var b=this;return b.items().set(b.create(a).concat(b.items().toArray())),b.renderNew()},insert:function(a,b,c){var d,e,f,g=this;return a=g.create(a),d=g.items(),!c&&b=0&&b
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "},postRender:function(){var a,b=this;return b.items().exec("postRender"),b._super(),b._layout.postRender(b),b.state.set("rendered",!0),b.settings.style&&b.$el.css(b.settings.style),b.settings.border&&(a=b.borderBox,b.$el.css({"border-top-width":a.top,"border-right-width":a.right,"border-bottom-width":a.bottom,"border-left-width":a.left})),b.parent()||(b.keyboardNav=new e({root:b})),b},initLayoutRect:function(){var a=this,b=a._super();return a._layout.recalc(a),b},recalc:function(){var a=this,b=a._layoutRect,c=a._lastRect;if(!c||c.w!=b.w||c.h!=b.h)return a._layout.recalc(a),b=a.layoutRect(),a._lastRect={x:b.x,y:b.y,w:b.w,h:b.h},!0},reflow:function(){var b;if(i.remove(this),this.visible()){for(a.repaintControls=[],a.repaintControls.map={},this.recalc(),b=a.repaintControls.length;b--;)a.repaintControls[b].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),a.repaintControls=[]}return this}})}),g("2e",["31","11"],function(a,b){"use strict";return{init:function(){var a=this;a.on("repaint",a.renderScroll)},renderScroll:function(){function c(){function b(b,g,h,i,j,k){var l,m,n,o,p,q,r,s,t;if(m=e.getEl("scroll"+b)){if(s=g.toLowerCase(),t=h.toLowerCase(),a(e.getEl("absend")).css(s,e.layoutRect()[i]-1),!j)return void a(m).css("display","none");a(m).css("display","block"),l=e.getEl("body"),n=e.getEl("scroll"+b+"t"),o=l["client"+h]-2*f,o-=c&&d?m["client"+k]:0,p=l["scroll"+h],q=o/p,r={},r[s]=l["offset"+g]+f,r[t]=o,a(m).css(r),r={},r[s]=l["scroll"+g]*q,r[t]=o*q,a(n).css(r)}}var c,d,g;g=e.getEl("body"),c=g.scrollWidth>g.clientWidth,d=g.scrollHeight>g.clientHeight,b("h","Left","Width","contentW",c,"Height"),b("v","Top","Height","contentH",d,"Width")}function d(){function c(c,d,g,h,i){var j,k=e._id+"-scroll"+c,l=e.classPrefix;a(e.getEl()).append('
    '),e.draghelper=new b(k+"t",{start:function(){j=e.getEl("body")["scroll"+d],a("#"+k).addClass(l+"active")},drag:function(a){var b,k,l,m,n=e.layoutRect();k=n.contentW>n.innerW,l=n.contentH>n.innerH,m=e.getEl("body")["client"+g]-2*f,m-=k&&l?e.getEl("scroll"+c)["client"+i]:0,b=m/e.getEl("body")["scroll"+g],e.getEl("body")["scroll"+d]=j+a["delta"+h]/b},stop:function(){a("#"+k).removeClass(l+"active")}})}e.classes.add("scroll"),c("v","Top","Height","Y","Width"),c("h","Left","Width","X","Height")}var e=this,f=2;e.settings.autoScroll&&(e._hasScroll||(e._hasScroll=!0,d(),e.on("wheel",function(a){var b=e.getEl("body");b.scrollLeft+=10*(a.deltaX||0),b.scrollTop+=10*a.deltaY,c()}),a(e.getEl("body")).on("scroll",c)),c())}}}),g("26",["z","2e"],function(a,b){"use strict";return a.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[b],renderHtml:function(){var a=this,b=a._layout,c=a.settings.html;return a.preRender(),b.preRender(a),"undefined"==typeof c?c='
    '+b.renderHtml(a)+"
    ":("function"==typeof c&&(c=c.call(a)),a._hasBody=!1),'
    '+(a._preBodyHtml||"")+c+"
    "}})}),g("2c",["30"],function(a){"use strict";return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(b,c){if(b<=1||c<=1){var d=a.getWindowSize();b=b<=1?b*d.w:b,c=c<=1?c*d.h:c}return this._layoutRect.autoResize=!1,this.layoutRect({minW:b,minH:c,w:b,h:c}).reflow()},resizeBy:function(a,b){var c=this,d=c.layoutRect();return c.resizeTo(d.w+a,d.h+b)}}}),g("18",["1e","1","31","2r","30","24","26","2c"],function(a,b,c,d,e,f,g,h){"use strict";function i(a,b){for(;a;){if(a==b)return!0;a=a.parent()}}function j(a){for(var b=u.length;b--;){var c=u[b],d=c.getParentCtrl(a.target);if(c.settings.autohide){if(d&&(i(d,c)||c.parent()===d))continue;a=c.fire("autohide",{target:a.target}),a.isDefaultPrevented()||c.hide()}}}function k(){q||(q=function(a){2!=a.button&&j(a)},c(a).on("click touchstart",q))}function l(){r||(r=function(){var a;for(a=u.length;a--;)n(u[a])},c(b).on("scroll",r))}function m(){if(!s){var d=a.documentElement,e=d.clientWidth,f=d.clientHeight;s=function(){a.all&&e==d.clientWidth&&f==d.clientHeight||(e=d.clientWidth,f=d.clientHeight,w.hideAll())},c(b).on("resize",s)}}function n(a){function b(b,c){for(var d,e=0;ec&&(a.fixed(!1).layoutRect({y:a._autoFixY}).repaint(),b(!1,a._autoFixY-c)):(a._autoFixY=a.layoutRect().y,a._autoFixY').appendTo(b.getContainerElm())),d.setTimeout(function(){e.addClass(f+"in"),c(b.getEl()).addClass(f+"in")}),t=!0),o(!0,b)}}),b.on("show",function(){b.parents().each(function(a){if(a.state.get("fixed"))return b.fixed(!0),!1})}),a.popover&&(b._preBodyHtml='
    ',b.classes.add("popover").add("bottom").add(b.isRtl()?"end":"start")),b.aria("label",a.ariaLabel),b.aria("labelledby",b._id),b.aria("describedby",b.describedBy||b._id+"-none")},fixed:function(a){var b=this;if(b.state.get("fixed")!=a){if(b.state.get("rendered")){var c=e.getViewPort();a?b.layoutRect().y-=c.y:b.layoutRect().y+=c.y}b.classes.toggle("fixed",a),b.state.set("fixed",a)}return b},show:function(){var a,b=this,c=b._super();for(a=u.length;a--&&u[a]!==b;);return a===-1&&u.push(b),c},hide:function(){return p(this),o(!1,this),this._super()},hideAll:function(){w.hideAll()},close:function(){var a=this;return a.fire("close").isDefaultPrevented()||(a.remove(),o(!1,a)),a},remove:function(){p(this),this._super()},postRender:function(){var a=this;return a.settings.bodyRole&&this.getEl("body").setAttribute("role",a.settings.bodyRole),a._super()}});return w.hideAll=function(){for(var a=u.length;a--;){var b=u[a];b&&b.settings.autohide&&(b.hide(),u.splice(a,1))}},w}),g("2q",["1e","2z","1","31","1g","2r","34","30","11","18","26"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";function l(b){var c,f="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",g=d("meta[name=viewport]")[0];e.overrideViewPort!==!1&&(g||(g=a.createElement("meta"),g.setAttribute("name","viewport"),a.getElementsByTagName("head")[0].appendChild(g)),c=g.getAttribute("content"),c&&"undefined"!=typeof q&&(q=c),g.setAttribute("content",b?f:q))}function m(b,c){n()&&c===!1&&d([a.documentElement,a.body]).removeClass(b+"fullscreen")}function n(){for(var a=0;aa.w&&(c=a.x-Math.max(0,b/2),e.layoutRect({w:b,x:c}),d=!0)),f&&(f.layoutRect({w:e.layoutRect().innerW}).recalc(),b=f.layoutRect().minW+a.deltaW,b>a.w&&(c=a.x-Math.max(0,b-a.w),e.layoutRect({w:b,x:c}),d=!0)),d&&e.recalc()},initLayoutRect:function(){var a,b=this,c=b._super(),d=0;if(b.settings.title&&!b._fullscreen){a=b.getEl("head");var e=h.getSize(a);c.headerW=e.width,c.headerH=e.height,d+=c.headerH}b.statusbar&&(d+=b.statusbar.layoutRect().h),c.deltaH+=d,c.minH+=d,c.h+=d;var f=h.getWindowSize();return c.x=b.settings.x||Math.max(0,f.w/2-c.w/2),c.y=b.settings.y||Math.max(0,f.h/2-c.h/2),c},renderHtml:function(){var a=this,b=a._layout,c=a._id,d=a.classPrefix,e=a.settings,f="",g="",h=e.html;return a.preRender(),b.preRender(a),e.title&&(f='
    '+a.encode(e.title)+'
    '),e.url&&(h=''),"undefined"==typeof h&&(h=b.renderHtml(a)),a.statusbar&&(g=a.statusbar.renderHtml()),'
    '+f+'
    '+h+"
    "+g+"
    "},fullscreen:function(b){var e,i,j=this,k=a.documentElement,l=j.classPrefix;if(b!=j._fullscreen)if(d(c).on("resize",function(){var a;if(j._fullscreen)if(e)j._timer||(j._timer=f.setTimeout(function(){var a=h.getWindowSize();j.moveTo(0,0).resizeTo(a.w,a.h),j._timer=0},50));else{a=(new Date).getTime();var b=h.getWindowSize();j.moveTo(0,0).resizeTo(b.w,b.h),(new Date).getTime()-a>50&&(e=!0)}}),i=j.layoutRect(),j._fullscreen=b,b){j._initial={x:i.x,y:i.y,w:i.w,h:i.h},j.borderBox=g.parseBox("0"),j.getEl("head").style.display="none",i.deltaH-=i.headerH+2,d([k,a.body]).addClass(l+"fullscreen"),j.classes.add("fullscreen");var m=h.getWindowSize();j.moveTo(0,0).resizeTo(m.w,m.h)}else j.borderBox=g.parseBox(j.settings.border),j.getEl("head").style.display="",i.deltaH+=i.headerH,d([k,a.body]).removeClass(l+"fullscreen"),j.classes.remove("fullscreen"),j.moveTo(j._initial.x,j._initial.y).resizeTo(j._initial.w,j._initial.h);return j.reflow()},postRender:function(){var a,c=this;b(function(){c.classes.add("in"),c.fire("open")},0),c._super(),c.statusbar&&c.statusbar.postRender(),c.focus(),this.dragHelper=new i(c._id+"-dragh",{start:function(){a={x:c.layoutRect().x,y:c.layoutRect().y}},drag:function(b){c.moveTo(a.x+b.deltaX,a.y+b.deltaY)}}),c.on("submit",function(a){a.isDefaultPrevented()||c.close()}),p.push(c),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var a,b=this;for(b.dragHelper.destroy(),b._super(),b.statusbar&&this.statusbar.remove(),m(b.classPrefix,!1),a=p.length;a--;)p[a]===b&&p.splice(a,1);l(p.length>0)},getContentWindow:function(){var a=this.getEl().getElementsByTagName("iframe")[0];return a?a.contentWindow:null}});return o(),r}),g("23",["1e","2q"],function(a,b){"use strict";var c=b.extend({init:function(a){a={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(a)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(d){function e(a,b,c){return{type:"button",text:a,subtype:c?"primary":"",onClick:function(a){a.control.parents()[1].close(),g(b)}}}var f,g=d.callback||function(){};switch(d.buttons){case c.OK_CANCEL:f=[e("Ok",!0,!0),e("Cancel",!1)];break;case c.YES_NO:case c.YES_NO_CANCEL:f=[e("Yes",1,!0),e("No",0)],d.buttons==c.YES_NO_CANCEL&&f.push(e("Cancel",-1));break;default:f=[e("Ok",!0,!0)]}return new b({padding:20,x:d.x,y:d.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:f,title:d.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:d.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:d.onClose,onCancel:function(){g(!1)}}).renderTo(a.body).reflow()},alert:function(a,b){return"string"==typeof a&&(a={text:a}),a.callback=b,c.msgBox(a)},confirm:function(a,b){return"string"==typeof a&&(a={text:a}),a.callback=b,a.buttons=c.OK_CANCEL,c.msgBox(a)}}});return c}),g("b",["2q","23"],function(a,b){return function(c){var d=function(b,c,d){var e;return b.title=b.title||" ",b.url=b.url||b.file,b.url&&(b.width=parseInt(b.width||320,10),b.height=parseInt(b.height||240,10)),b.body&&(b.items={defaults:b.defaults,type:b.bodyType||"form",items:b.body,data:b.data,callbacks:b.commands}),b.url||b.buttons||(b.buttons=[{text:"Ok",subtype:"primary",onclick:function(){e.find("form")[0].submit()}},{text:"Cancel",onclick:function(){e.close()}}]),e=new a(b),e.on("close",function(){d(e)}),b.data&&e.on("postRender",function(){this.find("*").each(function(a){var c=a.name();c in b.data&&a.value(b.data[c])})}),e.features=b||{},e.params=c||{},e=e.renderTo().reflow()},e=function(a,c,d){var e;return e=b.alert(a,function(){c()}),e.on("close",function(){d(e)}),e},f=function(a,c,d){var e;return e=b.confirm(a,function(a){c(a)}),e.on("close",function(){d(e)}),e},g=function(a){a.close()},h=function(a){return a.params},i=function(a,b){a.params=b};return{open:d,alert:e,confirm:f,close:g,getParams:h,setParams:i}}}),g("3",["9","a","b"],function(a,b,c){var d=function(d,e){var f=function(){return a.renderUI(d,e)};return{renderUI:f,getNotificationManagerImpl:function(){return b(d)},getWindowManagerImpl:function(){return c(d)}}};return{get:d}}),g("f",["37","1g","c"],function(a,b,c){var d=function(){var d=b.container;if(d&&"static"!==c.DOM.getStyle(d,"position",!0)){var e=c.DOM.getPos(d),f=e.x-d.scrollLeft,g=e.y-d.scrollTop;return a.some({x:f,y:g})}return a.none()};return{getUiContainerDelta:d}}),g("3b",["8"],function(a){return a("tinymce.util.Promise")}),g("3c",[],function(){var a=0,b=function(){var a=function(){return Math.round(4294967295*Math.random()).toString(36)};return"s"+Date.now().toString(36)+a()+a()+a()},c=function(c){return c+a++ +b()};return{uuid:c}}),g("3x",[],function(){var a=function(a,b){function c(c){var e,f,g;f=b[c?"startContainer":"endContainer"],g=b[c?"startOffset":"endOffset"],1==f.nodeType&&(e=a.create("span",{"data-mce-type":"bookmark"}),f.hasChildNodes()?(g=Math.min(g,f.childNodes.length-1),c?f.insertBefore(e,f.childNodes[g]):a.insertAfter(e,f.childNodes[g])):f.appendChild(e),f=e,g=0),d[c?"startContainer":"endContainer"]=f,d[c?"startOffset":"endOffset"]=g}var d={};return c(!0),b.collapsed||c(),d},b=function(a,b){function c(c){function d(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b==a)return c;1==b.nodeType&&"bookmark"==b.getAttribute("data-mce-type")||c++,b=b.nextSibling}return-1}var e,f,g;e=g=b[c?"startContainer":"endContainer"],f=b[c?"startOffset":"endOffset"],e&&(1==e.nodeType&&(f=d(e),e=e.parentNode,a.remove(g)),b[c?"startContainer":"endContainer"]=e,b[c?"startOffset":"endOffset"]=f)}c(!0),c();var d=a.createRng();return d.setStart(b.startContainer,b.startOffset),b.endContainer&&d.setEnd(b.endContainer,b.endOffset),d};return{create:a,resolve:b}}),g("3y",["8"],function(a){return a("tinymce.dom.TreeWalker")}),g("3z",["8"],function(a){return a("tinymce.dom.RangeUtils")}),g("3d",["3x","e","3y","3z"],function(a,b,c,d){var e=function(a,b,d){var e,f,g=[];for(e=new c(b,a),f=b;f&&(1===f.nodeType&&g.push(f),f!==d);f=e.next());return g},f=function(c,d){var e,f,g;f=c.dom,g=c.selection,e=a.create(f,g.getRng()),b.each(d,function(a){c.dom.remove(a,!0)}),g.setRng(a.resolve(f,e))},g=function(a){return"A"===a.nodeName&&a.hasAttribute("href")},h=function(a,b){var c=a.getParent(b,g);return c?c:b},i=function(a){var c,f,i,j,k,l,m;return k=a.selection,l=a.dom,m=k.getRng(),c=h(l,d.getNode(m.startContainer,m.startOffset)),f=d.getNode(m.endContainer,m.endOffset),i=a.getBody(),j=b.grep(e(i,c,f),g)},j=function(a){f(a,i(a))};return{unlinkSelection:j}}),g("o",["3c","3d"],function(a,b){var c=function(a,b){var c,d,e;for(e='',e+="",d=0;d",c=0;c
    ";e+=""}return e+="
    ",e+="
    "},d=function(a){var b=a.dom.select("*[data-mce-id]");return b[0]},e=function(a,b,e){a.undoManager.transact(function(){var f,g;a.insertContent(c(b,e)),f=d(a),f.removeAttribute("data-mce-id"),g=a.dom.select("td,th",f),a.selection.setCursorLocation(g[0],0)})},f=function(a,b){a.execCommand("FormatBlock",!1,b)},g=function(b,c,d){var e,f;e=b.editorUpload.blobCache,f=e.create(a.uuid("mceu"),d,c),e.add(f),b.insertContent(b.dom.createHTML("img",{src:f.blobUri()}))},h=function(a){a.selection.collapse(!1)},i=function(a){a.focus(),b.unlinkSelection(a),h(a)},j=function(a,b,c){a.focus(),a.dom.setAttrib(b,"href",c),h(a)},k=function(a,b){a.execCommand("mceInsertLink",!1,{href:b}),h(a)},l=function(a,b){var c=a.dom.getParent(a.selection.getStart(),"a[href]");c?j(a,c,b):k(a,b)},m=function(a,b){0===b.trim().length?i(a):l(a,b)};return{insertTable:e,formatBlock:f,insertBlob:g,createLink:m,unlink:i}}),g("3e",[],function(){var a=function(a){return/^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(a.trim())},b=function(a){return/^https?:\/\//.test(a.trim())};return{isDomainLike:a,isAbsolute:b}}),g("k",["e","d","3b","o","3e"],function(a,b,c,d,e){var f=function(a){a.find("textbox").eq(0).each(function(a){a.focus()})},g=function(c,d){var e=b.create(a.extend({type:"form",layout:"flex",direction:"row",padding:5,name:c,spacing:3},d));return e.on("show",function(){f(e)}),e},h=function(a,b){return b?a.show():a.hide()},i=function(a,b){return new c(function(c){a.windowManager.confirm("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){var d=a===!0?"http://"+b:b;c(d)})})},j=function(a,b){return!e.isAbsolute(b)&&e.isDomainLike(b)?i(a,b):c.resolve(b)},k=function(a,b){var c={},e=function(){a.focus(),d.unlink(a),b()},f=function(a){var b=a.meta;b&&b.attach&&(c={href:this.value(),attach:b.attach})},i=function(b){if(b.control===this){var c,d="";c=a.dom.getParent(a.selection.getStart(),"a[href]"),c&&(d=a.dom.getAttrib(c,"href")),this.fromJSON({linkurl:d}),h(this.find("#unlink"),c),this.find("#linkurl")[0].focus()}};return g("quicklink",{items:[{type:"button",name:"unlink",icon:"unlink",onclick:e,tooltip:"Remove link" +},{type:"filepicker",name:"linkurl",placeholder:"Paste or type a link",filetype:"file",onchange:f},{type:"button",icon:"checkmark",subtype:"primary",tooltip:"Ok",onclick:"submit"}],onshow:i,onsubmit:function(e){j(a,e.data.linkurl).then(function(e){a.undoManager.transact(function(){e===c.href&&(c.attach(),c={}),d.createLink(a,e)}),b()})}})};return{createQuickLinkForm:k}}),g("l",["e","d","3f"],function(a,b,c){var d=function(a,b){var c=function(a,b){return{selector:a,handler:b}},d=function(a){b.active(a)},e=function(a){b.disabled(a)};return b.settings.stateSelector?c(b.settings.stateSelector,d):b.settings.disabledStateSelector?c(b.settings.disabledStateSelector,e):null},e=function(a,b,c){return function(){var e=d(b,c);null!==e&&a.selection.selectorChanged(e.selector,e.handler)}},f=function(a){return c.isArray(a)?a:c.isString(a)?a.split(/[ ,]/):[]},g=function(c,d,g){var h,i=[];if(g)return a.each(f(g),function(a){var d;"|"==a?h=null:c.buttons[a]&&(h||(h={type:"buttongroup",items:[]},i.push(h)),d=a,a=c.buttons[d],"function"==typeof a&&(a=a()),a.type=a.type||"button",a=b.create(a),a.on("postRender",e(c,d,a)),h.items.push(a))}),b.create({type:"toolbar",layout:"flow",name:d,items:i})};return{create:g}}),g("5",["c","d","e","f","g","h","i","j","k","l"],function(a,b,c,d,e,f,g,h,i,j){return function(){var k,l,m=function(a,b){return c.map(b,function(b){return j.create(a,b.id,b.items)})},n=function(a){return a.items().length>0},o=function(a,d){var e=m(a,d).concat([j.create(a,"text",f.getTextSelectionToolbarItems(a)),j.create(a,"insert",f.getInsertToolbarItems(a)),i.createQuickLinkForm(a,z)]);return b.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:c.grep(e,n),oncancel:function(){a.focus()}})},p=function(a){a&&a.show()},q=function(a,b){a.moveTo(b.x,b.y)},r=function(a,b){b=b?b.substr(0,2):"",c.each({t:"down",b:"up",c:"center"},function(c,d){a.classes.toggle("arrow-"+c,d===b.substr(0,1))}),"cr"===b?(a.classes.toggle("arrow-left",!0),a.classes.toggle("arrow-right",!1)):"cl"===b?(a.classes.toggle("arrow-left",!0),a.classes.toggle("arrow-right",!0)):c.each({l:"left",r:"right"},function(c,d){a.classes.toggle("arrow-"+c,d===b.substr(1,1))})},s=function(a,b){var c=a.items().filter("#"+b);return c.length>0&&(c[0].show(),a.reflow(),!0)},t=function(b,c,e,i){var j,k,m,n;if(n=f.getPositionHandler(e),j=h.getContentAreaRect(e),k=a.DOM.getRect(b.getEl()),m="insert"===c?g.calcInsert(i,j,k):g.calc(i,j,k)){var o=d.getUiContainerDelta().getOr({x:0,y:0}),p={x:m.rect.x-o.x,y:m.rect.y-o.y,w:m.rect.w,h:m.rect.h};return l=i,q(b,g.userConstrain(n,i,j,p)),r(b,m.position),!0}return!1},u=function(a,b,c,d){return p(a),a.items().hide(),s(a,b)?void(t(a,b,c,d)===!1&&z(a)):void z(a)},v=function(){return k.items().filter("form:visible").length>0},w=function(b,c){if(k){if(k.items().hide(),!s(k,c))return void z(k);var d,e,i,j;p(k),k.items().hide(),s(k,c),j=f.getPositionHandler(b),d=h.getContentAreaRect(b),e=a.DOM.getRect(k.getEl()),i=g.calc(l,d,e),i&&(e=i.rect,q(k,g.userConstrain(j,l,d,e)),r(k,i.position))}},x=function(a,b,c,d){k||(e.fireBeforeRenderUI(a),k=o(a,d),k.renderTo().reflow().moveTo(c.x,c.y),a.nodeChanged()),u(k,b,a,c)},y=function(a,b,c){k&&t(k,b,a,c)},z=function(){k&&k.hide()},A=function(){k&&k.find("toolbar:visible").eq(0).each(function(a){a.focus(!0)})},B=function(){k&&(k.remove(),k=null)},C=function(){return k&&k.visible()&&v()};return{show:x,showForm:w,reposition:y,inForm:C,hide:z,focus:A,remove:B}}}),g("4f",[],function(){var a="undefined"!=typeof window?window:Function("return this;")();return a}),g("48",["4f"],function(a){var b=function(b,c){for(var d=void 0!==c?c:a,e=0;e'+this._super(a)}})}),g("r",["1e","1","1h"],function(a,b,c){"use strict";return c.extend({Defaults:{classes:"widget btn",role:"button"},init:function(a){var b,c=this;c._super(a),a=c.settings,b=c.settings.size,c.on("click mousedown",function(a){a.preventDefault()}),c.on("touchstart",function(a){c.fire("click",a),a.preventDefault()}),a.subtype&&c.classes.add(a.subtype),b&&c.classes.add("btn-"+b),a.icon&&c.icon(a.icon)},icon:function(a){return arguments.length?(this.state.set("icon",a),this):this.state.get("icon")},repaint:function(){var a,b=this.getEl().firstChild;b&&(a=b.style,a.width=a.height="100%"),this._super()},renderHtml:function(){var a,c,d=this,e=d._id,f=d.classPrefix,g=d.state.get("icon"),h=d.state.get("text"),i="",j=d.settings;return a=j.image,a?(g="none","string"!=typeof a&&(a=b.getSelection?a[0]:a[1]),a=" style=\"background-image: url('"+a+"')\""):a="",h&&(d.classes.add("btn-has-text"),i=''+d.encode(h)+""),g=g?f+"ico "+f+"i-"+g:"",c="boolean"==typeof j.active?' aria-pressed="'+j.active+'"':"",'
    "},bindStates:function(){function b(a){var b=d("span."+e,c.getEl());a?(b[0]||(d("button:first",c.getEl()).append(''),b=d("span."+e,c.getEl())),b.html(c.encode(a))):b.remove(),c.classes.toggle("btn-has-text",!!a)}var c=this,d=c.$,e=c.classPrefix+"txt";return c.state.on("change:text",function(a){b(a.value)}),c.state.on("change:icon",function(d){var e=d.value,f=c.classPrefix;c.settings.icon=e,e=e?f+"ico "+f+"i-"+c.settings.icon:"";var g=c.getEl().firstChild,h=g.getElementsByTagName("i")[0];e?(h&&h==g.firstChild||(h=a.createElement("i"),g.insertBefore(h,g.firstChild)),h.className=e):h&&g.removeChild(h),b(c.state.get("text"))}),c._super()}})}),h("3h",RegExp),g("q",["r","e","30","31","3h"],function(a,b,c,d,e){return a.extend({init:function(a){var c=this;a=b.extend({text:"Browse...",multiple:!1,accept:null},a),c._super(a),c.classes.add("browsebutton"),a.multiple&&c.classes.add("multiple")},postRender:function(){var a=this,b=c.create("input",{type:"file",id:a._id+"-browse",accept:a.settings.accept});a._super(),d(b).on("change",function(b){var c=b.target.files;a.value=function(){return c.length?a.settings.multiple?c:c[0]:null},b.preventDefault(),c.length&&a.fire("change",b)}),d(b).on("click",function(a){a.stopPropagation()}),d(a.getEl("button")).on("click",function(a){a.stopPropagation(),b.click()}),a.getEl().appendChild(b)},remove:function(){d(this.getEl("button")).off(),d(this.getEl("input")).off(),this._super()}})}),g("s",["z"],function(a){"use strict";return a.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var a=this,b=a._layout;return a.classes.add("btn-group"),a.preRender(),b.preRender(a),'
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "}})}),g("t",["1e","1h"],function(a,b){"use strict";return b.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(a){var b=this;b._super(a),b.on("click mousedown",function(a){a.preventDefault()}),b.on("click",function(a){a.preventDefault(),b.disabled()||b.checked(!b.checked())}),b.checked(b.settings.checked)},checked:function(a){return arguments.length?(this.state.set("checked",a),this):this.state.get("checked")},value:function(a){return arguments.length?this.checked(a):this.checked()},renderHtml:function(){var a=this,b=a._id,c=a.classPrefix;return'
    '+a.encode(a.state.get("text"))+"
    "},bindStates:function(){function b(a){c.classes.toggle("checked",a),c.aria("checked",a)}var c=this;return c.state.on("change:text",function(a){c.getEl("al").firstChild.data=c.translate(a.value)}),c.state.on("change:checked change:value",function(a){c.fire("change"),b(a.value)}),c.state.on("change:icon",function(b){var d=b.value,e=c.classPrefix;if("undefined"==typeof d)return c.settings.icon;c.settings.icon=d,d=d?e+"ico "+e+"i-"+c.settings.icon:"";var f=c.getEl().firstChild,g=f.getElementsByTagName("i")[0];d?(g&&g==f.firstChild||(g=a.createElement("i"),f.insertBefore(g,f.firstChild)),g.className=d):g&&f.removeChild(g)}),c.state.get("checked")&&b(!0),c._super()}})}),g("3i",["8"],function(a){return a("tinymce.util.VK")}),g("y",["1e","31","d","e","3i","30","1h"],function(a,b,c,d,e,f,g){"use strict";return g.extend({init:function(a){var c=this;c._super(a),a=c.settings,c.classes.add("combobox"),c.subinput=!0,c.ariaTarget="inp",a.menu=a.menu||a.values,a.menu&&(a.icon="caret"),c.on("click",function(d){var e=d.target,f=c.getEl();if(b.contains(f,e)||e==f)for(;e&&e!=f;)e.id&&e.id.indexOf("-open")!=-1&&(c.fire("action"),a.menu&&(c.showMenu(),d.aria&&c.menu.items()[0].focus())),e=e.parentNode}),c.on("keydown",function(a){var b;13==a.keyCode&&"INPUT"===a.target.nodeName&&(a.preventDefault(),c.parents().reverse().each(function(a){if(a.toJSON)return b=a,!1}),c.fire("submit",{data:b.toJSON()}))}),c.on("keyup",function(a){if("INPUT"==a.target.nodeName){var b=c.state.get("value"),d=a.target.value;d!==b&&(c.state.set("value",d),c.fire("autocomplete",a))}}),c.on("mouseover",function(a){var b=c.tooltip().moveTo(-65535);if(c.statusLevel()&&a.target.className.indexOf(c.classPrefix+"status")!==-1){var d=c.statusMessage()||"Ok",e=b.text(d).show().testMoveRel(a.target,["bc-tc","bc-tl","bc-tr"]);b.classes.toggle("tooltip-n","bc-tc"==e),b.classes.toggle("tooltip-nw","bc-tl"==e),b.classes.toggle("tooltip-ne","bc-tr"==e),b.moveRel(a.target,e)}})},statusLevel:function(a){return arguments.length>0&&this.state.set("statusLevel",a),this.state.get("statusLevel")},statusMessage:function(a){return arguments.length>0&&this.state.set("statusMessage",a),this.state.get("statusMessage")},showMenu:function(){var a,b=this,d=b.settings;b.menu||(a=d.menu||[],a.length?a={type:"menu",items:a}:a.type=a.type||"menu",b.menu=c.create(a).parent(b).renderTo(b.getContainerElm()),b.fire("createmenu"),b.menu.reflow(),b.menu.on("cancel",function(a){a.control===b.menu&&b.focus()}),b.menu.on("show hide",function(a){a.control.items().each(function(a){a.active(a.value()==b.value())})}).fire("show"),b.menu.on("select",function(a){b.value(a.control.value())}),b.on("focusin",function(a){"INPUT"==a.target.tagName.toUpperCase()&&b.menu.hide()}),b.aria("expanded",!0)),b.menu.show(),b.menu.layoutRect({w:b.layoutRect().w}),b.menu.moveRel(b.getEl(),b.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var c,d,e=this,g=e.getEl(),h=e.getEl("open"),i=e.layoutRect(),j=0,k=g.firstChild;e.statusLevel()&&"none"!==e.statusLevel()&&(j=parseInt(f.getRuntimeStyle(k,"padding-right"),10)-parseInt(f.getRuntimeStyle(k,"padding-left"),10)),c=h?i.w-f.getSize(h).width-10:i.w-10;var l=a;return l.all&&(!l.documentMode||l.documentMode<=8)&&(d=e.layoutRect().h-2+"px"),b(k).css({width:c-j,lineHeight:d}),e._super(),e},postRender:function(){var a=this;return b(this.getEl("inp")).on("change",function(b){a.state.set("value",b.target.value),a.fire("change",b)}),a._super()},renderHtml:function(){var a,b,c=this,d=c._id,e=c.settings,f=c.classPrefix,g=c.state.get("value")||"",h="",i="",j="";return"spellcheck"in e&&(i+=' spellcheck="'+e.spellcheck+'"'),e.maxLength&&(i+=' maxlength="'+e.maxLength+'"'),e.size&&(i+=' size="'+e.size+'"'),e.subtype&&(i+=' type="'+e.subtype+'"'),j='',c.disabled()&&(i+=' disabled="disabled"'),a=e.icon,a&&"caret"!=a&&(a=f+"ico "+f+"i-"+e.icon),b=c.state.get("text"),(a||b)&&(h='
    ",c.classes.add("has-open")),'
    '+j+h+"
    "},value:function(a){return arguments.length?(this.state.set("value",a),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(a,b){var e=this;if(0===a.length)return void e.hideMenu();var f=function(a,b){return function(){e.fire("selectitem",{title:b,value:a})}};e.menu?e.menu.items().remove():e.menu=c.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(e).renderTo(),d.each(a,function(a){e.menu.add({text:a.title,url:a.previewUrl,match:b,classes:"menu-item-ellipsis",onclick:f(a.value,a.title)})}),e.menu.renderNew(),e.hideMenu(),e.menu.on("cancel",function(a){a.control.parent()===e.menu&&(a.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()});var g=e.layoutRect().w;e.menu.layoutRect({w:g,minW:0,maxW:g}),e.menu.reflow(),e.menu.show(),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var a=this;a.state.on("change:value",function(b){a.getEl("inp").value!=b.value&&(a.getEl("inp").value=b.value)}),a.state.on("change:disabled",function(b){a.getEl("inp").disabled=b.value}),a.state.on("change:statusLevel",function(b){var c=a.getEl("status"),d=a.classPrefix,e=b.value;f.css(c,"display","none"===e?"none":""),f.toggleClass(c,d+"i-checkmark","ok"===e),f.toggleClass(c,d+"i-warning","warn"===e),f.toggleClass(c,d+"i-error","error"===e),a.classes.toggle("has-status","none"!==e),a.repaint()}),f.on(a.getEl("status"),"mouseleave",function(){a.tooltip().hide()}),a.on("cancel",function(b){a.menu&&a.menu.visible()&&(b.stopPropagation(),a.hideMenu())});var b=function(a,b){b&&b.items().length>0&&b.items().eq(a)[0].focus()};return a.on("keydown",function(c){var d=c.keyCode;"INPUT"===c.target.nodeName&&(d===e.DOWN?(c.preventDefault(),a.fire("autocomplete"),b(0,a.menu)):d===e.UP&&(c.preventDefault(),b(-1,a.menu)))}),a._super()},remove:function(){b(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}})}),g("v",["y"],function(a){"use strict";return a.extend({init:function(a){var b=this;a.spellcheck=!1,a.onaction&&(a.icon="none"),b._super(a),b.classes.add("colorbox"),b.on("change keyup postrender",function(){b.repaintColor(b.value())})},repaintColor:function(a){var b=this.getEl("open"),c=b?b.getElementsByTagName("i")[0]:null;if(c)try{c.style.background=a}catch(a){}},bindStates:function(){var a=this;return a.state.on("change:value",function(b){a.state.get("rendered")&&a.repaintColor(b.value)}),a._super()}})}),g("27",["r","18"],function(a,b){"use strict";return a.extend({showPanel:function(){var a=this,c=a.settings;if(a.classes.add("opened"),a.panel)a.panel.show();else{var d=c.panel;d.type&&(d={layout:"grid",items:d}),d.role=d.role||"dialog",d.popover=!0,d.autohide=!0,d.ariaRoot=!0,a.panel=new b(d).on("hide",function(){a.classes.remove("opened")}).on("cancel",function(b){b.stopPropagation(),a.focus(),a.hidePanel()}).parent(a).renderTo(a.getContainerElm()),a.panel.fire("show"),a.panel.reflow()}var e=a.panel.testMoveRel(a.getEl(),c.popoverAlign||(a.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl"]));a.panel.classes.toggle("start","bc-tl"===e),a.panel.classes.toggle("end","bc-tr"===e),a.panel.moveRel(a.getEl(),e)},hidePanel:function(){var a=this;a.panel&&a.panel.hide()},postRender:function(){var a=this;return a.aria("haspopup",!0),a.on("click",function(b){b.control===a&&(a.panel&&a.panel.visible()?a.hidePanel():(a.showPanel(),a.panel.focus(!!b.aria)))}),a._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),g("w",["27","c"],function(a,b){"use strict";var c=b.DOM;return a.extend({init:function(a){this._super(a),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(a){return a?(this._color=a,this.getEl("preview").style.backgroundColor=a,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var a=this,b=a._id,c=a.classPrefix,d=a.state.get("text"),e=a.settings.icon?c+"ico "+c+"i-"+a.settings.icon:"",f=a.settings.image?" style=\"background-image: url('"+a.settings.image+"')\"":"",g="";return d&&(a.classes.add("btn-has-text"),g=''+a.encode(d)+""),'
    '},postRender:function(){var a=this,b=a.settings.onclick;return a.on("click",function(d){d.aria&&"down"===d.aria.key||d.control!=a||c.getParent(d.target,"."+a.classPrefix+"open")||(d.stopImmediatePropagation(),b.call(a,d))}),delete a.settings.onclick,a._super()}})}),g("3j",["8"],function(a){return a("tinymce.util.Color")}),g("x",["1h","11","30","3j"],function(a,b,c,d){"use strict";return a.extend({Defaults:{classes:"widget colorpicker"},init:function(a){this._super(a)},postRender:function(){function a(a,b){var d,e,f=c.getPos(a);return d=b.pageX-f.x,e=b.pageY-f.y,d=Math.max(0,Math.min(d/a.clientWidth,1)),e=Math.max(0,Math.min(e/a.clientHeight,1)),{x:d,y:e}}function e(a,b){var e=(360-a.h)/360;c.css(j,{top:100*e+"%"}),b||c.css(l,{left:a.s+"%",top:100-a.v+"%"}),k.style.background=new d({s:100,v:100,h:a.h}).toHex(),m.color().parse({s:a.s,v:a.v,h:a.h})}function f(b){var c;c=a(k,b),h.s=100*c.x,h.v=100*(1-c.y),e(h),m.fire("change")}function g(b){var c;c=a(i,b),h=n.toHsv(),h.h=360*(1-c.y),e(h,!0),m.fire("change")}var h,i,j,k,l,m=this,n=m.color();i=m.getEl("h"),j=m.getEl("hp"),k=m.getEl("sv"),l=m.getEl("svp"),m._repaint=function(){h=n.toHsv(),e(h)},m._super(),m._svdraghelper=new b(m._id+"-sv",{start:f,drag:f}),m._hdraghelper=new b(m._id+"-h",{start:g,drag:g}),m._repaint()},rgb:function(){return this.color().toRgb()},value:function(a){var b=this;return arguments.length?(b.color().parse(a),void(b._rendered&&b._repaint())):b.color().toHex()},color:function(){return this._color||(this._color=new d),this._color},renderHtml:function(){function a(){var a,b,c,d,g="";for(c="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",d=f.split(","),a=0,b=d.length-1;a';return g}var b,c=this,d=c._id,e=c.classPrefix,f="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",g="background: -ms-linear-gradient(top,"+f+");background: linear-gradient(to bottom,"+f+");";return b='
    '+a()+'
    ','
    '+b+"
    "}})}),g("12",["1h","e","30","3h"],function(a,b,c,d){return a.extend({init:function(a){var c=this;a=b.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},a),c._super(a),c.classes.add("dropzone"),a.multiple&&c.classes.add("multiple")},renderHtml:function(){var a,b,d=this,e=d.settings;return a={id:d._id,hidefocus:"1"},b=c.create("div",a,""+this.translate(e.text)+""),e.height&&c.css(b,"height",e.height+"px"),e.width&&c.css(b,"width",e.width+"px"),b.className=d.classes,b.outerHTML},postRender:function(){var a=this,c=function(b){b.preventDefault(),a.classes.toggle("dragenter"),a.getEl().className=a.classes},e=function(c){var e=a.settings.accept;if("string"!=typeof e)return c;var f=new d("("+e.split(/\s*,\s*/).join("|")+")$","i");return b.grep(c,function(a){return f.test(a.name)})};a._super(),a.$el.on("dragover",function(a){a.preventDefault()}),a.$el.on("dragenter",c),a.$el.on("dragleave",c),a.$el.on("drop",function(b){if(b.preventDefault(),!a.state.get("disabled")){var c=e(b.dataTransfer.files);a.value=function(){return c.length?a.settings.multiple?c:c[0]:null},c.length&&a.fire("change",b)}})},remove:function(){this.$el.off(),this._super()}})}),g("28",["1h"],function(a){"use strict";return a.extend({init:function(a){var b=this;a.delimiter||(a.delimiter="\xbb"),b._super(a),b.classes.add("path"),b.canFocus=!0,b.on("click",function(a){var c,d=a.target;(c=d.getAttribute("data-index"))&&b.fire("select",{value:b.row()[c],index:c})}),b.row(b.settings.row)},focus:function(){var a=this;return a.getEl().firstChild.focus(),a},row:function(a){return arguments.length?(this.state.set("row",a),this):this.state.get("row")},renderHtml:function(){var a=this;return'
    '+a._getDataPathHtml(a.state.get("row"))+"
    "},bindStates:function(){var a=this;return a.state.on("change:row",function(b){a.innerHtml(a._getDataPathHtml(b.value))}),a._super()},_getDataPathHtml:function(a){var b,c,d=this,e=a||[],f="",g=d.classPrefix;for(b=0,c=e.length;b0?'":"")+'
    '+e[b].name+"
    ";return f||(f='
    \xa0
    '),f}})}),g("13",["28"],function(a){return a.extend({postRender:function(){function a(a){if(1===a.nodeType){if("BR"==a.nodeName||a.getAttribute("data-mce-bogus"))return!0;if("bookmark"===a.getAttribute("data-mce-type"))return!0}return!1}var b=this,c=b.settings.editor;return c.settings.elementpath!==!1&&(b.on("select",function(a){c.focus(),c.selection.select(this.row()[a.index].element),c.nodeChanged()}),c.on("nodeChange",function(d){for(var e=[],f=d.parents,g=f.length;g--;)if(1==f[g].nodeType&&!a(f[g])){var h=c.fire("ResolveName",{name:f[g].nodeName.toLowerCase(),target:f[g]});if(h.isDefaultPrevented()||e.push({name:h.name,element:f[g]}),h.isPropagationStopped())break}b.row(e)})),b._super()}})}),g("1r",["z"],function(a){"use strict";return a.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var a=this,b=a._layout,c=a.classPrefix;return a.classes.add("formitem"),b.preRender(a),'
    '+(a.settings.title?'
    '+a.settings.title+"
    ":"")+'
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "}})}),g("1a",["z","1r","e"],function(a,b,c){"use strict";return a.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var a=this,d=a.items();a.settings.formItemDefaults||(a.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),d.each(function(d){var e,f=d.settings.label;f&&(e=new b(c.extend({items:{type:"label",id:d._id+"-l",text:f,flex:0,forId:d._id,disabled:d.disabled()}},a.settings.formItemDefaults)),e.type="formitem",d.aria("labelledby",d._id+"-l"),"undefined"==typeof d.settings.flex&&(d.settings.flex=1),a.replace(d,e),e.add(d))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var a=this;a._super(),a.fromJSON(a.settings.data)},bindStates:function(){function a(){var a,c,d,e=0,f=[];if(b.settings.labelGapCalc!==!1)for(d="children"==b.settings.labelGapCalc?b.find("formitem"):b.items(),d.filter("formitem").each(function(a){var b=a.items()[0],c=b.getEl().clientWidth;e=c>e?c:e,f.push(b)}),c=b.settings.labelGap||0,a=f.length;a--;)f[a].settings.minWidth=e+c}var b=this;b._super(),b.on("show",a),a()}})}),g("14",["1a"],function(a){"use strict";return a.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var a=this,b=a._layout,c=a.classPrefix;return a.preRender(),b.preRender(a),'
    '+(a.settings.title?''+a.settings.title+"":"")+'
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "}})}),h("49",Date),h("4a",Math),g("41",["49","4a","3u"],function(a,b,c){var d=0,e=function(e){var f=new a,g=f.getTime(),h=b.floor(1e9*b.random());return d++,e+"_"+h+d+c(g)};return{generate:e}}),g("3n",[],function(){return"undefined"==typeof console&&(console={log:function(){}}),console}),g("1c",["1b","37","3l","3n","1e"],function(a,b,c,d,e){var f=function(a,b){var c=b||e,f=c.createElement("div");if(f.innerHTML=a,!f.hasChildNodes()||f.childNodes.length>1)throw d.error("HTML does not have a single root node",a),"HTML must have a single root node";return i(f.childNodes[0])},g=function(a,b){var c=b||e,d=c.createElement(a);return i(d)},h=function(a,b){var c=b||e,d=c.createTextNode(a);return i(d)},i=function(b){if(null===b||void 0===b)throw new c("Node cannot be null or undefined");return{dom:a.constant(b)}},j=function(a,c,d){return b.from(a.dom().elementFromPoint(c,d)).map(i)};return{fromHtml:f,fromTag:g,fromText:h,fromDom:i,fromPoint:j}}),g("4c",[],function(){var a=function(a){var b,c=!1;return function(){return c||(c=!0,b=a.apply(null,arguments)),b}};return{cached:a}}),g("46",[],function(){return{ATTRIBUTE:2,CDATA_SECTION:4,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,ELEMENT:1,TEXT:3,PROCESSING_INSTRUCTION:7,ENTITY_REFERENCE:5,ENTITY:6,NOTATION:12}}),g("47",["46"],function(a){var b=function(a){var b=a.dom().nodeName;return b.toLowerCase()},c=function(a){return a.dom().nodeType},d=function(a){return a.dom().nodeValue},e=function(a){return function(b){return c(b)===a}},f=function(d){return c(d)===a.COMMENT||"#comment"===b(d)},g=e(a.ELEMENT),h=e(a.TEXT),i=e(a.DOCUMENT);return{name:b,type:c,value:d,isElement:g,isText:h,isDocument:i,isComment:f}}),g("44",["4c","1c","47","1e"],function(a,b,c,d){var e=function(a){var b=c.isText(a)?a.dom().parentNode:a.dom();return void 0!==b&&null!==b&&b.ownerDocument.body.contains(b)},f=a.cached(function(){return g(b.fromDom(d))}),g=function(a){var c=a.dom().body;if(null===c||void 0===c)throw"Body is not available yet";return b.fromDom(c)};return{body:f,getBody:g,inBody:e}}),g("43",["3k","3u"],function(a,b){var c=function(c){if(null===c)return"null";var d=typeof c;return"object"===d&&a.prototype.isPrototypeOf(c)?"array":"object"===d&&b.prototype.isPrototypeOf(c)?"string":d},d=function(a){return function(b){return c(b)===a}};return{isString:d("string"),isObject:d("object"),isArray:d("array"),isNull:d("null"),isBoolean:d("boolean"),isUndefined:d("undefined"),isFunction:d("function"),isNumber:d("number")}}),g("4q",["2y","1b","3k","3l"],function(a,b,c,d){return function(){var e=arguments;return function(){for(var f=new c(arguments.length),g=0;g0&&e.unsuppMessage(m);var n={};return a.each(h,function(a){n[a]=b.constant(f[a])}),a.each(i,function(a){n[a]=b.constant(g.prototype.hasOwnProperty.call(f,a)?d.some(f[a]):d.none())}),n}}}),g("4j",["4q","4r"],function(a,b){return{immutable:a,immutableBag:b}}),g("4k",[],function(){var a=function(a,b){var c=[],d=function(a){return c.push(a),b(a)},e=b(a);do e=e.bind(d);while(e.isSome());return c};return{toArray:a}}),g("4d",["40"],function(a){var b=function(){var b=a.getOrDie("Node");return b},c=function(a,b,c){return 0!==(a.compareDocumentPosition(b)&c)},d=function(a,d){return c(a,d,b().DOCUMENT_POSITION_PRECEDING)},e=function(a,d){return c(a,d,b().DOCUMENT_POSITION_CONTAINED_BY)};return{documentPositionPreceding:d,documentPositionContainedBy:e}}),h("4w",Number),g("4s",["2y","4w","3u"],function(a,b,c){var d=function(a,b){for(var c=0;c0&&b0},C=function(b){var c=A(b);return a.filter(y(c).concat(z(c)),B)};return{find:C}}),g("15",["2y","1b","1","3m","1f","y","e"],function(a,b,c,d,e,f,g){"use strict";var h=function(){return c.tinymce?c.tinymce.activeEditor:e.activeEditor},i={},j=5,k=function(){i={}},l=function(a){return{title:a.title,value:{title:{raw:a.title},url:a.url,attach:a.attach}}},m=function(a){return g.map(a,l)},n=function(a,c){return{title:a,value:{title:a,url:c,attach:b.noop}}},o=function(b,c){var d=a.exists(c,function(a){return a.url===b});return!d},p=function(a,b,c){var d=b in a?a[b]:c;return d===!1?null:d},q=function(c,d,e,f){var h={title:"-"},j=function(c){var f=c.hasOwnProperty(e)?c[e]:[],h=a.filter(f,function(a){return o(a,d)});return g.map(h,function(a){return{title:a,value:{title:a,url:a,attach:b.noop}}})},k=function(b){var c=a.filter(d,function(a){return a.type===b});return m(c)},l=function(){var a=k("anchor"),b=p(f,"anchor_top","#top"),c=p(f,"anchor_bottom","#bottom");return null!==b&&a.unshift(n("",b)),null!==c&&a.push(n("",c)),a},q=function(b){return a.foldl(b,function(a,b){var c=0===a.length||0===b.length;return c?a.concat(b):a.concat(h,b)},[])};return f.typeahead_urls===!1?[]:"file"===e?q([s(c,j(i)),s(c,k("header")),s(c,l())]):s(c,j(i))},r=function(b,c){var d=i[c];/^https?/.test(b)&&(d?a.indexOf(d,b)===-1&&(i[c]=d.slice(0,j).concat(b)):i[c]=[b])},s=function(a,b){var c=a.toLowerCase(),d=g.grep(b,function(a){return a.title.toLowerCase().indexOf(c)!==-1});return 1===d.length&&d[0].title===a?[]:d},t=function(a){var b=a.title;return b.raw?b.raw:b},u=function(a,b,c,e){var f=function(f){var g=d.find(c),h=q(f,g,e,b);a.showAutoComplete(h,f)};a.on("autocomplete",function(){f(a.value())}),a.on("selectitem",function(b){var c=b.value;a.value(c.url);var d=t(c);"image"===e?a.fire("change",{meta:{alt:d,attach:c.attach}}):a.fire("change",{meta:{text:d,attach:c.attach}}),a.focus()}),a.on("click",function(b){0===a.value().length&&"INPUT"===b.target.nodeName&&f("")}),a.on("PostRender",function(){a.getRoot().on("submit",function(b){b.isDefaultPrevented()||r(a.value(),e)})})},v=function(a){var b=a.status,c=a.message;return"valid"===b?{status:"ok",message:c}:"unknown"===b?{status:"warn",message:c}:"invalid"===b?{status:"warn",message:c}:{status:"none",message:""}},w=function(a,b,c){var d=b.filepicker_validator_handler;if(d){var e=function(b){return 0===b.length?void a.statusLevel("none"):void d({url:b,type:c},function(b){var c=v(b);a.statusMessage(c.message),a.statusLevel(c.status)})};a.state.on("change:value",function(a){e(a.value)})}};return f.extend({Statics:{clearHistory:k},init:function(a){var b,d,e,f=this,i=h(),j=i.settings,k=a.filetype;a.spellcheck=!1,e=j.file_picker_types||j.file_browser_callback_types,e&&(e=g.makeMap(e,/[, ]/)),e&&!e[k]||(d=j.file_picker_callback,!d||e&&!e[k]?(d=j.file_browser_callback,!d||e&&!e[k]||(b=function(){d(f.getEl("inp").id,f.value(),k,c)})):b=function(){var a=f.fire("beforecall").meta;a=g.extend({filetype:k},a),d.call(i,function(a,b){f.value(a).fire("change",{meta:b})},f.value(),a)}),b&&(a.icon="browse",a.onaction=b),f._super(a),u(f,j,i.getBody(),k),w(f,j,k)}})}),g("16",["p"],function(a){"use strict";return a.extend({recalc:function(a){var b=a.layoutRect(),c=a.paddingBox;a.items().filter(":visible").each(function(a){a.layoutRect({x:c.left,y:c.top,w:b.innerW-c.right-c.left,h:b.innerH-c.top-c.bottom}),a.recalc&&a.recalc()})}})}),g("17",["p"],function(a){"use strict";return a.extend({recalc:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=[],O=Math.max,P=Math.min;for(d=a.items().filter(":visible"),e=a.layoutRect(),f=a.paddingBox,g=a.settings,m=a.isRtl()?g.direction||"row-reversed":g.direction,h=g.align,i=a.isRtl()?g.pack||"end":g.pack,j=g.spacing||0,"row-reversed"!=m&&"column-reverse"!=m||(d=d.set(d.toArray().reverse()),m=m.split("-")[0]),"column"==m?(z="y",x="h",y="minH",A="maxH",C="innerH",B="top",D="deltaH",E="contentH",J="left",H="w",F="x",G="innerW",I="minW",K="right",L="deltaW",M="contentW"):(z="x",x="w",y="minW",A="maxW",C="innerW",B="left",D="deltaW",E="contentW",J="top",H="h",F="y",G="innerH",I="minH",K="bottom",L="deltaH",M="contentH"),l=e[C]-f[B]-f[B],w=k=0,b=0,c=d.length;b0&&(k+=q,o[A]&&N.push(n),o.flex=q),l-=o[y],r=f[J]+o[I]+f[K],r>w&&(w=r);if(u={},l<0?u[y]=e[y]-l+e[D]:u[y]=e[C]-l+e[D],u[I]=w+e[L],u[E]=e[C]-l,u[M]=w,u.minW=P(u.minW,e.maxW),u.minH=P(u.minH,e.maxH),u.minW=O(u.minW,e.startMinWidth),u.minH=O(u.minH,e.startMinHeight),!e.autoResize||u.minW==e.minW&&u.minH==e.minH){for(t=l/k,b=0,c=N.length;bs?(l-=o[A]-o[y],k-=o.flex,o.flex=0,o.maxFlexSize=s):o.maxFlexSize=0;for(t=l/k,v=f[B],u={},0===k&&("end"==i?v=l+f[B]:"center"==i?(v=Math.round(e[C]/2-(e[C]-l)/2)+f[B],v<0&&(v=f[B])):"justify"==i&&(v=f[B],j=Math.floor(l/(d.length-1)))),u[F]=f[J],b=0,c=d.length;b0&&(r+=o.flex*t),u[x]=r,u[z]=v,n.layoutRect(u),n.recalc&&n.recalc(),v+=r+j}else if(u.w=u.minW,u.h=u.minH,a.layoutRect(u),this.recalc(a),null===a._lastRect){var Q=a.parent();Q&&(Q._lastRect=null,Q.recalc())}}})}),g("19",["1x"],function(a){return a.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(a){a.items().filter(":visible").each(function(a){a.recalc&&a.recalc()})},isNative:function(){return!0}})}),g("3q",["43","37"],function(a,b){return function(c,d,e,f,g){return c(e,f)?b.some(e):a.isFunction(g)&&g(e)?b.none():d(e,f,g)}}),g("3o",["43","2y","1b","37","44","45","1c","3q"],function(a,b,c,d,e,f,g,h){var i=function(a){return n(e.body(),a)},j=function(b,e,f){for(var h=b.dom(),i=a.isFunction(f)?f:c.constant(!1);h.parentNode;){h=h.parentNode;var j=g.fromDom(h);if(e(j))return d.some(j);if(i(j))break}return d.none()},k=function(a,b,c){var d=function(a){return b(a)};return h(d,j,a,b,c)},l=function(a,b){var c=a.dom();return c.parentNode?m(g.fromDom(c.parentNode),function(c){return!f.eq(a,c)&&b(c)}):d.none()},m=function(a,d){var e=b.find(a.dom().childNodes,c.compose(d,g.fromDom));return e.map(g.fromDom)},n=function(a,b){var c=function(a){for(var e=0;e=0;i--)h=b.toPt(g,i),j=c(d,h,g);e.value(j?j:null),j||e.text(h)})}},e=function(b){var c="8pt 10pt 12pt 14pt 18pt 24pt 36pt",d=b.settings.fontsize_formats||c;return a.map(d.split(" "),function(a){var b=a,c=a,d=a.split("=");return d.length>1&&(b=d[0],c=d[1]),{text:b,value:c}})},f=function(a){a.addButton("fontsizeselect",function(){var b=e(a);return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:b,fixedWidth:!0,onPostRender:d(a,b),onclick:function(b){b.control.settings.value&&a.execCommand("FontSize",!1,b.control.settings.value)}}})},g=function(a){f(a)};return{register:g}}),g("1l",["e","3r"],function(a,b){var c="Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",d=function(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a},e=function(b,c,d){return function(){var e=this;b.on("nodeChange",function(f){var g=b.formatter,h=null;a.each(f.parents,function(b){if(a.each(c,function(a){if(d?g.matchNode(b,d,{value:a.value})&&(h=a.value):g.matchNode(b,a.value)&&(h=a.value),h)return!1}),h)return!1}),e.value(h)})}},f=function(c,d){return function(){var f=[];return a.each(d,function(a){f.push({text:a[0],value:a[1],textStyle:function(){return c.formatter.getCssText(a[1])}})}),{type:"listbox",text:d[0][0],values:f,fixedWidth:!0,onselect:function(a){if(a.control){var d=a.control.value();b.toggleFormat(c,d)()}},onPostRender:e(c,f)}}},g=function(c,d){return a.map(d,function(a){return{text:a[0],onclick:b.toggleFormat(c,a[1]),textStyle:function(){return c.formatter.getCssText(a[1])}}})},h=function(a){var b=d(a.settings.block_formats||c);a.addMenuItem("blockformats",{text:"Blocks",menu:g(a,b)}),a.addButton("formatselect",f(a,b))};return{register:h}}),g("1m",["e","3r"],function(a,b){var c=function(b,d){var e=d.length;return a.each(d,function(a){a.menu&&(a.hidden=0===c(b,a.menu));var d=a.format;d&&(a.hidden=!b.formatter.canApply(d)),a.hidden&&e--}),e},d=function(a,b){var e=b.items().length;return b.items().each(function(b){b.menu&&b.visible(d(a,b.menu)>0),!b.menu&&b.settings.menu&&b.visible(c(a,b.settings.menu)>0);var f=b.settings.format;f&&b.visible(a.formatter.canApply(f)),b.visible()||e--}),e},e=function(c){var d=0,e=[],f=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],g=function(b){var c=[];if(b)return a.each(b,function(a){var b={text:a.title,icon:a.icon};if(a.items)b.menu=g(a.items);else{var f=a.format||"custom"+d++;a.format||(a.name=f,e.push(a)),b.format=f,b.cmd=a.cmd}c.push(b)}),c},h=function(){var a;return a=g(c.settings.style_formats_merge?c.settings.style_formats?f.concat(c.settings.style_formats):f:c.settings.style_formats||f)};return c.on("init",function(){a.each(e,function(a){c.formatter.register(a.name,a)})}),{type:"menu",items:h(),onPostRender:function(a){c.fire("renderFormatsMenu",{control:a.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return c.formatter.getCssText(this.settings.format)},onPostRender:function(){var a=this;a.parent().on("show",function(){var b,d;b=a.settings.format,b&&(a.disabled(!c.formatter.canApply(b)),a.active(c.formatter.match(b))),d=a.settings.cmd,d&&a.active(c.queryCommandState(d))})},onclick:function(){this.settings.format&&b.toggleFormat(c,this.settings.format)(),this.settings.cmd&&c.execCommand(this.settings.cmd)}}}},f=function(a,b){a.addMenuItem("formats",{text:"Formats",menu:b})},g=function(a,b){a.addButton("styleselect",{type:"menubutton",text:"Formats",menu:b,onShowMenu:function(){a.settings.style_formats_autohide&&d(a,this.menu)}})},h=function(a){var b=e(a);f(a,b),g(a,b)};return{register:h}}),g("1n",["2y","e"],function(a,b){var c=function(d,e){var f,g;if("string"==typeof e)g=e.split(" ");else if(b.isArray(e))return a.flatten(b.map(e,function(a){return c(d,a)}));return f=b.grep(g,function(a){return"|"===a||a in d.menuItems}),b.map(f,function(a){return"|"===a?{text:"-"}:d.menuItems[a]})},d=function(a){return a&&"-"===a.text},e=function(b){var c=a.filter(b,function(a,b,c){return!d(a)||!d(c[b-1])});return a.filter(c,function(a,b,c){return!d(a)||b>0&&bE[l]?y:E[l],F[m]=z>F[m]?z:F[m];for(A=f.innerW-q.left-q.right,w=0,l=0;l0?s:0),A-=(l>0?s:0)+E[l];for(B=f.innerH-q.top-q.bottom,x=0,m=0;m0?t:0),B-=(m>0?t:0)+F[m];if(w+=q.left+q.right,x+=q.top+q.bottom,i={},i.minW=w+(f.w-f.innerW),i.minH=x+(f.h-f.innerH),i.contentW=i.minW-f.deltaW,i.contentH=i.minH-f.deltaH,i.minW=Math.min(i.minW,f.maxW),i.minH=Math.min(i.minH,f.maxH),i.minW=Math.max(i.minW,f.startMinWidth),i.minH=Math.max(i.minH,f.startMinHeight),!f.autoResize||i.minW==f.minW&&i.minH==f.minH){f.autoResize&&(i=a.layoutRect(i),i.contentW=i.minW-f.deltaW,i.contentH=i.minH-f.deltaH);var G;G="start"==b.packV?0:B>0?Math.floor(B/c):0;var H=0,I=b.flexWidths;if(I)for(l=0;l'},src:function(a){this.getEl().src=a},html:function(a,c){var d=this,e=this.getEl().contentWindow.document.body;return e?(e.innerHTML=a,c&&c()):b.setTimeout(function(){d.html(a)}),this}})}),g("1u",["1h"],function(a){"use strict";return a.extend({init:function(a){var b=this;b._super(a),b.classes.add("widget").add("infobox"),b.canFocus=!1},severity:function(a){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(a)},help:function(a){this.state.set("help",a)},renderHtml:function(){var a=this,b=a.classPrefix;return'
    '+a.encode(a.state.get("text"))+'
    '},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.getEl("body").firstChild.data=a.encode(b.value),a.state.get("rendered")&&a.updateLayoutRect()}),a.state.on("change:help",function(b){a.classes.toggle("has-help",b.value),a.state.get("rendered")&&a.updateLayoutRect()}),a._super()}})}),g("1w",["1h","30"],function(a,b){"use strict";return a.extend({init:function(a){var b=this;b._super(a),b.classes.add("widget").add("label"),b.canFocus=!1,a.multiline&&b.classes.add("autoscroll"),a.strong&&b.classes.add("strong")},initLayoutRect:function(){var a=this,c=a._super();if(a.settings.multiline){var d=b.getSize(a.getEl());d.width>c.maxW&&(c.minW=c.maxW,a.classes.add("multiline")),a.getEl().style.width=c.minW+"px",c.startMinH=c.h=c.minH=Math.min(c.maxH,b.getSize(a.getEl()).height)}return c},repaint:function(){var a=this;return a.settings.multiline||(a.getEl().style.lineHeight=a.layoutRect().h+"px"),a._super()},severity:function(a){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(a)},renderHtml:function(){var a,b,c=this,d=c.settings.forId,e=c.settings.html?c.settings.html:c.encode(c.state.get("text"));return!d&&(b=c.settings.forName)&&(a=c.getRoot().find("#"+b)[0],a&&(d=a._id)),d?'":''+e+""},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.innerHtml(a.encode(b.value)),a.state.get("rendered")&&a.updateLayoutRect()}),a._super()}})}),g("2o",["z"],function(a){"use strict";return a.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(a){var b=this;b._super(a),b.classes.add("toolbar")},postRender:function(){var a=this;return a.items().each(function(a){a.classes.add("toolbar-item")}),a._super()}})}),g("20",["2o"],function(a){"use strict";return a.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),g("21",["1","d","r","20"],function(a,b,c,d){"use strict";function e(a,b){for(;a;){if(b===a)return!0;a=a.parentNode}return!1}var f=c.extend({init:function(a){var b=this;b._renderOpen=!0,b._super(a),a=b.settings,b.classes.add("menubtn"),a.fixedWidth&&b.classes.add("fixed-width"),b.aria("haspopup",!0),b.state.set("menu",a.menu||b.render())},showMenu:function(a){var c,d=this;return d.menu&&d.menu.visible()&&a!==!1?d.hideMenu():(d.menu||(c=d.state.get("menu")||[],d.classes.add("opened"),c.length?c={type:"menu",animate:!0,items:c}:(c.type=c.type||"menu",c.animate=!0),c.renderTo?d.menu=c.parent(d).show().renderTo():d.menu=b.create(c).parent(d).renderTo(),d.fire("createmenu"),d.menu.reflow(),d.menu.on("cancel",function(a){a.control.parent()===d.menu&&(a.stopPropagation(),d.focus(),d.hideMenu())}),d.menu.on("select",function(){d.focus()}),d.menu.on("show hide",function(a){a.control===d.menu&&(d.activeMenu("show"==a.type),d.classes.toggle("opened","show"==a.type)),d.aria("expanded","show"==a.type)}).fire("show")),d.menu.show(),d.menu.layoutRect({w:d.layoutRect().w}),d.menu.moveRel(d.getEl(),d.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),void d.fire("showmenu"))},hideMenu:function(){var a=this;a.menu&&(a.menu.items().each(function(a){a.hideMenu&&a.hideMenu()}),a.menu.hide())},activeMenu:function(a){this.classes.toggle("active",a)},renderHtml:function(){var b,c=this,e=c._id,f=c.classPrefix,g=c.settings.icon,h=c.state.get("text"),i="";return b=c.settings.image,b?(g="none","string"!=typeof b&&(b=a.getSelection?b[0]:b[1]),b=" style=\"background-image: url('"+b+"')\""):b="",h&&(c.classes.add("btn-has-text"),i=''+c.encode(h)+""),g=c.settings.icon?f+"ico "+f+"i-"+g:"",c.aria("role",c.parent()instanceof d?"menuitem":"button"),'
    '},postRender:function(){var a=this;return a.on("click",function(b){b.control===a&&e(b.target,a.getEl())&&(a.focus(),a.showMenu(!b.aria),b.aria&&a.menu.items().filter(":visible")[0].focus())}),a.on("mouseenter",function(b){var c,d=b.control,e=a.parent();d&&e&&d instanceof f&&d.parent()==e&&(e.items().filter("MenuButton").each(function(a){a.hideMenu&&a!=d&&(a.menu&&a.menu.visible()&&(c=!0),a.hideMenu())}),c&&(d.focus(),d.showMenu()))}),a._super()},bindStates:function(){var a=this;return a.state.on("change:menu",function(){a.menu&&a.menu.remove(),a.menu=null}),a._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return f}),g("22",["1h","d","1g","2r"],function(a,b,c,d){"use strict";var e=function(a,b){var c=a._textStyle;if(c){var d=a.getEl("text");d.setAttribute("style",c),b&&(d.style.color="",d.style.backgroundColor="")}};return a.extend({Defaults:{border:0,role:"menuitem"},init:function(a){var b,c=this;c._super(a),a=c.settings,c.classes.add("menu-item"),a.menu&&c.classes.add("menu-item-expand"),a.preview&&c.classes.add("menu-item-preview"),b=c.state.get("text"),"-"!==b&&"|"!==b||(c.classes.add("menu-item-sep"),c.aria("role","separator"),c.state.set("text","-")),a.selectable&&(c.aria("role","menuitemcheckbox"),c.classes.add("menu-item-checkbox"),a.icon="selected"),a.preview||a.selectable||c.classes.add("menu-item-normal"),c.on("mousedown",function(a){a.preventDefault()}),a.menu&&!a.ariaHideMenu&&c.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var a,c=this,d=c.settings,e=c.parent();if(e.items().each(function(a){a!==c&&a.hideMenu()}),d.menu){a=c.menu,a?a.show():(a=d.menu,a.length?a={type:"menu",animate:!0,items:a}:(a.type=a.type||"menu",a.animate=!0),e.settings.itemDefaults&&(a.itemDefaults=e.settings.itemDefaults),a=c.menu=b.create(a).parent(c).renderTo(),a.reflow(),a.on("cancel",function(b){b.stopPropagation(),c.focus(),a.hide()}),a.on("show hide",function(a){a.control.items&&a.control.items().each(function(a){a.active(a.settings.selected)})}).fire("show"),a.on("hide",function(b){b.control===a&&c.classes.remove("selected")}),a.submenu=!0),a._parentMenu=e,a.classes.add("menu-sub");var f=a.testMoveRel(c.getEl(),c.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);a.moveRel(c.getEl(),f),a.rel=f,f="menu-sub-"+f,a.classes.remove(a._lastRel).add(f),a._lastRel=f,c.classes.add("selected"),c.aria("expanded",!0)}},hideMenu:function(){var a=this;return a.menu&&(a.menu.items().each(function(a){a.hideMenu&&a.hideMenu()}),a.menu.hide(),a.aria("expanded",!1)),a},renderHtml:function(){function a(a){var b,d,e={};for(e=c.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},a=a.split("+"),b=0;b").replace(new RegExp(b("]mce~match!"),"g"),"")}var f=this,g=f._id,h=f.settings,i=f.classPrefix,j=f.state.get("text"),k=f.settings.icon,l="",m=h.shortcut,n=f.encode(h.url),o="";return k&&f.parent().classes.add("menu-has-icons"),h.image&&(l=" style=\"background-image: url('"+h.image+"')\""),m&&(m=a(m)),k=i+"ico "+i+"i-"+(f.settings.icon||"none"),o="-"!==j?'\xa0":"",j=e(f.encode(d(j))),n=e(f.encode(d(n))),'
    '+o+("-"!==j?''+j+"":"")+(m?'
    '+m+"
    ":"")+(h.menu?'
    ':"")+(n?'":"")+"
    "},postRender:function(){var a=this,b=a.settings,c=b.textStyle;if("function"==typeof c&&(c=c.call(this)),c){var e=a.getEl("text");e&&(e.setAttribute("style",c),a._textStyle=c)}return a.on("mouseenter click",function(c){c.control===a&&(b.menu||"click"!==c.type?(a.showMenu(),c.aria&&a.menu.focus(!0)):(a.fire("select"),d.requestAnimationFrame(function(){a.parent().hideAll()})))}),a._super(),a},hover:function(){var a=this;return a.parent().items().each(function(a){a.classes.remove("selected")}),a.classes.toggle("selected",!0),a},active:function(a){return e(this,a),"undefined"!=typeof a&&this.aria("checked",a),this._super(a)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),g("2n",["31","10","2r"],function(a,b,c){"use strict";return function(d,e){var f,g,h=this,i=b.classPrefix;h.show=function(b,j){function k(){f&&(a(d).append('
    '),j&&j())}return h.hide(),f=!0,b?g=c.setTimeout(k,b):k(),h},h.hide=function(){var a=d.lastChild;return c.clearTimeout(g),a&&a.className.indexOf("throbber")!=-1&&a.parentNode.removeChild(a),f=!1,h}}}),g("1z",["1g","2r","e","18","22","2n"],function(a,b,c,d,e,f){"use strict";return d.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(b){var d=this;if(b.autohide=!0,b.constrainToViewport=!0,"function"==typeof b.items&&(b.itemsFactory=b.items,b.items=[]),b.itemDefaults)for(var e=b.items,f=e.length;f--;)e[f]=c.extend({},b.itemDefaults,e[f]);d._super(b),d.classes.add("menu"),b.animate&&11!==a.ie&&d.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var a=this;a.hideAll(),a.fire("select")},load:function(){function a(){d.throbber&&(d.throbber.hide(),d.throbber=null)}var b,c,d=this;c=d.settings.itemsFactory,c&&(d.throbber||(d.throbber=new f(d.getEl("body"),!0),0===d.items().length?(d.throbber.show(),d.fire("loading")):d.throbber.show(100,function(){d.items().remove(),d.fire("loading")}),d.on("hide close",a)),d.requestTime=b=(new Date).getTime(),d.settings.itemsFactory(function(c){return 0===c.length?void d.hide():void(d.requestTime===b&&(d.getEl().style.width="",d.getEl("body").style.width="",a(),d.items().remove(),d.getEl("body").innerHTML="",d.add(c),d.renderNew(),d.fire("loaded")))}))},hideAll:function(){var a=this;return this.find("menuitem").exec("hideMenu"),a._super()},preRender:function(){var a=this;return a.items().each(function(b){var c=b.settings;if(c.icon||c.image||c.selectable)return a._hasIcons=!0,!1}),a.settings.itemsFactory&&a.on("postrender",function(){a.settings.itemsFactory&&a.load()}),a.on("show hide",function(c){c.control===a&&("show"===c.type?b.setTimeout(function(){a.classes.add("in")},0):a.classes.remove("in"))}),a._super()}})}),g("1y",["21","1z"],function(a,b){"use strict";return a.extend({init:function(a){function b(c){for(var f=0;f0&&(e=c[0].text,g.state.set("value",c[0].value)),g.state.set("menu",c)),g.state.set("text",a.text||e),g.classes.add("listbox"),g.on("select",function(b){var c=b.control;f&&(b.lastControl=f),a.multiple?c.active(!c.active()):g.value(b.control.value()),f=c})},bindStates:function(){function a(a,c){a instanceof b&&a.items().each(function(a){a.hasMenus()||a.active(a.value()===c)})}function c(a,b){var d;if(a)for(var e=0;e'},postRender:function(){var a=this;a._super(),a.resizeDragHelper=new b(this._id,{start:function(){a.fire("ResizeStart")},drag:function(b){"both"!=a.settings.direction&&(b.deltaX=0),a.fire("Resize",b)},stop:function(){a.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),g("2f",["1h"],function(a){"use strict";function b(a){var b="";if(a)for(var c=0;c'+a[c]+"";return b}return a.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(a){var b=this;b._super(a),b.settings.size&&(b.size=b.settings.size),b.settings.options&&(b._options=b.settings.options),b.on("keydown",function(a){var c;13==a.keyCode&&(a.preventDefault(),b.parents().reverse().each(function(a){if(a.toJSON)return c=a,!1}),b.fire("submit",{data:c.toJSON()}))})},options:function(a){return arguments.length?(this.state.set("options",a),this):this.state.get("options")},renderHtml:function(){var a,c=this,d="";return a=b(c._options),c.size&&(d=' size = "'+c.size+'"'),'"},bindStates:function(){var a=this;return a.state.on("change:options",function(c){a.getEl().innerHTML=b(c.value)}),a._super()}})}),g("2h",["1h","11","30"],function(a,b,c){"use strict";function d(a,b,c){return ac&&(a=c),a}function e(a,b,c){a.setAttribute("aria-"+b,c)}function f(a,b){var d,f,g,h,i,j;"v"==a.settings.orientation?(h="top",g="height",f="h"):(h="left",g="width",f="w"),j=a.getEl("handle"),d=(a.layoutRect()[f]||100)-c.getSize(j)[g],i=d*((b-a._minValue)/(a._maxValue-a._minValue))+"px",j.style[h]=i,j.style.height=a.layoutRect().h+"px",e(j,"valuenow",b),e(j,"valuetext",""+a.settings.previewFilter(b)),e(j,"valuemin",a._minValue),e(j,"valuemax",a._maxValue)}return a.extend({init:function(a){var b=this;a.previewFilter||(a.previewFilter=function(a){return Math.round(100*a)/100}),b._super(a),b.classes.add("slider"),"v"==a.orientation&&b.classes.add("vertical"),b._minValue=a.minValue||0,b._maxValue=a.maxValue||100,b._initValue=b.state.get("value")},renderHtml:function(){var a=this,b=a._id,c=a.classPrefix;return'
    '},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function a(a,b,c){return(c+a)/(b-a)}function e(a,b,c){return c*(b-a)-a}function f(b,c){function f(f){var g;g=n.value(),g=e(b,c,a(b,c,g)+.05*f),g=d(g,b,c),n.value(g),n.fire("dragstart",{value:g}),n.fire("drag",{value:g}),n.fire("dragend",{value:g})}n.on("keydown",function(a){switch(a.keyCode){case 37:case 38:f(-1);break;case 39:case 40:f(1)}})}function g(a,e,f){var g,h,i,o,p;n._dragHelper=new b(n._id,{handle:n._id+"-handle",start:function(a){g=a[j],h=parseInt(n.getEl("handle").style[k],10),i=(n.layoutRect()[m]||100)-c.getSize(f)[l],n.fire("dragstart",{value:p})},drag:function(b){var c=b[j]-g;o=d(h+c,0,i),f.style[k]=o+"px",p=a+o/i*(e-a),n.value(p),n.tooltip().text(""+n.settings.previewFilter(p)).show().moveRel(f,"bc tc"),n.fire("drag",{value:p})},stop:function(){n.tooltip().hide(),n.fire("dragend",{value:p})}})}var h,i,j,k,l,m,n=this;h=n._minValue,i=n._maxValue,"v"==n.settings.orientation?(j="screenY",k="top",l="height",m="h"):(j="screenX",k="left",l="width",m="w"),n._super(),f(h,i,n.getEl("handle")),g(h,i,n.getEl("handle"))},repaint:function(){this._super(),f(this,this.value())},bindStates:function(){var a=this;return a.state.on("change:value",function(b){f(a,b.value)}),a._super()}})}),g("2i",["1h"],function(a){"use strict";return a.extend({renderHtml:function(){var a=this;return a.classes.add("spacer"),a.canFocus=!1,'
    '}})}),g("2j",["1","31","30","21"],function(a,b,c,d){return d.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var a,d,e=this,f=e.getEl(),g=e.layoutRect();return e._super(),a=f.firstChild,d=f.lastChild,b(a).css({width:g.w-c.getSize(d).width,height:g.h-2}),b(d).css({height:g.h-2}),e},activeMenu:function(a){var c=this;b(c.getEl().lastChild).toggleClass(c.classPrefix+"active",a)},renderHtml:function(){var b,c,d=this,e=d._id,f=d.classPrefix,g=d.state.get("icon"),h=d.state.get("text"),i=d.settings,j="";return b=i.image,b?(g="none","string"!=typeof b&&(b=a.getSelection?b[0]:b[1]),b=" style=\"background-image: url('"+b+"')\""):b="",g=i.icon?f+"ico "+f+"i-"+g:"",h&&(d.classes.add("btn-has-text"),j=''+d.encode(h)+""),c="boolean"==typeof i.active?' aria-pressed="'+i.active+'"':"",'
    '},postRender:function(){var a=this,b=a.settings.onclick;return a.on("click",function(a){var c=a.target;if(a.control==this)for(;c;){if(a.aria&&"down"!=a.aria.key||"BUTTON"==c.nodeName&&c.className.indexOf("open")==-1)return a.stopImmediatePropagation(),void(b&&b.call(this,a));c=c.parentNode}}),delete a.settings.onclick,a._super()}})}),g("2k",["19"],function(a){"use strict";return a.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),g("2l",["26","31","30"],function(a,b,c){"use strict";return a.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(a){var c;this.activeTabId&&(c=this.getEl(this.activeTabId),b(c).removeClass(this.classPrefix+"active"),c.setAttribute("aria-selected","false")),this.activeTabId="t"+a,c=this.getEl("t"+a),c.setAttribute("aria-selected","true"),b(c).addClass(this.classPrefix+"active"),this.items()[a].show().fire("showtab"),this.reflow(),this.items().each(function(b,c){a!=c&&b.hide()})},renderHtml:function(){var a=this,b=a._layout,c="",d=a.classPrefix;return a.preRender(),b.preRender(a),a.items().each(function(b,e){var f=a._id+"-t"+e;b.aria("role","tabpanel"),b.aria("labelledby",f),c+='"}),'
    '+c+'
    '+b.renderHtml(a)+"
    "},postRender:function(){var a=this;a._super(),a.settings.activeTab=a.settings.activeTab||0,a.activateTab(a.settings.activeTab),this.on("click",function(b){var c=b.target.parentNode;if(c&&c.id==a._id+"-head")for(var d=c.childNodes.length;d--;)c.childNodes[d]==b.target&&a.activateTab(d)})},initLayoutRect:function(){var a,b,d,e=this;b=c.getSize(e.getEl("head")).width,b=b<0?0:b,d=0,e.items().each(function(a){b=Math.max(b,a.layoutRect().minW),d=Math.max(d,a.layoutRect().minH)}),e.items().each(function(a){a.settings.x=0,a.settings.y=0,a.settings.w=b,a.settings.h=d,a.layoutRect({x:0,y:0,w:b,h:d})});var f=c.getSize(e.getEl("head")).height;return e.settings.minWidth=b,e.settings.minHeight=d+f,a=e._super(),a.deltaH+=f,a.innerH=a.h-a.deltaH,a}})}),g("2m",["1e","e","30","1h"],function(a,b,c,d){return d.extend({init:function(a){var b=this;b._super(a),b.classes.add("textbox"),a.multiline?b.classes.add("multiline"):(b.on("keydown",function(a){var c;13==a.keyCode&&(a.preventDefault(),b.parents().reverse().each(function(a){if(a.toJSON)return c=a,!1}),b.fire("submit",{data:c.toJSON()}))}),b.on("keyup",function(a){b.state.set("value",a.target.value)}))},repaint:function(){var b,c,d,e,f,g=this,h=0;b=g.getEl().style,c=g._layoutRect,f=g._lastRepaintRect||{};var i=a;return!g.settings.multiline&&i.all&&(!i.documentMode||i.documentMode<=8)&&(b.lineHeight=c.h-h+"px"),d=g.borderBox,e=d.left+d.right+8,h=d.top+d.bottom+(g.settings.multiline?8:0),c.x!==f.x&&(b.left=c.x+"px",f.x=c.x),c.y!==f.y&&(b.top=c.y+"px",f.y=c.y),c.w!==f.w&&(b.width=c.w-e+"px",f.w=c.w),c.h!==f.h&&(b.height=c.h-h+"px",f.h=c.h),g._lastRepaintRect=f,g.fire("repaint",{},!1),g},renderHtml:function(){var a,d,e=this,f=e.settings;return a={id:e._id,hidefocus:"1"},b.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(b){a[b]=f[b]}),e.disabled()&&(a.disabled="disabled"),f.subtype&&(a.type=f.subtype),d=c.create(f.multiline?"textarea":"input",a),d.value=e.state.get("value"),d.className=e.classes,d.outerHTML},value:function(a){return arguments.length?(this.state.set("value",a),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var a=this;a.getEl().value=a.state.get("value"),a._super(),a.$el.on("change",function(b){a.state.set("value",b.target.value),a.fire("change",b)})},bindStates:function(){var a=this;return a.state.on("change:value",function(b){a.getEl().value!=b.value&&(a.getEl().value=b.value)}),a.state.on("change:disabled",function(b){a.getEl().disabled=b.value}),a._super()},remove:function(){this.$el.off(),this._super()}})}),g("6",["d","e","p","q","r","s","t","u","v","w","x","y","z","10","11","12","13","14","15","16","17","18","19","1a","7","1r","1s","1t","1u","1v","1w","1x","1y","1z","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","2g","2h","2i","2j","2k","2l","2m","2n","2o","2p","1h","2q"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha){var ia=function(){return{Selector:Y,Collection:h,ReflowQueue:T,Control:n,Factory:a,KeyboardNavigation:D,Container:m,DragHelper:o,Scrollable:W,Panel:O,Movable:M,Resizable:U,FloatPanel:v,Window:ha,MessageBox:L,Tooltip:fa,Widget:ga,Progress:R,Notification:N,Layout:F,AbsoluteLayout:c,Button:e,ButtonGroup:f,Checkbox:g,ComboBox:l,ColorBox:i,PanelButton:P,ColorButton:j,ColorPicker:k,Path:Q,ElementPath:q,FormItem:z,Form:x,FieldSet:r,FilePicker:s,FitLayout:t,FlexLayout:u,FlowLayout:w,FormatControls:y,GridLayout:A,Iframe:B,InfoBox:C,Label:E,Toolbar:ea,MenuBar:I,MenuButton:J,MenuItem:K,Throbber:da,Menu:H,ListBox:G,Radio:S,ResizeHandle:V,SelectBox:X,Slider:Z,Spacer:$,SplitButton:_,StackLayout:aa,TabPanel:ba,TextBox:ca,DropZone:p,BrowseButton:d}},ja=function(a){a.ui?b.each(ia(),function(b,c){a.ui[c]=b}):a.ui=ia()},ka=function(){b.each(ia(),function(b,c){a.add(c,b)})},la={appendTo:ja,registerToFactory:ka};return la}),g("0",["1","2","3","4","5","6","7"],function(a,b,c,d,e,f,g){return f.registerToFactory(),f.appendTo(a.tinymce?a.tinymce:{}),b.add("inlite",function(a){var b=new e;return g.setup(a),d.addToEditor(a,b),c.get(a,b)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/themes/modern/theme.min.js b/assets/plugins/tinymce4/tinymce/themes/modern/theme.min.js index 524b421e86..6d9774c26f 100755 --- a/assets/plugins/tinymce4/tinymce/themes/modern/theme.min.js +++ b/assets/plugins/tinymce4/tinymce/themes/modern/theme.min.js @@ -1 +1,5 @@ -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i=0;c--)for(d=f.length-1;d>=0;d--)if(f[d].predicate(e[c]))return{toolbar:f[d],element:e[c]};return null};a.on("click keyup setContent ObjectResized",function(b){("setcontent"!==b.type||b.selection)&&c.setEditorTimeout(a,function(){var b;b=u(a.selection.getNode()),b?(t(),s(b)):t()})}),a.on("blur hide contextmenu",t),a.on("ObjectResizeStart",function(){var b=u(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("ResizeEditor ResizeWindow",q(!0)),a.on("nodeChange",q(!1)),a.on("remove",function(){b.each(n(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var b=u(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.items()[0].focus()})};return{addContextualToolbars:m}}),g("h",["d"],function(a){var b={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},c=function(a,b){var c;return"|"==b?{text:"|"}:c=a[b]},d=function(d,e,f){var g,h,i,j,k;if(k=a.makeMap((e.removed_menuitems||"").split(/[ ,]/)),e.menu?(h=e.menu[f],j=!0):h=b[f],h){g={text:h.title},i=[],a.each((h.items||"").split(/[ ,]/),function(a){var b=c(d,a);b&&!k[a]&&i.push(c(d,a))}),j||a.each(d,function(a){a.context==f&&("before"==a.separator&&i.push({text:"|"}),a.prependToContext?i.unshift(a):i.push(a),"after"==a.separator&&i.push({text:"|"}))});for(var l=0;l=11},k=function(a){return!(!j()||!a.sidebars)&&a.sidebars.length>0},l=function(b){var c=a.map(b.sidebars,function(a){var c=a.settings;return{type:"button",icon:c.icon,image:c.image,tooltip:c.tooltip,onclick:i(b,a.name,b.sidebars)}});return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:c}]}};return{hasSidebar:k,createSidebar:l}}),g("j",[],function(){var a=function(a){var b=function(){a._skinLoaded=!0,a.fire("SkinLoaded")};return function(){a.initialized?b():a.on("init",b)}};return{fireSkinLoaded:a}}),g("6",["b","c","d","e","f","g","h","9","i","j","k"],function(a,b,c,d,e,f,g,h,i,j,k){var l=a.DOM,m=function(a){return function(b){a.find("*").disabled("readonly"===b.mode)}},n=function(a){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:a,html:""}},o=function(a){return{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[n("0"),i.createSidebar(a)]}},p=function(a,c,p){var q,r,s,t=a.settings;return p.skinUiCss&&l.styleSheetLoader.load(p.skinUiCss,j.fireSkinLoaded(a)),q=c.panel=b.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[t.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:g.createMenuButtons(a)},k.createToolbars(a,t.toolbar_items_size),i.hasSidebar(a)?o(a):n("1 0 0 0")]}),t.resize!==!1&&(r={type:"resizehandle",direction:t.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;s={width:b.clientWidth,height:b.clientHeight}},onResize:function(b){"both"===t.resize?h.resizeTo(a,s.width+b.deltaX,s.height+b.deltaY):h.resizeTo(a,null,s.height+b.deltaY)}}),t.statusbar!==!1&&q.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:a},r]}),a.fire("BeforeRenderUI"),a.on("SwitchMode",m(q)),q.renderBefore(p.targetNode).reflow(),t.readonly&&a.setMode("readonly"),p.width&&l.setStyle(q.getEl(),"width",p.width),a.on("remove",function(){q.remove(),q=null}),d.addKeys(a,q),f.addContextualToolbars(a),e.setup(a),{iframeContainer:q.find("#iframe")[0].getEl(),editorContainer:q.getEl()}};return{render:p}}),g("l",["a"],function(a){return a("tinymce.ui.FloatPanel")}),g("7",["d","c","b","l","k","h","g","e","j"],function(a,b,c,d,e,f,g,h,i){var j=function(a,j,k){var l,m,n=a.settings,o=c.DOM;n.fixed_toolbar_container&&(m=o.select(n.fixed_toolbar_container)[0]);var p=function(){if(l&&l.moveRel&&l.visible()&&!l._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=o.getPos(c),g=o.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}l.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}},q=function(){l&&(l.show(),p(),o.addClass(a.getBody(),"mce-edit-focus"))},r=function(){l&&(l.hide(),d.hideAll(),o.removeClass(a.getBody(),"mce-edit-focus"))},s=function(){return l?void(l.visible()||q()):(l=j.panel=b.create({type:m?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!m,border:1,items:[n.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:f.createMenuButtons(a)},e.createToolbars(a,n.toolbar_items_size)]}),a.fire("BeforeRenderUI"),l.renderTo(m||document.body).reflow(),h.addKeys(a,l),q(),g.addContextualToolbars(a),a.on("nodeChange",p),a.on("activate",q),a.on("deactivate",r),void a.nodeChanged())};return n.content_editable=!0,a.on("focus",function(){k.skinUiCss?o.styleSheetLoader.load(k.skinUiCss,s,s):s()}),a.on("blur hide",r),a.on("remove",function(){l&&(l.remove(),l=null)}),k.skinUiCss&&o.styleSheetLoader.load(k.skinUiCss,i.fireSkinLoaded(a)),{}};return{render:j}}),g("m",["a"],function(a){return a("tinymce.ui.Throbber")}),g("8",["m"],function(a){var b=function(b,c){var d;b.on("ProgressState",function(b){d=d||new a(c.panel.getEl("body")),b.state?d.show(b.time):d.hide()})};return{setup:b}}),g("0",["1","2","3","4","5","6","7","8","9"],function(a,b,c,d,e,f,g,h,i){var j=b.ThemeManager;e.appendTo(a.tinymce?a.tinymce:{});var k=function(a,b,d){var e=a.settings,i=e.skin!==!1&&(e.skin||"lightgray");if(i){var j=e.skin_url;j=j?a.documentBaseURI.toAbsolute(j):c.baseURL+"/skins/"+i,d.skinUiCss=j+"/skin.min.css",a.contentCSS.push(j+"/content"+(a.inline?".inline":"")+".min.css")}return h.setup(a,b),e.inline?g.render(a,b,d):f.render(a,b,d)};return j.add("modern",function(a){return{renderUI:function(b){return k(a,this,b)},resizeTo:function(b,c){return i.resizeTo(a,b,c)},resizeBy:function(b,c){return i.resizeBy(a,b,c)}}}),function(){}}),d("0")()}(); \ No newline at end of file +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0?c:f},v=function(a){var c=a.getParam("toolbar"),d="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";return c===!1?[]:b.isArray(c)?b.grep(c,function(a){return a.length>0}):u(a.settings,d)};return{isBrandingEnabled:c,hasMenubar:d,getMenubar:e,hasStatusbar:f,getToolbarSize:g,getResize:h,isReadOnly:i,getFixedToolbarContainer:j,getInlineToolbarPositionHandler:k,getMenu:l,getRemovedMenuItems:m,getMinWidth:n,getMinHeight:o,getMaxWidth:p,getMaxHeight:q,getSkinUrl:r,isSkinDisabled:s,isInline:t,getToolbars:v}}),g("2j",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("b",["6"],function(a){return a("tinymce.ui.Factory")}),g("38",["6"],function(a){return a("tinymce.util.I18n")}),g("2k",[],function(){var a=function(a){return a.fire("SkinLoaded")},b=function(a){return a.fire("ResizeEditor")},c=function(a){return a.fire("BeforeRenderUI")};return{fireSkinLoaded:a,fireResizeEditor:b,fireBeforeRenderUI:c}}),g("39",[],function(){var a=function(a,b){return function(){var c=a.find(b)[0];c&&c.focus(!0)}},b=function(b,c){b.shortcuts.add("Alt+F9","",a(c,"menubar")),b.shortcuts.add("Alt+F10,F10","",a(c,"toolbar")),b.shortcuts.add("Alt+F11","",a(c,"elementpath")),c.on("cancel",function(){b.focus()})};return{addKeys:b}}),g("14",["6"],function(a){return a("tinymce.Env")}),g("3q",["6"],function(a){return a("tinymce.geom.Rect")}),g("2u",["6"],function(a){return a("tinymce.util.Delay")}),h("2y",Array),h("2z",Error),g("z",["2y","2z"],function(a,b){var c=function(){},d=function(a){return function(){return a()}},e=function(a,b){return function(){return a(b.apply(null,arguments))}},f=function(a){return function(){return a}},g=function(a){return a},h=function(a,b){return a===b},i=function(b){for(var c=new a(arguments.length-1),d=1;d=0;c--)for(d=f.length-1;d>=0;d--)if(f[d].predicate(e[c]))return{toolbar:f[d],element:e[c]};return null};b.on("click keyup setContent ObjectResized",function(a){("setcontent"!==a.type||a.selection)&&e.setEditorTimeout(b,function(){var a;a=w(b.selection.getNode()),a?(v(),u(a)):v()})}),b.on("blur hide contextmenu",v),b.on("ObjectResizeStart",function(){var a=w(b.selection.getNode());a&&a.toolbar.panel&&a.toolbar.panel.hide()}),b.on("ResizeEditor ResizeWindow",s(!0)),b.on("nodeChange",s(!1)),b.on("remove",function(){f.each(p(),function(a){a.panel&&a.panel.remove()}),b.contextToolbars={}}),b.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var a=w(b.selection.getNode());a&&a.toolbar.panel&&a.toolbar.panel.items()[0].focus()})};return{addContextualToolbars:p}}),h("3i",String),g("2l",["31","2y","2z","3i"],function(a,b,c,d){var e=function(){var a=b.prototype.indexOf,c=function(b,c){return a.call(b,c)},d=function(a,b){return u(a,b)};return void 0===a?d:c}(),f=function(b,c){var d=e(b,c);return d===-1?a.none():a.some(d)},g=function(a,b){return e(a,b)>-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e0&&b=11},l=function(a){return!(!k()||!a.sidebars)&&a.sidebars.length>0},m=function(a){var b=c.map(a.sidebars,function(b){var c=b.settings;return{type:"button",icon:c.icon,image:c.image,tooltip:c.tooltip,onclick:j(a,b.name,a.sidebars)}});return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:b}]}};return{hasSidebar:l,createSidebar:m}}),g("3d",["2k"],function(a){var b=function(b){var c=function(){b._skinLoaded=!0,a.fireSkinLoaded(b)};return function(){b.initialized?c():b.on("init",c)}};return{fireSkinLoaded:b}}),g("2g",["2j","b","38","c","2k","2f","39","3a","3b","8","3c","3d","3e"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=a.DOM,o=function(a){return function(b){a.find("*").disabled("readonly"===b.mode)}},p=function(a){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:a,html:""}},q=function(a){return{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[p("0"),k.createSidebar(a)]}},r=function(a,d,r){var s,t,u;if(f.isSkinDisabled(a)===!1&&r.skinUiCss?n.styleSheetLoader.load(r.skinUiCss,l.fireSkinLoaded(a)):l.fireSkinLoaded(a)(),s=d.panel=b.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[{type:"container",classes:"top-part",items:[f.hasMenubar(a)===!1?null:{type:"menubar",border:"0 0 1 0",items:i.createMenuButtons(a)},m.createToolbars(a,f.getToolbarSize(a))]},k.hasSidebar(a)?q(a):p("1 0 0 0")]}),"none"!==f.getResize(a)&&(t={type:"resizehandle",direction:f.getResize(a),onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;u={width:b.clientWidth,height:b.clientHeight}},onResize:function(b){"both"===f.getResize(a)?j.resizeTo(a,u.width+b.deltaX,u.height+b.deltaY):j.resizeTo(a,null,u.height+b.deltaY)}}),f.hasStatusbar(a)){var v='tinymce',w=c.translate(["Powered by {0}",v]),x=f.isBrandingEnabled(a)?{type:"label",classes:"branding",html:" "+w}:null;s.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:a},t,x]})}return e.fireBeforeRenderUI(a),a.on("SwitchMode",o(s)),s.renderBefore(r.targetNode).reflow(),f.isReadOnly(a)&&a.setMode("readonly"),r.width&&n.setStyle(s.getEl(),"width",r.width),a.on("remove",function(){s.remove(),s=null}),g.addKeys(a,s),h.addContextualToolbars(a),{iframeContainer:s.find("#iframe")[0].getEl(),editorContainer:s.getEl()}};return{render:r}}),h("12",document),g("2o",["6"],function(a){return a("tinymce.dom.DomQuery")}),g("2n",["12","2j","14","c"],function(a,b,c,d){"use strict";var e=0,f={id:function(){return"mceu_"+e++},create:function(c,e,f){var g=a.createElement(c);return b.DOM.setAttribs(g,e),"string"==typeof f?g.innerHTML=f:d.each(f,function(a){a.nodeType&&g.appendChild(a)}),g},createFragment:function(a){return b.DOM.createFragment(a)},getWindowSize:function(){return b.DOM.getViewPort()},getSize:function(a){var b,c;if(a.getBoundingClientRect){var d=a.getBoundingClientRect();b=Math.max(d.width||d.right-d.left,a.offsetWidth),c=Math.max(d.height||d.bottom-d.bottom,a.offsetHeight)}else b=a.offsetWidth,c=a.offsetHeight;return{width:b,height:c}},getPos:function(a,c){return b.DOM.getPos(a,c||f.getContainer())},getContainer:function(){return c.container?c.container:a.body},getViewPort:function(a){return b.DOM.getViewPort(a)},get:function(b){return a.getElementById(b)},addClass:function(a,c){return b.DOM.addClass(a,c)},removeClass:function(a,c){return b.DOM.removeClass(a,c)},hasClass:function(a,c){return b.DOM.hasClass(a,c)},toggleClass:function(a,c,d){return b.DOM.toggleClass(a,c,d)},css:function(a,c,d){return b.DOM.setStyle(a,c,d)},getRuntimeStyle:function(a,c){return b.DOM.getStyle(a,c,!0)},on:function(a,c,d,e){return b.DOM.bind(a,c,d,e)},off:function(a,c,d){return b.DOM.unbind(a,c,d)},fire:function(a,c,d){return b.DOM.fire(a,c,d)},innerHtml:function(a,c){b.DOM.setHTML(a,c)}};return f}),g("1s",["12","1","2n"],function(a,b,c){"use strict";function d(b,d,e){var f,g,h,i,j,k,l,m,n,o;return n=c.getViewPort(),g=c.getPos(d),h=g.x,i=g.y,b.state.get("fixed")&&"static"==c.getRuntimeStyle(a.body,"position")&&(h-=n.x,i-=n.y),f=b.getEl(),o=c.getSize(f),j=o.width,k=o.height,o=c.getSize(d),l=o.width,m=o.height,e=(e||"").split(""),"b"===e[0]&&(i+=m),"r"===e[1]&&(h+=l),"c"===e[0]&&(i+=Math.round(m/2)),"c"===e[1]&&(h+=Math.round(l/2)),"b"===e[3]&&(i-=k),"r"===e[4]&&(h-=j),"c"===e[3]&&(i-=Math.round(k/2)),"c"===e[4]&&(h-=Math.round(j/2)),{x:h,y:i,w:j,h:k}}return{testMoveRel:function(a,b){for(var e=c.getViewPort(),f=0;f0&&g.x+g.w0&&g.y+g.he.x&&g.x+g.we.y&&g.y+g.hb?(a=b-c,a<0?0:a):a}var f=this;if(f.settings.constrainToViewport){var g=c.getViewPort(b),h=f.layoutRect();a=e(a,g.w+g.x,h.w),d=e(d,g.h+g.y,h.h)}return f.state.get("rendered")?f.layoutRect({x:a,y:d}).repaint():(f.settings.x=a,f.settings.y=d),f.fire("move",{x:a,y:d}),f}}}),g("2p",["6"],function(a){return a("tinymce.util.Class")}),g("2q",["6"],function(a){return a("tinymce.util.EventDispatcher")}),g("2r",[],function(){"use strict";return{parseBox:function(a){var b,c=10;if(a)return"number"==typeof a?(a=a||0,{top:a,left:a,bottom:a,right:a}):(a=a.split(" "),b=a.length,1===b?a[1]=a[2]=a[3]=a[0]:2===b?(a[2]=a[0],a[3]=a[1]):3===b&&(a[3]=a[1]),{top:parseInt(a[0],c)||0,right:parseInt(a[1],c)||0,bottom:parseInt(a[2],c)||0,left:parseInt(a[3],c)||0})},measureBox:function(a,b){function c(b){var c=a.ownerDocument.defaultView;if(c){var d=c.getComputedStyle(a,null);return d?(b=b.replace(/[A-Z]/g,function(a){return"-"+a}),d.getPropertyValue(b)):null}return a.currentStyle[b]}function d(a){var b=parseFloat(c(a),10);return isNaN(b)?0:b}return{top:d(b+"TopWidth"),right:d(b+"RightWidth"),bottom:d(b+"BottomWidth"),left:d(b+"LeftWidth")}}}}),g("2s",["c"],function(a){"use strict";function b(){}function c(a){this.cls=[],this.cls._map={},this.onchange=a||b,this.prefix=""}return a.extend(c.prototype,{add:function(a){return a&&!this.contains(a)&&(this.cls._map[a]=!0,this.cls.push(a),this._change()),this},remove:function(a){if(this.contains(a)){for(var b=0;b0&&(a+=" "),a+=this.prefix+this.cls[b];return a},c}),g("24",["2p"],function(a){"use strict";function b(a){for(var b,c=[],d=a.length;d--;)b=a[d],b.__checked||(c.push(b),b.__checked=1);for(d=c.length;d--;)delete c[d].__checked;return c}var c,d=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,f=/^\s*|\s*$/g,g=a.extend({init:function(a){function b(a){if(a)return a=a.toLowerCase(),function(b){return"*"===a||b.type===a}}function c(a){if(a)return function(b){return b._name===a}}function g(a){if(a)return a=a.split("."),function(b){for(var c=a.length;c--;)if(!b.classes.contains(a[c]))return!1;return!0}}function h(a,b,c){if(a)return function(d){var e=d[a]?d[a]():"";return b?"="===b?e===c:"*="===b?e.indexOf(c)>=0:"~="===b?(" "+e+" ").indexOf(" "+c+" ")>=0:"!="===b?e!=c:"^="===b?0===e.indexOf(c):"$="===b&&e.substr(e.length-c.length)===c:!!c}}function i(a){var b;if(a)return a=/(?:not\((.+)\))|(.+)/i.exec(a),a[1]?(b=k(a[1],[]),function(a){return!l(a,b)}):(a=a[2],function(b,c,d){return"first"===a?0===c:"last"===a?c===d-1:"even"===a?c%2===0:"odd"===a?c%2===1:!!b[a]&&b[a]()})}function j(a,e,j){function k(a){a&&e.push(a)}var l;return l=d.exec(a.replace(f,"")),k(b(l[1])),k(c(l[2])),k(g(l[3])),k(h(l[4],l[5],l[6])),k(i(l[7])),e.pseudo=!!l[7],e.direct=j,e}function k(a,b){var c,d,f,g=[];do if(e.exec(""),d=e.exec(a),d&&(a=d[3],g.push(d[1]),d[2])){c=d[3];break}while(d);for(c&&k(c,b),a=[],f=0;f"!=g[f]&&a.push(j(g[f],[],">"===g[f-1]));return b.push(a),b}var l=this.match;this._selectors=k(a,[])},match:function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;for(b=b||this._selectors,c=0,d=b.length;c=0;e--)for(j=g[e];o;){if(j.pseudo)for(m=o.parent().items(),k=l=m.length;k--&&m[k]!==o;);for(h=0,i=j.length;h1&&(h=b(h))}return c||(c=g.Collection),new c(h)}});return g}),g("i",["c","24","2p"],function(a,b,c){"use strict";var d,e,f=Array.prototype.push,g=Array.prototype.slice;return e={length:0,init:function(a){a&&this.add(a)},add:function(b){var c=this;return a.isArray(b)?f.apply(c,b):b instanceof d?c.add(b.toArray()):f.call(c,b),c},set:function(a){var b,c=this,d=c.length;for(c.length=0,c.add(a),b=c.length;b0}function f(a,b){var c,g;if(a===b)return!0;if(null===a||null===b)return a===b;if("object"!=typeof a||"object"!=typeof b)return a===b;if(d.isArray(b)){if(a.length!==b.length)return!1;for(c=a.length;c--;)if(!f(a[c],b[c]))return!1}if(e(a)||e(b))return a===b;g={};for(c in b){if(!f(a[c],b[c]))return!1;g[c]=!0}for(c in a)if(!g[c]&&!f(a[c],b[c]))return!1;return!0}return b.extend({Mixins:[c],init:function(b){var c,d;b=b||{};for(c in b)d=b[c],d instanceof a&&(b[c]=d.create(this,c));this.data=b},set:function(b,c){var d,e,g=this.data[b];if(c instanceof a&&(c=c.create(this,b)),"object"==typeof b){for(d in b)this.set(d,b[d]);return this}return f(g,c)||(this.data[b]=c,e={target:this,name:b,value:c,oldValue:g},this.fire("change:"+b,e),this.fire("change",e)),this},get:function(a){return this.data[a]},has:function(a){return a in this.data},bind:function(b){return a.create(this,b)},destroy:function(){this.fire("destroy")}})}),g("1z",["12","2u"],function(a,b){var c,d={};return{add:function(e){var f=e.parent();if(f){if(!f._layout||f._layout.isNative())return;d[f._id]||(d[f._id]=f),c||(c=!0,b.requestAnimationFrame(function(){var a,b;c=!1;for(a in d)b=d[a],b.state.get("rendered")&&b.reflow();d={}},a.body))}},remove:function(a){d[a._id]&&delete d[a._id]}}}),g("o",["12","2o","2p","2q","c","2r","2s","i","2t","2n","1z"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";function l(a){return a._eventDispatcher||(a._eventDispatcher=new d({scope:a,toggleEvent:function(b,c){c&&d.isNative(b)&&(a._nativeEvents||(a._nativeEvents={}),a._nativeEvents[b]=!0,a.state.get("rendered")&&m(a))}})),a._eventDispatcher}function m(a){function c(b){var c=a.getParentCtrl(b.target);c&&c.fire(b.type,b)}function d(){var a=j._lastHoverCtrl;a&&(a.fire("mouseleave",{target:a.getEl()}),a.parents().each(function(a){a.fire("mouseleave",{target:a.getEl()})}),j._lastHoverCtrl=null)}function e(b){var c,d,e,f=a.getParentCtrl(b.target),g=j._lastHoverCtrl,h=0;if(f!==g){if(j._lastHoverCtrl=f,d=f.parents().toArray().reverse(),d.push(f),g){for(e=g.parents().toArray().reverse(),e.push(g),h=0;h=h;c--)g=e[c],g.fire("mouseleave",{target:g.getEl()})}for(c=h;ci.maxW?i.maxW:c,i.w=c,i.innerW=c-d),c=a.h,c!==f&&(c=ci.maxH?i.maxH:c,i.h=c,i.innerH=c-e),c=a.innerW,c!==f&&(c=ci.maxW-d?i.maxW-d:c,i.innerW=c,i.w=c+d),c=a.innerH,c!==f&&(c=ci.maxH-e?i.maxH-e:c,i.innerH=c,i.h=c+e),a.contentW!==f&&(i.contentW=a.contentW),a.contentH!==f&&(i.contentH=a.contentH),b=h._lastLayoutRect,b.x===i.x&&b.y===i.y&&b.w===i.w&&b.h===i.h||(g=n.repaintControls,g&&g.map&&!g.map[h._id]&&(g.push(h),g.map[h._id]=!0),b.x=i.x,b.y=i.y,b.w=i.w,b.h=i.h),h):i},repaint:function(){var b,c,d,e,f,g,h,i,j,k,l=this;j=a.createRange?function(a){return a}:Math.round,b=l.getEl().style,e=l._layoutRect,i=l._lastRepaintRect||{},f=l.borderBox,g=f.left+f.right,h=f.top+f.bottom,e.x!==i.x&&(b.left=j(e.x)+"px",i.x=e.x),e.y!==i.y&&(b.top=j(e.y)+"px",i.y=e.y),e.w!==i.w&&(k=j(e.w-g),b.width=(k>=0?k:0)+"px",i.w=e.w),e.h!==i.h&&(k=j(e.h-h),b.height=(k>=0?k:0)+"px",i.h=e.h),l._hasBody&&e.innerW!==i.innerW&&(k=j(e.innerW),d=l.getEl("body"),d&&(c=d.style,c.width=(k>=0?k:0)+"px"),i.innerW=e.innerW),l._hasBody&&e.innerH!==i.innerH&&(k=j(e.innerH),d=d||l.getEl("body"),d&&(c=c||d.style,c.height=(k>=0?k:0)+"px"),i.innerH=e.innerH),l._lastRepaintRect=i,l.fire("repaint",{},!1)},updateLayoutRect:function(){var a=this;a.parent()._lastRect=null,j.css(a.getEl(),{width:"",height:""}),a._layoutRect=a._lastRepaintRect=a._lastLayoutRect=null,a.initLayoutRect()},on:function(a,b){function c(a){var b,c;return"string"!=typeof a?a:function(e){return b||d.parentsAndSelf().each(function(d){var e=d.settings.callbacks;if(e&&(b=e[a]))return c=d,!1}),b?b.call(c,e):(e.action=a,void this.fire("execute",e))}}var d=this;return l(d).on(a,c(b)),d},off:function(a,b){return l(this).off(a,b),this},fire:function(a,b,c){var d=this;if(b=b||{},b.control||(b.control=d),b=l(d).fire(a,b),c!==!1&&d.parent)for(var e=d.parent();e&&!b.isPropagationStopped();)e.fire(a,b,!1),e=e.parent();return b},hasEventListeners:function(a){return l(this).has(a)},parents:function(a){var b,c=this,d=new h;for(b=c.parent();b;b=b.parent())d.add(b);return a&&(d=d.filter(a)),d},parentsAndSelf:function(a){return new h(this).add(this.parents(a))},next:function(){var a=this.parent().items();return a[a.indexOf(this)+1]},prev:function(){var a=this.parent().items();return a[a.indexOf(this)-1]},innerHtml:function(a){return this.$el.html(a),this},getEl:function(a){var c=a?this._id+"-"+a:this._id;return this._elmCache[c]||(this._elmCache[c]=b("#"+c)[0]),this._elmCache[c]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(a){}return this},blur:function(){return this.getEl().blur(),this},aria:function(a,b){var c=this,d=c.getEl(c.ariaTarget);return"undefined"==typeof b?c._aria[a]:(c._aria[a]=b,c.state.get("rendered")&&d.setAttribute("role"==a?a:"aria-"+a,b),c)},encode:function(a,b){return b!==!1&&(a=this.translate(a)),(a||"").replace(/[&<>"]/g,function(a){return"&#"+a.charCodeAt(0)+";"})},translate:function(a){return n.translate?n.translate(a):a},before:function(a){var b=this,c=b.parent();return c&&c.insert(a,c.items().indexOf(b),!0),b},after:function(a){var b=this,c=b.parent();return c&&c.insert(a,c.items().indexOf(b)),b},remove:function(){var a,c,d=this,e=d.getEl(),f=d.parent();if(d.items){var g=d.items().toArray();for(c=g.length;c--;)g[c].remove()}f&&f.items&&(a=[],f.items().each(function(b){b!==d&&a.push(b)}),f.items().set(a),f._lastRect=null),d._eventsRoot&&d._eventsRoot==d&&b(e).off();var h=d.getRoot().controlIdLookup;return h&&delete h[d._id],e&&e.parentNode&&e.parentNode.removeChild(e),d.state.set("rendered",!1),d.state.destroy(),d.fire("remove"),d},renderBefore:function(a){return b(a).before(this.renderHtml()),this.postRender(),this},renderTo:function(a){return b(a||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
    '},postRender:function(){var a,c,d,e,f,g=this,h=g.settings;g.$el=b(g.getEl()),g.state.set("rendered",!0);for(e in h)0===e.indexOf("on")&&g.on(e.substr(2),h[e]);if(g._eventsRoot){for(d=g.parent();!f&&d;d=d.parent())f=d._eventsRoot;if(f)for(e in f._nativeEvents)g._nativeEvents[e]=!0}m(g),h.style&&(a=g.getEl(),a&&(a.setAttribute("style",h.style),a.style.cssText=h.style)),g.settings.border&&(c=g.borderBox,g.$el.css({"border-top-width":c.top,"border-right-width":c.right,"border-bottom-width":c.bottom,"border-left-width":c.left}));var i=g.getRoot();i.controlIdLookup||(i.controlIdLookup={}),i.controlIdLookup[g._id]=g;for(var j in g._aria)g.aria(j,g._aria[j]);g.state.get("visible")===!1&&(g.getEl().style.display="none"),g.bindStates(),g.state.on("change:visible",function(a){var b,c=a.value;g.state.get("rendered")&&(g.getEl().style.display=c===!1?"none":"",g.getEl().getBoundingClientRect()),b=g.parent(),b&&(b._lastRect=null),g.fire(c?"show":"hide"),k.add(g)}),g.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(a){function b(a,b){var c,d,e=a;for(c=d=0;e&&e!=b&&e.nodeType;)c+=e.offsetLeft||0,d+=e.offsetTop||0,e=e.offsetParent;return{x:c,y:d}}var c,d,e,f,g,h,i=this.getEl(),j=i.parentNode,k=b(i,j);return c=k.x,d=k.y,e=i.offsetWidth,f=i.offsetHeight,g=j.clientWidth,h=j.clientHeight,"end"==a?(c-=g-e,d-=h-f):"center"==a&&(c-=g/2-e/2,d-=h/2-f/2),j.scrollLeft=c,j.scrollTop=d,this},getRoot:function(){for(var a,b=this,c=[];b;){if(b.rootControl){a=b.rootControl;break}c.push(b),a=b,b=b.parent()}a||(a=this);for(var d=c.length;d--;)c[d].rootControl=a;return a},reflow:function(){k.remove(this);var a=this.parent();return a&&a._layout&&!a._layout.isNative()&&a.reflow(),this}};return e.each("text title visible disabled active value".split(" "),function(a){s[a]=function(b){return 0===arguments.length?this.state.get(a):("undefined"!=typeof b&&this.state.set(a,b),this)}}),n=c.extend(s)}),g("1j",["12"],function(a){"use strict";var b=function(a){return!!a.getAttribute("data-mce-tabstop")};return function(c){function d(a){return a&&1===a.nodeType}function e(a){return a=a||v,d(a)?a.getAttribute("role"):null}function f(a){for(var b,c=a||v;c=c.parentNode;)if(b=e(c))return b}function g(a){var b=v;if(d(b))return b.getAttribute("aria-"+a)}function h(a){var b=a.tagName.toUpperCase();return"INPUT"==b||"TEXTAREA"==b||"SELECT"==b}function i(a){return!(!h(a)||a.hidden)||(!!b(a)||!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(e(a)))}function j(a){function b(a){if(1==a.nodeType&&"none"!=a.style.display&&!a.disabled){i(a)&&c.push(a);for(var d=0;d=b.length&&(a=0),b[a]&&b[a].focus(),a}function n(a,b){var c=-1,d=k();b=b||j(d.getEl());for(var e=0;e=0&&(c=b.getEl(),c&&c.parentNode.removeChild(c),c=a.getEl(),c&&c.parentNode.removeChild(c)),b.parent(this)},create:function(b){var c,e=this,g=[];return f.isArray(b)||(b=[b]),f.each(b,function(b){b&&(b instanceof a||("string"==typeof b&&(b={type:b}),c=f.extend({},e.settings.defaults,b),b.type=c.type=c.type||b.type||e.settings.defaultType||(c.defaults?c.defaults.type:null),b=d.create(c)),g.push(b))}),g},renderNew:function(){var a=this;return a.items().each(function(b,c){var d;b.parent(a),b.state.get("rendered")||(d=a.getEl("body"),d.hasChildNodes()&&c<=d.childNodes.length-1?g(d.childNodes[c]).before(b.renderHtml()):g(d).append(b.renderHtml()),b.postRender(),i.add(b))}),a._layout.applyClasses(a.items().filter(":visible")),a._lastRect=null,a},append:function(a){return this.add(a).renderNew()},prepend:function(a){var b=this;return b.items().set(b.create(a).concat(b.items().toArray())),b.renderNew()},insert:function(a,b,c){var d,e,f,g=this;return a=g.create(a),d=g.items(),!c&&b=0&&b
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "},postRender:function(){var a,b=this;return b.items().exec("postRender"),b._super(),b._layout.postRender(b),b.state.set("rendered",!0),b.settings.style&&b.$el.css(b.settings.style),b.settings.border&&(a=b.borderBox,b.$el.css({"border-top-width":a.top,"border-right-width":a.right,"border-bottom-width":a.bottom,"border-left-width":a.left})),b.parent()||(b.keyboardNav=new e({root:b})),b},initLayoutRect:function(){var a=this,b=a._super();return a._layout.recalc(a),b},recalc:function(){var a=this,b=a._layoutRect,c=a._lastRect;if(!c||c.w!=b.w||c.h!=b.h)return a._layout.recalc(a),b=a.layoutRect(),a._lastRect={x:b.x,y:b.y,w:b.w,h:b.h},!0},reflow:function(){var b;if(i.remove(this),this.visible()){for(a.repaintControls=[],a.repaintControls.map={},this.recalc(),b=a.repaintControls.length;b--;)a.repaintControls[b].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),a.repaintControls=[]}return this}})}),g("p",["12","1","2o"],function(a,b,c){"use strict";function d(a){var b,c,d,e,f,g,h,i,j=Math.max;return b=a.documentElement,c=a.body,d=j(b.scrollWidth,c.scrollWidth),e=j(b.clientWidth,c.clientWidth),f=j(b.offsetWidth,c.offsetWidth),g=j(b.scrollHeight,c.scrollHeight),h=j(b.clientHeight,c.clientHeight),i=j(b.offsetHeight,c.offsetHeight),{width:d").css({position:"absolute",top:0,left:0,width:q.width,height:q.height,zIndex:2147483647,opacity:1e-4,cursor:k}).appendTo(p.body),c(p).on("mousemove touchmove",m).on("mouseup touchend",l),g.start(a)},m=function(a){return e(a),a.button!==j?l(a):(a.deltaX=a.screenX-n,a.deltaY=a.screenY-o,a.preventDefault(),void g.drag(a))},l=function(a){e(a),c(p).off("mousemove touchmove",m).off("mouseup touchend",l),i.remove(),g.stop&&g.stop(a)},this.destroy=function(){c(h()).off()},c(h()).on("mousedown touchstart",k)}}),g("22",["2o","p"],function(a,b){"use strict";return{init:function(){var a=this;a.on("repaint",a.renderScroll)},renderScroll:function(){function c(){function b(b,g,h,i,j,k){var l,m,n,o,p,q,r,s,t;if(m=e.getEl("scroll"+b)){if(s=g.toLowerCase(),t=h.toLowerCase(),a(e.getEl("absend")).css(s,e.layoutRect()[i]-1),!j)return void a(m).css("display","none");a(m).css("display","block"),l=e.getEl("body"),n=e.getEl("scroll"+b+"t"),o=l["client"+h]-2*f,o-=c&&d?m["client"+k]:0,p=l["scroll"+h],q=o/p,r={},r[s]=l["offset"+g]+f,r[t]=o,a(m).css(r),r={},r[s]=l["scroll"+g]*q,r[t]=o*q,a(n).css(r)}}var c,d,g;g=e.getEl("body"),c=g.scrollWidth>g.clientWidth,d=g.scrollHeight>g.clientHeight,b("h","Left","Width","contentW",c,"Height"),b("v","Top","Height","contentH",d,"Width")}function d(){function c(c,d,g,h,i){var j,k=e._id+"-scroll"+c,l=e.classPrefix;a(e.getEl()).append('
    '),e.draghelper=new b(k+"t",{start:function(){j=e.getEl("body")["scroll"+d],a("#"+k).addClass(l+"active")},drag:function(a){var b,k,l,m,n=e.layoutRect();k=n.contentW>n.innerW,l=n.contentH>n.innerH,m=e.getEl("body")["client"+g]-2*f,m-=k&&l?e.getEl("scroll"+c)["client"+i]:0,b=m/e.getEl("body")["scroll"+g],e.getEl("body")["scroll"+d]=j+a["delta"+h]/b},stop:function(){a("#"+k).removeClass(l+"active")}})}e.classes.add("scroll"),c("v","Top","Height","Y","Width"),c("h","Left","Width","X","Height")}var e=this,f=2;e.settings.autoScroll&&(e._hasScroll||(e._hasScroll=!0,d(),e.on("wheel",function(a){var b=e.getEl("body");b.scrollLeft+=10*(a.deltaX||0),b.scrollTop+=10*a.deltaY,c()}),a(e.getEl("body")).on("scroll",c)),c())}}}),g("1u",["n","22"],function(a,b){"use strict";return a.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[b],renderHtml:function(){var a=this,b=a._layout,c=a.settings.html;return a.preRender(),b.preRender(a),"undefined"==typeof c?c='
    '+b.renderHtml(a)+"
    ":("function"==typeof c&&(c=c.call(a)),a._hasBody=!1),'
    '+(a._preBodyHtml||"")+c+"
    "}})}),g("20",["2n"],function(a){"use strict";return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(b,c){if(b<=1||c<=1){var d=a.getWindowSize();b=b<=1?b*d.w:b,c=c<=1?c*d.h:c}return this._layoutRect.autoResize=!1,this.layoutRect({minW:b,minH:c,w:b,h:c}).reflow()},resizeBy:function(a,b){var c=this,d=c.layoutRect();return c.resizeTo(d.w+a,d.h+b)}}}),g("w",["12","1","2o","2u","2n","1s","1u","20"],function(a,b,c,d,e,f,g,h){"use strict";function i(a,b){for(;a;){if(a==b)return!0;a=a.parent()}}function j(a){for(var b=u.length;b--;){var c=u[b],d=c.getParentCtrl(a.target);if(c.settings.autohide){if(d&&(i(d,c)||c.parent()===d))continue;a=c.fire("autohide",{target:a.target}),a.isDefaultPrevented()||c.hide()}}}function k(){q||(q=function(a){2!=a.button&&j(a)},c(a).on("click touchstart",q))}function l(){r||(r=function(){var a;for(a=u.length;a--;)n(u[a])},c(b).on("scroll",r))}function m(){if(!s){var d=a.documentElement,e=d.clientWidth,f=d.clientHeight;s=function(){a.all&&e==d.clientWidth&&f==d.clientHeight||(e=d.clientWidth,f=d.clientHeight,w.hideAll())},c(b).on("resize",s)}}function n(a){function b(b,c){for(var d,e=0;ec&&(a.fixed(!1).layoutRect({y:a._autoFixY}).repaint(),b(!1,a._autoFixY-c)):(a._autoFixY=a.layoutRect().y,a._autoFixY').appendTo(b.getContainerElm())),d.setTimeout(function(){e.addClass(f+"in"),c(b.getEl()).addClass(f+"in")}),t=!0),o(!0,b)}}),b.on("show",function(){b.parents().each(function(a){if(a.state.get("fixed"))return b.fixed(!0),!1})}),a.popover&&(b._preBodyHtml='
    ',b.classes.add("popover").add("bottom").add(b.isRtl()?"end":"start")),b.aria("label",a.ariaLabel),b.aria("labelledby",b._id),b.aria("describedby",b.describedBy||b._id+"-none")},fixed:function(a){var b=this;if(b.state.get("fixed")!=a){if(b.state.get("rendered")){var c=e.getViewPort();a?b.layoutRect().y-=c.y:b.layoutRect().y+=c.y}b.classes.toggle("fixed",a),b.state.set("fixed",a)}return b},show:function(){var a,b=this,c=b._super();for(a=u.length;a--&&u[a]!==b;);return a===-1&&u.push(b),c},hide:function(){return p(this),o(!1,this),this._super()},hideAll:function(){w.hideAll()},close:function(){var a=this;return a.fire("close").isDefaultPrevented()||(a.remove(),o(!1,a)),a},remove:function(){p(this),this._super()},postRender:function(){var a=this;return a.settings.bodyRole&&this.getEl("body").setAttribute("role",a.settings.bodyRole),a._super()}});return w.hideAll=function(){for(var a=u.length;a--;){var b=u[a];b&&b.settings.autohide&&(b.hide(),u.splice(a,1))}},w}),g("2h",["12","14","2j","b","2k","2f","39","3a","3b","3d","3e","w"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(a){return!(!a||b.container)},n=function(a,b,n){var o,p,q=c.DOM,r=f.getFixedToolbarContainer(a);r&&(p=q.select(r)[0]);var s=function(){if(o&&o.moveRel&&o.visible()&&!o._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=q.getPos(c),g=q.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}o.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}},t=function(){o&&(o.show(),s(),q.addClass(a.getBody(),"mce-edit-focus"))},u=function(){o&&(o.hide(),l.hideAll(),q.removeClass(a.getBody(),"mce-edit-focus"))},v=function(){return o?void(o.visible()||t()):(o=b.panel=d.create({type:p?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:m(p),fixed:m(p),border:1,items:[f.hasMenubar(a)===!1?null:{type:"menubar",border:"0 0 1 0",items:i.createMenuButtons(a)},k.createToolbars(a,f.getToolbarSize(a))]}),e.fireBeforeRenderUI(a),p?o.renderTo(p).reflow():o.renderTo().reflow(),g.addKeys(a,o),t(),h.addContextualToolbars(a),a.on("nodeChange",s),a.on("activate",t),a.on("deactivate",u),void a.nodeChanged())};return a.settings.content_editable=!0,a.on("focus",function(){f.isSkinDisabled(a)===!1&&n.skinUiCss?q.styleSheetLoader.load(n.skinUiCss,v,v):v()}),a.on("blur hide",u),a.on("remove",function(){o&&(o.remove(),o=null)}),f.isSkinDisabled(a)===!1&&n.skinUiCss?q.styleSheetLoader.load(n.skinUiCss,j.fireSkinLoaded(a)):j.fireSkinLoaded(a)(),{}};return{render:n}}),g("2b",["2o","o","2u"],function(a,b,c){"use strict";return function(d,e){var f,g,h=this,i=b.classPrefix;h.show=function(b,j){function k(){f&&(a(d).append('
    '),j&&j())}return h.hide(),f=!0,b?g=c.setTimeout(k,b):k(),h},h.hide=function(){var a=d.lastChild;return c.clearTimeout(g),a&&a.className.indexOf("throbber")!=-1&&a.parentNode.removeChild(a),f=!1,h}}}),g("2i",["2b"],function(a){var b=function(b,c){var d;b.on("ProgressState",function(b){d=d||new a(c.panel.getEl("body")),b.state?d.show(b.time):d.hide()})};return{setup:b}}),g("7",["2f","2g","2h","2i"],function(a,b,c,d){var e=function(e,f,g){var h=a.getSkinUrl(e);return h&&(g.skinUiCss=h+"/skin.min.css",e.contentCSS.push(h+"/content"+(e.inline?".inline":"")+".min.css")),d.setup(e,f),a.isInline(e)?c.render(e,f,g):b.render(e,f,g)};return{renderUI:e}}),h("2m",setTimeout),g("2d",["o","1s"],function(a,b){return a.extend({Mixins:[b],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var a=this,b=a.classPrefix;return'"},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.getEl().lastChild.innerHTML=a.encode(b.value)}),a._super()},repaint:function(){var a,b,c=this;a=c.getEl().style,b=c._layoutRect,a.left=b.x+"px",a.top=b.y+"px",a.zIndex=131070}})}),g("15",["o","2d"],function(a,b){"use strict";var c,d=a.extend({init:function(a){var b=this;b._super(a),a=b.settings,b.canFocus=!0,a.tooltip&&d.tooltips!==!1&&(b.on("mouseenter",function(c){var d=b.tooltip().moveTo(-65535);if(c.control==b){var e=d.text(a.tooltip).show().testMoveRel(b.getEl(),["bc-tc","bc-tl","bc-tr"]);d.classes.toggle("tooltip-n","bc-tc"==e),d.classes.toggle("tooltip-nw","bc-tl"==e),d.classes.toggle("tooltip-ne","bc-tr"==e),d.moveRel(b.getEl(),e)}else d.hide()}),b.on("mouseleave mousedown click",function(){b.tooltip().hide()})),b.aria("label",a.ariaLabel||a.tooltip)},tooltip:function(){return c||(c=new b({type:"tooltip"}),c.renderTo()),c},postRender:function(){var a=this,b=a.settings;a._super(),a.parent()||!b.width&&!b.height||(a.initLayoutRect(),a.repaint()),b.autofocus&&a.focus()},bindStates:function(){function a(a){c.aria("disabled",a),c.classes.toggle("disabled",a)}function b(a){c.aria("pressed",a),c.classes.toggle("active",a)}var c=this;return c.state.on("change:disabled",function(b){a(b.value)}),c.state.on("change:active",function(a){b(a.value)}),c.state.get("disabled")&&a(!0),c.state.get("active")&&b(!0),c._super()},remove:function(){this._super(),c&&(c.remove(),c=null)}});return d}),g("1x",["15"],function(a){"use strict";return a.extend({Defaults:{value:0},init:function(a){var b=this;b._super(a),b.classes.add("progress"),b.settings.filter||(b.settings.filter=function(a){return Math.round(a)})},renderHtml:function(){var a=this,b=a._id,c=this.classPrefix;return'
    0%
    '},postRender:function(){var a=this;return a._super(),a.value(a.settings.value),a},bindStates:function(){function a(a){a=b.settings.filter(a),b.getEl().lastChild.innerHTML=a+"%",b.getEl().firstChild.firstChild.style.width=a+"%"}var b=this;return b.state.on("change:value",function(b){a(b.value)}),a(b.state.get("value")),b._super()}})}),g("1t",["o","1s","1x","2u"],function(a,b,c,d){var e=function(a,b){a.getEl().lastChild.textContent=b+(a.progressBar?" "+a.progressBar.value()+"%":"")};return a.extend({Mixins:[b],Defaults:{classes:"widget notification"},init:function(a){var b=this;b._super(a),b.maxWidth=a.maxWidth,a.text&&b.text(a.text),a.icon&&(b.icon=a.icon),a.color&&(b.color=a.color),a.type&&b.classes.add("notification-"+a.type),a.timeout&&(a.timeout<0||a.timeout>0)&&!a.closeButton?b.closeButton=!1:(b.classes.add("has-close"),b.closeButton=!0),a.progressBar&&(b.progressBar=new c),b.on("click",function(a){a.target.className.indexOf(b.classPrefix+"close")!=-1&&b.close()})},renderHtml:function(){var a=this,b=a.classPrefix,c="",d="",e="",f="";return a.icon&&(c=''),f=' style="max-width: '+a.maxWidth+"px;"+(a.color?"background-color: "+a.color+';"':'"'),a.closeButton&&(d=''),a.progressBar&&(e=a.progressBar.renderHtml()),''},postRender:function(){var a=this;return d.setTimeout(function(){a.$el.addClass(a.classPrefix+"in"),e(a,a.state.get("text"))},100),a._super()},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.getEl().firstChild.innerHTML=b.value,e(a,b.value)}),a.progressBar&&(a.progressBar.bindStates(),a.progressBar.state.on("change:value",function(b){e(a,a.state.get("text"))})),a._super()},close:function(){var a=this;return a.fire("close").isDefaultPrevented()||a.remove(),a},repaint:function(){var a,b,c=this;a=c.getEl().style,b=c._layoutRect,a.left=b.x+"px",a.top=b.y+"px",a.zIndex=65534}})}),g("9",["2l","2m","c","2n","1t"],function(a,b,c,d,e){return function(f){var g=function(a){return a.inline?a.getElement():a.getContentAreaContainer()},h=function(){var a=g(f);return d.getSize(a).width},i=function(b){a.each(b,function(a){a.moveTo(0,0)})},j=function(b){if(b.length>0){var c=b.slice(0,1)[0],d=g(f);c.moveRel(d,"tc-tc"),a.each(b,function(a,c){c>0&&a.moveRel(b[c-1].getEl(),"bc-tc")})}},k=function(a){i(a),j(a)},l=function(a,d){var f=c.extend(a,{maxWidth:h()}),g=new e(f);return g.args=f,f.timeout>0&&(g.timer=b(function(){g.close(),d()},f.timeout)),g.on("close",function(){d()}),g.renderTo(),g},m=function(a){a.close()},n=function(a){return a.args};return{open:l,close:m,reposition:k,getArgs:n}}}),g("2e",["12","2m","1","2o","14","2u","2r","2n","p","w","1u"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";function l(b){var c,f="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",g=d("meta[name=viewport]")[0];e.overrideViewPort!==!1&&(g||(g=a.createElement("meta"),g.setAttribute("name","viewport"),a.getElementsByTagName("head")[0].appendChild(g)),c=g.getAttribute("content"),c&&"undefined"!=typeof q&&(q=c),g.setAttribute("content",b?f:q))}function m(b,c){n()&&c===!1&&d([a.documentElement,a.body]).removeClass(b+"fullscreen")}function n(){for(var a=0;aa.w&&(c=a.x-Math.max(0,b/2),e.layoutRect({w:b,x:c}),d=!0)),f&&(f.layoutRect({w:e.layoutRect().innerW}).recalc(),b=f.layoutRect().minW+a.deltaW,b>a.w&&(c=a.x-Math.max(0,b-a.w),e.layoutRect({w:b,x:c}),d=!0)),d&&e.recalc()},initLayoutRect:function(){var a,b=this,c=b._super(),d=0;if(b.settings.title&&!b._fullscreen){a=b.getEl("head");var e=h.getSize(a);c.headerW=e.width,c.headerH=e.height,d+=c.headerH}b.statusbar&&(d+=b.statusbar.layoutRect().h),c.deltaH+=d,c.minH+=d,c.h+=d;var f=h.getWindowSize();return c.x=b.settings.x||Math.max(0,f.w/2-c.w/2),c.y=b.settings.y||Math.max(0,f.h/2-c.h/2),c},renderHtml:function(){var a=this,b=a._layout,c=a._id,d=a.classPrefix,e=a.settings,f="",g="",h=e.html;return a.preRender(),b.preRender(a),e.title&&(f='
    '+a.encode(e.title)+'
    '),e.url&&(h=''),"undefined"==typeof h&&(h=b.renderHtml(a)),a.statusbar&&(g=a.statusbar.renderHtml()),'
    '+f+'
    '+h+"
    "+g+"
    "},fullscreen:function(b){var e,i,j=this,k=a.documentElement,l=j.classPrefix;if(b!=j._fullscreen)if(d(c).on("resize",function(){var a;if(j._fullscreen)if(e)j._timer||(j._timer=f.setTimeout(function(){var a=h.getWindowSize();j.moveTo(0,0).resizeTo(a.w,a.h),j._timer=0},50));else{a=(new Date).getTime();var b=h.getWindowSize();j.moveTo(0,0).resizeTo(b.w,b.h),(new Date).getTime()-a>50&&(e=!0)}}), +i=j.layoutRect(),j._fullscreen=b,b){j._initial={x:i.x,y:i.y,w:i.w,h:i.h},j.borderBox=g.parseBox("0"),j.getEl("head").style.display="none",i.deltaH-=i.headerH+2,d([k,a.body]).addClass(l+"fullscreen"),j.classes.add("fullscreen");var m=h.getWindowSize();j.moveTo(0,0).resizeTo(m.w,m.h)}else j.borderBox=g.parseBox(j.settings.border),j.getEl("head").style.display="",i.deltaH+=i.headerH,d([k,a.body]).removeClass(l+"fullscreen"),j.classes.remove("fullscreen"),j.moveTo(j._initial.x,j._initial.y).resizeTo(j._initial.w,j._initial.h);return j.reflow()},postRender:function(){var a,c=this;b(function(){c.classes.add("in"),c.fire("open")},0),c._super(),c.statusbar&&c.statusbar.postRender(),c.focus(),this.dragHelper=new i(c._id+"-dragh",{start:function(){a={x:c.layoutRect().x,y:c.layoutRect().y}},drag:function(b){c.moveTo(a.x+b.deltaX,a.y+b.deltaY)}}),c.on("submit",function(a){a.isDefaultPrevented()||c.close()}),p.push(c),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var a,b=this;for(b.dragHelper.destroy(),b._super(),b.statusbar&&this.statusbar.remove(),m(b.classPrefix,!1),a=p.length;a--;)p[a]===b&&p.splice(a,1);l(p.length>0)},getContentWindow:function(){var a=this.getEl().getElementsByTagName("iframe")[0];return a?a.contentWindow:null}});return o(),r}),g("1r",["12","2e"],function(a,b){"use strict";var c=b.extend({init:function(a){a={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(a)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(d){function e(a,b,c){return{type:"button",text:a,subtype:c?"primary":"",onClick:function(a){a.control.parents()[1].close(),g(b)}}}var f,g=d.callback||function(){};switch(d.buttons){case c.OK_CANCEL:f=[e("Ok",!0,!0),e("Cancel",!1)];break;case c.YES_NO:case c.YES_NO_CANCEL:f=[e("Yes",1,!0),e("No",0)],d.buttons==c.YES_NO_CANCEL&&f.push(e("Cancel",-1));break;default:f=[e("Ok",!0,!0)]}return new b({padding:20,x:d.x,y:d.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:f,title:d.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:d.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:d.onClose,onCancel:function(){g(!1)}}).renderTo(a.body).reflow()},alert:function(a,b){return"string"==typeof a&&(a={text:a}),a.callback=b,c.msgBox(a)},confirm:function(a,b){return"string"==typeof a&&(a={text:a}),a.callback=b,a.buttons=c.OK_CANCEL,c.msgBox(a)}}});return c}),g("a",["2e","1r"],function(a,b){return function(c){var d=function(b,c,d){var e;return b.title=b.title||" ",b.url=b.url||b.file,b.url&&(b.width=parseInt(b.width||320,10),b.height=parseInt(b.height||240,10)),b.body&&(b.items={defaults:b.defaults,type:b.bodyType||"form",items:b.body,data:b.data,callbacks:b.commands}),b.url||b.buttons||(b.buttons=[{text:"Ok",subtype:"primary",onclick:function(){e.find("form")[0].submit()}},{text:"Cancel",onclick:function(){e.close()}}]),e=new a(b),e.on("close",function(){d(e)}),b.data&&e.on("postRender",function(){this.find("*").each(function(a){var c=a.name();c in b.data&&a.value(b.data[c])})}),e.features=b||{},e.params=c||{},e=e.renderTo().reflow()},e=function(a,c,d){var e;return e=b.alert(a,function(){c()}),e.on("close",function(){d(e)}),e},f=function(a,c,d){var e;return e=b.confirm(a,function(a){c(a)}),e.on("close",function(){d(e)}),e},g=function(a){a.close()},h=function(a){return a.params},i=function(a,b){a.params=b};return{open:d,alert:e,confirm:f,close:g,getParams:h,setParams:i}}}),g("3",["7","8","9","a"],function(a,b,c,d){var e=function(e){var f=function(b){return a.renderUI(e,this,b)},g=function(a,c){return b.resizeTo(e,a,c)},h=function(a,c){return b.resizeBy(e,a,c)},i=function(){return c(e)},j=function(){return d(e)};return{renderUI:f,resizeTo:g,resizeBy:h,getNotificationManagerImpl:i,getWindowManagerImpl:j}};return{get:e}}),g("1l",["2p","c"],function(a,b){"use strict";return a.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(a){this.settings=b.extend({},this.Defaults,a)},preRender:function(a){a.bodyClasses.add(this.settings.containerClass)},applyClasses:function(a){var b,c,d,e,f=this,g=f.settings;b=g.firstControlClass,c=g.lastControlClass,a.each(function(a){a.classes.remove(b).remove(c).add(g.controlClass),a.visible()&&(d||(d=a),e=a)}),d&&d.classes.add(b),e&&e.classes.add(c)},renderHtml:function(a){var b=this,c="";return b.applyClasses(a.items()),a.items().each(function(a){c+=a.renderHtml()}),c},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),g("d",["1l"],function(a){"use strict";return a.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(a){a.items().filter(":visible").each(function(a){var b=a.settings;a.layoutRect({x:b.x,y:b.y,w:b.w,h:b.h}),a.recalc&&a.recalc()})},renderHtml:function(a){return'
    '+this._super(a)}})}),g("f",["12","1","15"],function(a,b,c){"use strict";return c.extend({Defaults:{classes:"widget btn",role:"button"},init:function(a){var b,c=this;c._super(a),a=c.settings,b=c.settings.size,c.on("click mousedown",function(a){a.preventDefault()}),c.on("touchstart",function(a){c.fire("click",a),a.preventDefault()}),a.subtype&&c.classes.add(a.subtype),b&&c.classes.add("btn-"+b),a.icon&&c.icon(a.icon)},icon:function(a){return arguments.length?(this.state.set("icon",a),this):this.state.get("icon")},repaint:function(){var a,b=this.getEl().firstChild;b&&(a=b.style,a.width=a.height="100%"),this._super()},renderHtml:function(){var a,c,d=this,e=d._id,f=d.classPrefix,g=d.state.get("icon"),h=d.state.get("text"),i="",j=d.settings;return a=j.image,a?(g="none","string"!=typeof a&&(a=b.getSelection?a[0]:a[1]),a=" style=\"background-image: url('"+a+"')\""):a="",h&&(d.classes.add("btn-has-text"),i=''+d.encode(h)+""),g=g?f+"ico "+f+"i-"+g:"",c="boolean"==typeof j.active?' aria-pressed="'+j.active+'"':"",'
    "},bindStates:function(){function b(a){var b=d("span."+e,c.getEl());a?(b[0]||(d("button:first",c.getEl()).append(''),b=d("span."+e,c.getEl())),b.html(c.encode(a))):b.remove(),c.classes.toggle("btn-has-text",!!a)}var c=this,d=c.$,e=c.classPrefix+"txt";return c.state.on("change:text",function(a){b(a.value)}),c.state.on("change:icon",function(d){var e=d.value,f=c.classPrefix;c.settings.icon=e,e=e?f+"ico "+f+"i-"+c.settings.icon:"";var g=c.getEl().firstChild,h=g.getElementsByTagName("i")[0];e?(h&&h==g.firstChild||(h=a.createElement("i"),g.insertBefore(h,g.firstChild)),h.className=e):h&&g.removeChild(h),b(c.state.get("text"))}),c._super()}})}),h("2v",RegExp),g("e",["f","c","2n","2o","2v"],function(a,b,c,d,e){return a.extend({init:function(a){var c=this;a=b.extend({text:"Browse...",multiple:!1,accept:null},a),c._super(a),c.classes.add("browsebutton"),a.multiple&&c.classes.add("multiple")},postRender:function(){var a=this,b=c.create("input",{type:"file",id:a._id+"-browse",accept:a.settings.accept});a._super(),d(b).on("change",function(b){var c=b.target.files;a.value=function(){return c.length?a.settings.multiple?c:c[0]:null},b.preventDefault(),c.length&&a.fire("change",b)}),d(b).on("click",function(a){a.stopPropagation()}),d(a.getEl("button")).on("click",function(a){a.stopPropagation(),b.click()}),a.getEl().appendChild(b)},remove:function(){d(this.getEl("button")).off(),d(this.getEl("input")).off(),this._super()}})}),g("g",["n"],function(a){"use strict";return a.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var a=this,b=a._layout;return a.classes.add("btn-group"),a.preRender(),b.preRender(a),'
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "}})}),g("h",["12","15"],function(a,b){"use strict";return b.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(a){var b=this;b._super(a),b.on("click mousedown",function(a){a.preventDefault()}),b.on("click",function(a){a.preventDefault(),b.disabled()||b.checked(!b.checked())}),b.checked(b.settings.checked)},checked:function(a){return arguments.length?(this.state.set("checked",a),this):this.state.get("checked")},value:function(a){return arguments.length?this.checked(a):this.checked()},renderHtml:function(){var a=this,b=a._id,c=a.classPrefix;return'
    '+a.encode(a.state.get("text"))+"
    "},bindStates:function(){function b(a){c.classes.toggle("checked",a),c.aria("checked",a)}var c=this;return c.state.on("change:text",function(a){c.getEl("al").firstChild.data=c.translate(a.value)}),c.state.on("change:checked change:value",function(a){c.fire("change"),b(a.value)}),c.state.on("change:icon",function(b){var d=b.value,e=c.classPrefix;if("undefined"==typeof d)return c.settings.icon;c.settings.icon=d,d=d?e+"ico "+e+"i-"+c.settings.icon:"";var f=c.getEl().firstChild,g=f.getElementsByTagName("i")[0];d?(g&&g==f.firstChild||(g=a.createElement("i"),f.insertBefore(g,f.firstChild)),g.className=d):g&&f.removeChild(g)}),c.state.get("checked")&&b(!0),c._super()}})}),g("2w",["6"],function(a){return a("tinymce.util.VK")}),g("m",["12","2o","b","c","2w","2n","15"],function(a,b,c,d,e,f,g){"use strict";return g.extend({init:function(a){var c=this;c._super(a),a=c.settings,c.classes.add("combobox"),c.subinput=!0,c.ariaTarget="inp",a.menu=a.menu||a.values,a.menu&&(a.icon="caret"),c.on("click",function(d){var e=d.target,f=c.getEl();if(b.contains(f,e)||e==f)for(;e&&e!=f;)e.id&&e.id.indexOf("-open")!=-1&&(c.fire("action"),a.menu&&(c.showMenu(),d.aria&&c.menu.items()[0].focus())),e=e.parentNode}),c.on("keydown",function(a){var b;13==a.keyCode&&"INPUT"===a.target.nodeName&&(a.preventDefault(),c.parents().reverse().each(function(a){if(a.toJSON)return b=a,!1}),c.fire("submit",{data:b.toJSON()}))}),c.on("keyup",function(a){if("INPUT"==a.target.nodeName){var b=c.state.get("value"),d=a.target.value;d!==b&&(c.state.set("value",d),c.fire("autocomplete",a))}}),c.on("mouseover",function(a){var b=c.tooltip().moveTo(-65535);if(c.statusLevel()&&a.target.className.indexOf(c.classPrefix+"status")!==-1){var d=c.statusMessage()||"Ok",e=b.text(d).show().testMoveRel(a.target,["bc-tc","bc-tl","bc-tr"]);b.classes.toggle("tooltip-n","bc-tc"==e),b.classes.toggle("tooltip-nw","bc-tl"==e),b.classes.toggle("tooltip-ne","bc-tr"==e),b.moveRel(a.target,e)}})},statusLevel:function(a){return arguments.length>0&&this.state.set("statusLevel",a),this.state.get("statusLevel")},statusMessage:function(a){return arguments.length>0&&this.state.set("statusMessage",a),this.state.get("statusMessage")},showMenu:function(){var a,b=this,d=b.settings;b.menu||(a=d.menu||[],a.length?a={type:"menu",items:a}:a.type=a.type||"menu",b.menu=c.create(a).parent(b).renderTo(b.getContainerElm()),b.fire("createmenu"),b.menu.reflow(),b.menu.on("cancel",function(a){a.control===b.menu&&b.focus()}),b.menu.on("show hide",function(a){a.control.items().each(function(a){a.active(a.value()==b.value())})}).fire("show"),b.menu.on("select",function(a){b.value(a.control.value())}),b.on("focusin",function(a){"INPUT"==a.target.tagName.toUpperCase()&&b.menu.hide()}),b.aria("expanded",!0)),b.menu.show(),b.menu.layoutRect({w:b.layoutRect().w}),b.menu.moveRel(b.getEl(),b.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var c,d,e=this,g=e.getEl(),h=e.getEl("open"),i=e.layoutRect(),j=0,k=g.firstChild;e.statusLevel()&&"none"!==e.statusLevel()&&(j=parseInt(f.getRuntimeStyle(k,"padding-right"),10)-parseInt(f.getRuntimeStyle(k,"padding-left"),10)),c=h?i.w-f.getSize(h).width-10:i.w-10;var l=a;return l.all&&(!l.documentMode||l.documentMode<=8)&&(d=e.layoutRect().h-2+"px"),b(k).css({width:c-j,lineHeight:d}),e._super(),e},postRender:function(){var a=this;return b(this.getEl("inp")).on("change",function(b){a.state.set("value",b.target.value),a.fire("change",b)}),a._super()},renderHtml:function(){var a,b,c=this,d=c._id,e=c.settings,f=c.classPrefix,g=c.state.get("value")||"",h="",i="",j="";return"spellcheck"in e&&(i+=' spellcheck="'+e.spellcheck+'"'),e.maxLength&&(i+=' maxlength="'+e.maxLength+'"'),e.size&&(i+=' size="'+e.size+'"'),e.subtype&&(i+=' type="'+e.subtype+'"'),j='',c.disabled()&&(i+=' disabled="disabled"'),a=e.icon,a&&"caret"!=a&&(a=f+"ico "+f+"i-"+e.icon),b=c.state.get("text"),(a||b)&&(h='
    ",c.classes.add("has-open")),'
    '+j+h+"
    "},value:function(a){return arguments.length?(this.state.set("value",a),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(a,b){var e=this;if(0===a.length)return void e.hideMenu();var f=function(a,b){return function(){e.fire("selectitem",{title:b,value:a})}};e.menu?e.menu.items().remove():e.menu=c.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(e).renderTo(),d.each(a,function(a){e.menu.add({text:a.title,url:a.previewUrl,match:b,classes:"menu-item-ellipsis",onclick:f(a.value,a.title)})}),e.menu.renderNew(),e.hideMenu(),e.menu.on("cancel",function(a){a.control.parent()===e.menu&&(a.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()});var g=e.layoutRect().w;e.menu.layoutRect({w:g,minW:0,maxW:g}),e.menu.reflow(),e.menu.show(),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var a=this;a.state.on("change:value",function(b){a.getEl("inp").value!=b.value&&(a.getEl("inp").value=b.value)}),a.state.on("change:disabled",function(b){a.getEl("inp").disabled=b.value}),a.state.on("change:statusLevel",function(b){var c=a.getEl("status"),d=a.classPrefix,e=b.value;f.css(c,"display","none"===e?"none":""),f.toggleClass(c,d+"i-checkmark","ok"===e),f.toggleClass(c,d+"i-warning","warn"===e),f.toggleClass(c,d+"i-error","error"===e),a.classes.toggle("has-status","none"!==e),a.repaint()}),f.on(a.getEl("status"),"mouseleave",function(){a.tooltip().hide()}),a.on("cancel",function(b){a.menu&&a.menu.visible()&&(b.stopPropagation(),a.hideMenu())});var b=function(a,b){b&&b.items().length>0&&b.items().eq(a)[0].focus()};return a.on("keydown",function(c){var d=c.keyCode;"INPUT"===c.target.nodeName&&(d===e.DOWN?(c.preventDefault(),a.fire("autocomplete"),b(0,a.menu)):d===e.UP&&(c.preventDefault(),b(-1,a.menu)))}),a._super()},remove:function(){b(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}})}),g("j",["m"],function(a){"use strict";return a.extend({init:function(a){var b=this;a.spellcheck=!1,a.onaction&&(a.icon="none"),b._super(a),b.classes.add("colorbox"),b.on("change keyup postrender",function(){b.repaintColor(b.value())})},repaintColor:function(a){var b=this.getEl("open"),c=b?b.getElementsByTagName("i")[0]:null;if(c)try{c.style.background=a}catch(a){}},bindStates:function(){var a=this;return a.state.on("change:value",function(b){a.state.get("rendered")&&a.repaintColor(b.value)}),a._super()}})}),g("1v",["f","w"],function(a,b){"use strict";return a.extend({showPanel:function(){var a=this,c=a.settings;if(a.classes.add("opened"),a.panel)a.panel.show();else{var d=c.panel;d.type&&(d={layout:"grid",items:d}),d.role=d.role||"dialog",d.popover=!0,d.autohide=!0,d.ariaRoot=!0,a.panel=new b(d).on("hide",function(){a.classes.remove("opened")}).on("cancel",function(b){b.stopPropagation(),a.focus(),a.hidePanel()}).parent(a).renderTo(a.getContainerElm()),a.panel.fire("show"),a.panel.reflow()}var e=a.panel.testMoveRel(a.getEl(),c.popoverAlign||(a.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl"]));a.panel.classes.toggle("start","bc-tl"===e),a.panel.classes.toggle("end","bc-tr"===e),a.panel.moveRel(a.getEl(),e)},hidePanel:function(){var a=this;a.panel&&a.panel.hide()},postRender:function(){var a=this;return a.aria("haspopup",!0),a.on("click",function(b){b.control===a&&(a.panel&&a.panel.visible()?a.hidePanel():(a.showPanel(),a.panel.focus(!!b.aria)))}),a._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),g("k",["1v","2j"],function(a,b){"use strict";var c=b.DOM;return a.extend({init:function(a){this._super(a),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(a){return a?(this._color=a,this.getEl("preview").style.backgroundColor=a,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var a=this,b=a._id,c=a.classPrefix,d=a.state.get("text"),e=a.settings.icon?c+"ico "+c+"i-"+a.settings.icon:"",f=a.settings.image?" style=\"background-image: url('"+a.settings.image+"')\"":"",g="";return d&&(a.classes.add("btn-has-text"),g=''+a.encode(d)+""),'
    '},postRender:function(){var a=this,b=a.settings.onclick;return a.on("click",function(d){d.aria&&"down"===d.aria.key||d.control!=a||c.getParent(d.target,"."+a.classPrefix+"open")||(d.stopImmediatePropagation(),b.call(a,d))}),delete a.settings.onclick,a._super()}})}),g("2x",["6"],function(a){return a("tinymce.util.Color")}),g("l",["15","p","2n","2x"],function(a,b,c,d){"use strict";return a.extend({Defaults:{classes:"widget colorpicker"},init:function(a){this._super(a)},postRender:function(){function a(a,b){var d,e,f=c.getPos(a);return d=b.pageX-f.x,e=b.pageY-f.y,d=Math.max(0,Math.min(d/a.clientWidth,1)),e=Math.max(0,Math.min(e/a.clientHeight,1)),{x:d,y:e}}function e(a,b){var e=(360-a.h)/360;c.css(j,{top:100*e+"%"}),b||c.css(l,{left:a.s+"%",top:100-a.v+"%"}),k.style.background=new d({s:100,v:100,h:a.h}).toHex(),m.color().parse({s:a.s,v:a.v,h:a.h})}function f(b){var c;c=a(k,b),h.s=100*c.x,h.v=100*(1-c.y),e(h),m.fire("change")}function g(b){var c;c=a(i,b),h=n.toHsv(),h.h=360*(1-c.y),e(h,!0),m.fire("change")}var h,i,j,k,l,m=this,n=m.color();i=m.getEl("h"),j=m.getEl("hp"),k=m.getEl("sv"),l=m.getEl("svp"),m._repaint=function(){h=n.toHsv(),e(h)},m._super(),m._svdraghelper=new b(m._id+"-sv",{start:f,drag:f}),m._hdraghelper=new b(m._id+"-h",{start:g,drag:g}),m._repaint()},rgb:function(){return this.color().toRgb()},value:function(a){var b=this;return arguments.length?(b.color().parse(a),void(b._rendered&&b._repaint())):b.color().toHex()},color:function(){return this._color||(this._color=new d),this._color},renderHtml:function(){function a(){var a,b,c,d,g="";for(c="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",d=f.split(","),a=0,b=d.length-1;a';return g}var b,c=this,d=c._id,e=c.classPrefix,f="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",g="background: -ms-linear-gradient(top,"+f+");background: linear-gradient(to bottom,"+f+");";return b='
    '+a()+'
    ','
    '+b+"
    "}})}),g("q",["15","c","2n","2v"],function(a,b,c,d){return a.extend({init:function(a){var c=this;a=b.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},a),c._super(a),c.classes.add("dropzone"),a.multiple&&c.classes.add("multiple")},renderHtml:function(){var a,b,d=this,e=d.settings;return a={id:d._id,hidefocus:"1"},b=c.create("div",a,""+this.translate(e.text)+""),e.height&&c.css(b,"height",e.height+"px"),e.width&&c.css(b,"width",e.width+"px"),b.className=d.classes,b.outerHTML},postRender:function(){var a=this,c=function(b){b.preventDefault(),a.classes.toggle("dragenter"),a.getEl().className=a.classes},e=function(c){var e=a.settings.accept;if("string"!=typeof e)return c;var f=new d("("+e.split(/\s*,\s*/).join("|")+")$","i");return b.grep(c,function(a){return f.test(a.name)})};a._super(),a.$el.on("dragover",function(a){a.preventDefault()}),a.$el.on("dragenter",c),a.$el.on("dragleave",c),a.$el.on("drop",function(b){if(b.preventDefault(),!a.state.get("disabled")){var c=e(b.dataTransfer.files);a.value=function(){return c.length?a.settings.multiple?c:c[0]:null},c.length&&a.fire("change",b)}})},remove:function(){this.$el.off(),this._super()}})}),g("1w",["15"],function(a){"use strict";return a.extend({init:function(a){var b=this;a.delimiter||(a.delimiter="\xbb"),b._super(a),b.classes.add("path"),b.canFocus=!0,b.on("click",function(a){var c,d=a.target;(c=d.getAttribute("data-index"))&&b.fire("select",{value:b.row()[c],index:c})}),b.row(b.settings.row)},focus:function(){var a=this;return a.getEl().firstChild.focus(),a},row:function(a){return arguments.length?(this.state.set("row",a),this):this.state.get("row")},renderHtml:function(){var a=this;return'
    '+a._getDataPathHtml(a.state.get("row"))+"
    "},bindStates:function(){var a=this;return a.state.on("change:row",function(b){a.innerHtml(a._getDataPathHtml(b.value))}),a._super()},_getDataPathHtml:function(a){var b,c,d=this,e=a||[],f="",g=d.classPrefix;for(b=0,c=e.length;b0?'":"")+'
    '+e[b].name+"
    ";return f||(f='
    \xa0
    '),f}})}),g("r",["1w"],function(a){return a.extend({postRender:function(){function a(a){if(1===a.nodeType){if("BR"==a.nodeName||a.getAttribute("data-mce-bogus"))return!0;if("bookmark"===a.getAttribute("data-mce-type"))return!0}return!1}var b=this,c=b.settings.editor;return c.settings.elementpath!==!1&&(b.on("select",function(a){c.focus(),c.selection.select(this.row()[a.index].element),c.nodeChanged()}),c.on("nodeChange",function(d){for(var e=[],f=d.parents,g=f.length;g--;)if(1==f[g].nodeType&&!a(f[g])){var h=c.fire("ResolveName",{name:f[g].nodeName.toLowerCase(),target:f[g]});if(h.isDefaultPrevented()||e.push({name:h.name,element:f[g]}),h.isPropagationStopped())break}b.row(e)})),b._super()}})}),g("1f",["n"],function(a){"use strict";return a.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var a=this,b=a._layout,c=a.classPrefix;return a.classes.add("formitem"),b.preRender(a),'
    '+(a.settings.title?'
    '+a.settings.title+"
    ":"")+'
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "}})}),g("y",["n","1f","c"],function(a,b,c){"use strict";return a.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var a=this,d=a.items();a.settings.formItemDefaults||(a.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),d.each(function(d){var e,f=d.settings.label;f&&(e=new b(c.extend({items:{type:"label",id:d._id+"-l",text:f,flex:0,forId:d._id,disabled:d.disabled()}},a.settings.formItemDefaults)),e.type="formitem",d.aria("labelledby",d._id+"-l"),"undefined"==typeof d.settings.flex&&(d.settings.flex=1),a.replace(d,e),e.add(d))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var a=this;a._super(),a.fromJSON(a.settings.data)},bindStates:function(){function a(){var a,c,d,e=0,f=[];if(b.settings.labelGapCalc!==!1)for(d="children"==b.settings.labelGapCalc?b.find("formitem"):b.items(),d.filter("formitem").each(function(a){var b=a.items()[0],c=b.getEl().clientWidth;e=c>e?c:e,f.push(b)}),c=b.settings.labelGap||0,a=f.length;a--;)f[a].settings.minWidth=e+c}var b=this;b._super(),b.on("show",a),a()}})}),g("s",["y"],function(a){"use strict";return a.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var a=this,b=a._layout,c=a.classPrefix;return a.preRender(),b.preRender(a),'
    '+(a.settings.title?''+a.settings.title+"":"")+'
    '+(a.settings.html||"")+b.renderHtml(a)+"
    "}})}),h("3s",Date),h("3t",Math),g("3j",["3s","3t","3i"],function(a,b,c){var d=0,e=function(e){var f=new a,g=f.getTime(),h=b.floor(1e9*b.random());return d++,e+"_"+h+d+c(g)};return{generate:e}}),g("32",[],function(){return"undefined"==typeof console&&(console={log:function(){}}),console}),g("10",["z","31","2z","32","12"],function(a,b,c,d,e){var f=function(a,b){var c=b||e,f=c.createElement("div");if(f.innerHTML=a,!f.hasChildNodes()||f.childNodes.length>1)throw d.error("HTML does not have a single root node",a),"HTML must have a single root node";return i(f.childNodes[0])},g=function(a,b){var c=b||e,d=c.createElement(a);return i(d)},h=function(a,b){var c=b||e,d=c.createTextNode(a);return i(d)},i=function(b){if(null===b||void 0===b)throw new c("Node cannot be null or undefined");return{dom:a.constant(b)}},j=function(a,c,d){return b.from(a.dom().elementFromPoint(c,d)).map(i)};return{fromHtml:f,fromTag:g,fromText:h,fromDom:i,fromPoint:j}}),g("3v",[],function(){var a=function(a){var b,c=!1;return function(){return c||(c=!0,b=a.apply(null,arguments)),b}};return{cached:a}}),g("3o",[],function(){return{ATTRIBUTE:2,CDATA_SECTION:4,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,ELEMENT:1,TEXT:3,PROCESSING_INSTRUCTION:7,ENTITY_REFERENCE:5,ENTITY:6,NOTATION:12}}),g("3p",["3o"],function(a){var b=function(a){var b=a.dom().nodeName;return b.toLowerCase()},c=function(a){return a.dom().nodeType},d=function(a){return a.dom().nodeValue},e=function(a){return function(b){return c(b)===a}},f=function(d){return c(d)===a.COMMENT||"#comment"===b(d)},g=e(a.ELEMENT),h=e(a.TEXT),i=e(a.DOCUMENT);return{name:b,type:c,value:d,isElement:g,isText:h,isDocument:i,isComment:f}}),g("3m",["3v","10","3p","12"],function(a,b,c,d){var e=function(a){var b=c.isText(a)?a.dom().parentNode:a.dom();return void 0!==b&&null!==b&&b.ownerDocument.body.contains(b)},f=a.cached(function(){return g(b.fromDom(d))}),g=function(a){var c=a.dom().body;if(null===c||void 0===c)throw"Body is not available yet";return b.fromDom(c)};return{body:f,getBody:g,inBody:e}}),g("3l",["2y","3i"],function(a,b){var c=function(c){if(null===c)return"null";var d=typeof c;return"object"===d&&a.prototype.isPrototypeOf(c)?"array":"object"===d&&b.prototype.isPrototypeOf(c)?"string":d},d=function(a){return function(b){return c(b)===a}};return{isString:d("string"),isObject:d("object"),isArray:d("array"),isNull:d("null"),isBoolean:d("boolean"),isUndefined:d("undefined"),isFunction:d("function"),isNumber:d("number")}}),g("4a",["2l","z","2y","2z"],function(a,b,c,d){return function(){var e=arguments;return function(){for(var f=new c(arguments.length),g=0;g0&&e.unsuppMessage(m);var n={};return a.each(h,function(a){n[a]=b.constant(f[a])}),a.each(i,function(a){n[a]=b.constant(g.prototype.hasOwnProperty.call(f,a)?d.some(f[a]):d.none())}),n}}}),g("42",["4a","4b"],function(a,b){return{immutable:a,immutableBag:b}}),g("43",[],function(){var a=function(a,b){var c=[],d=function(a){return c.push(a),b(a)},e=b(a);do e=e.bind(d);while(e.isSome());return c};return{toArray:a}}),g("4c",[],function(){var a="undefined"!=typeof window?window:Function("return this;")();return a}),g("44",["4c"],function(a){var b=function(b,c){for(var d=void 0!==c?c:a,e=0;e0&&b0},C=function(b){var c=A(b);return a.filter(y(c).concat(z(c)),B)};return{find:C}}),g("t",["2l","z","1","30","13","m","c"],function(a,b,c,d,e,f,g){"use strict";var h=function(){return c.tinymce?c.tinymce.activeEditor:e.activeEditor},i={},j=5,k=function(){i={}},l=function(a){return{title:a.title,value:{title:{raw:a.title},url:a.url,attach:a.attach}}},m=function(a){return g.map(a,l)},n=function(a,c){return{title:a,value:{title:a,url:c,attach:b.noop}}},o=function(b,c){var d=a.exists(c,function(a){return a.url===b});return!d},p=function(a,b,c){var d=b in a?a[b]:c;return d===!1?null:d},q=function(c,d,e,f){var h={title:"-"},j=function(c){var f=c.hasOwnProperty(e)?c[e]:[],h=a.filter(f,function(a){return o(a,d)});return g.map(h,function(a){return{title:a,value:{title:a,url:a,attach:b.noop}}})},k=function(b){var c=a.filter(d,function(a){return a.type===b});return m(c)},l=function(){var a=k("anchor"),b=p(f,"anchor_top","#top"),c=p(f,"anchor_bottom","#bottom");return null!==b&&a.unshift(n("",b)),null!==c&&a.push(n("",c)),a},q=function(b){return a.foldl(b,function(a,b){var c=0===a.length||0===b.length;return c?a.concat(b):a.concat(h,b)},[])};return f.typeahead_urls===!1?[]:"file"===e?q([s(c,j(i)),s(c,k("header")),s(c,l())]):s(c,j(i))},r=function(b,c){var d=i[c];/^https?/.test(b)&&(d?a.indexOf(d,b)===-1&&(i[c]=d.slice(0,j).concat(b)):i[c]=[b])},s=function(a,b){var c=a.toLowerCase(),d=g.grep(b,function(a){return a.title.toLowerCase().indexOf(c)!==-1});return 1===d.length&&d[0].title===a?[]:d},t=function(a){var b=a.title;return b.raw?b.raw:b},u=function(a,b,c,e){var f=function(f){var g=d.find(c),h=q(f,g,e,b);a.showAutoComplete(h,f)};a.on("autocomplete",function(){f(a.value())}),a.on("selectitem",function(b){var c=b.value;a.value(c.url);var d=t(c);"image"===e?a.fire("change",{meta:{alt:d,attach:c.attach}}):a.fire("change",{meta:{text:d,attach:c.attach}}),a.focus()}),a.on("click",function(b){0===a.value().length&&"INPUT"===b.target.nodeName&&f("")}),a.on("PostRender",function(){a.getRoot().on("submit",function(b){b.isDefaultPrevented()||r(a.value(),e)})})},v=function(a){var b=a.status,c=a.message;return"valid"===b?{status:"ok",message:c}:"unknown"===b?{status:"warn",message:c}:"invalid"===b?{status:"warn",message:c}:{status:"none",message:""}},w=function(a,b,c){var d=b.filepicker_validator_handler;if(d){var e=function(b){return 0===b.length?void a.statusLevel("none"):void d({url:b,type:c},function(b){var c=v(b);a.statusMessage(c.message),a.statusLevel(c.status)})};a.state.on("change:value",function(a){e(a.value)})}};return f.extend({Statics:{clearHistory:k},init:function(a){var b,d,e,f=this,i=h(),j=i.settings,k=a.filetype;a.spellcheck=!1,e=j.file_picker_types||j.file_browser_callback_types,e&&(e=g.makeMap(e,/[, ]/)),e&&!e[k]||(d=j.file_picker_callback,!d||e&&!e[k]?(d=j.file_browser_callback,!d||e&&!e[k]||(b=function(){d(f.getEl("inp").id,f.value(),k,c)})):b=function(){var a=f.fire("beforecall").meta;a=g.extend({filetype:k},a),d.call(i,function(a,b){f.value(a).fire("change",{meta:b})},f.value(),a)}),b&&(a.icon="browse",a.onaction=b),f._super(a),u(f,j,i.getBody(),k),w(f,j,k)}})}),g("u",["d"],function(a){"use strict";return a.extend({recalc:function(a){var b=a.layoutRect(),c=a.paddingBox;a.items().filter(":visible").each(function(a){a.layoutRect({x:c.left,y:c.top,w:b.innerW-c.right-c.left,h:b.innerH-c.top-c.bottom}),a.recalc&&a.recalc()})}})}),g("v",["d"],function(a){"use strict";return a.extend({recalc:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=[],O=Math.max,P=Math.min;for(d=a.items().filter(":visible"),e=a.layoutRect(),f=a.paddingBox,g=a.settings,m=a.isRtl()?g.direction||"row-reversed":g.direction,h=g.align,i=a.isRtl()?g.pack||"end":g.pack,j=g.spacing||0,"row-reversed"!=m&&"column-reverse"!=m||(d=d.set(d.toArray().reverse()),m=m.split("-")[0]),"column"==m?(z="y",x="h",y="minH",A="maxH",C="innerH",B="top",D="deltaH",E="contentH",J="left",H="w",F="x",G="innerW",I="minW",K="right",L="deltaW",M="contentW"):(z="x",x="w",y="minW",A="maxW",C="innerW",B="left",D="deltaW",E="contentW",J="top",H="h",F="y",G="innerH",I="minH",K="bottom",L="deltaH",M="contentH"),l=e[C]-f[B]-f[B],w=k=0,b=0,c=d.length;b0&&(k+=q,o[A]&&N.push(n),o.flex=q),l-=o[y],r=f[J]+o[I]+f[K],r>w&&(w=r);if(u={},l<0?u[y]=e[y]-l+e[D]:u[y]=e[C]-l+e[D],u[I]=w+e[L],u[E]=e[C]-l,u[M]=w,u.minW=P(u.minW,e.maxW),u.minH=P(u.minH,e.maxH),u.minW=O(u.minW,e.startMinWidth),u.minH=O(u.minH,e.startMinHeight),!e.autoResize||u.minW==e.minW&&u.minH==e.minH){for(t=l/k,b=0,c=N.length;bs?(l-=o[A]-o[y],k-=o.flex,o.flex=0,o.maxFlexSize=s):o.maxFlexSize=0;for(t=l/k,v=f[B],u={},0===k&&("end"==i?v=l+f[B]:"center"==i?(v=Math.round(e[C]/2-(e[C]-l)/2)+f[B],v<0&&(v=f[B])):"justify"==i&&(v=f[B],j=Math.floor(l/(d.length-1)))),u[F]=f[J],b=0,c=d.length;b0&&(r+=o.flex*t),u[x]=r,u[z]=v,n.layoutRect(u),n.recalc&&n.recalc(),v+=r+j}else if(u.w=u.minW,u.h=u.minH,a.layoutRect(u),this.recalc(a),null===a._lastRect){var Q=a.parent();Q&&(Q._lastRect=null,Q.recalc())}}})}),g("x",["1l"],function(a){return a.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(a){a.items().filter(":visible").each(function(a){a.recalc&&a.recalc()})},isNative:function(){return!0}})}),g("35",["3l","31"],function(a,b){return function(c,d,e,f,g){return c(e,f)?b.some(e):a.isFunction(g)&&g(e)?b.none():d(e,f,g)}}),g("33",["3l","2l","z","31","3m","3n","10","35"],function(a,b,c,d,e,f,g,h){var i=function(a){return n(e.body(),a)},j=function(b,e,f){for(var h=b.dom(),i=a.isFunction(f)?f:c.constant(!1);h.parentNode;){h=h.parentNode;var j=g.fromDom(h);if(e(j))return d.some(j);if(i(j))break}return d.none()},k=function(a,b,c){var d=function(a){return b(a)};return h(d,j,a,b,c)},l=function(a,b){var c=a.dom();return c.parentNode?m(g.fromDom(c.parentNode),function(c){return!f.eq(a,c)&&b(c)}):d.none()},m=function(a,d){var e=b.find(a.dom().childNodes,c.compose(d,g.fromDom));return e.map(g.fromDom)},n=function(a,b){var c=function(a){for(var e=0;e=0;i--)h=b.toPt(g,i),j=c(d,h,g);e.value(j?j:null),j||e.text(h)})}},e=function(b){var c="8pt 10pt 12pt 14pt 18pt 24pt 36pt",d=b.settings.fontsize_formats||c;return a.map(d.split(" "),function(a){var b=a,c=a,d=a.split("=");return d.length>1&&(b=d[0],c=d[1]),{text:b,value:c}})},f=function(a){a.addButton("fontsizeselect",function(){var b=e(a);return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:b,fixedWidth:!0,onPostRender:d(a,b),onclick:function(b){b.control.settings.value&&a.execCommand("FontSize",!1,b.control.settings.value)}}})},g=function(a){f(a)};return{register:g}}),g("19",["c","36"],function(a,b){var c="Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",d=function(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a},e=function(b,c,d){return function(){var e=this;b.on("nodeChange",function(f){var g=b.formatter,h=null;a.each(f.parents,function(b){if(a.each(c,function(a){if(d?g.matchNode(b,d,{value:a.value})&&(h=a.value):g.matchNode(b,a.value)&&(h=a.value),h)return!1}),h)return!1}),e.value(h)})}},f=function(c,d){return function(){var f=[];return a.each(d,function(a){f.push({text:a[0],value:a[1],textStyle:function(){return c.formatter.getCssText(a[1])}})}),{type:"listbox",text:d[0][0],values:f,fixedWidth:!0,onselect:function(a){if(a.control){var d=a.control.value();b.toggleFormat(c,d)()}},onPostRender:e(c,f)}}},g=function(c,d){return a.map(d,function(a){return{text:a[0],onclick:b.toggleFormat(c,a[1]),textStyle:function(){return c.formatter.getCssText(a[1])}}})},h=function(a){var b=d(a.settings.block_formats||c);a.addMenuItem("blockformats",{text:"Blocks",menu:g(a,b)}),a.addButton("formatselect",f(a,b))};return{register:h}}),g("1a",["c","36"],function(a,b){var c=function(b,d){var e=d.length;return a.each(d,function(a){a.menu&&(a.hidden=0===c(b,a.menu));var d=a.format;d&&(a.hidden=!b.formatter.canApply(d)),a.hidden&&e--}),e},d=function(a,b){var e=b.items().length;return b.items().each(function(b){b.menu&&b.visible(d(a,b.menu)>0),!b.menu&&b.settings.menu&&b.visible(c(a,b.settings.menu)>0);var f=b.settings.format;f&&b.visible(a.formatter.canApply(f)),b.visible()||e--}),e},e=function(c){var d=0,e=[],f=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],g=function(b){var c=[];if(b)return a.each(b,function(a){var b={text:a.title,icon:a.icon};if(a.items)b.menu=g(a.items);else{var f=a.format||"custom"+d++;a.format||(a.name=f,e.push(a)),b.format=f,b.cmd=a.cmd}c.push(b)}),c},h=function(){var a;return a=g(c.settings.style_formats_merge?c.settings.style_formats?f.concat(c.settings.style_formats):f:c.settings.style_formats||f)};return c.on("init",function(){a.each(e,function(a){c.formatter.register(a.name,a)})}),{type:"menu",items:h(),onPostRender:function(a){c.fire("renderFormatsMenu",{control:a.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return c.formatter.getCssText(this.settings.format)},onPostRender:function(){var a=this;a.parent().on("show",function(){var b,d;b=a.settings.format,b&&(a.disabled(!c.formatter.canApply(b)),a.active(c.formatter.match(b))),d=a.settings.cmd,d&&a.active(c.queryCommandState(d))})},onclick:function(){this.settings.format&&b.toggleFormat(c,this.settings.format)(),this.settings.cmd&&c.execCommand(this.settings.cmd)}}}},f=function(a,b){a.addMenuItem("formats",{text:"Formats",menu:b})},g=function(a,b){a.addButton("styleselect",{type:"menubutton",text:"Formats",menu:b,onShowMenu:function(){a.settings.style_formats_autohide&&d(a,this.menu)}})},h=function(a){var b=e(a);f(a,b),g(a,b)};return{register:h}}),g("1b",["2l","c"],function(a,b){var c=function(d,e){var f,g;if("string"==typeof e)g=e.split(" ");else if(b.isArray(e))return a.flatten(b.map(e,function(a){return c(d,a)}));return f=b.grep(g,function(a){return"|"===a||a in d.menuItems}),b.map(f,function(a){return"|"===a?{text:"-"}:d.menuItems[a]})},d=function(a){return a&&"-"===a.text},e=function(b){var c=a.filter(b,function(a,b,c){return!d(a)||!d(c[b-1])});return a.filter(c,function(a,b,c){return!d(a)||b>0&&bE[l]?y:E[l],F[m]=z>F[m]?z:F[m];for(A=f.innerW-q.left-q.right,w=0,l=0;l0?s:0),A-=(l>0?s:0)+E[l];for(B=f.innerH-q.top-q.bottom,x=0,m=0;m0?t:0), +B-=(m>0?t:0)+F[m];if(w+=q.left+q.right,x+=q.top+q.bottom,i={},i.minW=w+(f.w-f.innerW),i.minH=x+(f.h-f.innerH),i.contentW=i.minW-f.deltaW,i.contentH=i.minH-f.deltaH,i.minW=Math.min(i.minW,f.maxW),i.minH=Math.min(i.minH,f.maxH),i.minW=Math.max(i.minW,f.startMinWidth),i.minH=Math.max(i.minH,f.startMinHeight),!f.autoResize||i.minW==f.minW&&i.minH==f.minH){f.autoResize&&(i=a.layoutRect(i),i.contentW=i.minW-f.deltaW,i.contentH=i.minH-f.deltaH);var G;G="start"==b.packV?0:B>0?Math.floor(B/c):0;var H=0,I=b.flexWidths;if(I)for(l=0;l'},src:function(a){this.getEl().src=a},html:function(a,c){var d=this,e=this.getEl().contentWindow.document.body;return e?(e.innerHTML=a,c&&c()):b.setTimeout(function(){d.html(a)}),this}})}),g("1i",["15"],function(a){"use strict";return a.extend({init:function(a){var b=this;b._super(a),b.classes.add("widget").add("infobox"),b.canFocus=!1},severity:function(a){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(a)},help:function(a){this.state.set("help",a)},renderHtml:function(){var a=this,b=a.classPrefix;return'
    '+a.encode(a.state.get("text"))+'
    '},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.getEl("body").firstChild.data=a.encode(b.value),a.state.get("rendered")&&a.updateLayoutRect()}),a.state.on("change:help",function(b){a.classes.toggle("has-help",b.value),a.state.get("rendered")&&a.updateLayoutRect()}),a._super()}})}),g("1k",["15","2n"],function(a,b){"use strict";return a.extend({init:function(a){var b=this;b._super(a),b.classes.add("widget").add("label"),b.canFocus=!1,a.multiline&&b.classes.add("autoscroll"),a.strong&&b.classes.add("strong")},initLayoutRect:function(){var a=this,c=a._super();if(a.settings.multiline){var d=b.getSize(a.getEl());d.width>c.maxW&&(c.minW=c.maxW,a.classes.add("multiline")),a.getEl().style.width=c.minW+"px",c.startMinH=c.h=c.minH=Math.min(c.maxH,b.getSize(a.getEl()).height)}return c},repaint:function(){var a=this;return a.settings.multiline||(a.getEl().style.lineHeight=a.layoutRect().h+"px"),a._super()},severity:function(a){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(a)},renderHtml:function(){var a,b,c=this,d=c.settings.forId,e=c.settings.html?c.settings.html:c.encode(c.state.get("text"));return!d&&(b=c.settings.forName)&&(a=c.getRoot().find("#"+b)[0],a&&(d=a._id)),d?'":''+e+""},bindStates:function(){var a=this;return a.state.on("change:text",function(b){a.innerHtml(a.encode(b.value)),a.state.get("rendered")&&a.updateLayoutRect()}),a._super()}})}),g("2c",["n"],function(a){"use strict";return a.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(a){var b=this;b._super(a),b.classes.add("toolbar")},postRender:function(){var a=this;return a.items().each(function(a){a.classes.add("toolbar-item")}),a._super()}})}),g("1o",["2c"],function(a){"use strict";return a.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),g("1p",["1","b","f","1o"],function(a,b,c,d){"use strict";function e(a,b){for(;a;){if(b===a)return!0;a=a.parentNode}return!1}var f=c.extend({init:function(a){var b=this;b._renderOpen=!0,b._super(a),a=b.settings,b.classes.add("menubtn"),a.fixedWidth&&b.classes.add("fixed-width"),b.aria("haspopup",!0),b.state.set("menu",a.menu||b.render())},showMenu:function(a){var c,d=this;return d.menu&&d.menu.visible()&&a!==!1?d.hideMenu():(d.menu||(c=d.state.get("menu")||[],d.classes.add("opened"),c.length?c={type:"menu",animate:!0,items:c}:(c.type=c.type||"menu",c.animate=!0),c.renderTo?d.menu=c.parent(d).show().renderTo():d.menu=b.create(c).parent(d).renderTo(),d.fire("createmenu"),d.menu.reflow(),d.menu.on("cancel",function(a){a.control.parent()===d.menu&&(a.stopPropagation(),d.focus(),d.hideMenu())}),d.menu.on("select",function(){d.focus()}),d.menu.on("show hide",function(a){a.control===d.menu&&(d.activeMenu("show"==a.type),d.classes.toggle("opened","show"==a.type)),d.aria("expanded","show"==a.type)}).fire("show")),d.menu.show(),d.menu.layoutRect({w:d.layoutRect().w}),d.menu.moveRel(d.getEl(),d.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),void d.fire("showmenu"))},hideMenu:function(){var a=this;a.menu&&(a.menu.items().each(function(a){a.hideMenu&&a.hideMenu()}),a.menu.hide())},activeMenu:function(a){this.classes.toggle("active",a)},renderHtml:function(){var b,c=this,e=c._id,f=c.classPrefix,g=c.settings.icon,h=c.state.get("text"),i="";return b=c.settings.image,b?(g="none","string"!=typeof b&&(b=a.getSelection?b[0]:b[1]),b=" style=\"background-image: url('"+b+"')\""):b="",h&&(c.classes.add("btn-has-text"),i=''+c.encode(h)+""),g=c.settings.icon?f+"ico "+f+"i-"+g:"",c.aria("role",c.parent()instanceof d?"menuitem":"button"),'
    '},postRender:function(){var a=this;return a.on("click",function(b){b.control===a&&e(b.target,a.getEl())&&(a.focus(),a.showMenu(!b.aria),b.aria&&a.menu.items().filter(":visible")[0].focus())}),a.on("mouseenter",function(b){var c,d=b.control,e=a.parent();d&&e&&d instanceof f&&d.parent()==e&&(e.items().filter("MenuButton").each(function(a){a.hideMenu&&a!=d&&(a.menu&&a.menu.visible()&&(c=!0),a.hideMenu())}),c&&(d.focus(),d.showMenu()))}),a._super()},bindStates:function(){var a=this;return a.state.on("change:menu",function(){a.menu&&a.menu.remove(),a.menu=null}),a._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return f}),g("1q",["15","b","14","2u"],function(a,b,c,d){"use strict";var e=function(a,b){var c=a._textStyle;if(c){var d=a.getEl("text");d.setAttribute("style",c),b&&(d.style.color="",d.style.backgroundColor="")}};return a.extend({Defaults:{border:0,role:"menuitem"},init:function(a){var b,c=this;c._super(a),a=c.settings,c.classes.add("menu-item"),a.menu&&c.classes.add("menu-item-expand"),a.preview&&c.classes.add("menu-item-preview"),b=c.state.get("text"),"-"!==b&&"|"!==b||(c.classes.add("menu-item-sep"),c.aria("role","separator"),c.state.set("text","-")),a.selectable&&(c.aria("role","menuitemcheckbox"),c.classes.add("menu-item-checkbox"),a.icon="selected"),a.preview||a.selectable||c.classes.add("menu-item-normal"),c.on("mousedown",function(a){a.preventDefault()}),a.menu&&!a.ariaHideMenu&&c.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var a,c=this,d=c.settings,e=c.parent();if(e.items().each(function(a){a!==c&&a.hideMenu()}),d.menu){a=c.menu,a?a.show():(a=d.menu,a.length?a={type:"menu",animate:!0,items:a}:(a.type=a.type||"menu",a.animate=!0),e.settings.itemDefaults&&(a.itemDefaults=e.settings.itemDefaults),a=c.menu=b.create(a).parent(c).renderTo(),a.reflow(),a.on("cancel",function(b){b.stopPropagation(),c.focus(),a.hide()}),a.on("show hide",function(a){a.control.items&&a.control.items().each(function(a){a.active(a.settings.selected)})}).fire("show"),a.on("hide",function(b){b.control===a&&c.classes.remove("selected")}),a.submenu=!0),a._parentMenu=e,a.classes.add("menu-sub");var f=a.testMoveRel(c.getEl(),c.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);a.moveRel(c.getEl(),f),a.rel=f,f="menu-sub-"+f,a.classes.remove(a._lastRel).add(f),a._lastRel=f,c.classes.add("selected"),c.aria("expanded",!0)}},hideMenu:function(){var a=this;return a.menu&&(a.menu.items().each(function(a){a.hideMenu&&a.hideMenu()}),a.menu.hide(),a.aria("expanded",!1)),a},renderHtml:function(){function a(a){var b,d,e={};for(e=c.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},a=a.split("+"),b=0;b").replace(new RegExp(b("]mce~match!"),"g"),"")}var f=this,g=f._id,h=f.settings,i=f.classPrefix,j=f.state.get("text"),k=f.settings.icon,l="",m=h.shortcut,n=f.encode(h.url),o="";return k&&f.parent().classes.add("menu-has-icons"),h.image&&(l=" style=\"background-image: url('"+h.image+"')\""),m&&(m=a(m)),k=i+"ico "+i+"i-"+(f.settings.icon||"none"),o="-"!==j?'\xa0":"",j=e(f.encode(d(j))),n=e(f.encode(d(n))),'
    '+o+("-"!==j?''+j+"":"")+(m?'
    '+m+"
    ":"")+(h.menu?'
    ':"")+(n?'":"")+"
    "},postRender:function(){var a=this,b=a.settings,c=b.textStyle;if("function"==typeof c&&(c=c.call(this)),c){var e=a.getEl("text");e&&(e.setAttribute("style",c),a._textStyle=c)}return a.on("mouseenter click",function(c){c.control===a&&(b.menu||"click"!==c.type?(a.showMenu(),c.aria&&a.menu.focus(!0)):(a.fire("select"),d.requestAnimationFrame(function(){a.parent().hideAll()})))}),a._super(),a},hover:function(){var a=this;return a.parent().items().each(function(a){a.classes.remove("selected")}),a.classes.toggle("selected",!0),a},active:function(a){return e(this,a),"undefined"!=typeof a&&this.aria("checked",a),this._super(a)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),g("1n",["14","2u","c","w","1q","2b"],function(a,b,c,d,e,f){"use strict";return d.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(b){var d=this;if(b.autohide=!0,b.constrainToViewport=!0,"function"==typeof b.items&&(b.itemsFactory=b.items,b.items=[]),b.itemDefaults)for(var e=b.items,f=e.length;f--;)e[f]=c.extend({},b.itemDefaults,e[f]);d._super(b),d.classes.add("menu"),b.animate&&11!==a.ie&&d.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var a=this;a.hideAll(),a.fire("select")},load:function(){function a(){d.throbber&&(d.throbber.hide(),d.throbber=null)}var b,c,d=this;c=d.settings.itemsFactory,c&&(d.throbber||(d.throbber=new f(d.getEl("body"),!0),0===d.items().length?(d.throbber.show(),d.fire("loading")):d.throbber.show(100,function(){d.items().remove(),d.fire("loading")}),d.on("hide close",a)),d.requestTime=b=(new Date).getTime(),d.settings.itemsFactory(function(c){return 0===c.length?void d.hide():void(d.requestTime===b&&(d.getEl().style.width="",d.getEl("body").style.width="",a(),d.items().remove(),d.getEl("body").innerHTML="",d.add(c),d.renderNew(),d.fire("loaded")))}))},hideAll:function(){var a=this;return this.find("menuitem").exec("hideMenu"),a._super()},preRender:function(){var a=this;return a.items().each(function(b){var c=b.settings;if(c.icon||c.image||c.selectable)return a._hasIcons=!0,!1}),a.settings.itemsFactory&&a.on("postrender",function(){a.settings.itemsFactory&&a.load()}),a.on("show hide",function(c){c.control===a&&("show"===c.type?b.setTimeout(function(){a.classes.add("in")},0):a.classes.remove("in"))}),a._super()}})}),g("1m",["1p","1n"],function(a,b){"use strict";return a.extend({init:function(a){function b(c){for(var f=0;f0&&(e=c[0].text,g.state.set("value",c[0].value)),g.state.set("menu",c)),g.state.set("text",a.text||e),g.classes.add("listbox"),g.on("select",function(b){var c=b.control;f&&(b.lastControl=f),a.multiple?c.active(!c.active()):g.value(b.control.value()),f=c})},bindStates:function(){function a(a,c){a instanceof b&&a.items().each(function(a){a.hasMenus()||a.active(a.value()===c)})}function c(a,b){var d;if(a)for(var e=0;e'},postRender:function(){var a=this;a._super(),a.resizeDragHelper=new b(this._id,{start:function(){a.fire("ResizeStart")},drag:function(b){"both"!=a.settings.direction&&(b.deltaX=0),a.fire("Resize",b)},stop:function(){a.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),g("23",["15"],function(a){"use strict";function b(a){var b="";if(a)for(var c=0;c'+a[c]+"";return b}return a.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(a){var b=this;b._super(a),b.settings.size&&(b.size=b.settings.size),b.settings.options&&(b._options=b.settings.options),b.on("keydown",function(a){var c;13==a.keyCode&&(a.preventDefault(),b.parents().reverse().each(function(a){if(a.toJSON)return c=a,!1}),b.fire("submit",{data:c.toJSON()}))})},options:function(a){return arguments.length?(this.state.set("options",a),this):this.state.get("options")},renderHtml:function(){var a,c=this,d="";return a=b(c._options),c.size&&(d=' size = "'+c.size+'"'),'"},bindStates:function(){var a=this;return a.state.on("change:options",function(c){a.getEl().innerHTML=b(c.value)}),a._super()}})}),g("25",["15","p","2n"],function(a,b,c){"use strict";function d(a,b,c){return ac&&(a=c),a}function e(a,b,c){a.setAttribute("aria-"+b,c)}function f(a,b){var d,f,g,h,i,j;"v"==a.settings.orientation?(h="top",g="height",f="h"):(h="left",g="width",f="w"),j=a.getEl("handle"),d=(a.layoutRect()[f]||100)-c.getSize(j)[g],i=d*((b-a._minValue)/(a._maxValue-a._minValue))+"px",j.style[h]=i,j.style.height=a.layoutRect().h+"px",e(j,"valuenow",b),e(j,"valuetext",""+a.settings.previewFilter(b)),e(j,"valuemin",a._minValue),e(j,"valuemax",a._maxValue)}return a.extend({init:function(a){var b=this;a.previewFilter||(a.previewFilter=function(a){return Math.round(100*a)/100}),b._super(a),b.classes.add("slider"),"v"==a.orientation&&b.classes.add("vertical"),b._minValue=a.minValue||0,b._maxValue=a.maxValue||100,b._initValue=b.state.get("value")},renderHtml:function(){var a=this,b=a._id,c=a.classPrefix;return'
    '},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function a(a,b,c){return(c+a)/(b-a)}function e(a,b,c){return c*(b-a)-a}function f(b,c){function f(f){var g;g=n.value(),g=e(b,c,a(b,c,g)+.05*f),g=d(g,b,c),n.value(g),n.fire("dragstart",{value:g}),n.fire("drag",{value:g}),n.fire("dragend",{value:g})}n.on("keydown",function(a){switch(a.keyCode){case 37:case 38:f(-1);break;case 39:case 40:f(1)}})}function g(a,e,f){var g,h,i,o,p;n._dragHelper=new b(n._id,{handle:n._id+"-handle",start:function(a){g=a[j],h=parseInt(n.getEl("handle").style[k],10),i=(n.layoutRect()[m]||100)-c.getSize(f)[l],n.fire("dragstart",{value:p})},drag:function(b){var c=b[j]-g;o=d(h+c,0,i),f.style[k]=o+"px",p=a+o/i*(e-a),n.value(p),n.tooltip().text(""+n.settings.previewFilter(p)).show().moveRel(f,"bc tc"),n.fire("drag",{value:p})},stop:function(){n.tooltip().hide(),n.fire("dragend",{value:p})}})}var h,i,j,k,l,m,n=this;h=n._minValue,i=n._maxValue,"v"==n.settings.orientation?(j="screenY",k="top",l="height",m="h"):(j="screenX",k="left",l="width",m="w"),n._super(),f(h,i,n.getEl("handle")),g(h,i,n.getEl("handle"))},repaint:function(){this._super(),f(this,this.value())},bindStates:function(){var a=this;return a.state.on("change:value",function(b){f(a,b.value)}),a._super()}})}),g("26",["15"],function(a){"use strict";return a.extend({renderHtml:function(){var a=this;return a.classes.add("spacer"),a.canFocus=!1,'
    '}})}),g("27",["1","2o","2n","1p"],function(a,b,c,d){return d.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var a,d,e=this,f=e.getEl(),g=e.layoutRect();return e._super(),a=f.firstChild,d=f.lastChild,b(a).css({width:g.w-c.getSize(d).width,height:g.h-2}),b(d).css({height:g.h-2}),e},activeMenu:function(a){var c=this;b(c.getEl().lastChild).toggleClass(c.classPrefix+"active",a)},renderHtml:function(){var b,c,d=this,e=d._id,f=d.classPrefix,g=d.state.get("icon"),h=d.state.get("text"),i=d.settings,j="";return b=i.image,b?(g="none","string"!=typeof b&&(b=a.getSelection?b[0]:b[1]),b=" style=\"background-image: url('"+b+"')\""):b="",g=i.icon?f+"ico "+f+"i-"+g:"",h&&(d.classes.add("btn-has-text"),j=''+d.encode(h)+""),c="boolean"==typeof i.active?' aria-pressed="'+i.active+'"':"",'
    '},postRender:function(){var a=this,b=a.settings.onclick;return a.on("click",function(a){var c=a.target;if(a.control==this)for(;c;){if(a.aria&&"down"!=a.aria.key||"BUTTON"==c.nodeName&&c.className.indexOf("open")==-1)return a.stopImmediatePropagation(),void(b&&b.call(this,a));c=c.parentNode}}),delete a.settings.onclick,a._super()}})}),g("28",["x"],function(a){"use strict";return a.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),g("29",["1u","2o","2n"],function(a,b,c){"use strict";return a.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(a){var c;this.activeTabId&&(c=this.getEl(this.activeTabId),b(c).removeClass(this.classPrefix+"active"),c.setAttribute("aria-selected","false")),this.activeTabId="t"+a,c=this.getEl("t"+a),c.setAttribute("aria-selected","true"),b(c).addClass(this.classPrefix+"active"),this.items()[a].show().fire("showtab"),this.reflow(),this.items().each(function(b,c){a!=c&&b.hide()})},renderHtml:function(){var a=this,b=a._layout,c="",d=a.classPrefix;return a.preRender(),b.preRender(a),a.items().each(function(b,e){var f=a._id+"-t"+e;b.aria("role","tabpanel"),b.aria("labelledby",f),c+='"}),'
    '+c+'
    '+b.renderHtml(a)+"
    "},postRender:function(){var a=this;a._super(),a.settings.activeTab=a.settings.activeTab||0,a.activateTab(a.settings.activeTab),this.on("click",function(b){var c=b.target.parentNode;if(c&&c.id==a._id+"-head")for(var d=c.childNodes.length;d--;)c.childNodes[d]==b.target&&a.activateTab(d)})},initLayoutRect:function(){var a,b,d,e=this;b=c.getSize(e.getEl("head")).width,b=b<0?0:b,d=0,e.items().each(function(a){b=Math.max(b,a.layoutRect().minW),d=Math.max(d,a.layoutRect().minH)}),e.items().each(function(a){a.settings.x=0,a.settings.y=0,a.settings.w=b,a.settings.h=d,a.layoutRect({x:0,y:0,w:b,h:d})});var f=c.getSize(e.getEl("head")).height;return e.settings.minWidth=b,e.settings.minHeight=d+f,a=e._super(),a.deltaH+=f,a.innerH=a.h-a.deltaH,a}})}),g("2a",["12","c","2n","15"],function(a,b,c,d){return d.extend({init:function(a){var b=this;b._super(a),b.classes.add("textbox"),a.multiline?b.classes.add("multiline"):(b.on("keydown",function(a){var c;13==a.keyCode&&(a.preventDefault(),b.parents().reverse().each(function(a){if(a.toJSON)return c=a,!1}),b.fire("submit",{data:c.toJSON()}))}),b.on("keyup",function(a){b.state.set("value",a.target.value)}))},repaint:function(){var b,c,d,e,f,g=this,h=0;b=g.getEl().style,c=g._layoutRect,f=g._lastRepaintRect||{};var i=a;return!g.settings.multiline&&i.all&&(!i.documentMode||i.documentMode<=8)&&(b.lineHeight=c.h-h+"px"),d=g.borderBox,e=d.left+d.right+8,h=d.top+d.bottom+(g.settings.multiline?8:0),c.x!==f.x&&(b.left=c.x+"px",f.x=c.x),c.y!==f.y&&(b.top=c.y+"px",f.y=c.y),c.w!==f.w&&(b.width=c.w-e+"px",f.w=c.w),c.h!==f.h&&(b.height=c.h-h+"px",f.h=c.h),g._lastRepaintRect=f,g.fire("repaint",{},!1),g},renderHtml:function(){var a,d,e=this,f=e.settings;return a={id:e._id,hidefocus:"1"},b.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(b){a[b]=f[b]}),e.disabled()&&(a.disabled="disabled"),f.subtype&&(a.type=f.subtype),d=c.create(f.multiline?"textarea":"input",a),d.value=e.state.get("value"),d.className=e.classes,d.outerHTML},value:function(a){return arguments.length?(this.state.set("value",a),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var a=this;a.getEl().value=a.state.get("value"),a._super(),a.$el.on("change",function(b){a.state.set("value",b.target.value),a.fire("change",b)})},bindStates:function(){var a=this;return a.state.on("change:value",function(b){a.getEl().value!=b.value&&(a.getEl().value=b.value)}),a.state.on("change:disabled",function(b){a.getEl().disabled=b.value}),a._super()},remove:function(){this.$el.off(),this._super()}})}),g("4",["b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","5","1f","1g","1h","1i","1j","1k","1l","1m","1n","1o","1p","1q","1r","1s","1t","1u","1v","1w","1x","1y","1z","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","15","2e"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha){var ia=function(){return{Selector:Y,Collection:h,ReflowQueue:T,Control:n,Factory:a,KeyboardNavigation:D,Container:m,DragHelper:o,Scrollable:W,Panel:O,Movable:M,Resizable:U,FloatPanel:v,Window:ha,MessageBox:L,Tooltip:fa,Widget:ga,Progress:R,Notification:N,Layout:F,AbsoluteLayout:c,Button:e,ButtonGroup:f,Checkbox:g,ComboBox:l,ColorBox:i,PanelButton:P,ColorButton:j,ColorPicker:k,Path:Q,ElementPath:q,FormItem:z,Form:x,FieldSet:r,FilePicker:s,FitLayout:t,FlexLayout:u,FlowLayout:w,FormatControls:y,GridLayout:A,Iframe:B,InfoBox:C,Label:E,Toolbar:ea,MenuBar:I,MenuButton:J,MenuItem:K,Throbber:da,Menu:H,ListBox:G,Radio:S,ResizeHandle:V,SelectBox:X,Slider:Z,Spacer:$,SplitButton:_,StackLayout:aa,TabPanel:ba,TextBox:ca,DropZone:p,BrowseButton:d}},ja=function(a){a.ui?b.each(ia(),function(b,c){a.ui[c]=b}):a.ui=ia()},ka=function(){b.each(ia(),function(b,c){a.add(c,b)})},la={appendTo:ja,registerToFactory:ka};return la}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return d.registerToFactory(),d.appendTo(a.tinymce?a.tinymce:{}),b.add("modern",function(a){return e.setup(a),c.get(a)}),function(){}}),d("0")()}(); \ No newline at end of file diff --git a/assets/plugins/tinymce4/tinymce/tinymce.min.js b/assets/plugins/tinymce4/tinymce/tinymce.min.js index 10303e2877..e2636d8b1c 100755 --- a/assets/plugins/tinymce4/tinymce/tinymce.min.js +++ b/assets/plugins/tinymce4/tinymce/tinymce.min.js @@ -1,16 +1,13 @@ -// 4.6.3 (2017-05-30) -!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i=d.x&&f.x+f.w<=d.w+d.x&&f.y>=d.y&&f.y+f.h<=d.h+d.y)return e[g];return null}function c(a,b,c){return f(a.x-b,a.y-c,a.w+2*b,a.h+2*c)}function d(a,b){var c,d,e,g;return c=i(a.x,b.x),d=i(a.y,b.y),e=h(a.x+a.w,b.x+b.w),g=h(a.y+a.h,b.y+b.h),e-c<0||g-d<0?null:f(c,d,e-c,g-d)}function e(a,b,c){var d,e,g,h,j,k,l,m,n,o;return j=a.x,k=a.y,l=a.x+a.w,m=a.y+a.h,n=b.x+b.w,o=b.y+b.h,d=i(0,b.x-j),e=i(0,b.y-k),g=i(0,l-n),h=i(0,m-o),j+=d,k+=e,c&&(l+=d,m+=e,j-=g,k-=h),l-=g,m-=h,f(j,k,l-j,m-k)}function f(a,b,c,d){return{x:a,y:b,w:c,h:d}}function g(a){return f(a.left,a.top,a.width,a.height)}var h=Math.min,i=Math.max,j=Math.round;return{inflate:c,relativePosition:a,findBestRelativePosition:b,intersect:d,clamp:e,create:f,fromClientRect:g}}),g("4",[],function(){function a(a,b){return function(){a.apply(b,arguments)}}function b(b){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof b)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],h(b,a(d,this),a(e,this))}function c(a){var b=this;return null===this._state?void this._deferreds.push(a):void i(function(){var c=b._state?a.onFulfilled:a.onRejected;if(null===c)return void(b._state?a.resolve:a.reject)(b._value);var d;try{d=c(b._value)}catch(b){return void a.reject(b)}a.resolve(d)})}function d(b){try{if(b===this)throw new TypeError("A promise cannot be resolved with itself.");if(b&&("object"==typeof b||"function"==typeof b)){var c=b.then;if("function"==typeof c)return void h(a(c,b),a(d,this),a(e,this))}this._state=!0,this._value=b,f.call(this)}catch(a){e.call(this,a)}}function e(a){this._state=!1,this._value=a,f.call(this)}function f(){for(var a=0,b=this._deferreds.length;a=534;return{opera:b,webkit:c,ie:d,gecko:g,mac:h,iOS:i,android:j,contentEditable:q,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=d,range:window.getSelection&&"Range"in window,documentMode:d&&!f?document.documentMode||7:10,fileApi:k,ceFalse:d===!1||d>8,canHaveCSP:d===!1||d>11,desktop:!l&&!m,windowsPhone:n}}),g("7",["5","6"],function(a,b){"use strict";function c(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)}function d(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d||!1):a.detachEvent&&a.detachEvent("on"+b,c)}function e(a,b){var c,d=b;return c=a.path,c&&c.length>0&&(d=c[0]),a.deepPath&&(c=a.deepPath(),c&&c.length>0&&(d=c[0])),d}function f(a,c){var d,f,g=c||{};for(d in a)k[d]||(g[d]=a[d]);if(g.target||(g.target=g.srcElement||document),b.experimentalShadowDom&&(g.target=e(a,g.target)),a&&j.test(a.type)&&a.pageX===f&&a.clientX!==f){var h=g.target.ownerDocument||document,i=h.documentElement,o=h.body;g.pageX=a.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),g.pageY=a.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)}return g.preventDefault=function(){g.isDefaultPrevented=n,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},g.stopPropagation=function(){g.isPropagationStopped=n,a&&(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0)},g.stopImmediatePropagation=function(){g.isImmediatePropagationStopped=n,g.stopPropagation()},l(g)===!1&&(g.isDefaultPrevented=m,g.isPropagationStopped=m,g.isImmediatePropagationStopped=m),"undefined"==typeof g.metaKey&&(g.metaKey=!1),g}function g(e,f,g){function h(){return"complete"===l.readyState||"interactive"===l.readyState&&l.body}function i(){g.domLoaded||(g.domLoaded=!0,f(m))}function j(){h()&&(d(l,"readystatechange",j),i())}function k(){try{l.documentElement.doScroll("left")}catch(b){return void a.setTimeout(k)}i()}var l=e.document,m={type:"ready"};return g.domLoaded?void f(m):(!l.addEventListener||b.ie&&b.ie<11?(c(l,"readystatechange",j),l.documentElement.doScroll&&e.self===e.top&&k()):h()?i():c(e,"DOMContentLoaded",i),void c(e,"load",i))}function h(){function a(a,b){var c,d,e,f,g=m[b];if(c=g&&g[a.type])for(d=0,e=c.length;dv.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function c(a){return a[M]=!0,a}function d(a){var b=F.createElement("div");try{return!!a(b)}catch(a){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function e(a,b){for(var c=a.split("|"),d=a.length;d--;)v.attrHandle[c[d]]=b}function f(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function g(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function h(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function i(a){return c(function(b){return b=+b,c(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function j(a){return a&&typeof a.getElementsByTagName!==U&&a}function k(){}function l(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function o(b,c,d){for(var e=0,f=c.length;e-1&&(c[j]=!(g[j]=l))}}else t=p(t===g?t.splice(q,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function r(a){for(var b,c,d,e=a.length,f=v.relative[a[0].type],g=f||v.relative[" "],h=f?1:0,i=m(function(a){return a===b},g,!0),j=m(function(a){return aa.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==B)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&n(k),h>1&&l(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ga,"$1"),c,h0,f=b.length>0,g=function(c,g,h,i,j){var k,l,m,n=0,o="0",q=c&&[],r=[],s=B,t=c||f&&v.find.TAG("*",j),u=O+=null==s?1:Math.random()||.1,w=t.length;for(j&&(B=g!==F&&g);o!==w&&null!=(k=t[o]);o++){if(f&&k){for(l=0;m=b[l++];)if(m(k,g,h)){i.push(k);break}j&&(O=u)}e&&((k=!m&&k)&&n--,c&&q.push(k))}if(n+=o,e&&o!==n){for(l=0;m=d[l++];)m(q,r,g,h);if(c){if(n>0)for(;o--;)q[o]||r[o]||(r[o]=Y.call(i));r=p(r)}$.apply(i,r),j&&!c&&r.length>0&&n+d.length>1&&a.uniqueSort(i)}return j&&(O=u,B=s),q};return e?c(g):g}var t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M="sizzle"+-new Date,N=window.document,O=0,P=0,Q=b(),R=b(),S=b(),T=function(a,b){return a===b&&(D=!0),0},U="undefined",V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=X.indexOf||function(a){for(var b=0,c=this.length;b+~]|"+ca+")"+ca+"*"),ja=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),ka=new RegExp(fa),la=new RegExp("^"+da+"$"),ma={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da+"|[*])"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},na=/^(?:input|select|textarea|button)$/i,oa=/^h\d$/i,pa=/^[^{]+\{\s*\[native \w/,qa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ra=/[+~]/,sa=/'|\\/g,ta=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),ua=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{$.apply(X=_.call(N.childNodes),N.childNodes),X[N.childNodes.length].nodeType}catch(a){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}u=a.support={},x=a.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=a.setDocument=function(a){function b(a){try{return a.top}catch(a){}return null}var c,e=a?a.ownerDocument||a:N,g=e.defaultView;return e!==F&&9===e.nodeType&&e.documentElement?(F=e,G=e.documentElement,H=!x(e),g&&g!==b(g)&&(g.addEventListener?g.addEventListener("unload",function(){E()},!1):g.attachEvent&&g.attachEvent("onunload",function(){E()})),u.attributes=d(function(a){return a.className="i",!a.getAttribute("className")}),u.getElementsByTagName=d(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),u.getElementsByClassName=pa.test(e.getElementsByClassName),u.getById=d(function(a){return G.appendChild(a).id=M,!e.getElementsByName||!e.getElementsByName(M).length}),u.getById?(v.find.ID=function(a,b){if(typeof b.getElementById!==U&&H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},v.filter.ID=function(a){var b=a.replace(ta,ua);return function(a){return a.getAttribute("id")===b}}):(delete v.find.ID,v.filter.ID=function(a){var b=a.replace(ta,ua);return function(a){var c=typeof a.getAttributeNode!==U&&a.getAttributeNode("id");return c&&c.value===b}}),v.find.TAG=u.getElementsByTagName?function(a,b){if(typeof b.getElementsByTagName!==U)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},v.find.CLASS=u.getElementsByClassName&&function(a,b){if(H)return b.getElementsByClassName(a)},J=[],I=[],(u.qsa=pa.test(e.querySelectorAll))&&(d(function(a){a.innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&I.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||I.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll(":checked").length||I.push(":checked")}),d(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&I.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(u.matchesSelector=pa.test(K=G.matches||G.webkitMatchesSelector||G.mozMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&d(function(a){u.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=I.length&&new RegExp(I.join("|")),J=J.length&&new RegExp(J.join("|")),c=pa.test(G.compareDocumentPosition),L=c||pa.test(G.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},T=c?function(a,b){if(a===b)return D=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!u.sortDetached&&b.compareDocumentPosition(a)===c?a===e||a.ownerDocument===N&&L(N,a)?-1:b===e||b.ownerDocument===N&&L(N,b)?1:C?aa.call(C,a)-aa.call(C,b):0:4&c?-1:1)}:function(a,b){if(a===b)return D=!0,0;var c,d=0,g=a.parentNode,h=b.parentNode,i=[a],j=[b];if(!g||!h)return a===e?-1:b===e?1:g?-1:h?1:C?aa.call(C,a)-aa.call(C,b):0;if(g===h)return f(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[d]===j[d];)d++;return d?f(i[d],j[d]):i[d]===N?-1:j[d]===N?1:0},e):F},a.matches=function(b,c){return a(b,null,null,c)},a.matchesSelector=function(b,c){if((b.ownerDocument||b)!==F&&E(b),c=c.replace(ja,"='$1']"),u.matchesSelector&&H&&(!J||!J.test(c))&&(!I||!I.test(c)))try{var d=K.call(b,c);if(d||u.disconnectedMatch||b.document&&11!==b.document.nodeType)return d}catch(a){}return a(c,F,null,[b]).length>0},a.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},a.attr=function(a,b){(a.ownerDocument||a)!==F&&E(a);var c=v.attrHandle[b.toLowerCase()],d=c&&W.call(v.attrHandle,b.toLowerCase())?c(a,b,!H):void 0;return void 0!==d?d:u.attributes||!H?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},a.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},a.uniqueSort=function(a){var b,c=[],d=0,e=0;if(D=!u.detectDuplicates,C=!u.sortStable&&a.slice(0),a.sort(T),D){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return C=null,a},w=a.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=w(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=w(b);return c},v=a.selectors={cacheLength:50,createPseudo:c,match:ma,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ta,ua),a[3]=(a[3]||a[4]||a[5]||"").replace(ta,ua),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(b){return b[1]=b[1].toLowerCase(),"nth"===b[1].slice(0,3)?(b[3]||a.error(b[0]),b[4]=+(b[4]?b[5]+(b[6]||1):2*("even"===b[3]||"odd"===b[3])),b[5]=+(b[7]+b[8]||"odd"===b[3])):b[3]&&a.error(b[0]),b},PSEUDO:function(a){var b,c=!a[6]&&a[2];return ma.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ka.test(c)&&(b=y(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ta,ua).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=Q[a+" "];return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&Q(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==U&&a.getAttribute("class")||"")})},ATTR:function(b,c,d){return function(e){var f=a.attr(e,b);return null==f?"!="===c:!c||(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f+" ").indexOf(d)>-1:"|="===c&&(f===d||f.slice(0,d.length+1)===d+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[M]||(q[M]={}),j=k[a]||[],n=j[0]===O&&j[1],m=j[0]===O&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[O,n,m];break}}else if(s&&(j=(b[M]||(b[M]={}))[a])&&j[0]===O)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[M]||(l[M]={}))[a]=[O,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(b,d){var e,f=v.pseudos[b]||v.setFilters[b.toLowerCase()]||a.error("unsupported pseudo: "+b);return f[M]?f(d):f.length>1?(e=[b,b,"",d],v.setFilters.hasOwnProperty(b.toLowerCase())?c(function(a,b){for(var c,e=f(a,d),g=e.length;g--;)c=aa.call(a,e[g]),a[c]=!(b[c]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:c(function(a){var b=[],d=[],e=z(a.replace(ga,"$1"));return e[M]?c(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,c,f){return b[0]=a,e(b,null,f,d),!d.pop()}}),has:c(function(b){return function(c){return a(b,c).length>0}}),contains:c(function(a){return a=a.replace(ta,ua),function(b){return(b.textContent||b.innerText||w(b)).indexOf(a)>-1}}),lang:c(function(b){return la.test(b||"")||a.error("unsupported lang: "+b),b=b.replace(ta,ua).toLowerCase(),function(a){var c;do if(c=H?a.lang:a.getAttribute("xml:lang")||a.getAttribute("lang"))return c=c.toLowerCase(),c===b||0===c.indexOf(b+"-");while((a=a.parentNode)&&1===a.nodeType);return!1}}),target:function(a){var b=window.location&&window.location.hash;return b&&b.slice(1)===a.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!v.pseudos.empty(a)},header:function(a){return oa.test(a.nodeName)},input:function(a){return na.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:i(function(){return[0]}),last:i(function(a,b){return[b-1]}),eq:i(function(a,b,c){return[c<0?c+b:c]}),even:i(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:i(function(a,b,c){for(var d=c<0?c+b:c;++d2&&"ID"===(g=f[0]).type&&u.getById&&9===b.nodeType&&H&&v.relative[f[1].type]){if(b=(v.find.ID(g.matches[0].replace(ta,ua),b)||[])[0],!b)return c;k&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!v.relative[h=g.type]);)if((i=v.find[h])&&(d=i(g.matches[0].replace(ta,ua),ra.test(f[0].type)&&j(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&l(f),!a)return $.apply(c,d),c;break}}return(k||z(a,m))(d,b,!H,c,ra.test(a)&&j(b.parentNode)||b),c},u.sortStable=M.split("").sort(T).join("")===M,u.detectDuplicates=!!D,E(),u.sortDetached=d(function(a){return 1&a.compareDocumentPosition(F.createElement("div"))}),d(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||e("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),u.attributes&&d(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||e("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),d(function(a){return null==a.getAttribute("disabled")})||e(ba,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),a}),g("1g",[],function(){function a(a){var b,c,d=a;if(!j(a))for(d=[],b=0,c=a.length;b=0;e--)i(a,b[e],c,d);else for(e=0;e)[^>]*$|#([\w\-]*)$)/,A=a.Event,B=c.makeMap("children,contents,next,prev"),C=c.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),D=c.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),E={"for":"htmlFor","class":"className",readonly:"readOnly"},F={"float":"cssFloat"},G={},H={},I=/^\s*|\s*$/g;return l.fn=l.prototype={constructor:l,selector:"",context:null,length:0,init:function(a,b){var c,d,e=this;if(!a)return e;if(a.nodeType)return e.context=e[0]=a,e.length=1,e;if(b&&b.nodeType)e.context=b;else{if(b)return l(a).attr(b);e.context=b=document}if(f(a)){if(e.selector=a,c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c)return l(b).find(a);if(c[1])for(d=h(a,q(b)).firstChild;d;)x.call(e,d),d=d.nextSibling;else{if(d=q(b).getElementById(c[2]),!d)return e;if(d.id!==c[2])return e.find(a);e.length=1,e[0]=d}}else this.add(a,!1);return e},toArray:function(){return c.toArray(this)},add:function(a,b){var c,d,e=this;if(f(a))return e.add(l(a));if(b!==!1)for(c=l.unique(e.toArray().concat(l.makeArray(a))),e.length=c.length,d=0;d1&&(B[a]||(e=l.unique(e)),0===a.indexOf("parents")&&(e=e.reverse())),e=l(e),c?e.filter(c):e}}),o({parentsUntil:function(a,b){return r(a,"parentNode",b)},nextUntil:function(a,b){return s(a,"nextSibling",1,b).slice(1)},prevUntil:function(a,b){return s(a,"previousSibling",1,b).slice(1)}},function(a,b){l.fn[a]=function(c,d){var e=this,f=[];return e.each(function(){var a=b.call(f,this,c,f);a&&(l.isArray(a)?f.push.apply(f,a):f.push(a))}),this.length>1&&(f=l.unique(f),0!==a.indexOf("parents")&&"prevUntil"!==a||(f=f.reverse())),f=l(f),d?f.filter(d):f}}),l.fn.is=function(a){return!!a&&this.filter(a).length>0},l.fn.init.prototype=l.fn,l.overrideDefaults=function(a){function b(d,e){return c=c||a(),0===arguments.length&&(d=c.element),e||(e=c.context),new b.fn.init(d,e)}var c;return l.extend(b,this),b},d.ie&&d.ie<8&&(u(G,"get",{maxlength:function(a){var b=a.maxLength;return 2147483647===b?v:b},size:function(a){var b=a.size;return 20===b?v:b},"class":function(a){return a.className},style:function(a){var b=a.style.cssText;return 0===b.length?v:b}}),u(G,"set",{"class":function(a,b){a.className=b},style:function(a,b){a.style.cssText=b}})),d.ie&&d.ie<9&&(F["float"]="styleFloat",u(H,"set",{opacity:function(a,b){var c=a.style;null===b||""===b?c.removeAttribute("filter"):(c.zoom=1,c.filter="alpha(opacity="+100*b+")")}})),l.attrHooks=G,l.cssHooks=H,l}),g("b",[],function(){return function(a,b){function c(a,b,c,d){function e(a){return a=parseInt(a,10).toString(16),a.length>1?a:"0"+a}return"#"+e(b)+e(c)+e(d)}var d,e,f,g,h=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,j=/\s*([^:]+):\s*([^;]+);?/g,k=/\s+$/,l={},m="\ufeff";for(a=a||{},b&&(f=b.getValidStyles(),g=b.getInvalidStyles()),e=("\\\" \\' \\; \\: ; : "+m).split(" "),d=0;d-1&&c||(w[a+b]=d==-1?i[0]:i.join(" "),delete w[a+"-top"+b],delete w[a+"-right"+b],delete w[a+"-bottom"+b],delete w[a+"-left"+b])}}function f(a){var b,c=w[a];if(c){for(c=c.split(" "),b=c.length;b--;)if(c[b]!==c[0])return!1;return w[a]=c[0],!0}}function g(a,b,c,d){f(b)&&f(c)&&f(d)&&(w[a]=w[b]+" "+w[c]+" "+w[d],delete w[b],delete w[c],delete w[d])}function n(a){return v=!0,l[a]}function o(a,b){return v&&(a=a.replace(/\uFEFF[0-9]/g,function(a){return l[a]})),b||(a=a.replace(/\\([\'\";:])/g,"$1")),a}function p(a){return String.fromCharCode(parseInt(a.slice(1),16))}function q(a){return a.replace(/\\[0-9a-f]+/gi,p)}function r(b,c,d,e,f,g){if(f=f||g)return f=o(f),"'"+f.replace(/\'/g,"\\'")+"'";if(c=o(c||d||e),!a.allow_script_urls){var h=c.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(h))return"";if(!a.allow_svg_data_urls&&/^data:image\/svg/i.test(h))return""}return x&&(c=x.call(y,c,"style")),"url('"+c.replace(/\'/g,"\\'")+"')"}var s,t,u,v,w={},x=a.url_converter,y=a.url_converter_scope||this;if(b){for(b=b.replace(/[\u0000-\u001F]/g,""),b=b.replace(/\\[\"\';:\uFEFF]/g,n).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(a){return a.replace(/[;:]/g,n)});s=j.exec(b);)if(j.lastIndex=s.index+s[0].length,t=s[1].replace(k,"").toLowerCase(),u=s[2].replace(k,""),t&&u){if(t=q(t),u=q(u),t.indexOf(m)!==-1||t.indexOf('"')!==-1)continue;if(!a.allow_script_urls&&("behavior"==t||/expression\s*\(|\/\*|\*\//.test(u)))continue;"font-weight"===t&&"700"===u?u="bold":"color"!==t&&"background-color"!==t||(u=u.toLowerCase()),u=u.replace(h,c),u=u.replace(i,r),w[t]=v?o(u,!0):u}e("border","",!0),e("border","-width"),e("border","-color"),e("border","-style"),e("padding",""),e("margin",""),g("border","border-width","border-style","border-color"),"medium none"===w.border&&delete w.border,"none"===w["border-image"]&&delete w["border-image"]}return w},serialize:function(a,b){function c(b){var c,d,e,g;if(c=f[b])for(d=0,e=c.length;d0?" ":"")+b+": "+g+";")}function d(a,b){var c;return c=g["*"],(!c||!c[a])&&(c=g[b],!c||!c[a])}var e,h,i="";if(b&&f)c("*"),c(b);else for(e in a)h=a[e],!h||g&&!d(e,b)||(i+=(i.length>0?" ":"")+e+": "+h+";");return i}}}}),g("c",[],function(){return function(a,b){function c(a,c,d,e){var f,g;if(a){if(!e&&a[c])return a[c];if(a!=b){if(f=a[d])return f;for(g=a.parentNode;g&&g!=b;g=g.parentNode)if(f=g[d])return f}}}function d(a,c,d,e){var f,g,h;if(a){if(f=a[d],b&&f===b)return;if(f){if(!e)for(h=f[c];h;h=h[c])if(!h[c])return h;return f}if(g=a.parentNode,g&&g!==b)return g}}var e=a;this.current=function(){return e},this.next=function(a){return e=c(e,"firstChild","nextSibling",a)},this.prev=function(a){return e=c(e,"lastChild","previousSibling",a)},this.prev2=function(a){return e=d(e,"lastChild","previousSibling",a)}}}),g("d",["9"],function(a){function b(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.textContent||b.innerText||a}function c(a,b){var c,d,f,g={};if(a){for(a=a.split(","),b=b||10,c=0;c\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,i=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,j=/[<>&\"\']/g,k=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,l={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};e={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},f={"<":"<",">":">","&":"&",""":'"',"'":"'"},d=c("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var m={encodeRaw:function(a,b){return a.replace(b?h:i,function(a){return e[a]||a})},encodeAllRaw:function(a){return(""+a).replace(j,function(a){return e[a]||a})},encodeNumeric:function(a,b){return a.replace(b?h:i,function(a){return a.length>1?"&#"+(1024*(a.charCodeAt(0)-55296)+(a.charCodeAt(1)-56320)+65536)+";":e[a]||"&#"+a.charCodeAt(0)+";"})},encodeNamed:function(a,b,c){return c=c||d,a.replace(b?h:i,function(a){return e[a]||c[a]||a})},getEncodeFunc:function(a,b){function f(a,c){return a.replace(c?h:i,function(a){return void 0!==e[a]?e[a]:void 0!==b[a]?b[a]:a.length>1?"&#"+(1024*(a.charCodeAt(0)-55296)+(a.charCodeAt(1)-56320)+65536)+";":"&#"+a.charCodeAt(0)+";"})}function j(a,c){return m.encodeNamed(a,c,b)}return b=c(b)||d,a=g(a.replace(/\+/g,",")),a.named&&a.numeric?f:a.named?b?j:m.encodeNamed:a.numeric?m.encodeNumeric:m.encodeRaw},decode:function(a){return a.replace(k,function(a,c){return c?(c="x"===c.charAt(0).toLowerCase()?parseInt(c.substr(1),16):parseInt(c,10),c>65535?(c-=65536,String.fromCharCode(55296+(c>>10),56320+(1023&c))):l[c]||String.fromCharCode(c)):f[a]||d[a]||b(a)})}};return m}),g("1h",["9"],function(a){function b(c){function d(){return J.createDocumentFragment()}function e(a,b){x(N,a,b)}function f(a,b){x(O,a,b)}function g(a){e(a.parentNode,U(a))}function h(a){e(a.parentNode,U(a)+1)}function i(a){f(a.parentNode,U(a))}function j(a){f(a.parentNode,U(a)+1)}function k(a){a?(I[R]=I[Q],I[S]=I[P]):(I[Q]=I[R],I[P]=I[S]),I.collapsed=N}function l(a){g(a),j(a)}function m(a){e(a,0),f(a,1===a.nodeType?a.childNodes.length:a.nodeValue.length)}function n(a,b){var c=I[Q],d=I[P],e=I[R],f=I[S],g=b.startContainer,h=b.startOffset,i=b.endContainer,j=b.endOffset;return 0===a?w(c,d,g,h):1===a?w(e,f,g,h):2===a?w(e,f,i,j):3===a?w(c,d,i,j):void 0}function o(){y(M)}function p(){return y(K)}function q(){return y(L)}function r(a){var b,d,e=this[Q],f=this[P];3!==e.nodeType&&4!==e.nodeType||!e.nodeValue?(e.childNodes.length>0&&(d=e.childNodes[f]),d?e.insertBefore(a,d):3==e.nodeType?c.insertAfter(a,e):e.appendChild(a)):f?f>=e.nodeValue.length?c.insertAfter(a,e):(b=e.splitText(f),e.parentNode.insertBefore(a,b)):e.parentNode.insertBefore(a,e)}function s(a){var b=I.extractContents();I.insertNode(a),a.appendChild(b),I.selectNode(a)}function t(){return T(new b(c),{startContainer:I[Q],startOffset:I[P],endContainer:I[R],endOffset:I[S],collapsed:I.collapsed,commonAncestorContainer:I.commonAncestorContainer})}function u(a,b){var c;if(3==a.nodeType)return a;if(b<0)return a;for(c=a.firstChild;c&&b>0;)--b,c=c.nextSibling;return c?c:a}function v(){return I[Q]==I[R]&&I[P]==I[S]}function w(a,b,d,e){var f,g,h,i,j,k;if(a==d)return b==e?0:b0&&I.collapse(a):I.collapse(a),I.collapsed=v(),I.commonAncestorContainer=c.findCommonAncestor(I[Q],I[R])}function y(a){var b,c,d,e,f,g,h,i=0,j=0;if(I[Q]==I[R])return z(a);for(b=I[R],c=b.parentNode;c;b=c,c=c.parentNode){if(c==I[Q])return A(b,a);++i}for(b=I[Q],c=b.parentNode;c;b=c,c=c.parentNode){if(c==I[R])return B(b,a);++j}for(d=j-i,e=I[Q];d>0;)e=e.parentNode,d--;for(f=I[R];d<0;)f=f.parentNode,d++;for(g=e.parentNode,h=f.parentNode;g!=h;g=g.parentNode,h=h.parentNode)e=g,f=h;return C(e,f,a)}function z(a){var b,c,e,f,g,h,i,j,k;if(a!=M&&(b=d()),I[P]==I[S])return b;if(3==I[Q].nodeType){if(c=I[Q].nodeValue,e=c.substring(I[P],I[S]),a!=L&&(f=I[Q],j=I[P],k=I[S]-I[P],0===j&&k>=f.nodeValue.length-1?f.parentNode.removeChild(f):f.deleteData(j,k),I.collapse(N)),a==M)return;return e.length>0&&b.appendChild(J.createTextNode(e)),b}for(f=u(I[Q],I[P]),g=I[S]-I[P];f&&g>0;)h=f.nextSibling,i=G(f,a),b&&b.appendChild(i),--g,f=h;return a!=L&&I.collapse(N),b}function A(a,b){var c,e,f,g,h,i;if(b!=M&&(c=d()),e=D(a,b),c&&c.appendChild(e),f=U(a),g=f-I[P],g<=0)return b!=L&&(I.setEndBefore(a),I.collapse(O)),c;for(e=a.previousSibling;g>0;)h=e.previousSibling,i=G(e,b),c&&c.insertBefore(i,c.firstChild),--g,e=h;return b!=L&&(I.setEndBefore(a),I.collapse(O)),c}function B(a,b){var c,e,f,g,h,i;for(b!=M&&(c=d()),f=E(a,b),c&&c.appendChild(f),e=U(a),++e,g=I[S]-e,f=a.nextSibling;f&&g>0;)h=f.nextSibling,i=G(f,b),c&&c.appendChild(i),--g,f=h;return b!=L&&(I.setStartAfter(a),I.collapse(N)),c}function C(a,b,c){var e,f,g,h,i,j,k;for(c!=M&&(f=d()),e=E(a,c),f&&f.appendChild(e),g=U(a),h=U(b),++g,i=h-g,j=a.nextSibling;i>0;)k=j.nextSibling,e=G(j,c),f&&f.appendChild(e),j=k,--i;return e=D(b,c),f&&f.appendChild(e),c!=L&&(I.setStartAfter(a),I.collapse(N)),f}function D(a,b){var c,d,e,f,g,h=u(I[R],I[S]-1),i=h!=I[R];if(h==a)return F(h,i,O,b);for(c=h.parentNode,d=F(c,O,O,b);c;){for(;h;)e=h.previousSibling,f=F(h,i,O,b),b!=M&&d.insertBefore(f,d.firstChild),i=N,h=e;if(c==a)return d;h=c.previousSibling,c=c.parentNode,g=F(c,O,O,b),b!=M&&g.appendChild(d),d=g}}function E(a,b){var c,d,e,f,g,h=u(I[Q],I[P]),i=h!=I[Q];if(h==a)return F(h,i,N,b);for(c=h.parentNode,d=F(c,O,N,b);c;){for(;h;)e=h.nextSibling,f=F(h,i,N,b),b!=M&&d.appendChild(f),i=N,h=e;if(c==a)return d;h=c.nextSibling,c=c.parentNode,g=F(c,O,N,b),b!=M&&g.appendChild(d),d=g}}function F(a,b,d,e){var f,g,h,i,j;if(b)return G(a,e);if(3==a.nodeType){if(f=a.nodeValue,d?(i=I[P],g=f.substring(i),h=f.substring(0,i)):(i=I[S],g=f.substring(0,i),h=f.substring(i)),e!=L&&(a.nodeValue=h),e==M)return;return j=c.clone(a,O),j.nodeValue=g,j}if(e!=M)return c.clone(a,O)}function G(a,b){return b!=M?b==L?c.clone(a,N):a:void a.parentNode.removeChild(a)}function H(){return c.create("body",null,q()).outerText}var I=this,J=c.doc,K=0,L=1,M=2,N=!0,O=!1,P="startOffset",Q="startContainer",R="endContainer",S="endOffset",T=a.extend,U=c.nodeIndex;return T(I,{startContainer:J,startOffset:0,endContainer:J,endOffset:0,collapsed:N,commonAncestorContainer:J,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:e,setEnd:f,setStartBefore:g,setStartAfter:h,setEndBefore:i,setEndAfter:j,collapse:k,selectNode:l,selectNodeContents:m,compareBoundaryPoints:n,deleteContents:o,extractContents:p,cloneContents:q,insertNode:r,surroundContents:s,cloneRange:t,toStringIE:H}),I}return b.prototype.toString=function(){return this.toStringIE()},b}),h("4r",Array),h("4s",Error),g("3t",["4r","4s"],function(a,b){var c=function(){},d=function(a,b){return function(){return a(b.apply(null,arguments))}},e=function(a){return function(){return a}},f=function(a){return a},g=function(a,b){return a===b},h=function(b){for(var c=new a(arguments.length-1),d=1;d-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e=b.length&&c(d)}};0===b.length?c([]):a.each(b,function(a,b){a.get(f(b))})})};return{par:b}}),g("3v",["3s","3u","4w"],function(a,b,c){var d=function(a){return c.par(a,b.nu)},e=function(b,c){var e=a.map(b,c);return d(e)},f=function(a,b){return function(c){return b(c).bind(a)}};return{par:d,mapM:e,compose:f}}),g("3w",["3t","4q"],function(a,b){var c=function(d){var e=function(a){return d===a},f=function(a){return c(d)},g=function(a){return c(d)},h=function(a){return c(a(d))},i=function(a){a(d)},j=function(a){return a(d)},k=function(a,b){return b(d)},l=function(a){return a(d)},m=function(a){return a(d)},n=function(){return b.some(d)};return{is:e,isValue:a.constant(!0),isError:a.constant(!1),getOr:a.constant(d),getOrThunk:a.constant(d),getOrDie:a.constant(d),or:f,orThunk:g,fold:k,map:h,each:i,bind:j,exists:l,forall:m,toOption:n}},d=function(c){var e=function(a){return a()},f=function(){return a.die(c)()},g=function(a){return a},h=function(a){return a()},i=function(a){return d(c)},j=function(a){return d(c)},k=function(a,b){return a(c)};return{is:a.constant(!1),isValue:a.constant(!1),isError:a.constant(!0),getOr:a.identity,getOrThunk:e,getOrDie:f,or:g,orThunk:h,fold:k,map:i,each:a.noop,bind:j,exists:a.constant(!1),forall:a.constant(!0),toOption:b.none}};return{value:c,error:d}}),g("1i",["3s","3t","3u","3v","3w","5","9"],function(a,b,c,d,e,f,g){"use strict";return function(h,i){function j(a){h.getElementsByTagName("head")[0].appendChild(a)}function k(a,b,c){function d(){for(var a=t.passed,b=a.length;b--;)a[b]();t.status=2,t.passed=[],t.failed=[]}function e(){for(var a=t.failed,b=a.length;b--;)a[b]();t.status=3,t.passed=[],t.failed=[]}function i(){var a=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(a&&a[1]<536)}function k(a,b){a()||((new Date).getTime()-s0)return r=h.createElement("style"), -r.textContent='@import "'+a+'"',p(),void j(r);o()}j(q),q.href=a}}var l,m=0,n={};i=i||{},l=i.maxLoadTime||5e3;var o=function(a){return c.nu(function(c){k(a,b.compose(c,b.constant(e.value(a))),b.compose(c,b.constant(e.error(a))))})},p=function(a){return a.fold(b.identity,b.identity)},q=function(b,c,e){d.par(a.map(b,o)).get(function(b){var d=a.partition(b,function(a){return a.isValue()});d.fail.length>0?e(d.fail.map(p)):c(d.pass.map(p))})};return{load:k,loadAll:q}}}),g("j",["9"],function(a){function b(b,c){return b=a.trim(b),b?b.split(c||" "):[]}function c(a){function c(a,c,d){function e(a,b){var c,d,e={};for(c=0,d=a.length;c