From d02db0905636f71ac9e603811b2dd58a6a06f626 Mon Sep 17 00:00:00 2001 From: Darko Luketic Date: Mon, 29 Nov 2021 01:25:11 +0100 Subject: [PATCH] cleanup and update of jquery-colorpicker dependency --- crayon-syntax-highlighter.sublime-project | 13 - crayon_fonts.class.php | 24 +- crayon_formatter.class.php | 2 - crayon_highlighter.class.php | 820 +-- crayon_langs.class.php | 967 +-- crayon_parser.class.php | 472 +- crayon_resource.class.php | 643 +- crayon_settings.class.php | 173 +- crayon_settings_wp.class.php | 196 +- crayon_themes.class.php | 2 - crayon_wp.class.php | 4 +- global.php | 199 +- js/jquery-colorpicker/.editorconfig | 13 + js/jquery-colorpicker/.eslintrc.json | 34 + js/jquery-colorpicker/.gitignore | 7 + js/jquery-colorpicker/.stylelintrc | 7 + js/jquery-colorpicker/CHANGELOG.md | 81 + js/jquery-colorpicker/LICENSE | 21 + js/jquery-colorpicker/README | 231 - js/jquery-colorpicker/README.md | 539 ++ js/jquery-colorpicker/TODO | 48 +- js/jquery-colorpicker/bower.json | 26 + js/jquery-colorpicker/demo.html | 641 ++ .../i18n/jquery.ui.colorpicker-de.js | 27 + .../i18n/jquery.ui.colorpicker-el.js | 28 + .../i18n/jquery.ui.colorpicker-en-GB.js | 27 + .../i18n/jquery.ui.colorpicker-en-US.js | 27 + .../i18n/jquery.ui.colorpicker-en.js | 2 +- .../i18n/jquery.ui.colorpicker-es.js | 27 + .../i18n/jquery.ui.colorpicker-fr.js | 2 +- .../i18n/jquery.ui.colorpicker-nl.js | 2 +- .../i18n/jquery.ui.colorpicker-pl.js | 27 + .../i18n/jquery.ui.colorpicker-pt-BR.js | 27 + .../i18n/jquery.ui.colorpicker-ru.js | 27 + .../i18n/jquery.ui.colorpicker-sr.js | 27 + .../i18n/jquery.ui.colorpicker-uk.js | 27 + .../images/128/bar-alpha.png | Bin 0 -> 1564 bytes js/jquery-colorpicker/images/128/bar.png | Bin 0 -> 1076 bytes js/jquery-colorpicker/images/128/map.png | Bin 0 -> 37070 bytes js/jquery-colorpicker/images/favicon.png | Bin 0 -> 6299 bytes js/jquery-colorpicker/images/logotype-a.png | Bin 0 -> 12310 bytes js/jquery-colorpicker/images/logotype-b.png | Bin 0 -> 17041 bytes js/jquery-colorpicker/index.html | 542 +- js/jquery-colorpicker/jquery.colorpicker.css | 437 +- js/jquery-colorpicker/jquery.colorpicker.js | 5836 ++++++++++------- js/jquery-colorpicker/package.json | 32 + .../jquery.ui.colorpicker-cmyk-parser.js | 13 + ...y.ui.colorpicker-cmyk-percentage-parser.js | 13 + .../parts/jquery.ui.colorpicker-memory.js | 80 + .../parts/jquery.ui.colorpicker-rgbslider.js | 80 + .../jquery.ui.colorpicker-swatchesswitcher.js | 35 + .../swatches/jquery.ui.colorpicker-copic.js | 363 + .../swatches/jquery.ui.colorpicker-crayola.js | 125 + .../swatches/jquery.ui.colorpicker-din6164.js | 579 ++ .../swatches/jquery.ui.colorpicker-isccnbs.js | 273 + .../swatches/jquery.ui.colorpicker-pantone.js | 942 +++ .../jquery.ui.colorpicker-prismacolor.js | 206 + .../jquery.ui.colorpicker-ral-classic.js | 218 + .../swatches/jquery.ui.colorpicker-x11.js | 150 + js/jquery-colorpicker/test/events.js | 39 + js/jquery-colorpicker/test/index.html | 19 + js/jquery-colorpicker/test/issues.js | 22 + js/jquery-colorpicker/yarn.lock | 2799 ++++++++ 63 files changed, 13398 insertions(+), 4845 deletions(-) delete mode 100644 crayon-syntax-highlighter.sublime-project create mode 100644 js/jquery-colorpicker/.editorconfig create mode 100644 js/jquery-colorpicker/.eslintrc.json create mode 100644 js/jquery-colorpicker/.stylelintrc create mode 100644 js/jquery-colorpicker/CHANGELOG.md create mode 100644 js/jquery-colorpicker/LICENSE delete mode 100644 js/jquery-colorpicker/README create mode 100644 js/jquery-colorpicker/README.md create mode 100644 js/jquery-colorpicker/bower.json create mode 100644 js/jquery-colorpicker/demo.html create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-de.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-el.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-GB.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-US.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-es.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pl.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pt-BR.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-ru.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-sr.js create mode 100644 js/jquery-colorpicker/i18n/jquery.ui.colorpicker-uk.js create mode 100644 js/jquery-colorpicker/images/128/bar-alpha.png create mode 100644 js/jquery-colorpicker/images/128/bar.png create mode 100644 js/jquery-colorpicker/images/128/map.png create mode 100644 js/jquery-colorpicker/images/favicon.png create mode 100644 js/jquery-colorpicker/images/logotype-a.png create mode 100644 js/jquery-colorpicker/images/logotype-b.png create mode 100644 js/jquery-colorpicker/package.json create mode 100644 js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-parser.js create mode 100644 js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js create mode 100644 js/jquery-colorpicker/parts/jquery.ui.colorpicker-memory.js create mode 100644 js/jquery-colorpicker/parts/jquery.ui.colorpicker-rgbslider.js create mode 100644 js/jquery-colorpicker/parts/jquery.ui.colorpicker-swatchesswitcher.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-copic.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-crayola.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-din6164.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-isccnbs.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-pantone.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-prismacolor.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-ral-classic.js create mode 100644 js/jquery-colorpicker/swatches/jquery.ui.colorpicker-x11.js create mode 100644 js/jquery-colorpicker/test/events.js create mode 100644 js/jquery-colorpicker/test/index.html create mode 100644 js/jquery-colorpicker/test/issues.js create mode 100644 js/jquery-colorpicker/yarn.lock diff --git a/crayon-syntax-highlighter.sublime-project b/crayon-syntax-highlighter.sublime-project deleted file mode 100644 index c3e83ab..0000000 --- a/crayon-syntax-highlighter.sublime-project +++ /dev/null @@ -1,13 +0,0 @@ -{ - "folders": - [ - { - "follow_symlinks": true, - "path": ".", - "folder_exclude_patterns": [ - "min", - "trans" - ] - } - ] -} diff --git a/crayon_fonts.class.php b/crayon_fonts.class.php index 4995d95..4ee3bcb 100644 --- a/crayon_fonts.class.php +++ b/crayon_fonts.class.php @@ -1,18 +1,21 @@ set_default(self::DEFAULT_FONT, self::DEFAULT_FONT_NAME); + // Methods ================================================================ + + function __construct() + { + $this->set_default(self::DEFAULT_FONT, self::DEFAULT_FONT_NAME); $this->directory(CRAYON_FONT_PATH); $this->relative_directory(CRAYON_FONT_DIR); $this->extension('css'); @@ -30,7 +33,6 @@ class CrayonFonts extends CrayonUserResourceCollection { } CrayonLog::debug($this->directory()); CrayonLog::debug($this->user_directory()); - } + } } -?> \ No newline at end of file diff --git a/crayon_formatter.class.php b/crayon_formatter.class.php index 3cf3c08..3d6fa81 100644 --- a/crayon_formatter.class.php +++ b/crayon_formatter.class.php @@ -629,5 +629,3 @@ class CrayonFormatter { return ' ' . $dim_mode . ': ' . $hl->setting_val($name) . $dim_unit . ';'; } } - -?> diff --git a/crayon_highlighter.class.php b/crayon_highlighter.class.php index 72b86e6..bda2aad 100644 --- a/crayon_highlighter.class.php +++ b/crayon_highlighter.class.php @@ -1,423 +1,449 @@ url($url); - } - - if ($language !== NULL) { - $this->language($language); - } - // Default ID - $id = $id !== NULL ? $id : uniqid(); - $this->id($id); - } - - /* Tries to load the code locally, then attempts to load it remotely */ - private function load() { - if (empty($this->url)) { - $this->error('The specified URL is empty, please provide a valid URL.'); - return; - } - // Try to replace the URL with an absolute path if it is local, used to prevent scripts - // from executing when they are loaded. - $url = $this->url; - if ($this->setting_val(CrayonSettings::DECODE_ATTRIBUTES)) { - $url = CrayonUtil::html_entity_decode($url); - } - $url = CrayonUtil::pathf($url); - $site_http = CrayonGlobalSettings::site_url(); - $scheme = parse_url($url, PHP_URL_SCHEME); - // Try to replace the site URL with a path to force local loading - if (empty($scheme)) { - // No url scheme is given - path may be given as relative - $url = CrayonUtil::path_slash($site_http) . CrayonUtil::path_slash($this->setting_val(CrayonSettings::LOCAL_PATH)) . $url; - } - $http_code = 0; - // If available, use the built in wp remote http get function. - if (function_exists('wp_remote_get')) { - $url_uid = 'crayon_' . CrayonUtil::str_uid($url); - $cached = get_transient($url_uid, 'crayon-syntax'); - CrayonSettingsWP::load_cache(); - if ($cached !== FALSE) { - $content = $cached; - $http_code = 200; - } else { - $response = @wp_remote_get($url, array('sslverify' => false, 'timeout' => 20)); - $content = wp_remote_retrieve_body($response); - $http_code = wp_remote_retrieve_response_code($response); - $cache = $this->setting_val(CrayonSettings::CACHE); - $cache_sec = CrayonSettings::get_cache_sec($cache); - if ($cache_sec > 1 && $http_code >= 200 && $http_code < 400) { - set_transient($url_uid, $content, $cache_sec); - CrayonSettingsWP::add_cache($url_uid); - } - } - } else if (in_array(parse_url($url, PHP_URL_SCHEME), array('ssl', 'http', 'https'))) { - // Fallback to cURL. At this point, the URL scheme must be valid. - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_HEADER, FALSE); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); - // For https connections, we do not require SSL verification - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); - curl_setopt($ch, CURLOPT_FRESH_CONNECT, FALSE); - curl_setopt($ch, CURLOPT_MAXREDIRS, 5); - if (isset($_SERVER['HTTP_USER_AGENT'])) { - curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); - } - $content = curl_exec($ch); - $error = curl_error($ch); - $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); - } - if ($http_code >= 200 && $http_code < 400) { - $this->code($content); - } else { - if (empty($this->code)) { - // If code is also given, just use that - $this->error("The provided URL ('$this->url'), parsed remotely as ('$url'), could not be accessed."); - } - } - $this->needs_load = FALSE; - } - /* Central point of access for all other functions to update code. */ - public function process() { - $tmr = new CrayonTimer(); - $this->runtime = NULL; - if ($this->needs_load) { - $tmr->start(); - $this->load(); - $this->runtime[CRAYON_LOAD_TIME] = $tmr->stop(); - } - if (!empty($this->error) || empty($this->code)) { - // Disable highlighting for errors and empty code - return; - } - - if ($this->language === NULL) { - $this->language_detect(); - } - if ($this->needs_format) { - $tmr->start(); - try { - // Parse before hand to read modes - $code = $this->code; - // If inline, then combine lines into one - if ($this->is_inline) { - $code = preg_replace('#[\r\n]+#ms', '', $code); - if ($this->setting_val(CrayonSettings::TRIM_WHITESPACE)) { - $code = trim($code); - } - } - // Decode html entities (e.g. if using visual editor or manually encoding) - if ($this->setting_val(CrayonSettings::DECODE)) { - $code = CrayonUtil::html_entity_decode($code); - } - // Save code so output is plain output is the same - $this->code = $code; - - // Allow mixed if langauge supports it and setting is set - CrayonParser::parse($this->language->id()); - if (!$this->setting_val(CrayonSettings::MIXED) || !$this->language->mode(CrayonParser::ALLOW_MIXED)) { - // Format the code with the generated regex and elements - $this->formatted_code = CrayonFormatter::format_code($code, $this->language, $this); - } else { - // Format the code with Mixed Highlighting - $this->formatted_code = CrayonFormatter::format_mixed_code($code, $this->language, $this); - } - } catch (Exception $e) { - $this->error($e->message()); - return; - } - $this->needs_format = FALSE; - $this->runtime[CRAYON_FORMAT_TIME] = $tmr->stop(); - } - } - - /* Used to format the glue in between code when finding mixed languages */ - private function format_glue($glue, $highlight = TRUE) { - // TODO $highlight - return CrayonFormatter::format_code($glue, $this->language, $this, $highlight); - } +class CrayonHighlighter +{ + // Properties and Constants =============================================== + private $id = ''; + // URL is initially NULL, meaning none provided + private $url = NULL; + private $code = ''; + private $formatted_code = ''; + private $title = ''; + private $line_count = 0; + private $marked_lines = array(); + private $range = NULL; + private $error = ''; + // Determine whether the code needs to be loaded, parsed or formatted + private $needs_load = FALSE; + private $needs_format = FALSE; + // Record the script run times + private $runtime = array(); + // Whether the code is mixed + private $is_mixed = FALSE; + // Inline code on a single floating line + private $is_inline = FALSE; + private $is_highlighted = TRUE; - /* Sends the code to the formatter for printing. Apart from the getters and setters, this is - the only other function accessible outside this class. $show_lines can also be a string. */ - function output($show_lines = TRUE, $print = TRUE) { - $this->process(); - if (empty($this->error)) { - // If no errors have occured, print the formatted code - $ret = CrayonFormatter::print_code($this, $this->formatted_code, $show_lines, $print); - } else { - $ret = CrayonFormatter::print_error($this, $this->error, '', $print); - } - // Reset the error message at the end of the print session - $this->error = ''; - // If $print = FALSE, $ret will contain the output - return $ret; - } + // Objects + // Stores the CrayonLang being used + private $language = NULL; + // A copy of the current global settings which can be overridden + private $settings = NULL; - // Getters and Setters ==================================================== - function code($code = NULL) { - if ($code === NULL) { - return $this->code; - } else { - // Trim whitespace - if ($this->setting_val(CrayonSettings::TRIM_WHITESPACE)) { - $code = preg_replace("#(?:^\\s*\\r?\\n)|(?:\\r?\\n\\s*$)#", '', $code); - } + // Methods ================================================================ + function __construct($url = NULL, $language = NULL, $id = NULL) + { + if ($url !== NULL) { + $this->url($url); + } + + if ($language !== NULL) { + $this->language($language); + } + // Default ID + $id = $id !== NULL ? $id : uniqid(); + $this->id($id); + } + + /* Tries to load the code locally, then attempts to load it remotely */ + private function load() + { + if (empty($this->url)) { + $this->error('The specified URL is empty, please provide a valid URL.'); + return; + } + // Try to replace the URL with an absolute path if it is local, used to prevent scripts + // from executing when they are loaded. + $url = $this->url; + if ($this->setting_val(CrayonSettings::DECODE_ATTRIBUTES)) { + $url = CrayonUtil::html_entity_decode($url); + } + $url = CrayonUtil::pathf($url); + $site_http = CrayonGlobalSettings::site_url(); + $scheme = parse_url($url, PHP_URL_SCHEME); + // Try to replace the site URL with a path to force local loading + if (empty($scheme)) { + // No url scheme is given - path may be given as relative + $url = CrayonUtil::path_slash($site_http) . CrayonUtil::path_slash($this->setting_val(CrayonSettings::LOCAL_PATH)) . $url; + } + $http_code = 0; + // If available, use the built in wp remote http get function. + if (function_exists('wp_remote_get')) { + $url_uid = 'crayon_' . CrayonUtil::str_uid($url); + $cached = get_transient($url_uid, 'crayon-syntax'); + CrayonSettingsWP::load_cache(); + if ($cached !== FALSE) { + $content = $cached; + $http_code = 200; + } else { + $response = @wp_remote_get($url, array('sslverify' => false, 'timeout' => 20)); + $content = wp_remote_retrieve_body($response); + $http_code = wp_remote_retrieve_response_code($response); + $cache = $this->setting_val(CrayonSettings::CACHE); + $cache_sec = CrayonSettings::get_cache_sec($cache); + if ($cache_sec > 1 && $http_code >= 200 && $http_code < 400) { + set_transient($url_uid, $content, $cache_sec); + CrayonSettingsWP::add_cache($url_uid); + } + } + } else if (in_array(parse_url($url, PHP_URL_SCHEME), array('ssl', 'http', 'https'))) { + // Fallback to cURL. At this point, the URL scheme must be valid. + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_HEADER, FALSE); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); + // For https connections, we do not require SSL verification + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); + curl_setopt($ch, CURLOPT_FRESH_CONNECT, FALSE); + curl_setopt($ch, CURLOPT_MAXREDIRS, 5); + if (isset($_SERVER['HTTP_USER_AGENT'])) { + curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); + } + $content = curl_exec($ch); + $error = curl_error($ch); + $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + } + if ($http_code >= 200 && $http_code < 400) { + $this->code($content); + } else { + if (empty($this->code)) { + // If code is also given, just use that + $this->error("The provided URL ('$this->url'), parsed remotely as ('$url'), could not be accessed."); + } + } + $this->needs_load = FALSE; + } + + /* Central point of access for all other functions to update code. */ + public function process() + { + $tmr = new CrayonTimer(); + $this->runtime = NULL; + if ($this->needs_load) { + $tmr->start(); + $this->load(); + $this->runtime[CRAYON_LOAD_TIME] = $tmr->stop(); + } + if (!empty($this->error) || empty($this->code)) { + // Disable highlighting for errors and empty code + return; + } + + if ($this->language === NULL) { + $this->language_detect(); + } + if ($this->needs_format) { + $tmr->start(); + try { + // Parse before hand to read modes + $code = $this->code; + // If inline, then combine lines into one + if ($this->is_inline) { + $code = preg_replace('#[\r\n]+#ms', '', $code); + if ($this->setting_val(CrayonSettings::TRIM_WHITESPACE)) { + $code = trim($code); + } + } + // Decode html entities (e.g. if using visual editor or manually encoding) + if ($this->setting_val(CrayonSettings::DECODE)) { + $code = CrayonUtil::html_entity_decode($code); + } + // Save code so output is plain output is the same + $this->code = $code; + + // Allow mixed if langauge supports it and setting is set + CrayonParser::parse($this->language->id()); + if (!$this->setting_val(CrayonSettings::MIXED) || !$this->language->mode(CrayonParser::ALLOW_MIXED)) { + // Format the code with the generated regex and elements + $this->formatted_code = CrayonFormatter::format_code($code, $this->language, $this); + } else { + // Format the code with Mixed Highlighting + $this->formatted_code = CrayonFormatter::format_mixed_code($code, $this->language, $this); + } + } catch (Exception $e) { + $this->error($e->message()); + return; + } + $this->needs_format = FALSE; + $this->runtime[CRAYON_FORMAT_TIME] = $tmr->stop(); + } + } + + /* Used to format the glue in between code when finding mixed languages */ + private function format_glue($glue, $highlight = TRUE) + { + // TODO $highlight + return CrayonFormatter::format_code($glue, $this->language, $this, $highlight); + } + + /* Sends the code to the formatter for printing. Apart from the getters and setters, this is + the only other function accessible outside this class. $show_lines can also be a string. */ + function output($show_lines = TRUE, $print = TRUE) + { + $this->process(); + if (empty($this->error)) { + // If no errors have occured, print the formatted code + $ret = CrayonFormatter::print_code($this, $this->formatted_code, $show_lines, $print); + } else { + $ret = CrayonFormatter::print_error($this, $this->error, '', $print); + } + // Reset the error message at the end of the print session + $this->error = ''; + // If $print = FALSE, $ret will contain the output + return $ret; + } + + // Getters and Setters ==================================================== + function code($code = NULL) + { + if ($code === NULL) { + return $this->code; + } else { + // Trim whitespace + if ($this->setting_val(CrayonSettings::TRIM_WHITESPACE)) { + $code = preg_replace("#(?:^\\s*\\r?\\n)|(?:\\r?\\n\\s*$)#", '', $code); + } if ($this->setting_val(CrayonSettings::TRIM_CODE_TAG)) { $code = preg_replace('#^\s*<\s*code[^>]*>#msi', '', $code); $code = preg_replace('#]*>\s*$#msi', '', $code); } - $before = $this->setting_val(CrayonSettings::WHITESPACE_BEFORE); - if ($before > 0) { - $code = str_repeat("\n", $before) . $code; - } - $after = $this->setting_val(CrayonSettings::WHITESPACE_AFTER); - if ($after > 0) { - $code = $code . str_repeat("\n", $after); - } - - if (!empty($code)) { - $this->code = $code; - $this->needs_format = TRUE; - } - } - } + $before = $this->setting_val(CrayonSettings::WHITESPACE_BEFORE); + if ($before > 0) { + $code = str_repeat("\n", $before) . $code; + } + $after = $this->setting_val(CrayonSettings::WHITESPACE_AFTER); + if ($after > 0) { + $code = $code . str_repeat("\n", $after); + } - function language($id = NULL) { - if ($id === NULL || !is_string($id)) { - return $this->language; - } - - if ( ($lang = CrayonResources::langs()->get($id)) != FALSE || ($lang = CrayonResources::langs()->alias($id)) != FALSE ) { - // Set the language if it exists or look for an alias - $this->language = $lang; - } else { - $this->language_detect(); - } - - // Prepare the language for use, even if we have no code, we need the name - CrayonParser::parse($this->language->id()); - } - - function language_detect() { - // Attempt to detect the language - if (!empty($id)) { - $this->log("The language '$id' could not be loaded."); - } - $this->language = CrayonResources::langs()->detect($this->url, $this->setting_val(CrayonSettings::FALLBACK_LANG)); - } + if (!empty($code)) { + $this->code = $code; + $this->needs_format = TRUE; + } + } + } - function url($url = NULL) { - if ($url === NULL) { - return $this->url; - } else { - $this->url = $url; - $this->needs_load = TRUE; - } - } + function language($id = NULL) + { + if ($id === NULL || !is_string($id)) { + return $this->language; + } - function title($title = NULL) { - if (!CrayonUtil::str($this->title, $title)) { - return $this->title; - } - } + if (($lang = CrayonResources::langs()->get($id)) != FALSE || ($lang = CrayonResources::langs()->alias($id)) != FALSE) { + // Set the language if it exists or look for an alias + $this->language = $lang; + } else { + $this->language_detect(); + } - function line_count($line_count = NULL) { - if (!CrayonUtil::num($this->line_count, $line_count)) { - return $this->line_count; - } - } + // Prepare the language for use, even if we have no code, we need the name + CrayonParser::parse($this->language->id()); + } - function marked($str = NULL) { - if ($str === NULL) { - return $this->marked_lines; - } - // If only an int is given - if (is_int($str)) { - $array = array($str); - return CrayonUtil::arr($this->marked_lines, $array); - } - // A string with ints separated by commas, can also contain ranges - $array = CrayonUtil::trim_e($str); - $array = array_unique($array); - $lines = array(); - foreach ($array as $line) { - // Check for ranges - if (strpos($line, '-') !== FALSE) { - $ranges = CrayonUtil::range_str($line); - $lines = array_merge($lines, $ranges); - } else { - // Otherwise check the string for a number - $line = intval($line); - if ($line !== 0) { - $lines[] = $line; - } - } - } - return CrayonUtil::arr($this->marked_lines, $lines); - } - - function range($str = NULL) { - if ($str === NULL) { - return $this->range; - } else { - $range = CrayonUtil::range_str_single($str); - if ($range) { - $this->range = $range; - } - } - return FALSE; - } + function language_detect() + { + // Attempt to detect the language + if (!empty($id)) { + $this->log("The language '$id' could not be loaded."); + } + $this->language = CrayonResources::langs()->detect($this->url, $this->setting_val(CrayonSettings::FALLBACK_LANG)); + } - function log($var) { - if ($this->setting_val(CrayonSettings::ERROR_LOG)) { - CrayonLog::log($var); - } - } + function url($url = NULL) + { + if ($url === NULL) { + return $this->url; + } else { + $this->url = $url; + $this->needs_load = TRUE; + } + } - function id($id = NULL) { - if ($id == NULL) { - return $this->id; - } else { - $this->id = strval($id); - } - } - - function error($string = NULL) { - if (!$string) { - return $this->error; - } - $this->error .= $string; - $this->log($string); - // Add the error string and ensure no further processing occurs - $this->needs_load = FALSE; - $this->needs_format = FALSE; - } + function title($title = NULL) + { + if (!CrayonUtil::str($this->title, $title)) { + return $this->title; + } + } - // Set and retreive settings - // TODO fix this, it's too limiting - function settings($mixed = NULL) { - if ($this->settings == NULL) { - $this->settings = CrayonGlobalSettings::get_obj(); - } - - if ($mixed === NULL) { - return $this->settings; - } else if (is_string($mixed)) { - return $this->settings->get($mixed); - } else if (is_array($mixed)) { - $this->settings->set($mixed); - return TRUE; - } - return FALSE; - } + function line_count($line_count = NULL) + { + if (!CrayonUtil::num($this->line_count, $line_count)) { + return $this->line_count; + } + } - /* Retrieve a single setting's value for use in the formatter. By default, on failure it will - * return TRUE to ensure FALSE is only sent when a setting is found. This prevents a fake - * FALSE when the formatter checks for a positive setting (Show/Enable) and fails. When a - * negative setting is needed (Hide/Disable), $default_return should be set to FALSE. */ - // TODO fix this (see above) - function setting_val($name = NULL, $default_return = TRUE) { - if (is_string($name) && $setting = $this->settings($name)) { - return $setting->value(); - } else { - // Name not valid - return (is_bool($default_return) ? $default_return : TRUE); - } - } - - // Set a setting value - // TODO fix this (see above) - function setting_set($name = NULL, $value = TRUE) { - $this->settings->set($name, $value); - } + function marked($str = NULL) + { + if ($str === NULL) { + return $this->marked_lines; + } + // If only an int is given + if (is_int($str)) { + $array = array($str); + return CrayonUtil::arr($this->marked_lines, $array); + } + // A string with ints separated by commas, can also contain ranges + $array = CrayonUtil::trim_e($str); + $array = array_unique($array); + $lines = array(); + foreach ($array as $line) { + // Check for ranges + if (strpos($line, '-') !== FALSE) { + $ranges = CrayonUtil::range_str($line); + $lines = array_merge($lines, $ranges); + } else { + // Otherwise check the string for a number + $line = intval($line); + if ($line !== 0) { + $lines[] = $line; + } + } + } + return CrayonUtil::arr($this->marked_lines, $lines); + } - // Used to find current index in dropdown setting - function setting_index($name = NULL) { - $setting = $this->settings($name); - if (is_string($name) && $setting->is_array()) { - return $setting->index(); - } else { - // Returns -1 to avoid accidentally selecting an item in a dropdown - return CrayonSettings::INVALID; - } - } + function range($str = NULL) + { + if ($str === NULL) { + return $this->range; + } else { + $range = CrayonUtil::range_str_single($str); + if ($range) { + $this->range = $range; + } + } + return FALSE; + } - function formatted_code() { - return $this->formatted_code; - } + function log($var) + { + if ($this->setting_val(CrayonSettings::ERROR_LOG)) { + CrayonLog::log($var); + } + } - function runtime() { - return $this->runtime; - } - - function is_highlighted($highlighted = NULL) { - if ($highlighted === NULL) { - return $this->is_highlighted; - } else { - $this->is_highlighted = $highlighted; - } - } - - function is_mixed($mixed = NULL) { - if ($mixed === NULL) { - return $this->is_mixed; - } else { - $this->is_mixed = $mixed; - } - } - - function is_inline($inline = NULL) { - if ($inline === NULL) { - return $this->is_inline; - } else { - $inline = CrayonUtil::str_to_bool($inline, FALSE); - $this->is_inline = $inline; - } - } + function id($id = NULL) + { + if ($id == NULL) { + return $this->id; + } else { + $this->id = strval($id); + } + } + + function error($string = NULL) + { + if (!$string) { + return $this->error; + } + $this->error .= $string; + $this->log($string); + // Add the error string and ensure no further processing occurs + $this->needs_load = FALSE; + $this->needs_format = FALSE; + } + + // Set and retreive settings + // TODO fix this, it's too limiting + function settings($mixed = NULL) + { + if ($this->settings == NULL) { + $this->settings = CrayonGlobalSettings::get_obj(); + } + + if ($mixed === NULL) { + return $this->settings; + } else if (is_string($mixed)) { + return $this->settings->get($mixed); + } else if (is_array($mixed)) { + $this->settings->set($mixed); + return TRUE; + } + return FALSE; + } + + /* Retrieve a single setting's value for use in the formatter. By default, on failure it will + * return TRUE to ensure FALSE is only sent when a setting is found. This prevents a fake + * FALSE when the formatter checks for a positive setting (Show/Enable) and fails. When a + * negative setting is needed (Hide/Disable), $default_return should be set to FALSE. */ + // TODO fix this (see above) + function setting_val($name = NULL, $default_return = TRUE) + { + if (is_string($name) && $setting = $this->settings($name)) { + return $setting->value(); + } else { + // Name not valid + return (is_bool($default_return) ? $default_return : TRUE); + } + } + + // Set a setting value + // TODO fix this (see above) + function setting_set($name = NULL, $value = TRUE) + { + $this->settings->set($name, $value); + } + + // Used to find current index in dropdown setting + function setting_index($name = NULL) + { + $setting = $this->settings($name); + if (is_string($name) && $setting->is_array()) { + return $setting->index(); + } else { + // Returns -1 to avoid accidentally selecting an item in a dropdown + return CrayonSettings::INVALID; + } + } + + function formatted_code() + { + return $this->formatted_code; + } + + function runtime() + { + return $this->runtime; + } + + function is_highlighted($highlighted = NULL) + { + if ($highlighted === NULL) { + return $this->is_highlighted; + } else { + $this->is_highlighted = $highlighted; + } + } + + function is_mixed($mixed = NULL) + { + if ($mixed === NULL) { + return $this->is_mixed; + } else { + $this->is_mixed = $mixed; + } + } + + function is_inline($inline = NULL) + { + if ($inline === NULL) { + return $this->is_inline; + } else { + $inline = CrayonUtil::str_to_bool($inline, FALSE); + $this->is_inline = $inline; + } + } } -?> \ No newline at end of file diff --git a/crayon_langs.class.php b/crayon_langs.class.php index ee6c156..f0e4d1f 100644 --- a/crayon_langs.class.php +++ b/crayon_langs.class.php @@ -1,33 +1,37 @@ 'c', 'PREPROCESSOR' => 'p', 'STRING' => 's', 'KEYWORD' => 'k', - 'STATEMENT' => 'st', 'RESERVED' => 'r', 'TYPE' => 't', 'TAG' => 'ta', 'MODIFIER' => 'm', 'IDENTIFIER' => 'i', - 'ENTITY' => 'e', 'VARIABLE' => 'v', 'CONSTANT' => 'cn', 'OPERATOR' => 'o', 'SYMBOL' => 'sy', - 'NOTATION' => 'n', 'FADED' => 'f', CrayonParser::HTML_CHAR => 'h', CrayonParser::CRAYON_ELEMENT => 'crayon-internal-element'); - const DEFAULT_LANG = 'default'; - const DEFAULT_LANG_NAME = 'Default'; - const RESOURCE_TYPE = 'CrayonLangsResourceType'; +class CrayonLangs extends CrayonUserResourceCollection +{ + // Properties and Constants =============================================== + // CSS classes for known elements + private static $known_elements = array('COMMENT' => 'c', 'PREPROCESSOR' => 'p', 'STRING' => 's', 'KEYWORD' => 'k', + 'STATEMENT' => 'st', 'RESERVED' => 'r', 'TYPE' => 't', 'TAG' => 'ta', 'MODIFIER' => 'm', 'IDENTIFIER' => 'i', + 'ENTITY' => 'e', 'VARIABLE' => 'v', 'CONSTANT' => 'cn', 'OPERATOR' => 'o', 'SYMBOL' => 'sy', + 'NOTATION' => 'n', 'FADED' => 'f', CrayonParser::HTML_CHAR => 'h', CrayonParser::CRAYON_ELEMENT => 'crayon-internal-element'); + const DEFAULT_LANG = 'default'; + const DEFAULT_LANG_NAME = 'Default'; - // Used to cache the objects, since they are unlikely to change during a single run - private static $resource_cache = array(); + const RESOURCE_TYPE = 'CrayonLangsResourceType'; - // Methods ================================================================ - public function __construct() { - $this->set_default(self::DEFAULT_LANG, self::DEFAULT_LANG_NAME); - $this->directory(CRAYON_LANG_PATH); + // Used to cache the objects, since they are unlikely to change during a single run + private static $resource_cache = array(); + + // Methods ================================================================ + public function __construct() + { + $this->set_default(self::DEFAULT_LANG, self::DEFAULT_LANG_NAME); + $this->directory(CRAYON_LANG_PATH); $this->relative_directory(CRAYON_LANG_DIR); $this->extension('txt'); @@ -44,501 +48,550 @@ class CrayonLangs extends CrayonUserResourceCollection { } CrayonLog::debug($this->directory()); CrayonLog::debug($this->user_directory()); - } - - public function filename($id, $user = NULL) { - return $id."/$id.".$this->extension(); } - // XXX Override - public function load_process() { - parent::load_process(); - $this->load_exts(); - $this->load_aliases(); - $this->load_delimiters(); // TODO check for setting? - } + public function filename($id, $user = NULL) + { + return $id . "/$id." . $this->extension(); + } - public function load_resources($dir = NULL) { + // XXX Override + public function load_process() + { + parent::load_process(); + $this->load_exts(); + $this->load_aliases(); + $this->load_delimiters(); // TODO check for setting? + } + + public function load_resources($dir = NULL) + { parent::load_resources($dir); } - // XXX Override - public function create_user_resource_instance($id, $name = NULL) { + // XXX Override + public function create_user_resource_instance($id, $name = NULL) + { return new CrayonLang($id, $name); - } + } - // XXX Override - public function add_default() { - $result = parent::add_default(); - if ($this->is_state_loading() && !$result) { - // Default not added, must already be loaded, ready to parse - CrayonParser::parse(self::DEFAULT_LANG); - } - } + // XXX Override + public function add_default() + { + $result = parent::add_default(); + if ($this->is_state_loading() && !$result) { + // Default not added, must already be loaded, ready to parse + CrayonParser::parse(self::DEFAULT_LANG); + } + } - /* Attempts to detect the language based on extension, otherwise falls back to fallback language given. - * Returns a CrayonLang object. */ - public function detect($path, $fallback_id = NULL) { - $this->load(); - extract(pathinfo($path)); + /* Attempts to detect the language based on extension, otherwise falls back to fallback language given. + * Returns a CrayonLang object. */ + public function detect($path, $fallback_id = NULL) + { + $this->load(); + extract(pathinfo($path)); - // If fallback id if given - if ($fallback_id == NULL) { - // Otherwise use global fallback - $fallback_id = CrayonGlobalSettings::get(CrayonSettings::FALLBACK_LANG); - } - // Attempt to use fallback - $fallback = $this->get($fallback_id); - // Use extension before trying fallback - $extension = isset($extension) ? $extension : ''; + // If fallback id if given + if ($fallback_id == NULL) { + // Otherwise use global fallback + $fallback_id = CrayonGlobalSettings::get(CrayonSettings::FALLBACK_LANG); + } + // Attempt to use fallback + $fallback = $this->get($fallback_id); + // Use extension before trying fallback + $extension = isset($extension) ? $extension : ''; - if ( !empty($extension) && ($lang = $this->ext($extension)) || ($lang = $this->get($extension)) ) { - // If extension is found, attempt to find a language for it. - // If that fails, attempt to load a language with the same id as the extension. - return $lang; - } else if ($fallback != NULL || $fallback = $this->get_default()) { - // Resort to fallback if loaded, or fallback to default - return $fallback; - } else { - // No language found - return NULL; - } - } + if (!empty($extension) && ($lang = $this->ext($extension)) || ($lang = $this->get($extension))) { + // If extension is found, attempt to find a language for it. + // If that fails, attempt to load a language with the same id as the extension. + return $lang; + } else if ($fallback != NULL || $fallback = $this->get_default()) { + // Resort to fallback if loaded, or fallback to default + return $fallback; + } else { + // No language found + return NULL; + } + } - /* Load all extensions and add them into each language. */ - private function load_exts() { - // Load only once - if (!$this->is_state_loading()) { - return; - } - if ( ($lang_exts = self::load_attr_file(CRAYON_LANG_EXT)) !== FALSE ) { - foreach ($lang_exts as $lang_id=>$exts) { - $lang = $this->get($lang_id); - $lang->ext($exts); - } - } - } + /* Load all extensions and add them into each language. */ + private function load_exts() + { + // Load only once + if (!$this->is_state_loading()) { + return; + } + if (($lang_exts = self::load_attr_file(CRAYON_LANG_EXT)) !== FALSE) { + foreach ($lang_exts as $lang_id => $exts) { + $lang = $this->get($lang_id); + $lang->ext($exts); + } + } + } - /* Load all extensions and add them into each language. */ - private function load_aliases() { - // Load only once - if (!$this->is_state_loading()) { - return; - } - if ( ($lang_aliases = self::load_attr_file(CRAYON_LANG_ALIAS)) !== FALSE ) { - foreach ($lang_aliases as $lang_id=>$aliases) { - $lang = $this->get($lang_id); - $lang->alias($aliases); - } - } - } + /* Load all extensions and add them into each language. */ + private function load_aliases() + { + // Load only once + if (!$this->is_state_loading()) { + return; + } + if (($lang_aliases = self::load_attr_file(CRAYON_LANG_ALIAS)) !== FALSE) { + foreach ($lang_aliases as $lang_id => $aliases) { + $lang = $this->get($lang_id); + $lang->alias($aliases); + } + } + } - /* Load all extensions and add them into each language. */ - private function load_delimiters() { - // Load only once - if (!$this->is_state_loading()) { - return; - } - if ( ($lang_delims = self::load_attr_file(CRAYON_LANG_DELIM)) !== FALSE ) { - foreach ($lang_delims as $lang_id=>$delims) { - $lang = $this->get($lang_id); - $lang->delimiter($delims); - } - } - } + /* Load all extensions and add them into each language. */ + private function load_delimiters() + { + // Load only once + if (!$this->is_state_loading()) { + return; + } + if (($lang_delims = self::load_attr_file(CRAYON_LANG_DELIM)) !== FALSE) { + foreach ($lang_delims as $lang_id => $delims) { + $lang = $this->get($lang_id); + $lang->delimiter($delims); + } + } + } - // Used to load aliases and extensions to languages - private function load_attr_file($path) { - if ( ($lines = CrayonUtil::lines($path, 'lwc')) !== FALSE) { - $attributes = array(); // key = language id, value = array of attr - foreach ($lines as $line) { - preg_match('#^[\t ]*([^\r\n\t ]+)[\t ]+([^\r\n]+)#', $line, $matches); - if (count($matches) == 3 && $lang = $this->get($matches[1])) { - // If the langauges of the attribute exists, return it in an array - // TODO merge instead of replace key? - $attributes[$matches[1]] = explode(' ', $matches[2]); - } - } - return $attributes; - } else { - CrayonLog::syslog('Could not load attr file: ' . $path); - return FALSE; - } - } + // Used to load aliases and extensions to languages + private function load_attr_file($path) + { + if (($lines = CrayonUtil::lines($path, 'lwc')) !== FALSE) { + $attributes = array(); // key = language id, value = array of attr + foreach ($lines as $line) { + preg_match('#^[\t ]*([^\r\n\t ]+)[\t ]+([^\r\n]+)#', $line, $matches); + if (count($matches) == 3 && $lang = $this->get($matches[1])) { + // If the langauges of the attribute exists, return it in an array + // TODO merge instead of replace key? + $attributes[$matches[1]] = explode(' ', $matches[2]); + } + } + return $attributes; + } else { + CrayonLog::syslog('Could not load attr file: ' . $path); + return FALSE; + } + } - /* Returns the CrayonLang for the given extension */ - public function ext($ext) { - $this->load(); - foreach ($this->get() as $lang) { - if ($lang->has_ext($ext)) { - return $lang; - } - } - return FALSE; - } + /* Returns the CrayonLang for the given extension */ + public function ext($ext) + { + $this->load(); + foreach ($this->get() as $lang) { + if ($lang->has_ext($ext)) { + return $lang; + } + } + return FALSE; + } - /* Returns the CrayonLang for the given alias */ - public function alias($alias) { - $this->load(); - foreach ($this->get() as $lang) { - if ($lang->has_alias($alias)) { - return $lang; - } - } - return FALSE; - } + /* Returns the CrayonLang for the given alias */ + public function alias($alias) + { + $this->load(); + foreach ($this->get() as $lang) { + if ($lang->has_alias($alias)) { + return $lang; + } + } + return FALSE; + } - /* Fetches a resource. Type is an int from CrayonLangsResourceType. */ - public function fetch($type, $reload = FALSE, $keep_empty_fetches = FALSE) { - $this->load(); + /* Fetches a resource. Type is an int from CrayonLangsResourceType. */ + public function fetch($type, $reload = FALSE, $keep_empty_fetches = FALSE) + { + $this->load(); - if (!array_key_exists($type, self::$resource_cache) || $reload) { - $fetches = array(); - foreach ($this->get() as $lang) { + if (!array_key_exists($type, self::$resource_cache) || $reload) { + $fetches = array(); + foreach ($this->get() as $lang) { - switch ($type) { - case CrayonLangsResourceType::EXTENSION: - $fetch = $lang->ext(); - break; - case CrayonLangsResourceType::ALIAS: - $fetch = $lang->alias(); - break; - case CrayonLangsResourceType::DELIMITER: - $fetch = $lang->delimiter(); - break; - default: - return FALSE; - } + switch ($type) { + case CrayonLangsResourceType::EXTENSION: + $fetch = $lang->ext(); + break; + case CrayonLangsResourceType::ALIAS: + $fetch = $lang->alias(); + break; + case CrayonLangsResourceType::DELIMITER: + $fetch = $lang->delimiter(); + break; + default: + return FALSE; + } - if ( !empty($fetch) || $keep_empty_fetches ) { - $fetches[$lang->id()] = $fetch; - } - } - self::$resource_cache[$type] = $fetches; - } - return self::$resource_cache[$type]; - } + if (!empty($fetch) || $keep_empty_fetches) { + $fetches[$lang->id()] = $fetch; + } + } + self::$resource_cache[$type] = $fetches; + } + return self::$resource_cache[$type]; + } - public function extensions($reload = FALSE) { - return $this->fetch(CrayonLangsResourceType::EXTENSION, $reload); - } + public function extensions($reload = FALSE) + { + return $this->fetch(CrayonLangsResourceType::EXTENSION, $reload); + } - public function aliases($reload = FALSE) { - return $this->fetch(CrayonLangsResourceType::ALIAS, $reload); - } + public function aliases($reload = FALSE) + { + return $this->fetch(CrayonLangsResourceType::ALIAS, $reload); + } - public function delimiters($reload = FALSE) { - return $this->fetch(CrayonLangsResourceType::DELIMITER, $reload); - } + public function delimiters($reload = FALSE) + { + return $this->fetch(CrayonLangsResourceType::DELIMITER, $reload); + } - public function extensions_inverted($reload = FALSE) { - $extensions = $this->extensions($reload); - $inverted = array(); - foreach ($extensions as $lang=>$exts) { - foreach ($exts as $ext) { - $inverted[$ext] = $lang; - } - } - return $inverted; - } + public function extensions_inverted($reload = FALSE) + { + $extensions = $this->extensions($reload); + $inverted = array(); + foreach ($extensions as $lang => $exts) { + foreach ($exts as $ext) { + $inverted[$ext] = $lang; + } + } + return $inverted; + } - public function ids_and_aliases($reload = FALSE) { - $fetch = $this->fetch(CrayonLangsResourceType::ALIAS, $reload, TRUE); - foreach ($fetch as $id=>$alias_array) { - $ids_and_aliases[] = $id; - foreach ($alias_array as $alias) { - $ids_and_aliases[] = $alias; - } - } - return $ids_and_aliases; - } + public function ids_and_aliases($reload = FALSE) + { + $fetch = $this->fetch(CrayonLangsResourceType::ALIAS, $reload, TRUE); + foreach ($fetch as $id => $alias_array) { + $ids_and_aliases[] = $id; + foreach ($alias_array as $alias) { + $ids_and_aliases[] = $alias; + } + } + return $ids_and_aliases; + } - /* Return the array of valid elements or a particular element value */ - public static function known_elements($name = NULL) { - if ($name === NULL) { - return self::$known_elements; - } else if (is_string($name) && array_key_exists($name, self::$known_elements)) { - return self::$known_elements[$name]; - } else { - return FALSE; - } - } + /* Return the array of valid elements or a particular element value */ + public static function known_elements($name = NULL) + { + if ($name === NULL) { + return self::$known_elements; + } else if (is_string($name) && array_key_exists($name, self::$known_elements)) { + return self::$known_elements[$name]; + } else { + return FALSE; + } + } - /* Verify an element is valid */ - public static function is_known_element($name) { - return self::known_elements($name) !== FALSE; - } + /* Verify an element is valid */ + public static function is_known_element($name) + { + return self::known_elements($name) !== FALSE; + } - /* Compare two languages by name */ - public static function langcmp($a, $b) { - $a = strtolower($a->name()); - $b = strtolower($b->name()); - if ($a == $b) { - return 0; - } else { - return ($a < $b) ? -1 : 1; - } - } + /* Compare two languages by name */ + public static function langcmp($a, $b) + { + $a = strtolower($a->name()); + $b = strtolower($b->name()); + if ($a == $b) { + return 0; + } else { + return ($a < $b) ? -1 : 1; + } + } - public static function sort_by_name($langs) { - // Sort by name - usort($langs, 'CrayonLangs::langcmp'); - $sorted_lags = array(); - foreach ($langs as $lang) { - $sorted_lags[$lang->id()] = $lang; - } - return $sorted_lags; - } + public static function sort_by_name($langs) + { + // Sort by name + usort($langs, 'CrayonLangs::langcmp'); + $sorted_lags = array(); + foreach ($langs as $lang) { + $sorted_lags[$lang->id()] = $lang; + } + return $sorted_lags; + } - public function is_parsed($id = NULL) { - if ($id === NULL) { - // Determine if all langs are successfully parsed - foreach ($this->get() as $lang) { - if ($lang->state() != CrayonLang::PARSED_SUCCESS) { - return FALSE; - } - } - return TRUE; - } else if (($lang = $this->get($id)) != FALSE) { - return $lang->is_parsed(); - } - return FALSE; - } + public function is_parsed($id = NULL) + { + if ($id === NULL) { + // Determine if all langs are successfully parsed + foreach ($this->get() as $lang) { + if ($lang->state() != CrayonLang::PARSED_SUCCESS) { + return FALSE; + } + } + return TRUE; + } else if (($lang = $this->get($id)) != FALSE) { + return $lang->is_parsed(); + } + return FALSE; + } - public function is_default($id) { - if (($lang = $this->get($id)) != FALSE) { - return $lang->is_default(); - } - return FALSE; - } + public function is_default($id) + { + if (($lang = $this->get($id)) != FALSE) { + return $lang->is_default(); + } + return FALSE; + } } /* Individual language. */ -class CrayonLang extends CrayonVersionResource { - private $ext = array(); - private $aliases = array(); - private $delimiters = ''; - // Associative array of CrayonElement objects - private $elements = array(); - //private $regex = ''; - private $state = self::UNPARSED; - private $modes = array(); - // Whether this language allows Multiple Highlighting from other languages - const PARSED_ERRORS = -1; - const UNPARSED = 0; - const PARSED_SUCCESS = 1; - function __construct($id, $name = NULL) { - parent::__construct($id, $name); - $this->modes = CrayonParser::modes(); - } +class CrayonLang extends CrayonVersionResource +{ + private $ext = array(); + private $aliases = array(); + private $delimiters = ''; + // Associative array of CrayonElement objects + private $elements = array(); + //private $regex = ''; + private $state = self::UNPARSED; + private $modes = array(); + // Whether this language allows Multiple Highlighting from other languages + const PARSED_ERRORS = -1; + const UNPARSED = 0; + const PARSED_SUCCESS = 1; - // Override - function clean_id($id) { - $id = CrayonUtil::space_to_hyphen( strtolower(trim($id)) ); + function __construct($id, $name = NULL) + { + parent::__construct($id, $name); + $this->modes = CrayonParser::modes(); + } + + // Override + function clean_id($id) + { + $id = CrayonUtil::space_to_hyphen(strtolower(trim($id))); return preg_replace('/[^\w\-+#]/msi', '', $id); - } + } - function ext($ext = NULL) { - if ($ext === NULL) { - return $this->ext; - } else if (is_array($ext) && !empty($ext)) { - foreach ($ext as $e) { - $this->ext($e); - } - } else if (is_string($ext) && !empty($ext) && !in_array($ext, $this->ext)) { - $ext = strtolower($ext); - $ext = str_replace('.', '', $ext); - $this->ext[] = $ext; - } - } + function ext($ext = NULL) + { + if ($ext === NULL) { + return $this->ext; + } else if (is_array($ext) && !empty($ext)) { + foreach ($ext as $e) { + $this->ext($e); + } + } else if (is_string($ext) && !empty($ext) && !in_array($ext, $this->ext)) { + $ext = strtolower($ext); + $ext = str_replace('.', '', $ext); + $this->ext[] = $ext; + } + } - function has_ext($ext) { - return is_string($ext) && in_array($ext, $this->ext); - } + function has_ext($ext) + { + return is_string($ext) && in_array($ext, $this->ext); + } - function alias($alias = NULL) { - if ($alias === NULL) { - return $this->aliases; - } else if (is_array($alias) && !empty($alias)) { - foreach ($alias as $a) { - $this->alias($a); - } - } else if (is_string($alias) && !empty($alias) && !in_array($alias, $this->aliases)) { - $alias = strtolower($alias); - $this->aliases[] = $alias; - } - } + function alias($alias = NULL) + { + if ($alias === NULL) { + return $this->aliases; + } else if (is_array($alias) && !empty($alias)) { + foreach ($alias as $a) { + $this->alias($a); + } + } else if (is_string($alias) && !empty($alias) && !in_array($alias, $this->aliases)) { + $alias = strtolower($alias); + $this->aliases[] = $alias; + } + } - function has_alias($alias) { - return is_string($alias) && in_array($alias, $this->aliases); - } + function has_alias($alias) + { + return is_string($alias) && in_array($alias, $this->aliases); + } - function delimiter($delim = NULL) { - if ($delim === NULL) { - return $this->delimiters; - // Convert to regex for capturing delimiters - } else if (is_string($delim) && !empty($delim)) { - $this->delimiters = '(?:'.$delim.')'; - } else if (is_array($delim) && !empty($delim)) { - for ($i = 0; $i < count($delim); $i++) { - $delim[$i] = CrayonUtil::esc_atomic($delim[$i]); - } + function delimiter($delim = NULL) + { + if ($delim === NULL) { + return $this->delimiters; + // Convert to regex for capturing delimiters + } else if (is_string($delim) && !empty($delim)) { + $this->delimiters = '(?:' . $delim . ')'; + } else if (is_array($delim) && !empty($delim)) { + for ($i = 0; $i < count($delim); $i++) { + $delim[$i] = CrayonUtil::esc_atomic($delim[$i]); + } - $this->delimiters = '(?:'.implode(')|(?:', $delim).')'; - } - } + $this->delimiters = '(?:' . implode(')|(?:', $delim) . ')'; + } + } - function regex($element = NULL) { - if ($element == NULL) { - $regexes = array(); - foreach ($this->elements as $element) { - $regexes[] = $element->regex(); - } - return '#' . '(?:('. implode(')|(', array_values($regexes)) . '))' . '#' . - ($this->mode(CrayonParser::CASE_INSENSITIVE) ? 'i' : '') . - ($this->mode(CrayonParser::MULTI_LINE) ? 'm' : '') . - ($this->mode(CrayonParser::SINGLE_LINE) ? 's' : ''); - } else if (is_string($element) && array_key_exists($element, $this->elements)) { - return $this->elements[$element]->regex(); - } - } + function regex($element = NULL) + { + if ($element == NULL) { + $regexes = array(); + foreach ($this->elements as $element) { + $regexes[] = $element->regex(); + } + return '#' . '(?:(' . implode(')|(', array_values($regexes)) . '))' . '#' . + ($this->mode(CrayonParser::CASE_INSENSITIVE) ? 'i' : '') . + ($this->mode(CrayonParser::MULTI_LINE) ? 'm' : '') . + ($this->mode(CrayonParser::SINGLE_LINE) ? 's' : ''); + } else if (is_string($element) && array_key_exists($element, $this->elements)) { + return $this->elements[$element]->regex(); + } + } - // Retrieve by element name or set by CrayonElement - function element($name, $element = NULL) { - if (is_string($name)) { - $name = trim(strtoupper($name)); - if (array_key_exists($name, $this->elements) && $element === NULL) { - return $this->elements[$name]; - } else if (@get_class($element) == CRAYON_ELEMENT_CLASS) { - $this->elements[$name] = $element; - } - } - } + // Retrieve by element name or set by CrayonElement + function element($name, $element = NULL) + { + if (is_string($name)) { + $name = trim(strtoupper($name)); + if (array_key_exists($name, $this->elements) && $element === NULL) { + return $this->elements[$name]; + } else if (@get_class($element) == CRAYON_ELEMENT_CLASS) { + $this->elements[$name] = $element; + } + } + } - function elements() { - return $this->elements; - } + function elements() + { + return $this->elements; + } - function mode($name = NULL, $value = NULL) { - if (is_string($name) && CrayonParser::is_mode($name)) { - $name = trim(strtoupper($name)); - if ($value == NULL && array_key_exists($name, $this->modes)) { - return $this->modes[$name]; - } else if (is_string($value)) { - if (CrayonUtil::str_equal_array(trim($value), array('ON', 'YES', '1'))) { - $this->modes[$name] = TRUE; - } else if (CrayonUtil::str_equal_array(trim($value), array('OFF', 'NO', '0'))) { - $this->modes[$name] = FALSE; - } - } - } else { - return $this->modes; - } - } + function mode($name = NULL, $value = NULL) + { + if (is_string($name) && CrayonParser::is_mode($name)) { + $name = trim(strtoupper($name)); + if ($value == NULL && array_key_exists($name, $this->modes)) { + return $this->modes[$name]; + } else if (is_string($value)) { + if (CrayonUtil::str_equal_array(trim($value), array('ON', 'YES', '1'))) { + $this->modes[$name] = TRUE; + } else if (CrayonUtil::str_equal_array(trim($value), array('OFF', 'NO', '0'))) { + $this->modes[$name] = FALSE; + } + } + } else { + return $this->modes; + } + } - function state($state = NULL) { - if ($state === NULL) { - return $this->state; - } else if (is_int($state)) { - if ($state < 0) { - $this->state = self::PARSED_ERRORS; - } else if ($state > 0) { - $this->state = self::PARSED_SUCCESS; - } else if ($state == 0) { - $this->state = self::UNPARSED; - } - } - } + function state($state = NULL) + { + if ($state === NULL) { + return $this->state; + } else if (is_int($state)) { + if ($state < 0) { + $this->state = self::PARSED_ERRORS; + } else if ($state > 0) { + $this->state = self::PARSED_SUCCESS; + } else if ($state == 0) { + $this->state = self::UNPARSED; + } + } + } - function state_info() { - switch ($this->state) { - case self::PARSED_ERRORS : - return 'Parsed With Errors'; - case self::PARSED_SUCCESS : - return 'Successfully Parsed'; - case self::UNPARSED : - return 'Not Parsed'; - default : - return 'Undetermined'; - } - } + function state_info() + { + switch ($this->state) { + case self::PARSED_ERRORS : + return 'Parsed With Errors'; + case self::PARSED_SUCCESS : + return 'Successfully Parsed'; + case self::UNPARSED : + return 'Not Parsed'; + default : + return 'Undetermined'; + } + } - function is_parsed() { - return ($this->state != self::UNPARSED); - } + function is_parsed() + { + return ($this->state != self::UNPARSED); + } - function is_default() { - return $this->id() == CrayonLangs::DEFAULT_LANG; - } + function is_default() + { + return $this->id() == CrayonLangs::DEFAULT_LANG; + } } -class CrayonElement { - // The pure regex syntax without any modifiers or delimiters - private $name = ''; - private $css = ''; - private $regex = ''; - private $fallback = ''; - private $path = ''; +class CrayonElement +{ + // The pure regex syntax without any modifiers or delimiters + private $name = ''; + private $css = ''; + private $regex = ''; + private $fallback = ''; + private $path = ''; - function __construct($name, $path, $regex = '') { - $this->name($name); - $this->path($path); - $this->regex($regex); - } + function __construct($name, $path, $regex = '') + { + $this->name($name); + $this->path($path); + $this->regex($regex); + } - function __toString() { - return $this->regex(); - } + function __toString() + { + return $this->regex(); + } - function name($name = NULL) { - if ($name == NULL) { - return $this->name; - } else if (is_string($name)) { - $name = trim(strtoupper($name)); - if (CrayonLangs::is_known_element($name)) { - // If known element, set CSS to known class - $this->css(CrayonLangs::known_elements($name)); - } - $this->name = $name; - } - } + function name($name = NULL) + { + if ($name == NULL) { + return $this->name; + } else if (is_string($name)) { + $name = trim(strtoupper($name)); + if (CrayonLangs::is_known_element($name)) { + // If known element, set CSS to known class + $this->css(CrayonLangs::known_elements($name)); + } + $this->name = $name; + } + } - function regex($regex = NULL) { - if ($regex == NULL) { - return $this->regex; - } else if (is_string($regex)) { - if (($result = CrayonParser::validate_regex($regex, $this)) !== FALSE) { - $this->regex = $result; - } else { - return FALSE; - } - } - } + function regex($regex = NULL) + { + if ($regex == NULL) { + return $this->regex; + } else if (is_string($regex)) { + if (($result = CrayonParser::validate_regex($regex, $this)) !== FALSE) { + $this->regex = $result; + } else { + return FALSE; + } + } + } - // Expects: 'class1 class2 class3' - function css($css = NULL) { - if ($css == NULL) { - return $this->css; - } else if (is_string($css)) { - $this->css = CrayonParser::validate_css($css); - } - } + // Expects: 'class1 class2 class3' + function css($css = NULL) + { + if ($css == NULL) { + return $this->css; + } else if (is_string($css)) { + $this->css = CrayonParser::validate_css($css); + } + } - function fallback($fallback = NULL) { - if ($fallback == NULL) { - return $this->fallback; - } else if (is_string($fallback) && CrayonLangs::is_known_element($fallback)) { - $this->fallback = $fallback; - } - } + function fallback($fallback = NULL) + { + if ($fallback == NULL) { + return $this->fallback; + } else if (is_string($fallback) && CrayonLangs::is_known_element($fallback)) { + $this->fallback = $fallback; + } + } - function path($path = NULL) { - if ($path == NULL) { - return $this->path; - } else if (is_string($path) && @file_exists($path)) { - $this->path = $path; - } - } + function path($path = NULL) + { + if ($path == NULL) { + return $this->path; + } else if (is_string($path) && @file_exists($path)) { + $this->path = $path; + } + } } \ No newline at end of file diff --git a/crayon_parser.class.php b/crayon_parser.class.php index 44a2ede..59bb836 100644 --- a/crayon_parser.class.php +++ b/crayon_parser.class.php @@ -1,265 +1,275 @@ )'; // No longer used - const HTML_CHAR = 'HTML_CHAR'; - const HTML_CHAR_REGEX = '<|>|(&([\w-]+);?)|[ \t]+'; - const CRAYON_ELEMENT = 'CRAYON_ELEMENT'; - const CRAYON_ELEMENT_REGEX = '\{\{crayon-internal:[^\}]*\}\}'; - const CRAYON_ELEMENT_REGEX_CAPTURE = '\{\{crayon-internal:([^\}]*)\}\}'; - private static $modes = array(self::CASE_INSENSITIVE => TRUE, self::MULTI_LINE => TRUE, self::SINGLE_LINE => TRUE, self::ALLOW_MIXED => TRUE); +class CrayonParser +{ + // Properties and Constants =============================================== + const CASE_INSENSITIVE = 'CASE_INSENSITIVE'; + const MULTI_LINE = 'MULTI_LINE'; + const SINGLE_LINE = 'SINGLE_LINE'; + const ALLOW_MIXED = 'ALLOW_MIXED'; + //const NO_END_TAG = '(?![^<]*>)'; // No longer used + const HTML_CHAR = 'HTML_CHAR'; + const HTML_CHAR_REGEX = '<|>|(&([\w-]+);?)|[ \t]+'; + const CRAYON_ELEMENT = 'CRAYON_ELEMENT'; + const CRAYON_ELEMENT_REGEX = '\{\{crayon-internal:[^\}]*\}\}'; + const CRAYON_ELEMENT_REGEX_CAPTURE = '\{\{crayon-internal:([^\}]*)\}\}'; - // Methods ================================================================ - private function __construct() {} + private static $modes = array(self::CASE_INSENSITIVE => TRUE, self::MULTI_LINE => TRUE, self::SINGLE_LINE => TRUE, self::ALLOW_MIXED => TRUE); - /** - * Parse all languages stored in CrayonLangs. - * Avoid using this unless you must list the details in language files for all languages. - * @return array Array of all loaded CrayonLangs. - */ - public static function parse_all() { - $langs = CrayonResources::langs()->get(); - if (empty($langs)) { - return FALSE; - } - foreach ($langs as $lang) { - self::parse($lang->id()); - } - return $langs; - } + // Methods ================================================================ + private function __construct() + { + } - /* Read a syntax file and parse the regex rules within it, this may require several other - files containing lists of keywords and such to be read. Updates the parsed elements and - regex in the CrayonLang with the given $id. */ - public static function parse($id) { - // Verify the language is loaded and has not been parsed before - if ( !($lang = CrayonResources::langs()->get($id)) ) { - CrayonLog::syslog("The language with id '$id' was not loaded and could not be parsed."); - return FALSE; - } else if ($lang->is_parsed()) { - return; - } - // Read language file - $path = CrayonResources::langs()->path($id); + /** + * Parse all languages stored in CrayonLangs. + * Avoid using this unless you must list the details in language files for all languages. + * @return array Array of all loaded CrayonLangs. + */ + public static function parse_all() + { + $langs = CrayonResources::langs()->get(); + if (empty($langs)) { + return FALSE; + } + foreach ($langs as $lang) { + self::parse($lang->id()); + } + return $langs; + } + + /* Read a syntax file and parse the regex rules within it, this may require several other + files containing lists of keywords and such to be read. Updates the parsed elements and + regex in the CrayonLang with the given $id. */ + public static function parse($id) + { + // Verify the language is loaded and has not been parsed before + if (!($lang = CrayonResources::langs()->get($id))) { + CrayonLog::syslog("The language with id '$id' was not loaded and could not be parsed."); + return FALSE; + } else if ($lang->is_parsed()) { + return; + } + // Read language file + $path = CrayonResources::langs()->path($id); CrayonLog::debug('Parsing language ' . $path); - if ( ($file = CrayonUtil::lines($path, 'wcs')) === FALSE ) { + if (($file = CrayonUtil::lines($path, 'wcs')) === FALSE) { CrayonLog::debug('Parsing failed ' . $path); - return FALSE; - } + return FALSE; + } - // Extract the language name - $name_pattern = '#^[ \t]*name[ \t]+([^\r\n]+)[ \t]*#mi'; - preg_match($name_pattern, $file, $name); - if (count($name) > 1) { - $name = $name[1]; - $lang->name($name); - $file = preg_replace($name_pattern, '', $file); - } else { - $name = $lang->id(); - } + // Extract the language name + $name_pattern = '#^[ \t]*name[ \t]+([^\r\n]+)[ \t]*#mi'; + preg_match($name_pattern, $file, $name); + if (count($name) > 1) { + $name = $name[1]; + $lang->name($name); + $file = preg_replace($name_pattern, '', $file); + } else { + $name = $lang->id(); + } - // Extract the language version - $version_pattern = '#^[ \t]*version[ \t]+([^\r\n]+)[ \t]*#mi'; - preg_match($version_pattern, $file, $version); - if (count($version) > 1) { - $version = $version[1]; - $lang->version($version); - $file = preg_replace($version_pattern, '', $file); - } + // Extract the language version + $version_pattern = '#^[ \t]*version[ \t]+([^\r\n]+)[ \t]*#mi'; + preg_match($version_pattern, $file, $version); + if (count($version) > 1) { + $version = $version[1]; + $lang->version($version); + $file = preg_replace($version_pattern, '', $file); + } - // Extract the modes - $mode_pattern = '#^[ \t]*(' . implode('|', array_keys(self::$modes)) . ')[ \t]+(?:=[ \t]*)?([^\r\n]+)[ \t]*#mi'; - preg_match_all($mode_pattern, $file, $mode_matches); - if (count($mode_matches) == 3) { - for ($i = 0; $i < count($mode_matches[0]); $i++) { - $lang->mode($mode_matches[1][$i], $mode_matches[2][$i]); - } - $file = preg_replace($mode_pattern, '', $file); - } + // Extract the modes + $mode_pattern = '#^[ \t]*(' . implode('|', array_keys(self::$modes)) . ')[ \t]+(?:=[ \t]*)?([^\r\n]+)[ \t]*#mi'; + preg_match_all($mode_pattern, $file, $mode_matches); + if (count($mode_matches) == 3) { + for ($i = 0; $i < count($mode_matches[0]); $i++) { + $lang->mode($mode_matches[1][$i], $mode_matches[2][$i]); + } + $file = preg_replace($mode_pattern, '', $file); + } - /* Add reserved Crayon element. This is used by Crayon internally. */ - $crayon_element = new CrayonElement(self::CRAYON_ELEMENT, $path, self::CRAYON_ELEMENT_REGEX); - $lang->element(self::CRAYON_ELEMENT, $crayon_element); + /* Add reserved Crayon element. This is used by Crayon internally. */ + $crayon_element = new CrayonElement(self::CRAYON_ELEMENT, $path, self::CRAYON_ELEMENT_REGEX); + $lang->element(self::CRAYON_ELEMENT, $crayon_element); - // Extract elements, classes and regex - $pattern = '#^[ \t]*([\w:]+)[ \t]+(?:\[([\w\t ]*)\][ \t]+)?([^\r\n]+)[ \t]*#m'; - preg_match_all($pattern, $file, $matches); + // Extract elements, classes and regex + $pattern = '#^[ \t]*([\w:]+)[ \t]+(?:\[([\w\t ]*)\][ \t]+)?([^\r\n]+)[ \t]*#m'; + preg_match_all($pattern, $file, $matches); - if (!empty($matches[0])) { - $elements = $matches[1]; - $classes = $matches[2]; - $regexes = $matches[3]; - } else { - CrayonLog::syslog("No regex patterns and/or elements were parsed from language file at '$path'."); - } + if (!empty($matches[0])) { + $elements = $matches[1]; + $classes = $matches[2]; + $regexes = $matches[3]; + } else { + CrayonLog::syslog("No regex patterns and/or elements were parsed from language file at '$path'."); + } - // Remember state in case we encounter catchable exceptions - $error = FALSE; - for ($i = 0; $i < count($matches[0]); $i++) { - // References - $name = &$elements[$i]; - $class = &$classes[$i]; - $regex = &$regexes[$i]; - $name = trim(strtoupper($name)); - // Ensure both the element and regex are valid - if (empty($name) || empty($regex)) { - CrayonLog::syslog("Element(s) and/or regex(es) are missing in '$path'."); - $error = TRUE; - continue; - } - // Look for fallback element - $pieces = explode(':', $name); - if (count($pieces) == 2) { - $name = $pieces[0]; - $fallback = $pieces[1]; - } else if (count($pieces) == 1) { - $name = $pieces[0]; - $fallback = ''; - } else { - CrayonLog::syslog("Too many colons found in element name '$name' in '$path'"); - $error = TRUE; - continue; - } - // Create a new CrayonElement - $element = new CrayonElement($name, $path); - $element->fallback($fallback); - if (!empty($class)) { - // Avoid setting known css to blank - $element->css($class); - } - if ($element->regex($regex) === FALSE) { - $error = TRUE; - continue; - } - // Add the regex to the element - $lang->element($name, $element); - $state = $error ? CrayonLang::PARSED_ERRORS : CrayonLang::PARSED_SUCCESS; - $lang->state($state); - } + // Remember state in case we encounter catchable exceptions + $error = FALSE; + for ($i = 0; $i < count($matches[0]); $i++) { + // References + $name = &$elements[$i]; + $class = &$classes[$i]; + $regex = &$regexes[$i]; + $name = trim(strtoupper($name)); + // Ensure both the element and regex are valid + if (empty($name) || empty($regex)) { + CrayonLog::syslog("Element(s) and/or regex(es) are missing in '$path'."); + $error = TRUE; + continue; + } + // Look for fallback element + $pieces = explode(':', $name); + if (count($pieces) == 2) { + $name = $pieces[0]; + $fallback = $pieces[1]; + } else if (count($pieces) == 1) { + $name = $pieces[0]; + $fallback = ''; + } else { + CrayonLog::syslog("Too many colons found in element name '$name' in '$path'"); + $error = TRUE; + continue; + } + // Create a new CrayonElement + $element = new CrayonElement($name, $path); + $element->fallback($fallback); + if (!empty($class)) { + // Avoid setting known css to blank + $element->css($class); + } + if ($element->regex($regex) === FALSE) { + $error = TRUE; + continue; + } + // Add the regex to the element + $lang->element($name, $element); + $state = $error ? CrayonLang::PARSED_ERRORS : CrayonLang::PARSED_SUCCESS; + $lang->state($state); + } - /* Prevents < > and other html entities from being printed as is, which could lead to actual html tags - * from the printed code appearing on the page - not good. This can also act to color any HTML entities - * that are not picked up by previously defined elements. - */ - $html = new CrayonElement(self::HTML_CHAR, $path, self::HTML_CHAR_REGEX); - $lang->element(self::HTML_CHAR, $html); - } + /* Prevents < > and other html entities from being printed as is, which could lead to actual html tags + * from the printed code appearing on the page - not good. This can also act to color any HTML entities + * that are not picked up by previously defined elements. + */ + $html = new CrayonElement(self::HTML_CHAR, $path, self::HTML_CHAR_REGEX); + $lang->element(self::HTML_CHAR, $html); + } - // Validates regex and accesses data stored in a CrayonElement - public static function validate_regex($regex, $element) { - if (is_string($regex) && @get_class($element) == CRAYON_ELEMENT_CLASS) { - // If the (?alt) tag has been used, insert the file into the regex - $file = self::regex_match('#\(\?alt:(.+?)\)#', $regex); - if ( count($file) == 2 ) { - // Element 0 has full match, 1 has captured groups - for ($i = 0; $i < count($file[1]); $i++) { - $file_lines = CrayonUtil::lines(dirname($element->path()) . crayon_s() . $file[1][$i], 'rcwh'); - if ($file_lines !== FALSE) { - $file_lines = implode('|', $file_lines); - // If any spaces exist, treat them as whitespace - $file_lines = preg_replace('#[ \t]+#msi', '\s+', $file_lines); - $regex = str_replace($file[0][$i], "(?:$file_lines)", $regex); - } else { - CrayonLog::syslog("Parsing of '{$element->path()}' failed, an (?alt) tag failed for the element '{$element->name()}'" ); - return FALSE; - } - } - } + // Validates regex and accesses data stored in a CrayonElement + public static function validate_regex($regex, $element) + { + if (is_string($regex) && @get_class($element) == CRAYON_ELEMENT_CLASS) { + // If the (?alt) tag has been used, insert the file into the regex + $file = self::regex_match('#\(\?alt:(.+?)\)#', $regex); + if (count($file) == 2) { + // Element 0 has full match, 1 has captured groups + for ($i = 0; $i < count($file[1]); $i++) { + $file_lines = CrayonUtil::lines(dirname($element->path()) . crayon_s() . $file[1][$i], 'rcwh'); + if ($file_lines !== FALSE) { + $file_lines = implode('|', $file_lines); + // If any spaces exist, treat them as whitespace + $file_lines = preg_replace('#[ \t]+#msi', '\s+', $file_lines); + $regex = str_replace($file[0][$i], "(?:$file_lines)", $regex); + } else { + CrayonLog::syslog("Parsing of '{$element->path()}' failed, an (?alt) tag failed for the element '{$element->name()}'"); + return FALSE; + } + } + } - // If the (?default:element) function is used, replace the regex with the default, if exists - $def = self::regex_match('#\(\?default(?:\:(\w+))?\)#', $regex); - if ( count($def) == 2 ) { - // Load default language - $default = CrayonResources::langs()->get(CrayonLangs::DEFAULT_LANG); - // If default has not been loaded, we can't use it, skip the element - if (!$default) { - CrayonLog::syslog( - "Could not use default regex in the element '{$element->name()}' in '{$element->path()}'"); - return FALSE; - } - for ($i = 0; $i < count($def[1]); $i++) { - // If an element has been provided - $element_name = ( !empty($def[1][$i]) ) ? $def[1][$i] : $element->name(); - if (($default_element = $default->element($element_name)) != FALSE) { - $regex = str_replace($def[0][$i], '(?:' . $default_element->regex() .')', $regex); - } else { - CrayonLog::syslog("The language at '{$element->path()}' referred to the Default Language regex for element '{$element->name()}', which did not exist."); + // If the (?default:element) function is used, replace the regex with the default, if exists + $def = self::regex_match('#\(\?default(?:\:(\w+))?\)#', $regex); + if (count($def) == 2) { + // Load default language + $default = CrayonResources::langs()->get(CrayonLangs::DEFAULT_LANG); + // If default has not been loaded, we can't use it, skip the element + if (!$default) { + CrayonLog::syslog( + "Could not use default regex in the element '{$element->name()}' in '{$element->path()}'"); + return FALSE; + } + for ($i = 0; $i < count($def[1]); $i++) { + // If an element has been provided + $element_name = (!empty($def[1][$i])) ? $def[1][$i] : $element->name(); + if (($default_element = $default->element($element_name)) != FALSE) { + $regex = str_replace($def[0][$i], '(?:' . $default_element->regex() . ')', $regex); + } else { + CrayonLog::syslog("The language at '{$element->path()}' referred to the Default Language regex for element '{$element->name()}', which did not exist."); if (CRAYON_DEBUG) { CrayonLog::syslog("Default language URL: " . CrayonResources::langs()->url(CrayonLangs::DEFAULT_LANG)); CrayonLog::syslog("Default language Path: " . CrayonResources::langs()->path(CrayonLangs::DEFAULT_LANG)); } - return FALSE; - } - } - } + return FALSE; + } + } + } - // If the (?html) tag is used, escape characters in html (<, > and &) - $html = self::regex_match('#\(\?html:(.+?)\)#', $regex); - if ( count($html) == 2 ) { - for ($i = 0; $i < count($html[1]); $i++) { - $regex = str_replace($html[0][$i], htmlentities($html[1][$i]), $regex); - } - } + // If the (?html) tag is used, escape characters in html (<, > and &) + $html = self::regex_match('#\(\?html:(.+?)\)#', $regex); + if (count($html) == 2) { + for ($i = 0; $i < count($html[1]); $i++) { + $regex = str_replace($html[0][$i], htmlentities($html[1][$i]), $regex); + } + } - // Ensure all parenthesis are atomic to avoid conflicting with element matches - $regex = CrayonUtil::esc_atomic($regex); + // Ensure all parenthesis are atomic to avoid conflicting with element matches + $regex = CrayonUtil::esc_atomic($regex); - // Escape #, this is our delimiter - $regex = CrayonUtil::esc_hash($regex); + // Escape #, this is our delimiter + $regex = CrayonUtil::esc_hash($regex); - // Test if regex is valid - if (@preg_match("#$regex#", '') === FALSE) { - CrayonLog::syslog("The regex for the element '{$element->name()}' in '{$element->path()}' is not valid."); - return FALSE; - } + // Test if regex is valid + if (@preg_match("#$regex#", '') === FALSE) { + CrayonLog::syslog("The regex for the element '{$element->name()}' in '{$element->path()}' is not valid."); + return FALSE; + } - return $regex; - } else { - return ''; - } - } + return $regex; + } else { + return ''; + } + } - public static function validate_css($css) { - if (is_string($css)) { - // Remove dots in CSS class and convert to lowercase - $css = str_replace('.', '', $css); - $css = strtolower($css); - $css = explode(' ', $css); - $css_str = ''; - foreach ($css as $c) { - if (!empty($c)) { - $css_str .= $c . ' '; - } - } - return trim($css_str); - } else { - return ''; - } - } + public static function validate_css($css) + { + if (is_string($css)) { + // Remove dots in CSS class and convert to lowercase + $css = str_replace('.', '', $css); + $css = strtolower($css); + $css = explode(' ', $css); + $css_str = ''; + foreach ($css as $c) { + if (!empty($c)) { + $css_str .= $c . ' '; + } + } + return trim($css_str); + } else { + return ''; + } + } - public static function regex_match($pattern, $subject) { - if (preg_match_all($pattern, $subject, $matches)) { - return $matches; - } - return array(); - } + public static function regex_match($pattern, $subject) + { + if (preg_match_all($pattern, $subject, $matches)) { + return $matches; + } + return array(); + } - public static function modes() { - return self::$modes; - } + public static function modes() + { + return self::$modes; + } - public static function is_mode($name) { - return is_string($name) && array_key_exists($name, self::$modes); - } + public static function is_mode($name) + { + return is_string($name) && array_key_exists($name, self::$modes); + } } -?> \ No newline at end of file diff --git a/crayon_resource.class.php b/crayon_resource.class.php index 03df8e2..40b8a73 100644 --- a/crayon_resource.class.php +++ b/crayon_resource.class.php @@ -1,296 +1,333 @@ path($id)); - } + /* Verifies a resource exists. */ + public function exists($id) + { + return file_exists($this->path($id)); + } - /* Load all the available languages. Doesn't parse them for their names and regex. */ - public function load() { - // Load only once + /* Load all the available languages. Doesn't parse them for their names and regex. */ + public function load() + { + // Load only once - if (!$this->is_state_unloaded()) { - return; - } - $this->state = self::LOADING; - $this->load_process(); - $this->state = self::LOADED; - } + if (!$this->is_state_unloaded()) { + return; + } + $this->state = self::LOADING; + $this->load_process(); + $this->state = self::LOADED; + } - public function load_resources($dir = NULL) { + public function load_resources($dir = NULL) + { if ($dir === NULL) { $dir = $this->dir; } - if (!$this->is_state_loading()) { + if (!$this->is_state_loading()) { // Load only once - return; - } - try { - // Look in directory for resources + return; + } + try { + // Look in directory for resources - if (!is_dir($dir)) { - CrayonLog::syslog('The resource directory is missing, should be at \'' . $dir . '\'.'); - } else if (($handle = @opendir($dir)) != FALSE) { - // Loop over directory contents - while (($file = readdir($handle)) !== FALSE) { - if ($file != "." && $file != "..") { - // Check if $file is directory, remove extension when checking for existence. + if (!is_dir($dir)) { + CrayonLog::syslog('The resource directory is missing, should be at \'' . $dir . '\'.'); + } else if (($handle = @opendir($dir)) != FALSE) { + // Loop over directory contents + while (($file = readdir($handle)) !== FALSE) { + if ($file != "." && $file != "..") { + // Check if $file is directory, remove extension when checking for existence. - if (!is_dir($dir . $file)) { - $file = CrayonUtil::path_rem_ext($file); - } - if ($this->exists($file)) { - $this->add_resource($this->resource_instance($file)); - } - } - } - closedir($handle); - } - } catch (Exception $e) { - CrayonLog::syslog('An error occured when trying to load resources: ' . $e->getFile() . $e->getLine()); - } - } + if (!is_dir($dir . $file)) { + $file = CrayonUtil::path_rem_ext($file); + } + if ($this->exists($file)) { + $this->add_resource($this->resource_instance($file)); + } + } + } + closedir($handle); + } + } catch (Exception $e) { + CrayonLog::syslog('An error occured when trying to load resources: ' . $e->getFile() . $e->getLine()); + } + } - /* Override in subclasses. */ - public function load_process() { - if (!$this->is_state_loading()) { - return; - } - $this->load_resources(); - $this->add_default(); - } + /* Override in subclasses. */ + public function load_process() + { + if (!$this->is_state_loading()) { + return; + } + $this->load_resources(); + $this->add_default(); + } - /* Override in subclasses */ - public function add_default() { - if (!$this->is_state_loading()) { - return FALSE; - } else if (!$this->is_loaded($this->default_id)) { - CrayonLog::syslog('The default resource could not be loaded from \'' . $this->dir . '\'.'); - // Add the default, but it will not be functionable + /* Override in subclasses */ + public function add_default() + { + if (!$this->is_state_loading()) { + return FALSE; + } else if (!$this->is_loaded($this->default_id)) { + CrayonLog::syslog('The default resource could not be loaded from \'' . $this->dir . '\'.'); + // Add the default, but it will not be functionable - $default = $this->resource_instance($this->default_id, $this->default_name); - $this->add($this->default_id, $default); - return TRUE; - } - return FALSE; - } + $default = $this->resource_instance($this->default_id, $this->default_name); + $this->add($this->default_id, $default); + return TRUE; + } + return FALSE; + } - /* Returns the default resource */ - public function set_default($id, $name) { - $this->default_id = $id; - $this->default_name = $name; - } + /* Returns the default resource */ + public function set_default($id, $name) + { + $this->default_id = $id; + $this->default_name = $name; + } - /* Returns the default resource */ - public function get_default() { - return $this->get($this->default_id); - } + /* Returns the default resource */ + public function get_default() + { + return $this->get($this->default_id); + } - /* Override in subclasses to create subclass object if needed */ - public function resource_instance($id, $name = NULL) { - return new CrayonResource($id, $name); - } + /* Override in subclasses to create subclass object if needed */ + public function resource_instance($id, $name = NULL) + { + return new CrayonResource($id, $name); + } - public function add($id, $resource) { - if (is_string($id) && !empty($id)) { - $this->collection[$id] = $resource; - asort($this->collection); + public function add($id, $resource) + { + if (is_string($id) && !empty($id)) { + $this->collection[$id] = $resource; + asort($this->collection); CrayonLog::debug('Added resource: ' . $this->path($id)); - } else { + } else { CrayonLog::syslog('Could not add resource: ', $id); } - } + } - public function add_resource($resource) { - $this->add($resource->id(), $resource); - } + public function add_resource($resource) + { + $this->add($resource->id(), $resource); + } - public function remove($name) { - if (is_string($name) && !empty($name) && array_key_exists($name, $this->collection)) { - unset($this->collection[$name]); - } - } + public function remove($name) + { + if (is_string($name) && !empty($name) && array_key_exists($name, $this->collection)) { + unset($this->collection[$name]); + } + } - public function remove_all() { - $this->collection = array(); - } + public function remove_all() + { + $this->collection = array(); + } - /* Returns the resource for the given id or NULL if it can't be found */ - public function get($id = NULL) { - $this->load(); - if ($id === NULL) { - return $this->collection; - } else if (is_string($id) && $this->is_loaded($id)) { - return $this->collection[$id]; - } - return NULL; - } + /* Returns the resource for the given id or NULL if it can't be found */ + public function get($id = NULL) + { + $this->load(); + if ($id === NULL) { + return $this->collection; + } else if (is_string($id) && $this->is_loaded($id)) { + return $this->collection[$id]; + } + return NULL; + } - public function get_array() { - $array = array(); - foreach ($this->get() as $resource) { - $array[$resource->id()] = $resource->name(); - } - return $array; - } + public function get_array() + { + $array = array(); + foreach ($this->get() as $resource) { + $array[$resource->id()] = $resource->name(); + } + return $array; + } - public function is_loaded($id) { - if (is_string($id)) { - return array_key_exists($id, $this->collection); - } - return FALSE; - } + public function is_loaded($id) + { + if (is_string($id)) { + return array_key_exists($id, $this->collection); + } + return FALSE; + } - public function get_state() { - return $this->state; - } + public function get_state() + { + return $this->state; + } - public function is_state_loaded() { - return $this->state == self::LOADED; - } + public function is_state_loaded() + { + return $this->state == self::LOADED; + } - public function is_state_loading() { - return $this->state == self::LOADING; - } + public function is_state_loading() + { + return $this->state == self::LOADING; + } - public function is_state_unloaded() { - return $this->state == self::UNLOADED; - } + public function is_state_unloaded() + { + return $this->state == self::UNLOADED; + } - public function directory($dir = NULL) { + public function directory($dir = NULL) + { if ($dir === NULL) { return $this->dir; } else { $this->dir = CrayonUtil::path_slash($dir); } - } + } - public function url($id) { - return ''; - } + public function url($id) + { + return ''; + } - public function get_css($id, $ver = NULL) { - $resource = $this->get($id); - return '' . CRAYON_NL; - } + public function get_css($id, $ver = NULL) + { + $resource = $this->get($id); + return '' . CRAYON_NL; + } } -class CrayonUsedResourceCollection extends CrayonResourceCollection { +class CrayonUsedResourceCollection extends CrayonResourceCollection +{ - // Checks if any resoruces are being used - public function is_used($id = NULL) { - if ($id === NULL) { - foreach ($this->get() as $resource) { - if ($resource->used()) { - return TRUE; - } - } - return FALSE; - } else { - $resource = $this->get($id); - if (!$resource) { - return FALSE; - } else { - return $resource->used(); - } - } - } + // Checks if any resoruces are being used + public function is_used($id = NULL) + { + if ($id === NULL) { + foreach ($this->get() as $resource) { + if ($resource->used()) { + return TRUE; + } + } + return FALSE; + } else { + $resource = $this->get($id); + if (!$resource) { + return FALSE; + } else { + return $resource->used(); + } + } + } - public function set_used($id, $value = TRUE) { - $resource = $this->get($id); - if ($resource !== NULL && !$resource->used()) { - $resource->used($value == TRUE); - return TRUE; - } - return FALSE; - } + public function set_used($id, $value = TRUE) + { + $resource = $this->get($id); + if ($resource !== NULL && !$resource->used()) { + $resource->used($value == TRUE); + return TRUE; + } + return FALSE; + } - public function get_used() { - $used = array(); - foreach ($this->get() as $resource) { - if ($resource->used()) { - $used[] = $resource; - } - } - return $used; - } + public function get_used() + { + $used = array(); + foreach ($this->get() as $resource) { + if ($resource->used()) { + $used[] = $resource; + } + } + return $used; + } - // XXX Override - public function resource_instance($id, $name = NULL) { - return new CrayonUsedResource($id, $name); - } + // XXX Override + public function resource_instance($id, $name = NULL) + { + return new CrayonUsedResource($id, $name); + } - public function get_used_css() { - $used = $this->get_used(); - $css = array(); - foreach ($used as $resource) { - $url = $this->url($resource->id()); - $css[$resource->id()] = $url; - } - return $css; - } + public function get_used_css() + { + $used = $this->get_used(); + $css = array(); + foreach ($used as $resource) { + $url = $this->url($resource->id()); + $css[$resource->id()] = $url; + } + return $css; + } } -class CrayonUserResourceCollection extends CrayonUsedResourceCollection { +class CrayonUserResourceCollection extends CrayonUsedResourceCollection +{ private $user_dir = ''; private $curr_dir = NULL; // TODO better to use a base dir and relative @@ -299,17 +336,20 @@ class CrayonUserResourceCollection extends CrayonUsedResourceCollection { private $extension = ''; // XXX Override - public function resource_instance($id, $name = NULL) { + public function resource_instance($id, $name = NULL) + { $resource = $this->create_user_resource_instance($id, $name); $resource->user($this->curr_dir == $this->user_directory()); return $resource; } - public function create_user_resource_instance($id, $name = NULL) { + public function create_user_resource_instance($id, $name = NULL) + { return new CrayonUserResource($id, $name); } - public function user_directory($dir = NULL) { + public function user_directory($dir = NULL) + { if ($dir === NULL) { return $this->user_dir; } else { @@ -317,21 +357,24 @@ class CrayonUserResourceCollection extends CrayonUsedResourceCollection { } } - public function relative_directory($relative_directory = NULL) { + public function relative_directory($relative_directory = NULL) + { if ($relative_directory == NULL) { return $this->relative_directory; } $this->relative_directory = $relative_directory; } - public function extension($extension = NULL) { + public function extension($extension = NULL) + { if ($extension == NULL) { return $this->extension; } $this->extension = $extension; } - public function load_resources($dir = NULL) { + public function load_resources($dir = NULL) + { $this->curr_dir = $this->directory(); parent::load_resources($this->curr_dir); $this->curr_dir = $this->user_directory(); @@ -339,11 +382,13 @@ class CrayonUserResourceCollection extends CrayonUsedResourceCollection { $this->curr_dir = NULL; } - public function current_directory() { + public function current_directory() + { return $this->curr_dir; } - public function dir_is_user($id, $user = NULL) { + public function dir_is_user($id, $user = NULL) + { if ($user === NULL) { if ($this->is_state_loading()) { // We seem to be loading resources - use current directory @@ -360,95 +405,112 @@ class CrayonUserResourceCollection extends CrayonUsedResourceCollection { return $user; } - public function dirpath($user = NULL) { + public function dirpath($user = NULL) + { $path = $user ? $this->user_directory() : $this->directory(); return CrayonUtil::path_slash($path); } - public function dirpath_for_id($id, $user = NULL) { + public function dirpath_for_id($id, $user = NULL) + { $user = $this->dir_is_user($id, $user); return $this->dirpath($user) . $id; } - public function dirurl($user = NULL) { + public function dirurl($user = NULL) + { $path = $user ? CrayonGlobalSettings::upload_url() : CrayonGlobalSettings::plugin_path(); return CrayonUtil::path_slash($path . $this->relative_directory()); } // XXX Override - public function path($id, $user = NULL) { + public function path($id, $user = NULL) + { $user = $this->dir_is_user($id, $user); return $this->dirpath($user) . $this->filename($id, $user); } // XXX Override - public function url($id, $user = NULL) { + public function url($id, $user = NULL) + { $user = $this->dir_is_user($id, $user); return $this->dirurl($user) . $this->filename($id, $user); } - public function filename($id, $user = NULL) { + public function filename($id, $user = NULL) + { return "$id.$this->extension"; } } -class CrayonResource { - private $id = ''; - private $name = ''; +class CrayonResource +{ + private $id = ''; + private $name = ''; - function __construct($id, $name = NULL) { - $id = $this->clean_id($id); - CrayonUtil::str($this->id, $id); - ( empty($name) ) ? $this->name( self::clean_name($this->id) ) : $this->name($name); - } + function __construct($id, $name = NULL) + { + $id = $this->clean_id($id); + CrayonUtil::str($this->id, $id); + (empty($name)) ? $this->name(self::clean_name($this->id)) : $this->name($name); + } - function __tostring() { - return $this->name; - } + function __tostring() + { + return $this->name; + } - function id() { - return $this->id; - } + function id() + { + return $this->id; + } - function name($name = NULL) { - if ($name === NULL) { - return $this->name; - } else { - $this->name = $name; - } - } + function name($name = NULL) + { + if ($name === NULL) { + return $this->name; + } else { + $this->name = $name; + } + } - function clean_id($id) { - $id = CrayonUtil::space_to_hyphen( strtolower(trim($id)) ); + function clean_id($id) + { + $id = CrayonUtil::space_to_hyphen(strtolower(trim($id))); return preg_replace('#[^\w-]#msi', '', $id); - } + } - public static function clean_name($id) { - $id = CrayonUtil::hyphen_to_space( strtolower(trim($id)) ); - return CrayonUtil::ucwords($id); - } + public static function clean_name($id) + { + $id = CrayonUtil::hyphen_to_space(strtolower(trim($id))); + return CrayonUtil::ucwords($id); + } } -class CrayonUsedResource extends CrayonResource { +class CrayonUsedResource extends CrayonResource +{ // Keeps track of usage - private $used = FALSE; + private $used = FALSE; - function used($used = NULL) { - if ($used === NULL) { - return $this->used; - } else { - $this->used = ($used ? TRUE : FALSE); - } - } + function used($used = NULL) + { + if ($used === NULL) { + return $this->used; + } else { + $this->used = ($used ? TRUE : FALSE); + } + } } -class CrayonUserResource extends CrayonUsedResource { +class CrayonUserResource extends CrayonUsedResource +{ // Keeps track of user modifications private $user = FALSE; - function user($user = NULL) { + function user($user = NULL) + { if ($user === NULL) { return $this->user; } else { @@ -457,22 +519,23 @@ class CrayonUserResource extends CrayonUsedResource { } } -class CrayonVersionResource extends CrayonUserResource { +class CrayonVersionResource extends CrayonUserResource +{ // Adds version - private $version = ''; + private $version = ''; - function __construct($id, $name = NULL, $version = NULL) { - parent::__construct($id, $name); - $this->version($version); - } + function __construct($id, $name = NULL, $version = NULL) + { + parent::__construct($id, $name); + $this->version($version); + } - function version($version = NULL) { - if ($version === NULL) { - return $this->version; - } else if (is_string($version)) { - $this->version = $version; - } - } + function version($version = NULL) + { + if ($version === NULL) { + return $this->version; + } else if (is_string($version)) { + $this->version = $version; + } + } } - -?> \ No newline at end of file diff --git a/crayon_settings.class.php b/crayon_settings.class.php index 9c7acae..97e97c4 100644 --- a/crayon_settings.class.php +++ b/crayon_settings.class.php @@ -7,7 +7,8 @@ require_once(CRAYON_THEMES_PHP); * Stores CrayonSetting objects. * Each Crayon instance stores an instance of this class containing its specific settings. */ -class CrayonSettings { +class CrayonSettings +{ // Properties and Constants =============================================== const INVALID = -1; // Used for invalid dropdown index // Plugin data @@ -121,7 +122,8 @@ class CrayonSettings { private static $cache_array; - public static function get_cache_sec($cache) { + public static function get_cache_sec($cache) + { $values = array_values(self::$cache_array); if (array_key_exists($cache, $values)) { return $values[$cache]; @@ -136,11 +138,13 @@ class CrayonSettings { // The settings with default values private static $default = NULL; - function __construct() { + function __construct() + { $this->init(); } - function copy() { + function copy() + { $settings = new CrayonSettings(); foreach ($this->settings as $setting) { $settings->set($setting); // Overuse of set? @@ -150,7 +154,8 @@ class CrayonSettings { // Methods ================================================================ - private function init() { + private function init() + { global $CRAYON_VERSION; crayon_load_plugin_textdomain(); @@ -271,7 +276,8 @@ class CrayonSettings { // Getter and Setter ====================================================== // TODO this needs simplification - function set($name, $value = NULL, $replace = FALSE) { + function set($name, $value = NULL, $replace = FALSE) + { // Set associative array of settings if (is_array($name)) { $keys = array_keys($name); @@ -309,7 +315,8 @@ class CrayonSettings { } } - function get($name = NULL) { + function get($name = NULL) + { if ($name === NULL) { $copy = array(); foreach ($this->settings as $name => $setting) { @@ -324,7 +331,8 @@ class CrayonSettings { return FALSE; } - function val($name = NULL) { + function val($name = NULL) + { if (($setting = self::get($name)) != FALSE) { return $setting->value(); } else { @@ -332,7 +340,8 @@ class CrayonSettings { } } - function val_str($name) { + function val_str($name) + { if (($setting = self::get($name)) != FALSE) { $def = $setting->def(); $index = $setting->value(); @@ -344,7 +353,8 @@ class CrayonSettings { } } - function get_array() { + function get_array() + { $array = array(); foreach ($this->settings as $setting) { $array[$setting->name()] = $setting->value(); @@ -352,13 +362,15 @@ class CrayonSettings { return $array; } - function is_setting($name) { + function is_setting($name) + { return (is_string($name) && array_key_exists($name, $this->settings)); } /* Gets default settings, either as associative array of name=>value or CrayonSetting objects */ - public static function get_defaults($name = NULL, $objects = TRUE) { + public static function get_defaults($name = NULL, $objects = TRUE) + { if (self::$default === NULL) { self::$default = new CrayonSettings(); } @@ -386,7 +398,8 @@ class CrayonSettings { } } - public static function get_defaults_array() { + public static function get_defaults_array() + { return self::get_defaults(NULL, FALSE); } @@ -399,7 +412,8 @@ class CrayonSettings { * @param string $name * @param mixed $value */ - public static function validate($name, $value) { + public static function validate($name, $value) + { if (!is_string($name)) { return ''; } @@ -470,7 +484,8 @@ class CrayonSettings { // Takes an associative array of "smart settings" and regular settings. Smart settings can be used // to configure regular settings quickly. // E.g. 'max_height="20px"' will set 'height="20"', 'height_mode="0", height_unit="0"' - public static function smart_settings($settings) { + public static function smart_settings($settings) + { if (!is_array($settings)) { return FALSE; } @@ -524,7 +539,8 @@ class CrayonSettings { } // Used for height and width smart settings, I couldn't bear to copy paste code twice... - private static function smart_hw($name, $set, $mode, $unit, &$settings) { + private static function smart_hw($name, $set, $mode, $unit, &$settings) + { if (!is_string($name) || !is_string($set) || !is_string($mode) || !is_string($unit) || !is_array($settings)) { return; } @@ -557,7 +573,8 @@ class CrayonSettings { * These settings can be overriden by individual Crayons. * Also manages global site settings and paths. */ -class CrayonGlobalSettings { +class CrayonGlobalSettings +{ // The global settings stored as a CrayonSettings object. private static $global = NULL; /* These are used to load local files reliably and prevent scripts like PHP from executing @@ -572,50 +589,60 @@ class CrayonGlobalSettings { private static $upload_url = ''; private static $mkdir = NULL; - private function __construct() { + private function __construct() + { } - private static function init() { + private static function init() + { if (self::$global === NULL) { self::$global = new CrayonSettings(); } } - public static function get($name = NULL) { + public static function get($name = NULL) + { self::init(); return self::$global->get($name); } - public static function get_array() { + public static function get_array() + { self::init(); return self::$global->get_array(); } - public static function get_obj() { + public static function get_obj() + { self::init(); return self::$global->copy(); } - public static function val($name = NULL) { + public static function val($name = NULL) + { self::init(); return self::$global->val($name); } - public static function val_str($name = NULL) { + public static function val_str($name = NULL) + { self::init(); return self::$global->val_str($name); } - public static function has_changed($input, $setting, $value) { + public static function has_changed($input, $setting, $value) + { return $input == $setting && $value != CrayonGlobalSettings::val($setting); } - public static function set($name, $value = NULL, $replace = FALSE) { + public static function set($name, $value = NULL, $replace = FALSE) + { self::init(); self::$global->set($name, $value, $replace); } - public static function site_url($site_http = NULL) { + public static function site_url($site_http = NULL) + { if ($site_http === NULL) { return self::$site_http; } else { @@ -623,7 +650,8 @@ class CrayonGlobalSettings { } } - public static function site_path($site_path = NULL) { + public static function site_path($site_path = NULL) + { if ($site_path === NULL) { return self::$site_path; } else { @@ -631,7 +659,8 @@ class CrayonGlobalSettings { } } - public static function plugin_path($plugin_path = NULL) { + public static function plugin_path($plugin_path = NULL) + { if ($plugin_path === NULL) { return self::$plugin_path; } else { @@ -639,7 +668,8 @@ class CrayonGlobalSettings { } } - public static function upload_path($upload_path = NULL) { + public static function upload_path($upload_path = NULL) + { if ($upload_path === NULL) { return self::$upload_path; } else { @@ -647,7 +677,8 @@ class CrayonGlobalSettings { } } - public static function upload_url($upload_url = NULL) { + public static function upload_url($upload_url = NULL) + { if ($upload_url === NULL) { return self::$upload_url; } else { @@ -655,7 +686,8 @@ class CrayonGlobalSettings { } } - public static function set_mkdir($mkdir = NULL) { + public static function set_mkdir($mkdir = NULL) + { if ($mkdir === NULL) { return self::$mkdir; } else { @@ -663,7 +695,8 @@ class CrayonGlobalSettings { } } - public static function mkdir($dir = NULL) { + public static function mkdir($dir = NULL) + { if (self::$mkdir) { call_user_func(self::$mkdir, $dir); } else { @@ -678,14 +711,17 @@ $INT = new CrayonValidator('#\d+#'); /** * Validation class. */ -class CrayonValidator { +class CrayonValidator +{ private $pattern = '#*#msi'; - public function __construct($pattern) { + public function __construct($pattern) + { $this->pattern($pattern); } - public function pattern($pattern) { + public function pattern($pattern) + { if ($pattern === NULL) { return $pattern; } else { @@ -693,11 +729,13 @@ class CrayonValidator { } } - public function validate($str) { + public function validate($str) + { return preg_match($this->pattern, $str) !== FALSE; } - public function sanitize($str) { + public function sanitize($str) + { preg_match_all($this->pattern, $str, $matches); $result = ''; foreach ($matches as $match) { @@ -707,14 +745,18 @@ class CrayonValidator { } } -class CrayonNonNegIntValidator extends CrayonValidator { - public function __construct() { +class CrayonNonNegIntValidator extends CrayonValidator +{ + public function __construct() + { parent::__construct('#\d+#'); } } -class CrayonIntValidator extends CrayonValidator { - public function __construct() { +class CrayonIntValidator extends CrayonValidator +{ + public function __construct() + { parent::__construct('#-?\d+#'); } } @@ -723,7 +765,8 @@ class CrayonIntValidator extends CrayonValidator { * Individual setting. * Can store boolean, string, dropdown (with array of strings), etc. */ -class CrayonSetting { +class CrayonSetting +{ private $name = ''; /* The type of variables that can be set as the value. * For dropdown settings, value is int, even though value() will return a string. */ @@ -738,7 +781,8 @@ class CrayonSetting { private $validator = NULL; - public function __construct($name, $default = '', $value = NULL, $locked = NULL) { + public function __construct($name, $default = '', $value = NULL, $locked = NULL) + { $this->name($name); if ($default !== NULL) { $this->def($default); // Perform first to set type @@ -751,29 +795,35 @@ class CrayonSetting { } } - function __tostring() { + function __tostring() + { return $this->name; } - function copy() { + function copy() + { return new CrayonSetting($this->name, $this->default, $this->value, $this->locked); } - function name($name = NULL) { + function name($name = NULL) + { if (!CrayonUtil::str($this->name, $name)) { return $this->name; } } - function type() { + function type() + { return $this->type; } - function is_array() { + function is_array() + { return $this->is_array; } - function locked($locked = NULL) { + function locked($locked = NULL) + { if ($locked === NULL) { return $this->locked; } else { @@ -788,7 +838,8 @@ class CrayonSetting { * value() returns string value at current index for dropdown settings. * @param $value */ - function value($value = NULL) { + function value($value = NULL) + { if ($value === NULL) { /*if ($this->is_array) { return $this->default[$this->value]; // value at index @@ -812,7 +863,8 @@ class CrayonSetting { } } - function array_value() { + function array_value() + { if ($this->is_array) { return NULL; } @@ -824,7 +876,8 @@ class CrayonSetting { * For dropdown settings, default value is array of all possible value strings. * @param $default */ - function def($default = NULL) { + function def($default = NULL) + { // Only allow default to be set once if ($this->type === NULL && $default !== NULL) { @@ -864,7 +917,8 @@ class CrayonSetting { * @param int|string $index * @return FALSE if not dropdown setting */ - function index($index = NULL) { + function index($index = NULL) + { if (!$this->is_array) { return FALSE; } else if ($index === NULL) { @@ -885,7 +939,8 @@ class CrayonSetting { /** * Finds the index of a string in an array setting */ - function find_index($str) { + function find_index($str) + { if (!$this->is_array || is_string($str)) { return FALSE; } @@ -897,7 +952,8 @@ class CrayonSetting { return FALSE; } - function validator($validator) { + function validator($validator) + { if ($validator === NULL) { return $this->validator; } else { @@ -905,7 +961,8 @@ class CrayonSetting { } } - function sanitize($str) { + function sanitize($str) + { if ($this->validator != NULL) { return $this->validator->sanitize($str); } else { @@ -914,5 +971,3 @@ class CrayonSetting { } } - -?> \ No newline at end of file diff --git a/crayon_settings_wp.class.php b/crayon_settings_wp.class.php index 640732f..baf332b 100644 --- a/crayon_settings_wp.class.php +++ b/crayon_settings_wp.class.php @@ -9,7 +9,8 @@ require_once(CRAYON_SETTINGS_PHP); CrayonHighlighter and any non-WP classes will only use CrayonSettings to separate the implementation of global settings and ensure any system can use them. */ -class CrayonSettingsWP { +class CrayonSettingsWP +{ // Properties and Constants =============================================== // A copy of the current options in db @@ -45,12 +46,14 @@ class CrayonSettingsWP { const SAMPLE_CODE = 'sample-code'; const CACHE_CLEAR = 'crayon-cache-clear'; - private function __construct() { + private function __construct() + { } // Methods ================================================================ - public static function admin_load() { + public static function admin_load() + { self::$admin_page = $admin_page = add_options_page('Crayon Syntax Highlighter ' . crayon__('Settings'), 'Crayon', 'manage_options', 'crayon_settings', 'CrayonSettingsWP::settings'); add_action("admin_print_scripts-$admin_page", 'CrayonSettingsWP::admin_scripts'); add_action("admin_print_styles-$admin_page", 'CrayonSettingsWP::admin_styles'); @@ -73,7 +76,8 @@ class CrayonSettingsWP { } } - public static function admin_styles() { + public static function admin_styles() + { global $CRAYON_VERSION; if (CRAYON_MINIFY) { wp_enqueue_style('crayon', plugins_url(CRAYON_STYLE_MIN, __FILE__), array('editor-buttons'), $CRAYON_VERSION); @@ -84,7 +88,8 @@ class CrayonSettingsWP { } } - public static function admin_scripts() { + public static function admin_scripts() + { global $CRAYON_VERSION; if (CRAYON_MINIFY) { @@ -102,7 +107,8 @@ class CrayonSettingsWP { } } - public static function other_scripts() { + public static function other_scripts() + { global $CRAYON_VERSION; self::load_settings(TRUE); $deps = array('jquery', 'crayon_util_js'); @@ -114,7 +120,8 @@ class CrayonSettingsWP { wp_enqueue_script('crayon_js', plugins_url(CRAYON_JS, __FILE__), $deps, $CRAYON_VERSION); } - public static function init_js_settings() { + public static function init_js_settings() + { // This stores JS variables used in AJAX calls and in the JS files global $CRAYON_VERSION; self::load_settings(TRUE); @@ -147,7 +154,8 @@ class CrayonSettingsWP { } } - public static function init_admin_js_settings() { + public static function init_admin_js_settings() + { if (!self::$admin_js_settings) { // We need to load themes at this stage CrayonSettingsWP::load_settings(); @@ -189,7 +197,8 @@ class CrayonSettingsWP { } } - public static function settings() { + public static function settings() + { if (!current_user_can('manage_options')) { wp_die(crayon__('You do not have sufficient permissions to access this page.')); } @@ -238,11 +247,12 @@ class CrayonSettingsWP {
- ', ($break ? CRAYON_BR : ''); } - private static function checkbox($args, $line_break = TRUE, $preview = TRUE) { + private static function checkbox($args, $line_break = TRUE, $preview = TRUE) + { if (empty($args) || !is_array($args) || count($args) != 2) { return; } @@ -661,7 +695,8 @@ class CrayonSettingsWP { } // Draws a dropdown by loading the default value (an array) from a setting - private static function dropdown($id, $line_break = TRUE, $preview = TRUE, $echo = TRUE, $resources = NULL, $selected = NULL) { + private static function dropdown($id, $line_break = TRUE, $preview = TRUE, $echo = TRUE, $resources = NULL, $selected = NULL) + { if (!array_key_exists($id, self::$options)) { return; } @@ -686,7 +721,8 @@ class CrayonSettingsWP { } } - private static function button($args = array()) { + private static function button($args = array()) + { extract($args); CrayonUtil::set_var($id, ''); CrayonUtil::set_var($class, ''); @@ -695,26 +731,27 @@ class CrayonSettingsWP { return '' . $title . ''; } - private static function info_span($name, $text) { + private static function info_span($name, $text) + { echo '', $text, ''; } - private static function span($text) { + private static function span($text) + { echo '', $text, ''; } // General Fields ========================================================= - public static function help() { + public static function help() + { global $CRAYON_WEBSITE, $CRAYON_TWITTER, $CRAYON_GIT, $CRAYON_PLUGIN_WP, $CRAYON_DONATE; if (CrayonGlobalSettings::val(CrayonSettings::HIDE_HELP)) { return; } - echo '
-

Howdy, coder! Thanks for using Crayon. Useful Links: Documentation, GitHub, Plugin Page, Twitter. Crayon has always been free. If you value my work please consider a small donation to show your appreciation. Thanks! X

- '; } - public static function help_screen() { + public static function help_screen() + { $screen = get_current_screen(); if ($screen->id != self::$admin_page) { @@ -722,7 +759,8 @@ class CrayonSettingsWP { } } - public static function metrics() { + public static function metrics() + { echo '
'; self::checkbox(array(CrayonSettings::HEIGHT_SET, '' . crayon__('Height') . ' '), FALSE); self::dropdown(CrayonSettings::HEIGHT_MODE, FALSE); @@ -760,7 +798,8 @@ class CrayonSettingsWP { echo '
'; } - public static function toolbar() { + public static function toolbar() + { echo '
'; self::span(crayon__('Display the Toolbar') . ' '); self::dropdown(CrayonSettings::TOOLBAR); @@ -775,7 +814,8 @@ class CrayonSettingsWP { echo '
'; } - public static function lines() { + public static function lines() + { echo '
'; self::checkbox(array(CrayonSettings::STRIPED, crayon__('Display striped code lines'))); self::checkbox(array(CrayonSettings::MARKING, crayon__('Enable line marking for important lines'))); @@ -789,7 +829,8 @@ class CrayonSettingsWP { echo '
'; } - public static function langs() { + public static function langs() + { echo ''; // Specialised dropdown for languages if (array_key_exists(CrayonSettings::FALLBACK_LANG, self::$options)) { @@ -818,7 +859,8 @@ class CrayonSettingsWP { } } - public static function show_langs() { + public static function show_langs() + { CrayonSettingsWP::load_settings(); require_once(CRAYON_PARSER_PHP); if (($langs = CrayonParser::parse_all()) != FALSE) { @@ -846,7 +888,8 @@ class CrayonSettingsWP { exit(); } - public static function posts() { + public static function posts() + { echo ''; echo self::button(array('id' => 'show-posts', 'title' => crayon__('Show Crayon Posts'))); echo ' '; @@ -854,7 +897,8 @@ class CrayonSettingsWP { echo '
'; } - public static function post_cmp($a, $b) { + public static function post_cmp($a, $b) + { $a = $a->post_modified; $b = $b->post_modified; if ($a == $b) { @@ -864,7 +908,8 @@ class CrayonSettingsWP { } } - public static function show_posts() { + public static function show_posts() + { CrayonSettingsWP::load_settings(); $postIDs = self::load_posts(); $legacy_posts = self::load_legacy_posts(); @@ -903,7 +948,8 @@ class CrayonSettingsWP { exit(); } - public static function show_preview() { + public static function show_preview() + { echo '
'; self::load_settings(); // Run first to ensure global settings loaded @@ -970,7 +1016,8 @@ class Human { exit(); } - public static function theme($editor = FALSE) { + public static function theme($editor = FALSE) + { $db_theme = self::$options[CrayonSettings::THEME]; // Theme name from db if (!array_key_exists(CrayonSettings::THEME, self::$options)) { $db_theme = ''; @@ -1022,7 +1069,8 @@ class Human { } } - public static function font($editor = FALSE) { + public static function font($editor = FALSE) + { $db_font = self::$options[CrayonSettings::FONT]; // Theme name from db if (!array_key_exists(CrayonSettings::FONT, self::$options)) { $db_font = ''; @@ -1049,7 +1097,8 @@ class Human { self::checkbox(array(CrayonSettings::ENQUEUE_FONTS, crayon__('Enqueue fonts in the header (more efficient).') . self::help_button('http://aramk.com/blog/2012/01/07/enqueuing-themes-and-fonts-in-crayon/'))); } - public static function code($editor = FALSE) { + public static function code($editor = FALSE) + { echo '
'; self::checkbox(array(CrayonSettings::PLAIN, crayon__('Enable plain code view and display') . ' '), FALSE); self::dropdown(CrayonSettings::SHOW_PLAIN); @@ -1085,7 +1134,8 @@ class Human { self::input(array('id' => CrayonSettings::WHITESPACE_AFTER, 'size' => 2, 'break' => TRUE)); } - public static function tags() { + public static function tags() + { self::checkbox(array(CrayonSettings::INLINE_TAG, crayon__('Capture Inline Tags') . self::help_button('http://aramk.com/blog/2012/03/07/inline-crayons/'))); self::checkbox(array(CrayonSettings::INLINE_WRAP, crayon__('Wrap Inline Tags') . self::help_button('http://aramk.com/blog/2012/03/07/inline-crayons/'))); self::checkbox(array(CrayonSettings::CODE_TAG_CAPTURE, crayon__('Capture <code> as')), FALSE); @@ -1101,7 +1151,8 @@ class Human { self::checkbox(array(CrayonSettings::PLAIN_TAG, crayon__('Enable [plain][/plain] tag.') . self::help_button('http://aramk.com/blog/2011/12/27/mini-tags-in-crayon/'))); } - public static function files() { + public static function files() + { echo ''; echo crayon__('When loading local files and a relative path is given for the URL, use the absolute path'), ': ', '
', home_url(), '/'; @@ -1109,7 +1160,8 @@ class Human { echo '
', crayon__('Followed by your relative URL.'); } - public static function tag_editor() { + public static function tag_editor() + { $can_convert = self::load_legacy_posts(); if ($can_convert) { $disabled = ''; @@ -1135,7 +1187,8 @@ class Human { self::input(array('id' => CrayonSettings::TAG_EDITOR_QUICKTAG_BUTTON_TEXT, 'break' => TRUE)); } - public static function misc() { + public static function misc() + { echo crayon__('Clear the cache used to store remote code requests'), ': '; self::dropdown(CrayonSettings::CACHE, false); echo '
'; @@ -1155,14 +1208,16 @@ class Human { // Debug Fields =========================================================== - public static function errors() { + public static function errors() + { self::checkbox(array(CrayonSettings::ERROR_LOG, crayon__('Log errors for individual Crayons'))); self::checkbox(array(CrayonSettings::ERROR_LOG_SYS, crayon__('Log system-wide errors'))); self::checkbox(array(CrayonSettings::ERROR_MSG_SHOW, crayon__('Display custom message for errors'))); self::input(array('id' => CrayonSettings::ERROR_MSG, 'size' => 60, 'margin' => TRUE)); } - public static function log() { + public static function log() + { $log = CrayonLog::log(); touch(CRAYON_LOG_FILE); $exists = file_exists(CRAYON_LOG_FILE); @@ -1188,7 +1243,8 @@ class Human { // About Fields =========================================================== - public static function info() { + public static function info() + { global $CRAYON_VERSION, $CRAYON_DATE, $CRAYON_AUTHOR, $CRAYON_WEBSITE, $CRAYON_TWITTER, $CRAYON_GIT, $CRAYON_PLUGIN_WP, $CRAYON_AUTHOR_SITE, $CRAYON_EMAIL, $CRAYON_DONATE; echo ''; $version = '' . crayon__('Version') . ': ' . $CRAYON_VERSION; @@ -1224,10 +1280,7 @@ class Human { - -
- -
'; + '; echo ' @@ -1244,14 +1297,15 @@ class Human {
' . $links . '
'; - } - public static function help_button($link) { + public static function help_button($link) + { return ' ' . crayon__('?') . ''; } - public static function plugin_row_meta($meta, $file) { + public static function plugin_row_meta($meta, $file) + { global $CRAYON_DONATE; if ($file == CrayonWP::basename()) { $meta[] = '' . crayon__('Settings') . ''; @@ -1269,5 +1323,3 @@ if (defined('ABSPATH') && is_admin()) { add_action('admin_menu', 'CrayonSettingsWP::admin_load'); add_filter('plugin_row_meta', 'CrayonSettingsWP::plugin_row_meta', 10, 2); } - -?> diff --git a/crayon_themes.class.php b/crayon_themes.class.php index a452018..18310f3 100644 --- a/crayon_themes.class.php +++ b/crayon_themes.class.php @@ -41,5 +41,3 @@ class CrayonThemes extends CrayonUserResourceCollection { } } - -?> \ No newline at end of file diff --git a/crayon_wp.class.php b/crayon_wp.class.php index ca0d418..a3c4751 100644 --- a/crayon_wp.class.php +++ b/crayon_wp.class.php @@ -3,7 +3,7 @@ Plugin Name: Crayon Syntax Highlighter Plugin URI: https://github.com/aramk/crayon-syntax-highlighter Description: Supports multiple languages, themes, highlighting from a URL, local file or post text. -Version: 2.8.4 +Version: 2.8.6 Author: Aram Kocharyan Author URI: http://aramk.com/ Text Domain: crayon-syntax-highlighter @@ -1336,5 +1336,3 @@ if (defined('ABSPATH')) { } add_filter('init', 'CrayonWP::init_ajax'); } - -?> diff --git a/global.php b/global.php index 3a2ad0e..0a16148 100644 --- a/global.php +++ b/global.php @@ -1,35 +1,35 @@ "); -define('CRAYON_NL', "\r\n"); -define('CRAYON_BL', CRAYON_BR . CRAYON_NL); -define('CRAYON_DASH', "=============================================================================="); -define('CRAYON_LINE', "------------------------------------------------------------------------------"); +const CRAYON_BR = "
"; +const CRAYON_NL = "\r\n"; +const CRAYON_BL = CRAYON_BR . CRAYON_NL; +const CRAYON_DASH = "=============================================================================="; +const CRAYON_LINE = "------------------------------------------------------------------------------"; // Load utilities -require_once (CRAYON_UTIL_PHP); -require_once (CRAYON_TIMER_PHP); -require_once (CRAYON_LOG_PHP); +require_once(CRAYON_UTIL_PHP); +require_once(CRAYON_TIMER_PHP); +require_once(CRAYON_LOG_PHP); // Turn on the error & exception handlers //crayon_handler_on(); // GLOBAL FUNCTIONS -// Check for forwardslash/backslash in folder path to structure paths -function crayon_s($url = '') { +// Check for forward slash/backslash in folder path to structure paths +function crayon_s($url = '') +{ $url = strval($url); if (!empty($url) && !preg_match('#(\\\\|/)$#', $url)) { return $url . '/'; @@ -152,7 +153,8 @@ function crayon_s($url = '') { } // Returns path using forward slashes, slash added at the end -function crayon_pf($url, $slash = TRUE) { +function crayon_pf($url, $slash = TRUE) +{ $url = trim(strval($url)); if ($slash) { $url = crayon_s($url); @@ -161,12 +163,14 @@ function crayon_pf($url, $slash = TRUE) { } // Returns path using back slashes -function crayon_pb($url) { +function crayon_pb($url) +{ return str_replace('/', '\\', crayon_s(trim(strval($url)))); } // Get/Set plugin information -function crayon_set_info($info_array) { +function crayon_set_info($info_array) +{ global $CRAYON_VERSION, $CRAYON_DATE, $CRAYON_AUTHOR, $CRAYON_WEBSITE; if (!is_array($info_array)) { return; @@ -177,45 +181,53 @@ function crayon_set_info($info_array) { crayon_set_info_key('PluginURI', $info_array, $CRAYON_WEBSITE); } -function crayon_set_info_key($key, $array, &$info) { +function crayon_set_info_key($key, $array, &$info) +{ if (array_key_exists($key, $array)) { $info = $array[$key]; + return true; } else { return FALSE; } } -function crayon_vargs(&$var, $default) { +function crayon_vargs(&$var, $default) +{ $var = isset($var) ? $var : $default; } // Checks if the input is a valid PHP file and matches the $valid filename -function crayon_is_php_file($filepath, $valid) { +function crayon_is_php_file($filepath, $valid) +{ $path = pathinfo(crayon_pf($filepath)); return is_file($filepath) && $path['extension'] === 'php' && $path['filename'] === $valid; } // Stops the script if crayon_is_php_file() returns false or a remote path is given -function crayon_die_if_not_php($filepath, $valid) { +function crayon_die_if_not_php($filepath, $valid) +{ if (!crayon_is_php_file($filepath, $valid) || crayon_is_path_url($filepath)) { die("[ERROR] '$filepath' is not a valid PHP file for '$valid'"); } } -function crayon_is_path_url($path) { +function crayon_is_path_url($path) +{ $parts = parse_url($path); return isset($parts['scheme']) && strlen($parts['scheme']) > 1; } // LANGUAGE TRANSLATION FUNCTIONS -function crayon_load_plugin_textdomain() { +function crayon_load_plugin_textdomain() +{ if (function_exists('load_plugin_textdomain')) { load_plugin_textdomain(CRAYON_DOMAIN, false, CRAYON_DIR . CRAYON_TRANS_DIR); } } -function crayon__($text) { +function crayon__($text) +{ if (function_exists('__')) { return __($text, CRAYON_DOMAIN); } else { @@ -223,7 +235,8 @@ function crayon__($text) { } } -function crayon_e($text) { +function crayon_e($text) +{ if (function_exists('_e')) { _e($text, CRAYON_DOMAIN); } else { @@ -231,7 +244,8 @@ function crayon_e($text) { } } -function crayon_n($singular, $plural, $count) { +function crayon_n($singular, $plural, $count) +{ if (function_exists('_n')) { return _n($singular, $plural, $count, CRAYON_DOMAIN); } else { @@ -239,12 +253,11 @@ function crayon_n($singular, $plural, $count) { } } -function crayon_x($text, $context) { +function crayon_x($text, $context) +{ if (function_exists('_x')) { return _x($text, $context, CRAYON_DOMAIN); } else { return $text; } } - -?> \ No newline at end of file diff --git a/js/jquery-colorpicker/.editorconfig b/js/jquery-colorpicker/.editorconfig new file mode 100644 index 0000000..c4b6ff6 --- /dev/null +++ b/js/jquery-colorpicker/.editorconfig @@ -0,0 +1,13 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.js,*.json,*.html,*.css] +indent_size = 2 diff --git a/js/jquery-colorpicker/.eslintrc.json b/js/jquery-colorpicker/.eslintrc.json new file mode 100644 index 0000000..faf333c --- /dev/null +++ b/js/jquery-colorpicker/.eslintrc.json @@ -0,0 +1,34 @@ +{ + "env": { + "browser": true, + "es6": true + }, + "extends": "eslint:recommended", + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parserOptions": { + "ecmaVersion": 2018 + }, + "rules": { + "indent": [ + "error", + 2 + ], + "no-trailing-whitespace": true, + "no-multi-space": true, + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ] + } +} diff --git a/js/jquery-colorpicker/.gitignore b/js/jquery-colorpicker/.gitignore index 90ec22b..c182ea1 100644 --- a/js/jquery-colorpicker/.gitignore +++ b/js/jquery-colorpicker/.gitignore @@ -1 +1,8 @@ +/nbproject/private/ +/nbproject/ .svn +.idea/* +/debug/ +/node_modules/ +/bower_components/ +/npm-debug.log \ No newline at end of file diff --git a/js/jquery-colorpicker/.stylelintrc b/js/jquery-colorpicker/.stylelintrc new file mode 100644 index 0000000..1a2ac0c --- /dev/null +++ b/js/jquery-colorpicker/.stylelintrc @@ -0,0 +1,7 @@ +{ + "rules": { + "indentation": 2, + "no-descending-specificity": null + }, + "extends": "stylelint-config-recommended" +} diff --git a/js/jquery-colorpicker/CHANGELOG.md b/js/jquery-colorpicker/CHANGELOG.md new file mode 100644 index 0000000..aabac2a --- /dev/null +++ b/js/jquery-colorpicker/CHANGELOG.md @@ -0,0 +1,81 @@ +# Change Log +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## 1.2.20 - 2019-09-01 +### Fixed +- Merged security patches for third party components. + +## 1.2.19 - 2019-07-11 +### Fixed +- Merged security patches for third party components. + +## 1.2.18 - 2019-05-13 +### Added +- Merged PR #159 by @NicolasCARPi; Added `cancelOnExit` option in response to #158. + +## 1.2.17 - 2018-07-15 +### Fixed +- Merged PR #148 by @teambuktu; Input event for ui-colorpicker-number. + +## 1.2.16 - 2018-02-19 +### Fixed +- Merged PR #145 by @gentoo90; accept numpad keys on hex inputs. + +## 1.2.15 - 2018-02-12 +### Fixed +- Fix #144 by @Backslider23; memory part doesn't enable OK button correctly. +- Fixed black initialization issue in rgbslider part. + +## 1.2.14 - 2017-12-10 +### Added +- PR #143 by @zaeder; `ready` event at end of widget creation. + +## 1.2.13 - 2017-05-02 +### Fixed +- Fix #137 by @larsinsd; Typing in hex input does not enable OK button. +- Fix #139 by @s1738berger; Colorpicker cannot get disabled with option + 'buttonImageOnly' +- Fix #130 by @actionpark; Return `css` and `hex` color in all events. + +## 1.2.12 - 2017-03-29 +### Fixed +- Fixed #136 by @mateuszf; Cannot disable animation. + +## 1.2.11 - 2017-03-29 +### Fixed +- Fixed #134 by @larsinsd and @justzuhri; `Ctrl+V` not working on Mac OS-X. + +## 1.2.10 - 2017-03-29 +### Added +- Added Copic color swatches. +- Added Prismacolor color swatches. +- Added DIN 6164 color swatches. +- Added ISCC-NBS color swatches. + +## 1.2.9 - 2017-01-21 +### Fixed +- Implemented fix #135 by @cosmicnet; replaced `.attr()` calls with `.prop()`. + +## 1.2.8 - 2017-01-05 +### Added +- Polish (`pl`) translation added from PR #133 by @kniziol. +### Changed +- Replaced deprecated `.bind()`, `.unbind()`, `.delegate()` and `.undelegate()` +functions by `.on()` and `.off()` for jQuery 3.0.0 compatibility. +- Documented jQueryUI 1.12.0+ requirement for jQuery 3.0.0+. + +## 1.2.7 - 2016-12-24 +### Added +- Ukranian (`uk`) translation added from PR #131 by @ashep. + +## 1.2.6 - 2016-10-28 +### Fixed +- Allow focussing and keyboard support on the "map" and "bar" parts. + +## 1.2.5 - 2016-10-28 +### Fixed +- The "None" and "Transparent" radiobuttons didn't always refresh in certain +color states. diff --git a/js/jquery-colorpicker/LICENSE b/js/jquery-colorpicker/LICENSE new file mode 100644 index 0000000..af9901a --- /dev/null +++ b/js/jquery-colorpicker/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2011 Martijn van der Lee + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/js/jquery-colorpicker/README b/js/jquery-colorpicker/README deleted file mode 100644 index 038e717..0000000 --- a/js/jquery-colorpicker/README +++ /dev/null @@ -1,231 +0,0 @@ -jQuery.colorpicker v0.9.3 - -Copyright (c) 2011-2012 Martijn W. van der Lee -Licensed under the MIT. - -Full-featured colorpicker for jQueryUI with full theming support. -Most images from jPicker by Christopher T. Tillman. -Sourcecode created from scratch by Martijn W. van der Lee. - -IE support; make sure you have a doctype defined, or the colorpicker will not -display correctly. - -Options: - alpha: false - Whether or not to show the inputs for alpha. - - altAlpha: true - Change the opacity of the altField element(s) according to the alpha - setting. - - altField: '' - Change the background color of the elements specified in this element. - - altOnChange: true - If true, the altField element(s) are updated on every change, otherwise - only upon closing. - - altProperties: 'background-color' - Comma-separated list of CSS properties to set color of in the altField. - The following properties are allowed, all others are ignored. - background-color - color - border-color - outline-color - - autoOpen: false - If true, the dialog opens automatically upon page load. - - buttonColorize: false - If a buttonimage is specified, change the background color of the - image when the color is changed. - - buttonImage: 'images/ui-colorpicker.png' - Same as jQueryUI DatePicker. - - buttonImageOnly: false - Same as jQueryUI DatePicker. - - buttonText: null - Same as jQueryUI DatePicker. If null, use language default. - - closeOnEscape: true - Close the window when pressing the Escape key on the keyboard. - - closeOnOutside: true - Close the window when clicking outside the colorpicker display. - - color: '#00FF00' - Initial color. Formats recognized are: - #rrggbb - rrggbb (same as previous, but without the #) - rgb(rrr,ggg,bbb) - rgba(rrr,ggg,bbb,a.a) - rgb(rrr%,ggg%,bbb%) - rgba(rrr%,ggg%,bbb%,aaa%) - w3c-defined color name - - colorFormat: 'HEX' - Specifies the format of the color string returned in callbacks. - You can either specify one of the predefined formats: - #HEX #112233 - #HEX3 #123 if possible, otherwise false. - HEX 112233 - HEX3 123 if possible, otherwise false. - RGB rgb(123,45,67) if opaque, otherwise false. - RGBA rgba(123,45,67,0.123%) - RGB% rgb(12%,34%,56%) if opaque, otherwise false. - RGBA% rgba(12%,34%,56%,0.123%) - HSL hsl(123,45,67) if opaque, otherwise false. - HSLA hsla(123,45,67,0.123%) - HSL% hsl(12%,34%,56%) if opaque, otherwise false. - HSLA% hsla(12%,34%,56%,0.123%) - NAME Closest color name - EXACT Exact name if possible, otherwise false. - or specify your own format... - Each color channel is specified as a pair of two characters. - The first character determines the color channel: - a Alpha - r, g, b RGB color space; red, green and blue - h, s, v HSV color space; hue, saturation and value - c, m, y, k CMYK color space; cyan, magenta, yellow and black - L, A, B LAB color space; Luminosity, *A and *B. - The second character specifies the data type: - x Two-digit hexadecimal notation. - d Decimal (0-255) notation. - f Floating point (0-1) notation, not rounded. - p Percentage (0-100) notation, not rounded. - If you prefix a valid pair with a backslash, it won't be replaced. - All patterns are case sensitive. - For example, to create the common hex color format, use "#rxgxbx". - For an rgba() format, use "rgba(rd,gd,bd,af)" - - You can also specify an array of formats where the first non-FALSE one - is returned. Note that the only formats able to return FALSE are the - predefined formats HEX3 and EXACT. For example, this array will output - HEX3 format if possible or HEX format otherwise: - ['HEX3', 'HEX'] - - dragggable: true - Make the dialog draggable if the header is visible and the dialog is - not inline. - - duration: 'fast' - Same as jQueryUI DatePicker. - - hsv: true - Whether or not to show the inputs for HSV. - - layout: { ... } - Set the position of elements in a table layout. - You could create any layout possible with HTML tables by specifying - cell position and size of each part. - @todo document how this works. - - limit: '' - Limit the selectable colors to any of the predefined limits: - '' No limitations, allow 8bpp color for a palette of - all 16 million colors. - 'websafe' Set of 216 colors composed of 00, 33, 66, 99, cc - and ff color channel values in #rrggbb. - 'nibble' 4 bits per color, can be easily converted to #rgb - format. - The palette is limited to 4096 colors. - 'binary' Allow only #00 or #ff as color channel values for - primary colors only; only 8 colors are available - with this limit. - 'name' Limit to closest color name. - - modal: - Ensures no other controls on screen can be used while the dialog is - opened. - Also look at showCancelButton and closeOnEscape to use in combination - with the modal option. closeOnOutside is redundant when used with modal. - - mode: 'h' - Determines the functionality of the map and bar components. Allowed - values are; 'h', 's', 'l', 'r', 'g', 'b' or 'a', for hue, saturation, - luminosity, red, green, blue and alpha respectively. - - parts: '' - Determine which parts to display. - Use any of the preset names ('full', 'popup' or 'inline') or specify - an array of part names (i.e. ['header', 'map', 'bar', 'hex', 'hsv', - 'rgb', 'alpha', 'lab', 'cmyk', 'preview', 'swatches', 'footer']). - If an empty string is given, the parts will be automatically chosen as - preset 'popup' or 'inline' depending on the context in which the - colorpicker is used. - - rgb: true, // Show RGB controls and modes - Whether or not to show the inputs for RGB. - - regional: '', - Sets the language to use. Note that you must load the appropriate - language file from the i18n directory. '' is included by default. - - showAnim: 'fadeIn' - Same as jQueryUI DatePicker. - - showCancelButton: true - Show the Cancel button if buttonpane is visible. - - showCloseButton: true - Show the Close button if the header is visible. - If the dialog is inline, the close button is never shown. - - showNoneButton: false - Show the None/Revert button if buttonpane is visible. - - showOn: 'focus' - Same as jQueryUI DatePicker. - - showOptions: {} - Same as jQueryUI DatePicker. - - swatches: null - 'null' to show swatches of HTML colors or provide your own object - with colornames and {r:1, g:1, b:1} array. - For example { 'red': {r:1, g:0, b:0}, 'blue': {r:0, g:0, b:1} } - - title: null - Title to display in the header. If null, use language default. - -Events: - init: null - Triggered on initially setting the color. Called only once. - Callbacks recieve same data as select event. - - close: null - Triggered when the popup is closed. - Callbacks recieve same data as select event and an additional number - of fields containing the current color in all supported color spaces. - These are rgb{}, hsv{}, cmyk{}, lab{}, hsl{} and a. - Most values are floating point numbers in range [0,1] for accuracy. - The a and b values in the lab color space have range [-1,1]. - - select: null - Triggered on each change, confirmation (click on OK button) and - cancellation (click on Cancel, outside window or window close button) - respectively. - - The event recieves a jQuery event object and a data object containing - the elements 'formatted' (with the color formatted according to - formatColor). - - Note that select may be triggered in rapid succession when dragging - the mouse accross the map or bar and may be triggered without a change - in color upon specific user interactions. - -Methods: - open - Open the dialog - - close - Close the dialog - - destroy - Destroy the widget - - setColor - Set the current color to the specified color. Accepts any - CSS-confirmant color specification. \ No newline at end of file diff --git a/js/jquery-colorpicker/README.md b/js/jquery-colorpicker/README.md new file mode 100644 index 0000000..1268f4a --- /dev/null +++ b/js/jquery-colorpicker/README.md @@ -0,0 +1,539 @@ +

+ +

A full-featured colorpicker for jQueryUI with full theming support.

+ +[![Release](https://badge.fury.io/js/vanderlee-colorpicker.svg)](https://badge.fury.io/js/vanderlee-colorpicker) +[![License](https://img.shields.io/github/license/vanderlee/colorpicker.svg)](https://choosealicense.com/licenses/mit/) + +Copyright © 2011-2019 Martijn W. van der Lee. + +Most images from jPicker by Christopher T. Tillman. +Sourcecode created from scratch by Martijn W. van der Lee. + +Features +-------- +- jQueryUI (themeroller-based) look & feel +- Familiar interface layout +- Highly configurable + - Control parts + - Layout + - Input/output formats + - Swatches + - Many more +- Accurate color model +- Supports localization + - English, Dutch, French, etc. + - Easily translatable (https://www.transifex.com/projects/p/jquery-colorpicker/) +- Smart window alignment +- Complete API with events and methods +- Easily extendable with plugins + - Many examples included: RGB-Sliders with CSS gradients, Per-user cookie + memory for colors. +- Documented +- Limited Unit tests (QUnit-based) +- Disable/enable +- Keyboard support + +Requirements +------------ +jQuery 1.7.1 or higher required (will not work with v1.6 or before). + +jQueryUI 1.8.0 or higher required. + +For jQuery 3.0.0 or higher, you must use jQueryUI 1.12.0 or higher. + +IE support; make sure you have a doctype defined, or the colorpicker will not +display correctly. + +Installation +------------ + +With **npm**: `npm install vanderlee-colorpicker` + +With **yarn**: `yarn add vanderlee-colorpicker` + +With **bower** (deprecated): `bower install colorpicker` + +Zip archive: https://github.com/vanderlee/colorpicker/archive/master.zip + +jQueryUI custom build +--------------------- +If you download a custom build of jQueryUI, you need these components: + +* Dialog (includes Core, Widget, Mouse, Position, Draggable and Resizable) +* Fade Effect (only if you use the `showAnim` option, includes Effects Core) + +To use the `parts/jquery.ui.colorpicker-rgbslider.js` plugin, you must add: + +* Slider (includes Core, Widget and Mouse) + +To use the demo page included in the documentation, you must add: + +* Tabs (includes Core and Widget) + +Browser support +--------------- +Tested various versions of this plugin with the following browsers: + +- Chrome 31-54 +- FireFox 25-48 +- Opera 17-39 +- Internet Explorer 10-11 +- Edge 20-25 + +Keyboard support +---------------- +You can use the arrow keys to move the cursors on the map and bar controls. +Steps are measures in on-screen pixels. + +Holding the `shift` key while using the arrow keys takes steps 10x larger. +Pressing the `page down` and `page up` keys does the same for vertical movement. + +Holding the `ctrl` key while using the arrow keys takes you to the edges. +Pressing the `home` and `end` keys does the same for vertical movement. + +Documentation +============= +`.colorpicker(options)` +-------------------- +Turns an element into a colorpicker. + +Options +------- +### alpha (false) +Whether or not to show the inputs for alpha. + +### altAlpha (true) +Change the opacity of the altField element(s) according to the alpha setting. + +### altField ('') +Change the background color of the elements specified in this element. + +### altOnChange (true) +If true, the altField element(s) are updated on every change, otherwise +only upon closing. + +### altProperties (background-color) +Comma-separated list of CSS properties to set color of in the altField. +The following properties are allowed, all others are ignored. + +* ``background-color`` +* ``border-color`` +* ``color`` +* ``fill`` +* ``outline-color`` +* ``stroke`` + +### autoOpen (false) +If true, the dialog opens automatically upon page load. + +### buttonClass (null) +If this option is set to a string, the button will be assigned the +class specified. + +### buttonColorize (false) +If a `buttonImage` is specified, change the background color of the +image when the color is changed. + +### buttonImage ('images/ui-colorpicker.png') +Same as jQueryUI DatePicker. + +### buttonImageOnly (false) +Same as jQueryUI DatePicker. + +### buttonText (null) +Same as jQueryUI DatePicker. If null, use language default. + +### cancelOnExit (false) +If true, the value is reverted to the original one on exit. + +### closeOnEscape (true) +Close the window when pressing the Escape key on the keyboard. + +### closeOnOutside (true) +Close the window when clicking outside the colorpicker display. + +### color ('#00FF00') +Initial color. Formats recognized are: + +* #rrggbb +* rrggbb (same as previous, but without the #) +* rgb(rrr,ggg,bbb) +* rgba(rrr,ggg,bbb,a.a) +* rgb(rrr%,ggg%,bbb%) +* rgba(rrr%,ggg%,bbb%,aaa%) +* w3c-defined color name + +### colorFormat ('HEX') +Specifies the format of the color string returned in callbacks. +You can either specify one of the predefined formats: + +* ``#HEX`` #112233 (#RRGGBB) +* ``#HEX3`` #123 (#RGB) if possible, otherwise false. +* ``HEX`` 112233 (RRGGBB) +* ``HEX3`` 123 (RGB) if possible, otherwise false. +* ``#HEXA`` #11223344 (#RRGGBBAA) +* ``#HEXA4`` #1234 (#RGBA) if possible, otherwise false. +* ``HEXA`` 11223344 (RRGGBBAA) +* ``HEXA4 `` 1234 (RGBA) if possible, otherwise false. +* ``RGB`` rgb(123,45,67) if opaque, otherwise false. +* ``RGBA`` rgba(123,45,67,0.123%) +* ``RGB%`` rgb(12%,34%,56%) if opaque, otherwise false. +* ``RGBA%`` rgba(12%,34%,56%,0.123%) +* ``HSL`` hsl(123,45,67) if opaque, otherwise false. +* ``HSLA`` hsla(123,45,67,0.123%) +* ``HSL%`` hsl(12%,34%,56%) if opaque, otherwise false. +* ``HSLA%`` hsla(12%,34%,56%,0.123%) +* ``NAME`` Closest color name +* ``EXACT`` Exact name if possible, otherwise false. + +or specify your own format... +Each color channel is specified as a pair of two characters. +The first character determines the color channel: + +* ``a`` Alpha +* ``r, g, b`` RGB color space; red, green and blue +* ``h, s, v`` HSV color space; hue, saturation and value +* ``c, m, y, k`` CMYK color space; cyan, magenta, yellow and black +* ``L, A, B`` LAB color space; Luminosity, *A and *B. + +The second character specifies the data type: + +* ``x`` Two-digit hexadecimal notation. +* ``d`` Decimal (0-255) notation. +* ``f`` Floating point (0-1) notation, not rounded. +* ``p`` Percentage (0-100) notation, not rounded. + +If you prefix a valid pair with a backslash, it won't be replaced. +All patterns are case sensitive. +For example, to create the common hex color format, use "#rxgxbx". +For an rgba() format, use "rgba(rd,gd,bd,af)" + +You can also specify an array of formats where the first non-FALSE one +is returned. Note that the only formats able to return FALSE are the +predefined formats HEX3 and EXACT. For example, this array will output +HEX3 format if possible or HEX format otherwise: + +* ``['HEX3', 'HEX']`` + +### disabled (false) +Disable or enable the colorpicker and all it's controls by setting this option. + +If you disable the `input` using the `disabled` HTML attribute before attaching +a colorpicker, it will automatically be disabled. + +You can change this option using the `option` method call. + +### draggable (true) +Make the dialog draggable if the header is visible and the dialog is +not inline. + +### containment (null) +If the dialog is draggable, constrains dragging to within the bounds of the +specified element or region. Same as jQueryUI Draggable. + +### duration ('fast') +Same as jQueryUI DatePicker. + +### hideOn ('button') +Specifies what user events will hide the colorpicker if not inline. +Specify multiple events by separating with space. + +* ``focus`` When the element goes out of focus (either tab or click) +* ``click`` When the element is clicked (for non-inputs) +* ``alt`` When clicking on an element specified with as altField +* ``button`` When clicking on the button created if this event is specified. +* ``all`` selects all possible triggers +* ``both`` same as ``all`` (deprecated, kept backwards compatibility) + +### hsv (true) +Whether or not to show the inputs for HSV. + +### inline (true) +If set to false, attaching to a non-input will still make the dialog +a popup instead of inline. Make sure you handle events to catch the +color change, otherwise you can't use the color. + +### inlineFrame (true) +If enabled, shows a border and background when inline. Disabling may +allow closer integration. + +### layout ({ ... }) +Set the position of elements in a table layout. +You could create any layout possible with HTML tables by specifying +cell position and size of each part. + +The layout option takes a map (object) with each property name matching one of +the available parts (including any possible custom or plugin parts). The value +is a an array with four coordinates on order `[`left`, `top`, `width`, +`height`]`. + +The coordinates correspond to cells in a table, so if you want to have a part +at top-left and spanning two rows and three columns, the value would be +`[0, 0, 3, 2]`. + +Care should be taken to ensure no parts overlap (best to just draw out a grid +on paper first). Behavior is undefined if parts overlap. You need not cover +the entire rectangular area; any empty cells will be simply remain empty. + +The default layout is as follows: + + { + map: [0, 0, 1, 5], + bar: [1, 0, 1, 5], + preview: [2, 0, 1, 1], + hsv: [2, 1, 1, 1], + rgb: [2, 2, 1, 1], + alpha: [2, 3, 1, 1], + hex: [2, 4, 1, 1], + lab: [3, 1, 1, 1], + cmyk: [3, 2, 1, 2], + swatches: [4, 0, 1, 5] + } + +### limit ('') +Limit the selectable colors to any of the predefined limits: + +* ``''`` No limitations, allow 8bpp color for a palette of all 16 million + colors. +* ``websafe`` Set of 216 colors composed of 00, 33, 66, 99, cc and ff color + channel values in #rrggbb. +* ``nibble`` 4 bits per color, can be easily converted to #rgb format. The + palette is limited to 4096 colors. +* ``binary`` Allow only #00 or #ff as color channel values for primary colors + only; only 8 colors are available with this limit. +* ``name`` Limit to closest color name. + +### modal (false) +Ensures no other controls on screen can be used while the dialog is +opened. +Also look at showCancelButton and closeOnEscape to use in combination +with the modal option. closeOnOutside is redundant when used with modal. + +### mode ('h') +Determines the functionality of the map and bar components. Allowed +values are; 'h', 's', 'l', 'r', 'g', 'b' or 'a', for hue, saturation, +luminosity, red, green, blue and alpha respectively. + +### okOnEnter (false) +Close the window when pressing the Enter key on the keyboard, keeping the +selected color. + +### part +Use the part option to specify options specific to parts (including plugin +parts). By default, the following part options are available: + +### parts ('') +Determine which parts to display. +Use any of the preset names ('full', 'popup' or 'inline') or specify an array +of part names (i.e. ['header', 'map', 'bar', 'hex', 'hsv', +'rgb', 'alpha', 'lab', 'cmyk', 'preview', 'swatches', 'footer']). +If an empty string is given, the parts will be automatically chosen as +preset 'popup' or 'inline' depending on the context in which the +colorpicker is used. + +### position (null) +Specify the position of the dialog as a jQueryUI position object. +See [jQueryUI .position() API documentation](http://api.jqueryui.com/position/) +for information on how to use. +ColorPicker adds an additional option to the `of` option; the value `'element'` +will refer to the element to which the ColorPicker is attached, including if it +is invisible). +By default, the dialog will attached to the bottom-left of the element, flipping +on collision. + +### regional ('') +Sets the language to use. Note that you must load the appropriate language file +from the i18n directory. '' is included by default. + +### revert (false) +If enabled, closing the dialog through any means but the OK button will revert +the color back to the previous state, as if pressing the Cancel button. +The revert option changes the behavior of the [X] button in the header, the +Escape keyboard button and clicking outside the dialog, when any of these +features are enabled. + +### rgb (true) +Whether or not to show the inputs for RGB. + +### showAnim ('fadeIn') +Same as jQueryUI DatePicker. + +### showCancelButton (true) +Show the Cancel button if buttonpane is visible. + +### showCloseButton (true) +Show the Close button if the header is visible. +If the dialog is inline, the close button is never shown. + +### showNoneButton (false) +Show the None/Revert button if buttonpane is visible. + +### showOn ('focus click alt') +Specifies what user events will show the colorpicker if not inline. +Specify multiple events by separating with space. + +* ``focus`` When the element comes into focus (either tab or click) +* ``click`` When the element is clicked (for non-inputs) +* ``alt`` When clicking on an element specified with as altField +* ``button`` When clicking on the button created if this event is specified. +* ``all`` selects all possible triggers +* ``both`` same as ``all`` (deprecated, kept backwards compatibility) + +### showOptions ({}) +Same as jQueryUI DatePicker. + +### swatches (null) +'null' to show swatches of HTML colors or provide your own object +with colornames and {r:1, g:1, b:1} array. +For example { 'red': {r:1, g:0, b:0}, 'blue': {r:0, g:0, b:1} } +Alternatively, load a predefined set of swatches and specify the name. +For example, for the pantone set, specify 'pantone'. + +### swatchesWidth (84) +Width of the swatches display in pixels. + +### title (null) +Title to display in the header. If null, use language default. + +Events +------ +Each event receives a jQuery `event` object and an object containing the +elements 'formatted' (with the color formatted according to `formatColor`), +the Colorpicker element that triggered the event and the color represented in a +number of format: + +* `hex: rrggbb` +* `css: #rrggbb` +* `a: ...` +* `rgb: {r: ..., g: ..., b: ...}` +* `hsv: {h: ..., s: ..., v: ...}` +* `cmyk: {c: ..., m: ..., y: ..., k: ...}` +* `hsl: {h: ..., s: ..., l: ...}` +* `lab: {l: ..., a: ..., b: ...}` + +Note that select may be triggered in rapid succession when dragging +the mouse across the map or bar and may be triggered without a change +in color upon specific user interactions. + +### cancel (event, {formatted: ..., colorPicker: ...}) +Triggered when the dialog is closed through the cancel button. + +### close (event, {formatted: ..., colorPicker: ...}) +Triggered when the popup is closed. + +### init (event, {formatted: ..., colorPicker: ...}) +Triggered on initially setting the color. Called only once. +Callbacks receive same data as select event. + +### ok (event, {formatted: ..., colorPicker: ...}) +Triggered when the dialog is closed through the cancel button. + +### open (event, {formatted: ..., colorPicker: ...}) +Triggered whenever the dialog is opened. + +### ready (event, {formatted: ..., colorPicker: ...}) +Triggered after creating the widget/dialog. + +### select (event, {formatted: ..., colorPicker: ...}) +Triggered on each change, confirmation (click on OK button) and +cancellation (click on Cancel, outside window or window close button) +respectively. + +### stop(event, {formatted: ..., colorPicker: ...}) +Triggered when the user stops changing a control. This only affects the map +and bar parts. Where the `select` event will trigger on each mouse move, the +`stop` event will only trigger when the mouse button is released. For other +controls, `stop` and `select` are both triggered. + +The callback is otherwise identical to `select`. When both are triggered, +`select` is triggered before `stop`. + +Methods +------- +### open +Open the dialog + +### close +Close the dialog + +### destroy +Destroy the widget + +### setColor +Set the current color to the specified color. Accepts any CSS-confirming color +specification. + +Plugins +------- +Colorpicker is extensible with several types of plugins. A number of plugins +is provided for use. The plugins are constructed such that you only need to +load the javascript file after the Colorpicker plugin itself is loaded. + +### limits +Limits let you limit the possible colors, as used by the 'limit' option. + +No plugins included. + +### parsers +Parser take a textual representation of a color and return a Color object. +If no match is found, nothing is returned and the next parser is tried. +Parsers are tried in order of appearance. + +Included plugins: +* ``cmyk-parser`` Parses a ``cmyk(c, y, m, k)`` format, similar + to rgba. +* ``cmyk-percentage-parser`` Parses a ``cmyk(c%, y%, m%, k%)`` format with + percentages. + +### parts +You can add additional visual parts, usually controls, that interact +with the rest of Colorpicker framework. + +Included plugins: +* ``memory`` Cookie-based memory nodes. +* ``rgbsliders`` Set of three red/green/blue sliders with dynamically +adjusted gradients. +* ``swatchesswitcher`` Switch through all available sets of swatches. + +### partslists +Partslists are a convenient way to select multiple parts at once without having +to specify each one individually. + +No plugins included. + +### regional +Regional (in the i18n directory) plugins contain localized texts +(a.k.a. translations). A number of languages is provided. + +Included regionals: +* ``de`` German (Deutsch). +* ``el`` Greece. +* ``en`` English (default). +* ``fr`` French. +* ``nl`` Dutch. +* ``pt-br`` Brazilian Portuguese. +* ``ru`` Russian. + +### swatches +Swatches are collections of predefined and named colors. By default the +standard ``html`` colors are loaded. +Setting `swatches` using the `option` method will switch the displayed swatches. + +Included plugins: +* ``crayola`` Crayola pencil color names +* ``pantone`` Pantone color codes +* ``ral-classic`` Classic RAL paint numbers +* ``x11`` X11 color palette (using "gray", not "grey"). + +### writers +Writers take a Color object and output a textual representation of the color. +Writers are used for the colorFormat option. + +No plugins included. + +Objects +------- +Colorpicker uses a Color object internally to represent a color and convert +between the supported color models. +You can create a new Color object through $.colorpicker.Color. diff --git a/js/jquery-colorpicker/TODO b/js/jquery-colorpicker/TODO index 6916720..1d9cbfc 100644 --- a/js/jquery-colorpicker/TODO +++ b/js/jquery-colorpicker/TODO @@ -1,20 +1,28 @@ -Fix the weird one-pixel vertical shift bug. - Caused by ui-widget class. - Only happens in Chrome and only on some, not all. - Disappears and re-appears at different zoom levels. -In hex input, accept (and strip) '#' symbol on copy/past. -Completely destroy object when closed. -Enabled/disabled -isRTL? What to RTL, besides button? -Disable selection in MSIE: this.dialog.on('selectstart', function(event) { return false; }) -Special rendering mode for color_none? Use [X] images? -Fix parsing from input with websafe colors -Recognize "transparent" color name. -Limit number of events triggered. -Small size variant (128x128) -isRTL? What to RTL, besides button? -Undo/redo memory? -ARIA support. -Allow only set (dec/hex) characters in inputs -Most-recently-used swatches -HSL/HSV distance calculations should take into account cyclic hue. \ No newline at end of file +$.undelegate and remove keydown methods for opening upon close() +Separate into a pure dialog and a "caller" plugin. +Implement a getColor method. +Use preconfigured/default output color. +Allow optional manual specification of color. +Fix the weird one-pixel vertical shift bug. +Caused by ui-widget class. +Only happens in Chrome and only on some, not all. +Disappears and re-appears at different zoom levels. +In hex input, accept (and strip) '#' symbol on copy/past. +Completely destroy object when closed. +Enabled/disabled +isRTL? What to RTL, besides button? +Disable selection in MSIE: this.dialog.on('selectstart', function(event) { return false; }) +Special rendering mode for color_none? Use [X] images? +Fix parsing from input with websafe colors +Recognize "transparent" color name. +Limit number of events triggered. +Small size variant (128x128) +isRTL? What to RTL, besides button? +Undo/redo memory? +ARIA support. +Allow only set (dec/hex) characters in inputs +Most-recently-used swatches +HSL/HSV distance calculations should take into account cyclic hue. +Support CSS4 color format draft proposals: http://dev.w3.org/csswg/css-color/ +Add more swatches; i.e. http://en.wikipedia.org/wiki/List_of_8-bit_computer_hardware_palettes +Allow Cancel button to be enabled even when no change. Extra value for `showCancelButton`? diff --git a/js/jquery-colorpicker/bower.json b/js/jquery-colorpicker/bower.json new file mode 100644 index 0000000..8754e4d --- /dev/null +++ b/js/jquery-colorpicker/bower.json @@ -0,0 +1,26 @@ +{ + "name": "colorpicker", + "version": "1.2.20", + "homepage": "https://github.com/vanderlee/colorpicker", + "authors": [ + "Martijn van der Lee " + ], + "description": "JQuery colorpicker: themeroller styling, RGB, HSL, CMYK and L*A*B support. Standard look & feel, configurable. Works as a popup or inline.", + "main": "jquery.colorpicker.js", + "keywords": [ + "jquery", + "colorpicker" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "jquery": ">=1.7.1", + "jquery-ui": ">=1.8.0" + } +} diff --git a/js/jquery-colorpicker/demo.html b/js/jquery-colorpicker/demo.html new file mode 100644 index 0000000..da775e7 --- /dev/null +++ b/js/jquery-colorpicker/demo.html @@ -0,0 +1,641 @@ + + + + jQuery Colorpicker + + + + + + + + + + + + + + + + + + + + + + + + + + +

jQuery ColorPicker - Demo page

+ +
+ + +
+

Basic <input> example, without any options

+ + + +
+ +
+

Basic element (<span>> example, without any options

+ + + +
+ +
+

Fully-featured example

+ + + +
+ +
+

Localized to Dutch (nl)

+ + + +
+ +
+

Limit to websafe colors

+ + + +
+ +
+

Alternative field class

+ + +
Background-color on outside, text color here
+
+ + +
+ +
+

Events

+ +
+ + +
+ +
+

Output formatting HSLA

+ + + + +
+ +
+

Output format list

+ You can specify a list of output formats, the first perfect match for the color is output.
+ + + + +
+ +
+

Dialog with Colorpicker popup (demonstrates z-index)

+ +
+ Basic <input> example, without any options: +
+ Basic element example, without any options: +
+ + +
+ +
+

Modal (and showCancelButton, closeOnEscape, showCloseButton)

+ + + +
+ +
+

Input formatting

+ Demonstrates the ability to parse common color formats as input.
+ + + +
+ +
+

Popup from any element (<em>)

+ Just click on this Emphasized word to show the colorpicker. + + +
+ +
+

Custom layout

+ It's easy to arrange a new layout for the dialog. Especially handy when used in a sidebar.
+ + + +
+ +
+

Custom swatches

+ Use the Pantone PMS colors as swatches
+ + + + +
+ +
+

Custom swatches - array

+ Use an array of swatches
+ + + + +
+ +
+

Hidden input

+ Uses a hidden input and buttons to pop open the colorpicker
+ + + + +
+ +
+

Plugins

+ Demonstrates how to extend the set of parts with plugins.
+
    +
  1. RGB Slider - Individual RGB sliders
  2. +
  3. Memory - Store and retrieve colors with cookies
  4. +
  5. Swatches Switcher - Switch between different sets of swatches
  6. +
+ + + +
+ +
+

Only a button image

+ +
+ + + +
+ +
+

Revert color on non-button exit.

+

Reverts the color on escape, clickOnOutside or close window + using the [X] button.

+

Open the Colorpicker, change color and click outside window, + press ESC key or click the [X] button in the header. The dialog + should now close and the previous color restored in the + input.

+ + + +
+ +
+

Close OK on enter

+ Close the popup by pressing the enter key, keeping the selected color. + + + +
+ +
+

128-pixel map and bar

+ + + +
+ +
+

Custom color format

+ + + +
+ +
+

Centered using position option

+ + + +
+ +
+

Disable/enable

+ +
+ Disabled by default: + +
+ Disabled using option: + +
+ + + +
+ +
+

No show animation

+ + + +
+ +
+ + diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-de.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-de.js new file mode 100644 index 0000000..0382e7a --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-de.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['de'] = { + ok: 'OK', + cancel: 'Abbrechen', + none: 'Keine', + button: 'Farbe', + title: 'Wähle eine Farbe', + transparent: 'Transparent', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); \ No newline at end of file diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-el.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-el.js new file mode 100644 index 0000000..123db29 --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-el.js @@ -0,0 +1,28 @@ +; +jQuery(function ($) { + $.colorpicker.regional['el'] = { + "alphaA": "A", + "button": "Χρώμα", + "cancel": "Άκυρο", + "cmykC": "C", + "cmykK": "K", + "cmykM": "M", + "cmykY": "Y", + "hslH": "H", + "hslL": "L", + "hslS": "S", + "hsvH": "H", + "hsvS": "S", + "hsvV": "V", + "labA": "a", + "labB": "b", + "labL": "L", + "none": "Κανένα", + "ok": "Επιβεβαίωση", + "rgbB": "B", + "rgbG": "G", + "rgbR": "Κ", + "title": "Επιλέξτε χρώμα", + "transparent": "Διαφάνεια" + }; +}); \ No newline at end of file diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-GB.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-GB.js new file mode 100644 index 0000000..1487a0f --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-GB.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['en-GB'] = { + ok: 'OK', + cancel: 'Cancel', + none: 'None', + button: 'Colour', + title: 'Pick a colour', + transparent: 'Transparent', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); \ No newline at end of file diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-US.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-US.js new file mode 100644 index 0000000..13d371b --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en-US.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['en-US'] = { + ok: 'OK', + cancel: 'Cancel', + none: 'None', + button: 'Color', + title: 'Pick a color', + transparent: 'Transparent', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); \ No newline at end of file diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en.js index 82ff967..03eeea3 100644 --- a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en.js +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-en.js @@ -1,4 +1,4 @@ -jQuery(function($) { +;jQuery(function($) { $.colorpicker.regional['en'] = { ok: 'OK', cancel: 'Cancel', diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-es.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-es.js new file mode 100644 index 0000000..a3531ca --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-es.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['es'] = { + ok: 'OK', + cancel: 'Cancelar', + none: 'Ninguno', + button: 'Color', + title: 'Selecciona un color', + transparent: 'Transparente', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); \ No newline at end of file diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-fr.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-fr.js index e981edf..cd1b336 100644 --- a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-fr.js +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-fr.js @@ -1,4 +1,4 @@ -jQuery(function($) { +;jQuery(function($) { $.colorpicker.regional['fr'] = { ok: 'OK', cancel: 'Annuler', diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-nl.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-nl.js index 48fa7eb..9bab104 100644 --- a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-nl.js +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-nl.js @@ -1,4 +1,4 @@ -jQuery(function($) { +;jQuery(function($) { $.colorpicker.regional['nl'] = { ok: 'OK', cancel: 'Annuleren', diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pl.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pl.js new file mode 100644 index 0000000..a6f2f1e --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pl.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['pl'] = { + ok: 'OK', + cancel: 'Anuluj', + none: 'Wyczyść', + button: 'Kolor', + title: 'Wskaż kolor', + transparent: 'Przezroczysty', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pt-BR.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pt-BR.js new file mode 100644 index 0000000..fec1e97 --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-pt-BR.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['pt-br'] = { + ok: 'OK', + cancel: 'Cancelar', + none: 'Nenhum', + button: 'Cor', + title: 'Escolha uma cor', + transparent: 'Transparente', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-ru.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-ru.js new file mode 100644 index 0000000..04ff993 --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-ru.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['ru'] = { + ok: 'OK', + cancel: 'Отменить', + none: 'Никакой', + button: 'Цвет', + title: 'Выбрать цвет', + transparent: 'Прозрачный', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); \ No newline at end of file diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-sr.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-sr.js new file mode 100644 index 0000000..c6de9a6 --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-sr.js @@ -0,0 +1,27 @@ +;jQuery(function($) { + $.colorpicker.regional['sr'] = { + ok: 'OK', + cancel: 'Odustani', + none: 'Nijedno', + button: 'Boja', + title: 'Izaberi boju', + transparent: 'Providno', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); diff --git a/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-uk.js b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-uk.js new file mode 100644 index 0000000..1a3f4ce --- /dev/null +++ b/js/jquery-colorpicker/i18n/jquery.ui.colorpicker-uk.js @@ -0,0 +1,27 @@ +;jQuery(function ($) { + $.colorpicker.regional['uk'] = { + ok: 'ОК', + cancel: 'Скасувати', + none: 'Ніякий', + button: 'Колір', + title: 'Обрати колір', + transparent: 'Прозорий', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + }; +}); diff --git a/js/jquery-colorpicker/images/128/bar-alpha.png b/js/jquery-colorpicker/images/128/bar-alpha.png new file mode 100644 index 0000000000000000000000000000000000000000..454dc9ef9ce3cb9b4a2ebe65ba6bd5bad2237e16 GIT binary patch literal 1564 zcmV+%2IKjOP)3Hdh|^MjtPTYTAV!#fSk9h3%gM;dh>&Ih^1zx{fNBI_B7z_d zAQ54hViB+i%pq{+As9e~!Z2NeC~gB=0h0n-3J^dHXU?1faX`)i(;z-bJvRdy015Jf z7%(5e+#`Uj3g$KemJ^@4op>DWhI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!8G*}+Z=;6xZyCO zfWOP!+|zxM%!sHg&fVA{maX|oKyc0X*wxXBZ35ekrD3laxl@CaQRG_&tdz$K)|!Uv z?8(J4U4V9_3iS-_MMOl?{oE}v(zGitSBBdj(q~a2rfCjX{~Z)1LlQmj>}~GZz>wpQ z=v_@c19Y7E27Pw)hvU1|B;(i>%Q}wuW&BC`D7XWva(17$ZmI+;Am@5$EI)w_uMioP zG{qj@`}`F(p3d6Wp?a*iG2nE|FGSIh+zJ{-JX{+`j0ShNJX^oHPm&NmW}|IqA4Wac zty}c{oK*XFQ?ZZT;oT6{1J@F6R+NIK4(ZaFfIAYWC1Nsi>Ih$qPnFrh%;8KI+rfC^c|+Rp*waJWFOBP#|F z7ukF6r-1p8$QqWT!GNHh_@vAUWP}r(n1I1YI>kN-$QuNZq_+V6TYm2QbLs;bVKM^% z{#)|&)E}GyGD4Gm0sKEY|Lf`?sU!E>p2p>U40kJESl?}JpNq?|Zgs3=y#kcJSt$0) ze#Ux;I)4K{PtTn)bd{>V*>RxWH-AMG8gaxASxs>k^=b7eqI(f%;(^xKN%q)GL{2^f zea-$v%PJI-ae9?Uj|P`a0Hz@f&aFy8$@m_Wd)4hZ^L?>5PEhAXflbTRbZsPsGF9cuGMQMzAz$n;beEl zX5C67_97p^>74_ipH?S1sh~T#DD!OBJl|9&KP)us)of!OW^t(0+WBE{cK6nNAh zsw*$^;&oV_p4qYFoJIXo-A`b|JzQ@ua0lKx_umU*%I{s3;6E< OWOB*E;H}>Exc>n$oCcZz literal 0 HcmV?d00001 diff --git a/js/jquery-colorpicker/images/logotype-a.png b/js/jquery-colorpicker/images/logotype-a.png new file mode 100644 index 0000000000000000000000000000000000000000..a8eea61c291b12d207e8837c23f054890ff889c8 GIT binary patch literal 12310 zcmeHt`9GBH`}Z}-k`N`?mFz_JeJByx_jM4)I%I@wgH$RZ*|KY4vW{$H9ZK1^vKx%D z#bC<5&3HzA?)&?CUf)09d4Bl(FxPD7b)LuaKF{Mij^q8**ieVzG{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0I@<}yQ4_5box(3?m4{!Bzj@ZCKmmKo%iT1$wy0DR8i82Da{4(2g!w2NhiZhps z@zfbQK=?od=GGP_nky+MI5Ouz^LM3q&vR5=P11Luce5*en_pRC?toea1in9WdYZg=j3y~ zQpN;uKN`zcaAKmhmTa@~$=y^wVR!8fsAm>_D!hz&z^qRn)2WT*ZYX_P64$`nTlMPZ|;qZ)auov{wYo z5X&1rv8Z zS~8#unj`B!*BG;+Y?S%;(NBkf{GJ1AlUp@q$@?UBU|9U_w^baL(3`Kq;#}3EK2+r6 zd+;_-*o5|_9!VoK@-_lc29df#SeuNzg% z)J#C6d=7jAkZM+ygD_sX-9iry>CtYC6&B{cPi?mQG)rxm>31!DDhDa9zwLGA@HV;2 zLAP20`P3glh{u=c9(uWkl?FV*6=yhPmO@KN9cyccQa&$ccYK6(`z1x10YP5H`OnfZpwC#)jUxq4_m6 zv`EgR;#G&pzf+9C*ZzDgx@w2^@O)de!uWR@3pj58bg9S1(AE%_44zve4gU@jo_YTY zEb&kki}^QH;RK{kPOcw5{2e-EzXlwH>^vxBY+6kGAI*ofLA_uu&E3D} zco-_LgBhxtt*rlz`MjkAI&P2@%Im+hY}FM&_K_W(e}`MXfPsaAJtPSK`0GssCKg$f zKKz@+P(1(8#ZexZJ>vOc^v$6-$0{o;gAx&~2-)}_xje?39NY+a$Vcc8k7pGElQM@% zz}S{(>)*lFKch~6XVm_C^LIP`lg59V@c&p7PG4U;JeFBpfmHFT76Sfb1kEF5tp_Da H&x8IC1q3vP literal 0 HcmV?d00001 diff --git a/js/jquery-colorpicker/index.html b/js/jquery-colorpicker/index.html index db9fae7..46f8692 100644 --- a/js/jquery-colorpicker/index.html +++ b/js/jquery-colorpicker/index.html @@ -1,210 +1,332 @@ - - - - jQuery Colorpicker - - - - - - - - - - -

jQuery ColorPicker

- -
- - Basic <input> example, without any options: - -
- - Basic <div> example, without any options: - - -
- - Fully-featured example: - - -
- - Localized to Dutch (nl): - - -
- - Limit to websafe colors: - - -
- - Alternative field class: - -
Background-color on outside, text color here
-
- - -
- - Events: -
- - -
- - Output formatting HSLA: - - - -
- - Output format list: - - - -
- - Dialog with Colorpicker popup (demonstrates z-index): - -
- Basic <input> example, without any options: -
- Basic <div> example, without any options: -
- - -
- - Modal (and showCancelButton, closeOnEscape, showCloseButton): - - -
- - Input formatting: - - - + + + + + jQuery.Colorpicker + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Fork me on GitHub + + + + + +
+ + +
+ +
+
+ +

Examples

+
+ Try it yourself… + +

Simple popup

+
+ +
+ + +

Fully featured popup

+
+ +
+ + +

Custom layout

+
+ +
+ + +

Plugins

+
+ +
+ + +

Localization

+
+ +
+ + +

More examples…

+ Click here view a lot more demo's Demos +
+ +

Unittest

+
+ jQuery.colorpicker comes with a small set of QUnit-based unittests.
+ Click here to run the tests in a new window: Unittests +
+
+ + + + diff --git a/js/jquery-colorpicker/jquery.colorpicker.css b/js/jquery-colorpicker/jquery.colorpicker.css index 8487cdc..995d3eb 100644 --- a/js/jquery-colorpicker/jquery.colorpicker.css +++ b/js/jquery-colorpicker/jquery.colorpicker.css @@ -1,199 +1,238 @@ -.ui-colorpicker, -.ui-dialog.ui-colorpicker { - width: auto; - white-space: nowrap; - - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.ui-colorpicker-inline { - position: static; -} - -.ui-colorpicker-buttonset { - float: left; - margin-left: .4em; -} - -.ui-colorpicker-buttonset .ui-button { - margin: .5em 0 .5em 0; - cursor: pointer; -} - -.ui-colorpicker-buttonpane { - background-image: none; - margin: .7em 0 0 0; - padding: 0 .2em; - border-left: 0; - border-right: 0; - border-bottom: 0; -} - -.ui-colorpicker-buttonpane button { - float: right; - margin: .5em .2em .4em; - cursor: pointer; - padding: .2em .6em .3em .6em; - width: auto; - overflow: visible; -} - -.ui-colorpicker-buttonpane button.ui-colorpicker-current { - float: left; -} - -.ui-colorpicker table { - font-size: 100%; /* Reset browser table font-size */ - margin: 0; -} - -.ui-colorpicker table td { - vertical-align: top; -} - -.ui-colorpicker-padding-left { - padding-left: 10px; -} -.ui-colorpicker-padding-top { - padding-top: 10px; -} - -.ui-colorpicker-border { - border: 1px inset; - display: inline-block; -} - -/* Bar & map */ -.ui-colorpicker-map > *, -.ui-colorpicker-bar > * { - position: absolute; - cursor: crosshair; -} - -.ui-colorpicker-map-pointer, -.ui-colorpicker-bar-pointer { - position: absolute; -} -/* Map */ -.ui-colorpicker-map, -.ui-colorpicker-map > * { - display: block; - width: 256px; - height: 256px; - overflow: hidden; -} - -.ui-colorpicker-map-layer-1, -.ui-colorpicker-map-layer-2 { - background: url(images/map.png) no-repeat; -} - -.ui-colorpicker-map-layer-alpha { - background: url(images/map-opacity.png); -} - -.ui-colorpicker-map-pointer { - display: inline-block; - width: 15px; - height: 15px; - background: url(images/map-pointer.png) no-repeat; -} - -/* Bar */ -.ui-colorpicker-bar, -.ui-colorpicker-bar > * { - display: block; - width: 20px; - height: 256px; - overflow: hidden; - background-repeat: repeat-x; -} - -.ui-colorpicker-bar-layer-1, -.ui-colorpicker-bar-layer-2, -.ui-colorpicker-bar-layer-3, -.ui-colorpicker-bar-layer-4 { - background: url(images/bar.png) repeat-x; -} - -.ui-colorpicker-bar-layer-alpha { - background: url(images/bar-opacity.png); -} - -.ui-colorpicker-bar-layer-alphabar { - background: url(images/bar-alpha.png); -} - -.ui-colorpicker-bar-pointer { - display: inline-block; - width: 20px; - height: 7px; - background: url(images/bar-pointer.png) no-repeat; -} - -/* Preview */ -.ui-colorpicker-preview { - text-align: center; -} - -.ui-colorpicker-preview-initial { - cursor: pointer; -} - -.ui-colorpicker-preview-initial, -.ui-colorpicker-preview-current { - width: 50px; - height: 20px; - display: inline-block; -} - -.ui-colorpicker-preview-initial-alpha, -.ui-colorpicker-preview-current-alpha { - width: 50px; - height: 20px; - display: inline-block; - background: url(images/preview-opacity.png) repeat; -} - -/* Inputs */ -.ui-colorpicker-rgb label, -.ui-colorpicker-hsv label, -.ui-colorpicker-hsl label, -.ui-colorpicker-lab label, -.ui-colorpicker-cmyk label, -.ui-colorpicker-alpha label { - width: 1.5em; - display: inline-block; -} - -.ui-colorpicker-number { - margin: .1em; - width: 4em; -} - -/* Hex */ -.ui-colorpicker-hex { - text-align: center; -} - -/* Swatches */ -.ui-colorpicker-swatches { - width: 84px; - height: 256px; - overflow: auto; - background-color: #f8f8f8; -} - -.ui-colorpicker-swatch { - cursor: pointer; - float: left; - width: 11px; - height: 11px; - border-right: 1px solid black; - border-bottom: 1px solid black; -} \ No newline at end of file +.ui-colorpicker, +.ui-dialog.ui-colorpicker { + width: auto; + white-space: nowrap; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.ui-colorpicker-inline { + position: static; +} + +.ui-colorpicker-buttonset { + float: left; + margin-left: .4em; +} + +.ui-colorpicker-buttonset .ui-button { + margin: .5em 0 .5em 0; + cursor: pointer; +} + +.ui-colorpicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} + +.ui-colorpicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} + +.ui-colorpicker-buttonpane button.ui-colorpicker-current { + float: left; +} + +.ui-colorpicker table { + width: 100%; + font-size: 100%; /* Reset browser table font-size */ + margin: 0; +} + +.ui-colorpicker table td { + vertical-align: top; +} + +.ui-colorpicker-padding-left { + padding-left: 10px; +} +.ui-colorpicker-padding-top { + padding-top: 10px; +} + +.ui-colorpicker-border { + border: 1px inset; + display: inline-block; +} + +/* Bar & map */ +.ui-colorpicker-map > *, +.ui-colorpicker-bar > * { + position: absolute; + cursor: crosshair; +} + +.ui-colorpicker-map-pointer, +.ui-colorpicker-bar-pointer { + position: absolute; + left: 0; +} + +/* Map */ +.ui-colorpicker-map, +.ui-colorpicker-map > * { + display: block; + width: 256px; + height: 256px; + overflow: hidden; +} + +.ui-colorpicker-map-layer-1, +.ui-colorpicker-map-layer-2 { + background: url(images/map.png) no-repeat; +} + +.ui-colorpicker-map-128, +.ui-colorpicker-map-128 > * { + width: 128px; + height: 128px; +} + +.ui-colorpicker-map-128 .ui-colorpicker-map-layer-1, +.ui-colorpicker-map-128 .ui-colorpicker-map-layer-2 { + background: url(images/128/map.png) no-repeat; +} + +.ui-colorpicker-map-layer-alpha { + background: url(images/map-opacity.png); +} + +.ui-colorpicker-map-pointer { + display: inline-block; + width: 15px; + height: 15px; + background: url(images/map-pointer.png) no-repeat; +} + +/* Bar */ +.ui-colorpicker-bar, +.ui-colorpicker-bar > * { + display: block; + width: 20px; + height: 256px; + overflow: hidden; + background-repeat: repeat-x; +} + +.ui-colorpicker-bar-128, +.ui-colorpicker-bar-128 > * { + height: 128px; +} + +.ui-colorpicker-bar-layer-1, +.ui-colorpicker-bar-layer-2, +.ui-colorpicker-bar-layer-3, +.ui-colorpicker-bar-layer-4 { + background: url(images/bar.png) repeat-x; +} + +.ui-colorpicker-bar-128 .ui-colorpicker-bar-layer-1, +.ui-colorpicker-bar-128 .ui-colorpicker-bar-layer-2, +.ui-colorpicker-bar-128 .ui-colorpicker-bar-layer-3, +.ui-colorpicker-bar-128 .ui-colorpicker-bar-layer-4 { + background: url(images/128/bar.png) repeat-x; +} + +.ui-colorpicker-bar-layer-alpha { + background: url(images/bar-opacity.png); +} + +.ui-colorpicker-bar-layer-alphabar { + background: url(images/bar-alpha.png); +} + +.ui-colorpicker-bar-128 .ui-colorpicker-bar-layer-alphabar { + background: url(images/128/bar-alpha.png); +} + +.ui-colorpicker-bar-pointer { + display: inline-block; + width: 20px; + height: 7px; + background: url(images/bar-pointer.png) no-repeat; +} + +/* Preview */ +.ui-colorpicker-preview { + text-align: center; + height: 20px; +} + +.ui-colorpicker-preview-initial { + cursor: pointer; +} + +.ui-colorpicker-preview-initial, +.ui-colorpicker-preview-current { + width: 50px; + height: 20px; + display: inline-block; +} + +.ui-colorpicker-preview-initial-alpha, +.ui-colorpicker-preview-current-alpha { + width: 50px; + height: 20px; + display: inline-block; + background: url(images/preview-opacity.png) repeat; +} + +/* Inputs */ +.ui-colorpicker-rgb label, +.ui-colorpicker-hsv label, +.ui-colorpicker-hsl label, +.ui-colorpicker-lab label, +.ui-colorpicker-cmyk label, +.ui-colorpicker-alpha label { + width: 1.5em; + display: inline-block; +} + +.ui-colorpicker-number { + margin: .1em; + width: 4em; +} + +/* Hex */ +.ui-colorpicker-hex { + text-align: center; +} + +/* Swatches */ +.ui-colorpicker-swatches { + height: 256px; + overflow: auto; + background-color: #f8f8f8; +} + +.ui-colorpicker-swatch { + cursor: pointer; + float: left; + width: 11px; + height: 11px; + border-right: 1px solid black; + border-bottom: 1px solid black; +} + +.ui-colorpicker-disabled { + opacity: .5; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); + pointer-events: none; +} + +.ui-colorpicker-disabled * { + cursor: default !important; +} diff --git a/js/jquery-colorpicker/jquery.colorpicker.js b/js/jquery-colorpicker/jquery.colorpicker.js index e19db7b..4e09943 100644 --- a/js/jquery-colorpicker/jquery.colorpicker.js +++ b/js/jquery-colorpicker/jquery.colorpicker.js @@ -1,2552 +1,3284 @@ -/*jslint devel: true, bitwise: true, regexp: true, browser: true, confusion: true, unparam: true, eqeq: true, white: true, nomen: true, plusplus: true, maxerr: 50, indent: 4 */ -/*globals jQuery,Color */ - -/* - * ColorPicker - * - * Copyright (c) 2011-2012 Martijn W. van der Lee - * Licensed under the MIT. - * - * Full-featured colorpicker for jQueryUI with full theming support. - * Most images from jPicker by Christopher T. Tillman. - * Sourcecode created from scratch by Martijn W. van der Lee. - */ - -(function ($) { - "use strict"; - - $.colorpicker = new function() { - this.regional = []; - this.regional[''] = { - ok: 'OK', - cancel: 'Cancel', - none: 'None', - button: 'Color', - title: 'Pick a color', - transparent: 'Transparent', - hsvH: 'H', - hsvS: 'S', - hsvV: 'V', - rgbR: 'R', - rgbG: 'G', - rgbB: 'B', - labL: 'L', - labA: 'a', - labB: 'b', - hslH: 'H', - hslS: 'S', - hslL: 'L', - cmykC: 'C', - cmykM: 'M', - cmykY: 'Y', - cmykK: 'K', - alphaA: 'A' - }; - }; - - var _colorpicker_index = 0, - - _container_popup = '', - - _container_inline = '
', - - _parts_lists = { - 'full': ['header', 'map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'lab', 'cmyk', 'preview', 'swatches', 'footer'], - 'popup': ['map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'preview', 'footer'], - 'draggable': ['header', 'map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'preview', 'footer'], - 'inline': ['map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'preview'] - }, - - _intToHex = function (dec) { - var result = Math.round(dec).toString(16); - if (result.length === 1) { - result = ('0' + result); - } - return result.toLowerCase(); - }, - - _formats = { - '#HEX': function(color) { - return _formatColor('#rxgxbx', color); - } - , '#HEX3': function(color) { - var hex3 = _formats.HEX3(color); - return hex3 === false? false : '#'+hex3; - } - , 'HEX': function(color) { - return _formatColor('rxgxbx', color); - } - , 'HEX3': function(color) { - var rgb = color.getRGB(), - r = Math.round(rgb.r * 255), - g = Math.round(rgb.g * 255), - b = Math.round(rgb.b * 255); - - if (((r >>> 4) == (r &= 0xf)) - && ((g >>> 4) == (g &= 0xf)) - && ((b >>> 4) == (b &= 0xf))) { - return r.toString(16)+g.toString(16)+b.toString(16); - } - return false; - } - , 'RGB': function(color) { - return color.getAlpha() >= 1 - ? _formatColor('rgb(rd,gd,bd)', color) - : false; - } - , 'RGBA': function(color) { - return _formatColor('rgba(rd,gd,bd,af)', color); - } - , 'RGB%': function(color) { - return color.getAlpha() >= 1 - ? _formatColor('rgb(rp%,gp%,bp%)', color) - : false; - } - , 'RGBA%': function(color) { - return _formatColor('rgba(rp%,gp%,bp%,af)', color); - } - , 'HSL': function(color) { - return color.getAlpha() >= 1 - ? _formatColor('hsl(hd,sd,vd)', color) - : false; - } - , 'HSLA': function(color) { - return _formatColor('hsla(hd,sd,vd,af)', color); - } - , 'HSL%': function(color) { - return color.getAlpha() >= 1 - ? _formatColor('hsl(hp%,sp%,vp%)', color) - : false; - } - , 'HSLA%': function(color) { - return _formatColor('hsla(hp%,sp%,vp%,af)', color); - } - , 'NAME': function(color) { - return _closestName(color); - } - , 'EXACT': function(color) { //@todo experimental. Implement a good fallback list - return _exactName(color); - } - }, - - _formatColor = function (formats, color) { - var that = this, - text = null, - types = { 'x': function(v) {return _intToHex(v * 255);} - , 'd': function(v) {return Math.round(v * 255);} - , 'f': function(v) {return v;} - , 'p': function(v) {return v * 100;} - }, - channels = color.getChannels(); - - if (!$.isArray(formats)) { - formats = [formats]; - } - - $.each(formats, function(index, format) { - if (_formats[format]) { - text = _formats[format](color); - return (text === false); - } else { - text = format.replace(/\\?[argbhsvcmykLAB][xdfp]/g, function(m) { - if (m.match(/^\\/)) { - return m.slice(1); - } - return types[m.charAt(1)](channels[m.charAt(0)]); - }); - return false; - } - }); - - return text; - }, - - _colors = { - 'black': {r: 0, g: 0, b: 0}, - 'dimgray': {r: 0.4117647058823529, g: 0.4117647058823529, b: 0.4117647058823529}, - 'gray': {r: 0.5019607843137255, g: 0.5019607843137255, b: 0.5019607843137255}, - 'darkgray': {r: 0.6627450980392157, g: 0.6627450980392157, b: 0.6627450980392157}, - 'silver': {r: 0.7529411764705882, g: 0.7529411764705882, b: 0.7529411764705882}, - 'lightgrey': {r: 0.8274509803921568, g: 0.8274509803921568, b: 0.8274509803921568}, - 'gainsboro': {r: 0.8627450980392157, g: 0.8627450980392157, b: 0.8627450980392157}, - 'whitesmoke': {r: 0.9607843137254902, g: 0.9607843137254902, b: 0.9607843137254902}, - 'white': {r: 1, g: 1, b: 1}, - 'rosybrown': {r: 0.7372549019607844, g: 0.5607843137254902, b: 0.5607843137254902}, - 'indianred': {r: 0.803921568627451, g: 0.3607843137254902, b: 0.3607843137254902}, - 'brown': {r: 0.6470588235294118, g: 0.16470588235294117, b: 0.16470588235294117}, - 'firebrick': {r: 0.6980392156862745, g: 0.13333333333333333, b: 0.13333333333333333}, - 'lightcoral': {r: 0.9411764705882353, g: 0.5019607843137255, b: 0.5019607843137255}, - 'maroon': {r: 0.5019607843137255, g: 0, b: 0}, - 'darkred': {r: 0.5450980392156862, g: 0, b: 0}, - 'red': {r: 1, g: 0, b: 0}, - 'snow': {r: 1, g: 0.9803921568627451, b: 0.9803921568627451}, - 'salmon': {r: 0.9803921568627451, g: 0.5019607843137255, b: 0.4470588235294118}, - 'mistyrose': {r: 1, g: 0.8941176470588236, b: 0.8823529411764706}, - 'tomato': {r: 1, g: 0.38823529411764707, b: 0.2784313725490196}, - 'darksalmon': {r: 0.9137254901960784, g: 0.5882352941176471, b: 0.47843137254901963}, - 'orangered': {r: 1, g: 0.27058823529411763, b: 0}, - 'coral': {r: 1, g: 0.4980392156862745, b: 0.3137254901960784}, - 'lightsalmon': {r: 1, g: 0.6274509803921569, b: 0.47843137254901963}, - 'sienna': {r: 0.6274509803921569, g: 0.3215686274509804, b: 0.17647058823529413}, - 'seashell': {r: 1, g: 0.9607843137254902, b: 0.9333333333333333}, - 'chocolate': {r: 0.8235294117647058, g: 0.4117647058823529, b: 0.11764705882352941}, - 'saddlebrown': {r: 0.5450980392156862, g: 0.27058823529411763, b: 0.07450980392156863}, - 'sandybrown': {r: 0.9568627450980393, g: 0.6431372549019608, b: 0.3764705882352941}, - 'peachpuff': {r: 1, g: 0.8549019607843137, b: 0.7254901960784313}, - 'peru': {r: 0.803921568627451, g: 0.5215686274509804, b: 0.24705882352941178}, - 'linen': {r: 0.9803921568627451, g: 0.9411764705882353, b: 0.9019607843137255}, - 'darkorange': {r: 1, g: 0.5490196078431373, b: 0}, - 'bisque': {r: 1, g: 0.8941176470588236, b: 0.7686274509803922}, - 'burlywood': {r: 0.8705882352941177, g: 0.7215686274509804, b: 0.5294117647058824}, - 'tan': {r: 0.8235294117647058, g: 0.7058823529411765, b: 0.5490196078431373}, - 'antiquewhite': {r: 0.9803921568627451, g: 0.9215686274509803, b: 0.8431372549019608}, - 'navajowhite': {r: 1, g: 0.8705882352941177, b: 0.6784313725490196}, - 'blanchedalmond': {r: 1, g: 0.9215686274509803, b: 0.803921568627451}, - 'papayawhip': {r: 1, g: 0.9372549019607843, b: 0.8352941176470589}, - 'orange': {r: 1, g: 0.6470588235294118, b: 0}, - 'moccasin': {r: 1, g: 0.8941176470588236, b: 0.7098039215686275}, - 'wheat': {r: 0.9607843137254902, g: 0.8705882352941177, b: 0.7019607843137254}, - 'oldlace': {r: 0.9921568627450981, g: 0.9607843137254902, b: 0.9019607843137255}, - 'floralwhite': {r: 1, g: 0.9803921568627451, b: 0.9411764705882353}, - 'goldenrod': {r: 0.8549019607843137, g: 0.6470588235294118, b: 0.12549019607843137}, - 'darkgoldenrod': {r: 0.7215686274509804, g: 0.5254901960784314, b: 0.043137254901960784}, - 'cornsilk': {r: 1, g: 0.9725490196078431, b: 0.8627450980392157}, - 'gold': {r: 1, g: 0.8431372549019608, b: 0}, - 'palegoldenrod': {r: 0.9333333333333333, g: 0.9098039215686274, b: 0.6666666666666666}, - 'khaki': {r: 0.9411764705882353, g: 0.9019607843137255, b: 0.5490196078431373}, - 'lemonchiffon': {r: 1, g: 0.9803921568627451, b: 0.803921568627451}, - 'darkkhaki': {r: 0.7411764705882353, g: 0.7176470588235294, b: 0.4196078431372549}, - 'beige': {r: 0.9607843137254902, g: 0.9607843137254902, b: 0.8627450980392157}, - 'lightgoldenrodyellow': {r: 0.9803921568627451, g: 0.9803921568627451, b: 0.8235294117647058}, - 'olive': {r: 0.5019607843137255, g: 0.5019607843137255, b: 0}, - 'yellow': {r: 1, g: 1, b: 0}, - 'lightyellow': {r: 1, g: 1, b: 0.8784313725490196}, - 'ivory': {r: 1, g: 1, b: 0.9411764705882353}, - 'olivedrab': {r: 0.4196078431372549, g: 0.5568627450980392, b: 0.13725490196078433}, - 'yellowgreen': {r: 0.6039215686274509, g: 0.803921568627451, b: 0.19607843137254902}, - 'darkolivegreen': {r: 0.3333333333333333, g: 0.4196078431372549, b: 0.1843137254901961}, - 'greenyellow': {r: 0.6784313725490196, g: 1, b: 0.1843137254901961}, - 'lawngreen': {r: 0.48627450980392156, g: 0.9882352941176471, b: 0}, - 'chartreuse': {r: 0.4980392156862745, g: 1, b: 0}, - 'darkseagreen': {r: 0.5607843137254902, g: 0.7372549019607844, b: 0.5607843137254902}, - 'forestgreen': {r: 0.13333333333333333, g: 0.5450980392156862, b: 0.13333333333333333}, - 'limegreen': {r: 0.19607843137254902, g: 0.803921568627451, b: 0.19607843137254902}, - 'lightgreen': {r: 0.5647058823529412, g: 0.9333333333333333, b: 0.5647058823529412}, - 'palegreen': {r: 0.596078431372549, g: 0.984313725490196, b: 0.596078431372549}, - 'darkgreen': {r: 0, g: 0.39215686274509803, b: 0}, - 'green': {r: 0, g: 0.5019607843137255, b: 0}, - 'lime': {r: 0, g: 1, b: 0}, - 'honeydew': {r: 0.9411764705882353, g: 1, b: 0.9411764705882353}, - 'mediumseagreen': {r: 0.23529411764705882, g: 0.7019607843137254, b: 0.44313725490196076}, - 'seagreen': {r: 0.1803921568627451, g: 0.5450980392156862, b: 0.3411764705882353}, - 'springgreen': {r: 0, g: 1, b: 0.4980392156862745}, - 'mintcream': {r: 0.9607843137254902, g: 1, b: 0.9803921568627451}, - 'mediumspringgreen': {r: 0, g: 0.9803921568627451, b: 0.6039215686274509}, - 'mediumaquamarine': {r: 0.4, g: 0.803921568627451, b: 0.6666666666666666}, - 'aquamarine': {r: 0.4980392156862745, g: 1, b: 0.8313725490196079}, - 'turquoise': {r: 0.25098039215686274, g: 0.8784313725490196, b: 0.8156862745098039}, - 'lightseagreen': {r: 0.12549019607843137, g: 0.6980392156862745, b: 0.6666666666666666}, - 'mediumturquoise': {r: 0.2823529411764706, g: 0.8196078431372549, b: 0.8}, - 'darkslategray': {r: 0.1843137254901961, g: 0.30980392156862746, b: 0.30980392156862746}, - 'paleturquoise': {r: 0.6862745098039216, g: 0.9333333333333333, b: 0.9333333333333333}, - 'teal': {r: 0, g: 0.5019607843137255, b: 0.5019607843137255}, - 'darkcyan': {r: 0, g: 0.5450980392156862, b: 0.5450980392156862}, - 'darkturquoise': {r: 0, g: 0.807843137254902, b: 0.8196078431372549}, - 'aqua': {r: 0, g: 1, b: 1}, - 'cyan': {r: 0, g: 1, b: 1}, - 'lightcyan': {r: 0.8784313725490196, g: 1, b: 1}, - 'azure': {r: 0.9411764705882353, g: 1, b: 1}, - 'cadetblue': {r: 0.37254901960784315, g: 0.6196078431372549, b: 0.6274509803921569}, - 'powderblue': {r: 0.6901960784313725, g: 0.8784313725490196, b: 0.9019607843137255}, - 'lightblue': {r: 0.6784313725490196, g: 0.8470588235294118, b: 0.9019607843137255}, - 'deepskyblue': {r: 0, g: 0.7490196078431373, b: 1}, - 'skyblue': {r: 0.5294117647058824, g: 0.807843137254902, b: 0.9215686274509803}, - 'lightskyblue': {r: 0.5294117647058824, g: 0.807843137254902, b: 0.9803921568627451}, - 'steelblue': {r: 0.27450980392156865, g: 0.5098039215686274, b: 0.7058823529411765}, - 'aliceblue': {r: 0.9411764705882353, g: 0.9725490196078431, b: 1}, - 'dodgerblue': {r: 0.11764705882352941, g: 0.5647058823529412, b: 1}, - 'slategray': {r: 0.4392156862745098, g: 0.5019607843137255, b: 0.5647058823529412}, - 'lightslategray': {r: 0.4666666666666667, g: 0.5333333333333333, b: 0.6}, - 'lightsteelblue': {r: 0.6901960784313725, g: 0.7686274509803922, b: 0.8705882352941177}, - 'cornflowerblue': {r: 0.39215686274509803, g: 0.5843137254901961, b: 0.9294117647058824}, - 'royalblue': {r: 0.2549019607843137, g: 0.4117647058823529, b: 0.8823529411764706}, - 'midnightblue': {r: 0.09803921568627451, g: 0.09803921568627451, b: 0.4392156862745098}, - 'lavender': {r: 0.9019607843137255, g: 0.9019607843137255, b: 0.9803921568627451}, - 'navy': {r: 0, g: 0, b: 0.5019607843137255}, - 'darkblue': {r: 0, g: 0, b: 0.5450980392156862}, - 'mediumblue': {r: 0, g: 0, b: 0.803921568627451}, - 'blue': {r: 0, g: 0, b: 1}, - 'ghostwhite': {r: 0.9725490196078431, g: 0.9725490196078431, b: 1}, - 'darkslateblue': {r: 0.2823529411764706, g: 0.23921568627450981, b: 0.5450980392156862}, - 'slateblue': {r: 0.41568627450980394, g: 0.35294117647058826, b: 0.803921568627451}, - 'mediumslateblue': {r: 0.4823529411764706, g: 0.40784313725490196, b: 0.9333333333333333}, - 'mediumpurple': {r: 0.5764705882352941, g: 0.4392156862745098, b: 0.8588235294117647}, - 'blueviolet': {r: 0.5411764705882353, g: 0.16862745098039217, b: 0.8862745098039215}, - 'indigo': {r: 0.29411764705882354, g: 0, b: 0.5098039215686274}, - 'darkorchid': {r: 0.6, g: 0.19607843137254902, b: 0.8}, - 'darkviolet': {r: 0.5803921568627451, g: 0, b: 0.8274509803921568}, - 'mediumorchid': {r: 0.7294117647058823, g: 0.3333333333333333, b: 0.8274509803921568}, - 'thistle': {r: 0.8470588235294118, g: 0.7490196078431373, b: 0.8470588235294118}, - 'plum': {r: 0.8666666666666667, g: 0.6274509803921569, b: 0.8666666666666667}, - 'violet': {r: 0.9333333333333333, g: 0.5098039215686274, b: 0.9333333333333333}, - 'purple': {r: 0.5019607843137255, g: 0, b: 0.5019607843137255}, - 'darkmagenta': {r: 0.5450980392156862, g: 0, b: 0.5450980392156862}, - 'magenta': {r: 1, g: 0, b: 1}, - 'fuchsia': {r: 1, g: 0, b: 1}, - 'orchid': {r: 0.8549019607843137, g: 0.4392156862745098, b: 0.8392156862745098}, - 'mediumvioletred': {r: 0.7803921568627451, g: 0.08235294117647059, b: 0.5215686274509804}, - 'deeppink': {r: 1, g: 0.0784313725490196, b: 0.5764705882352941}, - 'hotpink': {r: 1, g: 0.4117647058823529, b: 0.7058823529411765}, - 'palevioletred': {r: 0.8588235294117647, g: 0.4392156862745098, b: 0.5764705882352941}, - 'lavenderblush': {r: 1, g: 0.9411764705882353, b: 0.9607843137254902}, - 'crimson': {r: 0.8627450980392157, g: 0.0784313725490196, b: 0.23529411764705882}, - 'pink': {r: 1, g: 0.7529411764705882, b: 0.796078431372549}, - 'lightpink': {r: 1, g: 0.7137254901960784, b: 0.7568627450980392} - }, - - _exactName = function(color) { - var name = false; - - $.each(_colors, function(n, color_b) { - if (color.equals(new Color(color_b.r, color_b.g, color_b.b))) { - name = n; - return false; - } - }); - - return name; - }, - - _closestName = function(color) { - var rgb = color.getRGB(), - distance = null, - name = false, - d; - - $.each(_colors, function(n, color_b) { - d = color.distance(new Color(color_b.r, color_b.g, color_b.b)); - if (d < distance || distance === null) { - name = n; - if (d == 0) { - return false; // can't get much closer than 0 - } - distance = d; - } - }); - - return name; - }, - - _parseHex = function(color) { - var c, - m; - - // {#}rrggbb - m = /^#?([a-fA-F0-9]{1,6})$/.exec(color); - if (m) { - c = parseInt(m[1], 16); - return new Color( - ((c >> 16) & 0xFF) / 255, - ((c >> 8) & 0xFF) / 255, - (c & 0xFF) / 255 - ); - } - - return false; - }, - - _parseColor = function(color) { - var name = $.trim(color).toLowerCase(), - m; - - if (color == '') { - return new Color(); - } - - if (_colors[name]) { - return new Color(_colors[name].r, _colors[name].g, _colors[name].b); - } - - // rgba(r,g,b,a) - m = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); - if (m) { - return new Color( - m[1] / 255, - m[2] / 255, - m[3] / 255, - parseFloat(m[4]) - ); - } - - // hsla(r,g,b,a) - m = /^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); - if (m) { - return (new Color()).setHSL( - m[1] / 255, - m[2] / 255, - m[3] / 255).setAlpha(parseFloat(m[4])); - } - - // rgba(r%,g%,b%,a%) - m = /^rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); - if (m) { - return new Color( - m[1] / 100, - m[2] / 100, - m[3] / 100, - m[4] / 100 - ); - } - - // hsla(r%,g%,b%,a%) - m = /^hsla?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); - if (m) { - return (new Color()).setHSL( - m[1] / 100, - m[2] / 100, - m[3] / 100).setAlpha(m[4] / 100); - } - - // #rrggbb - m = /^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(color); - if (m) { - return new Color( - parseInt(m[1], 16) / 255, - parseInt(m[2], 16) / 255, - parseInt(m[3], 16) / 255 - ); - } - - // #rgb - m = /^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(color); - if (m) { - return new Color( - parseInt(m[1] + m[1], 16) / 255, - parseInt(m[2] + m[2], 16) / 255, - parseInt(m[3] + m[3], 16) / 255 - ); - } - - return _parseHex(color); - }, - - _layoutTable = function(layout, callback) { - var bitmap, - x, - y, - width, height, - columns, rows, - index, - cell, - html, - w, - h, - colspan, - walked; - - layout.sort(function(a, b) { - if (a.pos[1] == b.pos[1]) { - return a.pos[0] - b.pos[0]; - } - return a.pos[1] - b.pos[1]; - }); - - // Determine dimensions of the table - width = 0; - height = 0; - $.each (layout, function(index, part) { - width = Math.max(width, part.pos[0] + part.pos[2]); - height = Math.max(height, part.pos[1] + part.pos[3]); - }); - - // Initialize bitmap - bitmap = []; - for (x = 0; x < width; ++x) { - bitmap.push([]); - } - - // Mark rows and columns which have layout assigned - rows = []; - columns = []; - $.each(layout, function(index, part) { - // mark columns - for (x = 0; x < part.pos[2]; x += 1) { - columns[part.pos[0] + x] = true; - } - for (y = 0; y < part.pos[3]; y += 1) { - rows[part.pos[1] + y] = true; - } - }); - - // Generate the table - html = ''; - cell = layout[index = 0]; - for (y = 0; y < height; ++y) { - html += ''; - for (x = 0; x < width; x) { - if (typeof cell !== 'undefined' && x == cell.pos[0] && y == cell.pos[1]) { - // Create a "real" cell - html += callback(cell, x, y); - - for (h = 0; h < cell.pos[3]; h +=1) { - for (w = 0; w < cell.pos[2]; w +=1) { - bitmap[x + w][y + h] = true; - } - } - - x += cell.pos[2]; - cell = layout[++index]; - } else { - // Fill in the gaps - colspan = 0; - walked = false; - - while (x < width && bitmap[x][y] === undefined && (cell === undefined || y < cell.pos[1] || (y == cell.pos[1] && x < cell.pos[0]))) { - if (columns[x] === true) { - colspan += 1; - } - walked = true; - x += 1; - } - - if (colspan > 0) { - html += ''; - } else if (!walked) { - x += 1; - } - } - } - html += ''; - } - - return '' + html + '
'; - }, - - _parts = { - header: function (inst) { - var that = this, - e = null, - _html =function() { - var title = inst.options.title || inst._getRegional('title'), - html = '' + title + ''; - - if (!inst.inline && inst.options.showCloseButton) { - html += '' - + 'close'; - } - - return '
' + html + '
'; - }; - - this.init = function() { - e = $(_html()).prependTo(inst.dialog); - - var close = $('.ui-dialog-titlebar-close', e); - inst._hoverable(close); - inst._focusable(close); - close.click(function(event) { - event.preventDefault(); - inst.close(); - }); - - if (!inst.inline && inst.options.draggable) { - inst.dialog.draggable({ - handle: e - }); - } - }; - }, - - map: function (inst) { - var that = this, - e = null, - mousemove_timeout = null, - _mousedown, _mouseup, _mousemove, _html; - - _mousedown = function (event) { - if (!inst.opened) { - return; - } - - var div = $('.ui-colorpicker-map-layer-pointer', e), - offset = div.offset(), - width = div.width(), - height = div.height(), - x = event.pageX - offset.left, - y = event.pageY - offset.top; - - if (x >= 0 && x < width && y >= 0 && y < height) { - event.stopImmediatePropagation(); - event.preventDefault(); - e.unbind('mousedown', _mousedown); - $(document).bind('mouseup', _mouseup); - $(document).bind('mousemove', _mousemove); - _mousemove(event); - } - }; - - _mouseup = function (event) { - event.stopImmediatePropagation(); - event.preventDefault(); - $(document).unbind('mouseup', _mouseup); - $(document).unbind('mousemove', _mousemove); - e.bind('mousedown', _mousedown); - }; - - _mousemove = function (event) { - event.stopImmediatePropagation(); - event.preventDefault(); - - if (event.pageX === that.x && event.pageY === that.y) { - return; - } - that.x = event.pageX; - that.y = event.pageY; - - var div = $('.ui-colorpicker-map-layer-pointer', e), - offset = div.offset(), - width = div.width(), - height = div.height(), - x = event.pageX - offset.left, - y = event.pageY - offset.top; - - x = Math.max(0, Math.min(x / width, 1)); - y = Math.max(0, Math.min(y / height, 1)); - - // interpret values - switch (inst.mode) { - case 'h': - inst.color.setHSV(null, x, 1 - y); - break; - - case 's': - case 'a': - inst.color.setHSV(x, null, 1 - y); - break; - - case 'v': - inst.color.setHSV(x, 1 - y, null); - break; - - case 'r': - inst.color.setRGB(null, 1 - y, x); - break; - - case 'g': - inst.color.setRGB(1 - y, null, x); - break; - - case 'b': - inst.color.setRGB(x, 1 - y, null); - break; - } - - inst._change(); - }; - - _html = function () { - var html = '
' - + ' ' - + ' ' - + (inst.options.alpha ? ' ' : '') - + '
'; - return html; - }; - - this.update = function () { - switch (inst.mode) { - case 'h': - $('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 0', 'opacity': ''}).show(); - $('.ui-colorpicker-map-layer-2', e).hide(); - break; - - case 's': - case 'a': - $('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -260px', 'opacity': ''}).show(); - $('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -520px', 'opacity': ''}).show(); - break; - - case 'v': - $(e).css('background-color', 'black'); - $('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -780px', 'opacity': ''}).show(); - $('.ui-colorpicker-map-layer-2', e).hide(); - break; - - case 'r': - $('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -1040px', 'opacity': ''}).show(); - $('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -1300px', 'opacity': ''}).show(); - break; - - case 'g': - $('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -1560px', 'opacity': ''}).show(); - $('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -1820px', 'opacity': ''}).show(); - break; - - case 'b': - $('.ui-colorpicker-map-layer-1', e).css({'background-position': '0 -2080px', 'opacity': ''}).show(); - $('.ui-colorpicker-map-layer-2', e).css({'background-position': '0 -2340px', 'opacity': ''}).show(); - break; - } - that.repaint(); - }; - - this.repaint = function () { - var div = $('.ui-colorpicker-map-layer-pointer', e), - x = 0, - y = 0; - - switch (inst.mode) { - case 'h': - x = inst.color.getHSV().s * div.width(); - y = (1 - inst.color.getHSV().v) * div.width(); - $(e).css('background-color', inst.color.copy().normalize().toCSS()); - break; - - case 's': - case 'a': - x = inst.color.getHSV().h * div.width(); - y = (1 - inst.color.getHSV().v) * div.width(); - $('.ui-colorpicker-map-layer-2', e).css('opacity', 1 - inst.color.getHSV().s); - break; - - case 'v': - x = inst.color.getHSV().h * div.width(); - y = (1 - inst.color.getHSV().s) * div.width(); - $('.ui-colorpicker-map-layer-1', e).css('opacity', inst.color.getHSV().v); - break; - - case 'r': - x = inst.color.getRGB().b * div.width(); - y = (1 - inst.color.getRGB().g) * div.width(); - $('.ui-colorpicker-map-layer-2', e).css('opacity', inst.color.getRGB().r); - break; - - case 'g': - x = inst.color.getRGB().b * div.width(); - y = (1 - inst.color.getRGB().r) * div.width(); - $('.ui-colorpicker-map-layer-2', e).css('opacity', inst.color.getRGB().g); - break; - - case 'b': - x = inst.color.getRGB().r * div.width(); - y = (1 - inst.color.getRGB().g) * div.width(); - $('.ui-colorpicker-map-layer-2', e).css('opacity', inst.color.getRGB().b); - break; - } - - if (inst.options.alpha) { - $('.ui-colorpicker-map-layer-alpha', e).css('opacity', 1 - inst.color.getAlpha()); - } - - $('.ui-colorpicker-map-pointer', e).css({ - 'left': x - 7, - 'top': y - 7 - }); - }; - - this.init = function () { - e = $(_html()).appendTo($('.ui-colorpicker-map-container', inst.dialog)); - - e.bind('mousedown', _mousedown); - }; - }, - - bar: function (inst) { - var that = this, - e = null, - _mousedown, _mouseup, _mousemove, _html; - - _mousedown = function (event) { - if (!inst.opened) { - return; - } - - var div = $('.ui-colorpicker-bar-layer-pointer', e), - offset = div.offset(), - width = div.width(), - height = div.height(), - x = event.pageX - offset.left, - y = event.pageY - offset.top; - - if (x >= 0 && x < width && y >= 0 && y < height) { - event.stopImmediatePropagation(); - event.preventDefault(); - e.unbind('mousedown', _mousedown); - $(document).bind('mouseup', _mouseup); - $(document).bind('mousemove', _mousemove); - _mousemove(event); - } - }; - - _mouseup = function (event) { - event.stopImmediatePropagation(); - event.preventDefault(); - $(document).unbind('mouseup', _mouseup); - $(document).unbind('mousemove', _mousemove); - e.bind('mousedown', _mousedown); - }; - - _mousemove = function (event) { - event.stopImmediatePropagation(); - event.preventDefault(); - - if (event.pageY === that.y) { - return; - } - that.y = event.pageY; - - var div = $('.ui-colorpicker-bar-layer-pointer', e), - offset = div.offset(), - height = div.height(), - y = event.pageY - offset.top; - - y = Math.max(0, Math.min(y / height, 1)); - - // interpret values - switch (inst.mode) { - case 'h': - inst.color.setHSV(1 - y, null, null); - break; - - case 's': - inst.color.setHSV(null, 1 - y, null); - break; - - case 'v': - inst.color.setHSV(null, null, 1 - y); - break; - - case 'r': - inst.color.setRGB(1 - y, null, null); - break; - - case 'g': - inst.color.setRGB(null, 1 - y, null); - break; - - case 'b': - inst.color.setRGB(null, null, 1 - y); - break; - - case 'a': - inst.color.setAlpha(1 - y); - break; - } - - inst._change(); - }; - - _html = function () { - var html = '
' - + ' ' - + ' ' - + ' ' - + ' '; - - if (inst.options.alpha) { - html += ' ' - + ' '; - } - - html += '
'; - - return html; - }; - - this.update = function () { - switch (inst.mode) { - case 'h': - case 's': - case 'v': - case 'r': - case 'g': - case 'b': - $('.ui-colorpicker-bar-layer-alpha', e).show(); - $('.ui-colorpicker-bar-layer-alphabar', e).hide(); - break; - - case 'a': - $('.ui-colorpicker-bar-layer-alpha', e).hide(); - $('.ui-colorpicker-bar-layer-alphabar', e).show(); - break; - } - - switch (inst.mode) { - case 'h': - $('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 0', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-2', e).hide(); - $('.ui-colorpicker-bar-layer-3', e).hide(); - $('.ui-colorpicker-bar-layer-4', e).hide(); - break; - - case 's': - $('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -260px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -520px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-3', e).hide(); - $('.ui-colorpicker-bar-layer-4', e).hide(); - break; - - case 'v': - $('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -520px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-2', e).hide(); - $('.ui-colorpicker-bar-layer-3', e).hide(); - $('.ui-colorpicker-bar-layer-4', e).hide(); - break; - - case 'r': - $('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -1560px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -1300px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-3', e).css({'background-position': '0 -780px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-4', e).css({'background-position': '0 -1040px', 'opacity': ''}).show(); - break; - - case 'g': - $('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -2600px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -2340px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-3', e).css({'background-position': '0 -1820px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-4', e).css({'background-position': '0 -2080px', 'opacity': ''}).show(); - break; - - case 'b': - $('.ui-colorpicker-bar-layer-1', e).css({'background-position': '0 -3640px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-2', e).css({'background-position': '0 -3380px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-3', e).css({'background-position': '0 -2860px', 'opacity': ''}).show(); - $('.ui-colorpicker-bar-layer-4', e).css({'background-position': '0 -3120px', 'opacity': ''}).show(); - break; - - case 'a': - $('.ui-colorpicker-bar-layer-1', e).hide(); - $('.ui-colorpicker-bar-layer-2', e).hide(); - $('.ui-colorpicker-bar-layer-3', e).hide(); - $('.ui-colorpicker-bar-layer-4', e).hide(); - break; - } - that.repaint(); - }; - - this.repaint = function () { - var div = $('.ui-colorpicker-bar-layer-pointer', e), - y = 0; - - switch (inst.mode) { - case 'h': - y = (1 - inst.color.getHSV().h) * div.height(); - break; - - case 's': - y = (1 - inst.color.getHSV().s) * div.height(); - $('.ui-colorpicker-bar-layer-2', e).css('opacity', 1 - inst.color.getHSV().v); - $(e).css('background-color', inst.color.copy().normalize().toCSS()); - break; - - case 'v': - y = (1 - inst.color.getHSV().v) * div.height(); - $(e).css('background-color', inst.color.copy().normalize().toCSS()); - break; - - case 'r': - y = (1 - inst.color.getRGB().r) * div.height(); - $('.ui-colorpicker-bar-layer-2', e).css('opacity', Math.max(0, (inst.color.getRGB().b - inst.color.getRGB().g))); - $('.ui-colorpicker-bar-layer-3', e).css('opacity', Math.max(0, (inst.color.getRGB().g - inst.color.getRGB().b))); - $('.ui-colorpicker-bar-layer-4', e).css('opacity', Math.min(inst.color.getRGB().b, inst.color.getRGB().g)); - break; - - case 'g': - y = (1 - inst.color.getRGB().g) * div.height(); - $('.ui-colorpicker-bar-layer-2', e).css('opacity', Math.max(0, (inst.color.getRGB().b - inst.color.getRGB().r))); - $('.ui-colorpicker-bar-layer-3', e).css('opacity', Math.max(0, (inst.color.getRGB().r - inst.color.getRGB().b))); - $('.ui-colorpicker-bar-layer-4', e).css('opacity', Math.min(inst.color.getRGB().r, inst.color.getRGB().b)); - break; - - case 'b': - y = (1 - inst.color.getRGB().b) * div.height(); - $('.ui-colorpicker-bar-layer-2', e).css('opacity', Math.max(0, (inst.color.getRGB().r - inst.color.getRGB().g))); - $('.ui-colorpicker-bar-layer-3', e).css('opacity', Math.max(0, (inst.color.getRGB().g - inst.color.getRGB().r))); - $('.ui-colorpicker-bar-layer-4', e).css('opacity', Math.min(inst.color.getRGB().r, inst.color.getRGB().g)); - break; - - case 'a': - y = (1 - inst.color.getAlpha()) * div.height(); - $(e).css('background-color', inst.color.copy().normalize().toCSS()); - break; - } - - if (inst.mode !== 'a') { - $('.ui-colorpicker-bar-layer-alpha', e).css('opacity', 1 - inst.color.getAlpha()); - } - - $('.ui-colorpicker-bar-pointer', e).css('top', y - 3); - }; - - this.init = function () { - e = $(_html()).appendTo($('.ui-colorpicker-bar-container', inst.dialog)); - - e.bind('mousedown', _mousedown); - }; - }, - - preview: function (inst) { - var that = this, - e = null, - _html; - - _html = function () { - return '
' - + '
' - + '
' - + '
'; - }; - - this.init = function () { - e = $(_html()).appendTo($('.ui-colorpicker-preview-container', inst.dialog)); - - $('.ui-colorpicker-preview-initial', e).click(function () { - inst.color = inst.currentColor.copy(); - inst._change(); - }); - - }; - - this.update = function () { - if (inst.options.alpha) { - $('.ui-colorpicker-preview-initial-alpha, .ui-colorpicker-preview-current-alpha', e).show(); - } else { - $('.ui-colorpicker-preview-initial-alpha, .ui-colorpicker-preview-current-alpha', e).hide(); - } - - this.repaint(); - }; - - this.repaint = function () { - $('.ui-colorpicker-preview-initial', e).css('background-color', inst.currentColor.toCSS()).attr('title', inst.currentColor.toHex()); - $('.ui-colorpicker-preview-initial-alpha', e).css('opacity', 1 - inst.currentColor.getAlpha()); - $('.ui-colorpicker-preview-current', e).css('background-color', inst.color.toCSS()).attr('title', inst.color.toHex()); - $('.ui-colorpicker-preview-current-alpha', e).css('opacity', 1 - inst.color.getAlpha()); - }; - }, - - hsv: function (inst) { - var that = this, - e = null, - _html; - - _html = function () { - var html = ''; - - if (inst.options.hsv) { - html += '
°
' - + '
%
' - + '
%
'; - } - - return '
' + html + '
'; - }; - - this.init = function () { - e = $(_html()).appendTo($('.ui-colorpicker-hsv-container', inst.dialog)); - - $('.ui-colorpicker-mode', e).click(function () { - inst.mode = $(this).val(); - inst._updateAllParts(); - }); - - $('.ui-colorpicker-number', e).bind('change keyup', function () { - inst.color.setHSV( - $('.ui-colorpicker-hsv-h .ui-colorpicker-number', e).val() / 360, - $('.ui-colorpicker-hsv-s .ui-colorpicker-number', e).val() / 100, - $('.ui-colorpicker-hsv-v .ui-colorpicker-number', e).val() / 100 - ); - inst._change(); - }); - }; - - this.repaint = function () { - var hsv = inst.color.getHSV(); - hsv.h *= 360; - hsv.s *= 100; - hsv.v *= 100; - - $.each(hsv, function (index, value) { - var input = $('.ui-colorpicker-hsv-' + index + ' .ui-colorpicker-number', e); - value = Math.round(value); - if (input.val() !== value) { - input.val(value); - } - }); - }; - - this.update = function () { - $('.ui-colorpicker-mode', e).each(function () { - $(this).attr('checked', $(this).val() === inst.mode); - }); - this.repaint(); - }; - }, - - rgb: function (inst) { - var that = this, - e = null, - _html; - - _html = function () { - var html = ''; - - if (inst.options.rgb) { - html += '
' - + '
' - + '
'; - } - - return '
' + html + '
'; - }; - - this.init = function () { - e = $(_html()).appendTo($('.ui-colorpicker-rgb-container', inst.dialog)); - - $('.ui-colorpicker-mode', e).click(function () { - inst.mode = $(this).val(); - inst._updateAllParts(); - }); - - $('.ui-colorpicker-number', e).bind('change keyup', function () { - inst.color.setRGB( - $('.ui-colorpicker-rgb-r .ui-colorpicker-number', e).val() / 255, - $('.ui-colorpicker-rgb-g .ui-colorpicker-number', e).val() / 255, - $('.ui-colorpicker-rgb-b .ui-colorpicker-number', e).val() / 255 - ); - - inst._change(); - }); - }; - - this.repaint = function () { - $.each(inst.color.getRGB(), function (index, value) { - var input = $('.ui-colorpicker-rgb-' + index + ' .ui-colorpicker-number', e); - value = Math.round(value * 255); - if (input.val() !== value) { - input.val(value); - } - }); - }; - - this.update = function () { - $('.ui-colorpicker-mode', e).each(function () { - $(this).attr('checked', $(this).val() === inst.mode); - }); - this.repaint(); - }; - }, - - lab: function (inst) { - var that = this, - part = null, - html = function () { - var html = ''; - - if (inst.options.hsv) { - html += '
' - + '
' - + '
'; - } - - return '
' + html + '
'; - }; - - this.init = function () { - var data = 0; - - part = $(html()).appendTo($('.ui-colorpicker-lab-container', inst.dialog)); - - $('.ui-colorpicker-number', part).on('change keyup', function (event) { - inst.color.setLAB( - parseInt($('.ui-colorpicker-lab-l .ui-colorpicker-number', part).val(), 10) / 100, - (parseInt($('.ui-colorpicker-lab-a .ui-colorpicker-number', part).val(), 10) + 128) / 255, - (parseInt($('.ui-colorpicker-lab-b .ui-colorpicker-number', part).val(), 10) + 128) / 255 - ); - inst._change(); - }); - }; - - this.repaint = function () { - var lab = inst.color.getLAB(); - lab.l *= 100; - lab.a = (lab.a * 255) - 128; - lab.b = (lab.b * 255) - 128; - - $.each(lab, function (index, value) { - var input = $('.ui-colorpicker-lab-' + index + ' .ui-colorpicker-number', part); - value = Math.round(value); - if (input.val() !== value) { - input.val(value); - } - }); - }; - - this.update = function () { - this.repaint(); - }; - - }, - - cmyk: function (inst) { - var that = this, - part = null, - html = function () { - var html = ''; - - if (inst.options.hsv) { - html += '
%
' - + '
%
' - + '
%
' - + '
%
'; - } - - return '
' + html + '
'; - }; - - this.init = function () { - part = $(html()).appendTo($('.ui-colorpicker-cmyk-container', inst.dialog)); - - $('.ui-colorpicker-number', part).on('change keyup', function (event) { - inst.color.setCMYK( - parseInt($('.ui-colorpicker-cmyk-c .ui-colorpicker-number', part).val(), 10) / 100, - parseInt($('.ui-colorpicker-cmyk-m .ui-colorpicker-number', part).val(), 10) / 100, - parseInt($('.ui-colorpicker-cmyk-y .ui-colorpicker-number', part).val(), 10) / 100, - parseInt($('.ui-colorpicker-cmyk-k .ui-colorpicker-number', part).val(), 10) / 100 - ); - inst._change(); - }); - }; - - this.repaint = function () { - $.each(inst.color.getCMYK(), function (index, value) { - var input = $('.ui-colorpicker-cmyk-' + index + ' .ui-colorpicker-number', part); - value = Math.round(value * 100); - if (input.val() !== value) { - input.val(value); - } - }); - }; - - this.update = function () { - this.repaint(); - }; - - }, - - alpha: function (inst) { - var that = this, - e = null, - _html; - - _html = function () { - var html = ''; - - if (inst.options.alpha) { - html += '
%
'; - } - - return '
' + html + '
'; - }; - - this.init = function () { - e = $(_html()).appendTo($('.ui-colorpicker-alpha-container', inst.dialog)); - - $('.ui-colorpicker-mode', e).click(function () { - inst.mode = $(this).val(); - inst._updateAllParts(); - }); - - $('.ui-colorpicker-number', e).bind('change keyup', function () { - inst.color.setAlpha($('.ui-colorpicker-a .ui-colorpicker-number', e).val() / 100); - inst._change(); - }); - }; - - this.update = function () { - $('.ui-colorpicker-mode', e).each(function () { - $(this).attr('checked', $(this).val() === inst.mode); - }); - this.repaint(); - }; - - this.repaint = function () { - var input = $('.ui-colorpicker-a .ui-colorpicker-number', e), - value = Math.round(inst.color.getAlpha() * 100); - if (!input.is(':focus') && input.val() !== value) { - input.val(value); - } - }; - }, - - hex: function (inst) { - var that = this, - e = null, - _html; - - _html = function () { - var html = ''; - - if (inst.options.alpha) { - html += ''; - } - - html += ''; - - return '
' + html + '
'; - }; - - this.init = function () { - e = $(_html()).appendTo($('.ui-colorpicker-hex-container', inst.dialog)); - - // repeat here makes the invalid input disappear faster - $('.ui-colorpicker-hex-input', e).bind('change keydown keyup', function (a, b, c) { - if (/[^a-fA-F0-9]/.test($(this).val())) { - $(this).val($(this).val().replace(/[^a-fA-F0-9]/, '')); - } - }); - - $('.ui-colorpicker-hex-input', e).bind('change keyup', function () { - // repeat here makes sure that the invalid input doesn't get parsed - inst.color = _parseHex($(this).val()).setAlpha(inst.color.getAlpha()); - inst._change(); - }); - - $('.ui-colorpicker-hex-alpha', e).bind('change keydown keyup', function () { - if (/[^a-fA-F0-9]/.test($(this).val())) { - $(this).val($(this).val().replace(/[^a-fA-F0-9]/, '')); - } - }); - - $('.ui-colorpicker-hex-alpha', e).bind('change keyup', function () { - inst.color.setAlpha(parseInt($('.ui-colorpicker-hex-alpha', e).val(), 16) / 255); - inst._change(); - }); - }; - - this.update = function () { - this.repaint(); - }; - - this.repaint = function () { - if (!$('.ui-colorpicker-hex-input', e).is(':focus')) { - $('.ui-colorpicker-hex-input', e).val(inst.color.toHex(true)); - } - - if (!$('.ui-colorpicker-hex-alpha', e).is(':focus')) { - $('.ui-colorpicker-hex-alpha', e).val(_intToHex(inst.color.getAlpha() * 255)); - } - }; - }, - - swatches: function (inst) { - var that = this, - part = null, - html = function () { - var html = ''; - - $.each(inst.options.swatches, function (name, color) { - var c = new Color(color.r, color.g, color.b), - css = c.toCSS(); - html += '
'; - }); - - return '
' + html + '
'; - }; - - this.init = function () { - part = $(html()).appendTo($('.ui-colorpicker-swatches-container', inst.dialog)); - - $('.ui-colorpicker-swatch', part).click(function () { - inst.color = _parseColor($(this).css('background-color')); - inst._change(); - }); - }; - }, - - footer: function (inst) { - var that = this, - part = null, - id_transparent = 'ui-colorpicker-special-transparent-'+_colorpicker_index, - id_none = 'ui-colorpicker-special-none-'+_colorpicker_index, - html = function () { - var html = ''; - - if (inst.options.alpha || (!inst.inline && inst.options.showNoneButton)) { - html += '
'; - - if (inst.options.alpha) { - html += ''; - } - if (!inst.inline && inst.options.showNoneButton) { - html += ''; - } - html += '
'; - } - - if (!inst.inline) { - html += '
'; - if (inst.options.showCancelButton) { - html += ''; - } - html += ''; - html += '
'; - } - - return '
' + html + '
'; - }; - - this.init = function () { - part = $(html()).appendTo(inst.dialog); - - $('.ui-colorpicker-ok', part).button().click(function () { - inst.close(); - }); - - $('.ui-colorpicker-cancel', part).button().click(function () { - inst.color = inst.currentColor.copy(); - inst._change(inst.color.set); - inst.close(); - }); - - //inst._getRegional('transparent') - $('.ui-colorpicker-buttonset', part).buttonset(); - - $('.ui-colorpicker-special-color', part).click(function () { - inst._change(); - }); - - $('#'+id_none, part).click(function () { - inst._change(false); - }); - - $('#'+id_transparent, part).click(function () { - inst.color.setAlpha(0); - inst._change(); - }); - }; - - this.repaint = function () { - if (!inst.color.set) { - $('.ui-colorpicker-special-none', part).attr('checked', true).button( "refresh" ); - } else if (inst.color.getAlpha() == 0) { - $('.ui-colorpicker-special-transparent', part).attr('checked', true).button( "refresh" ); - } else { - $('input', part).attr('checked', false).button( "refresh" ); - } - - $('.ui-colorpicker-cancel', part).button(inst.changed ? 'enable' : 'disable'); - }; - - this.update = function () {}; - } - }, - - Color = function () { - var spaces = { rgb: {r: 0, g: 0, b: 0}, - hsv: {h: 0, s: 0, v: 0}, - hsl: {h: 0, s: 0, l: 0}, - lab: {l: 0, a: 0, b: 0}, - cmyk: {c: 0, m: 0, y: 0, k: 1} - }, - a = 1, - arg, - args = arguments, - _clip = function(v) { - if (isNaN(v) || v === null) { - return 0; - } - if (typeof v == 'string') { - v = parseInt(v, 10); - } - return Math.max(0, Math.min(v, 1)); - }, - _hexify = function (number) { - var digits = '0123456789abcdef', - lsd = number % 16, - msd = (number - lsd) / 16, - hexified = digits.charAt(msd) + digits.charAt(lsd); - return hexified; - }, - _rgb_to_xyz = function(rgb) { - var r = (rgb.r > 0.04045) ? Math.pow((rgb.r + 0.055) / 1.055, 2.4) : rgb.r / 12.92, - g = (rgb.g > 0.04045) ? Math.pow((rgb.g + 0.055) / 1.055, 2.4) : rgb.g / 12.92, - b = (rgb.b > 0.04045) ? Math.pow((rgb.b + 0.055) / 1.055, 2.4) : rgb.b / 12.92; - - return { - x: r * 0.4124 + g * 0.3576 + b * 0.1805, - y: r * 0.2126 + g * 0.7152 + b * 0.0722, - z: r * 0.0193 + g * 0.1192 + b * 0.9505 - }; - }, - _xyz_to_rgb = function(xyz) { - var rgb = { - r: xyz.x * 3.2406 + xyz.y * -1.5372 + xyz.z * -0.4986, - g: xyz.x * -0.9689 + xyz.y * 1.8758 + xyz.z * 0.0415, - b: xyz.x * 0.0557 + xyz.y * -0.2040 + xyz.z * 1.0570 - }; - - rgb.r = (rgb.r > 0.0031308) ? 1.055 * Math.pow(rgb.r, (1 / 2.4)) - 0.055 : 12.92 * rgb.r; - rgb.g = (rgb.g > 0.0031308) ? 1.055 * Math.pow(rgb.g, (1 / 2.4)) - 0.055 : 12.92 * rgb.g; - rgb.b = (rgb.b > 0.0031308) ? 1.055 * Math.pow(rgb.b, (1 / 2.4)) - 0.055 : 12.92 * rgb.b; - - return rgb; - }, - _rgb_to_hsv = function(rgb) { - var minVal = Math.min(rgb.r, rgb.g, rgb.b), - maxVal = Math.max(rgb.r, rgb.g, rgb.b), - delta = maxVal - minVal, - del_R, del_G, del_B, - hsv = { - h: 0, - s: 0, - v: maxVal - }; - - if (delta === 0) { - hsv.h = 0; - hsv.s = 0; - } else { - hsv.s = delta / maxVal; - - del_R = (((maxVal - rgb.r) / 6) + (delta / 2)) / delta; - del_G = (((maxVal - rgb.g) / 6) + (delta / 2)) / delta; - del_B = (((maxVal - rgb.b) / 6) + (delta / 2)) / delta; - - if (rgb.r === maxVal) { - hsv.h = del_B - del_G; - } else if (rgb.g === maxVal) { - hsv.h = (1 / 3) + del_R - del_B; - } else if (rgb.b === maxVal) { - hsv.h = (2 / 3) + del_G - del_R; - } - - if (hsv.h < 0) { - hsv.h += 1; - } else if (hsv.h > 1) { - hsv.h -= 1; - } - } - - return hsv; - }, - _hsv_to_rgb = function(hsv) { - var rgb = { - r: 0, - g: 0, - b: 0 - }, - var_h, - var_i, - var_1, - var_2, - var_3; - - if (hsv.s === 0) { - rgb.r = rgb.g = rgb.b = hsv.v; - } else { - var_h = hsv.h === 1 ? 0 : hsv.h * 6; - var_i = Math.floor(var_h); - var_1 = hsv.v * (1 - hsv.s); - var_2 = hsv.v * (1 - hsv.s * (var_h - var_i)); - var_3 = hsv.v * (1 - hsv.s * (1 - (var_h - var_i))); - - if (var_i === 0) { - rgb.r = hsv.v; - rgb.g = var_3; - rgb.b = var_1; - } else if (var_i === 1) { - rgb.r = var_2; - rgb.g = hsv.v; - rgb.b = var_1; - } else if (var_i === 2) { - rgb.r = var_1; - rgb.g = hsv.v; - rgb.b = var_3; - } else if (var_i === 3) { - rgb.r = var_1; - rgb.g = var_2; - rgb.b = hsv.v; - } else if (var_i === 4) { - rgb.r = var_3; - rgb.g = var_1; - rgb.b = hsv.v; - } else { - rgb.r = hsv.v; - rgb.g = var_1; - rgb.b = var_2; - } - } - - return rgb; - }, - _rgb_to_hsl = function(rgb) { - var minVal = Math.min(rgb.r, rgb.g, rgb.b), - maxVal = Math.max(rgb.r, rgb.g, rgb.b), - delta = maxVal - minVal, - del_R, del_G, del_B, - hsl = { - h: 0, - s: 0, - l: (maxVal + minVal) / 2 - }; - - if (delta === 0) { - hsl.h = 0; - hsl.s = 0; - } else { - hsl.s = hsl.l < 0.5 ? delta / (maxVal + minVal) : delta / (2 - maxVal - minVal); - - del_R = (((maxVal - rgb.r) / 6) + (delta / 2)) / delta; - del_G = (((maxVal - rgb.g) / 6) + (delta / 2)) / delta; - del_B = (((maxVal - rgb.b) / 6) + (delta / 2)) / delta; - - if (rgb.r === maxVal) { - hsl.h = del_B - del_G; - } else if (rgb.g === maxVal) { - hsl.h = (1 / 3) + del_R - del_B; - } else if (rgb.b === maxVal) { - hsl.h = (2 / 3) + del_G - del_R; - } - - if (hsl.h < 0) { - hsl.h += 1; - } else if (hsl.h > 1) { - hsl.h -= 1; - } - } - - return hsl; - }, - _hsl_to_rgb = function(hsl) { - var var_1, - var_2, - hue_to_rgb = function(v1, v2, vH) { - if (vH < 0) { - vH += 1; - } - if (vH > 1) { - vH -= 1; - } - if ((6 * vH) < 1) { - return v1 + (v2 - v1) * 6 * vH; - } - if ((2 * vH) < 1) { - return v2; - } - if ((3 * vH) < 2) { - return v1 + (v2 - v1) * ((2 / 3) - vH) * 6; - } - return v1; - }; - - if (hsl.s === 0) { - return { - r: hsl.l, - g: hsl.l, - b: hsl.l - }; - } - - var_2 = (hsl.l < 0.5) ? hsl.l * (1 + hsl.s) : (hsl.l + hsl.s) - (hsl.s * hsl.l); - var_1 = 2 * hsl.l - var_2; - - return { - r: hue_to_rgb(var_1, var_2, hsl.h + (1 / 3)), - g: hue_to_rgb(var_1, var_2, hsl.h), - b: hue_to_rgb(var_1, var_2, hsl.h - (1 / 3)) - }; - }, - _xyz_to_lab = function(xyz) { - // CIE-L*ab D65 1931 - var x = xyz.x / 0.95047, - y = xyz.y, - z = xyz.z / 1.08883; - - x = (x > 0.008856) ? Math.pow(x, (1/3)) : (7.787 * x) + (16/116); - y = (y > 0.008856) ? Math.pow(y, (1/3)) : (7.787 * y) + (16/116); - z = (z > 0.008856) ? Math.pow(z, (1/3)) : (7.787 * z) + (16/116); - - return { - l: ((116 * y) - 16) / 100, // [0,100] - a: ((500 * (x - y)) + 128) / 255, // [-128,127] - b: ((200 * (y - z)) + 128) / 255 // [-128,127] - }; - }, - _lab_to_xyz = function(lab) { - var lab2 = { - l: lab.l * 100, - a: (lab.a * 255) - 128, - b: (lab.b * 255) - 128 - }, - xyz = { - x: 0, - y: (lab2.l + 16) / 116, - z: 0 - }; - - xyz.x = lab2.a / 500 + xyz.y; - xyz.z = xyz.y - lab2.b / 200; - - xyz.x = (Math.pow(xyz.x, 3) > 0.008856) ? Math.pow(xyz.x, 3) : (xyz.x - 16 / 116) / 7.787; - xyz.y = (Math.pow(xyz.y, 3) > 0.008856) ? Math.pow(xyz.y, 3) : (xyz.y - 16 / 116) / 7.787; - xyz.z = (Math.pow(xyz.z, 3) > 0.008856) ? Math.pow(xyz.z, 3) : (xyz.z - 16 / 116) / 7.787; - - xyz.x *= 0.95047; - xyz.y *= 1; - xyz.z *= 1.08883; - - return xyz; - }, - _rgb_to_cmy = function(rgb) { - return { - c: 1 - (rgb.r), - m: 1 - (rgb.g), - y: 1 - (rgb.b) - }; - }, - _cmy_to_rgb = function(cmy) { - return { - r: 1 - (cmy.c), - g: 1 - (cmy.m), - b: 1 - (cmy.y) - }; - }, - _cmy_to_cmyk = function(cmy) { - var K = 1; - - if (cmy.c < K) { - K = cmy.c; - } - if (cmy.m < K) { - K = cmy.m; - } - if (cmy.y < K) { - K = cmy.y; - } - - if (K == 1) { - return { - c: 0, - m: 0, - y: 0, - k: 1 - }; - } - - return { - c: (cmy.c - K) / (1 - K), - m: (cmy.m - K) / (1 - K), - y: (cmy.y - K) / (1 - K), - k: K - }; - }, - _cmyk_to_cmy = function(cmyk) { - return { - c: cmyk.c * (1 - cmyk.k) + cmyk.k, - m: cmyk.m * (1 - cmyk.k) + cmyk.k, - y: cmyk.y * (1 - cmyk.k) + cmyk.k - }; - }; - - this.set = true; - - this.setAlpha = function(_a) { - if (_a !== null) { - a = _clip(_a); - } - - return this; - }; - - this.getAlpha = function() { - return a; - }; - - this.setRGB = function(r, g, b) { - spaces = {rgb: this.getRGB()}; - if (r !== null) { - spaces.rgb.r = _clip(r); - } - if (g !== null) { - spaces.rgb.g = _clip(g); - } - if (b !== null) { - spaces.rgb.b = _clip(b); - } - - return this; - }; - - this.setHSV = function(h, s, v) { - spaces = {hsv: this.getHSV()}; - if (h !== null) { - spaces.hsv.h = _clip(h); - } - if (s !== null) { - spaces.hsv.s = _clip(s); - } - if (v !== null) { - spaces.hsv.v = _clip(v); - } - - return this; - }; - - this.setHSL = function(h, s, l) { - spaces = {hsl: this.getHSL()}; - if (h !== null) { - spaces.hsl.h = _clip(h); - } - if (s !== null) { - spaces.hsl.s = _clip(s); - } - if (l !== null) { - spaces.hsl.l = _clip(l); - } - - return this; - }; - - this.setLAB = function(l, a, b) { - spaces = {lab: this.getLAB()}; - if (l !== null) { - spaces.lab.l = _clip(l); - } - if (a !== null) { - spaces.lab.a = _clip(a); - } - if (b !== null) { - spaces.lab.b = _clip(b); - } - - return this; - }; - - this.setCMYK = function(c, m, y, k) { - spaces = {cmyk: this.getCMYK()}; - if (c !== null) { - spaces.cmyk.c = _clip(c); - } - if (m !== null) { - spaces.cmyk.m = _clip(m); - } - if (y !== null) { - spaces.cmyk.y = _clip(y); - } - if (k !== null) { - spaces.cmyk.k = _clip(k); - } - - return this; - }; - - this.getRGB = function() { - if (!spaces.rgb) { - spaces.rgb = spaces.lab ? _xyz_to_rgb(_lab_to_xyz(spaces.lab)) - : spaces.hsv ? _hsv_to_rgb(spaces.hsv) - : spaces.hsl ? _hsl_to_rgb(spaces.hsl) - : spaces.cmyk ? _cmy_to_rgb(_cmyk_to_cmy(spaces.cmyk)) - : {r: 0, g: 0, b: 0}; - spaces.rgb.r = _clip(spaces.rgb.r); - spaces.rgb.g = _clip(spaces.rgb.g); - spaces.rgb.b = _clip(spaces.rgb.b); - } - return $.extend({}, spaces.rgb); - }; - - this.getHSV = function() { - if (!spaces.hsv) { - spaces.hsv = spaces.lab ? _rgb_to_hsv(this.getRGB()) - : spaces.rgb ? _rgb_to_hsv(spaces.rgb) - : spaces.hsl ? _rgb_to_hsv(this.getRGB()) - : spaces.cmyk ? _rgb_to_hsv(this.getRGB()) - : {h: 0, s: 0, v: 0}; - spaces.hsv.h = _clip(spaces.hsv.h); - spaces.hsv.s = _clip(spaces.hsv.s); - spaces.hsv.v = _clip(spaces.hsv.v); - } - return $.extend({}, spaces.hsv); - }; - - this.getHSL = function() { - if (!spaces.hsl) { - spaces.hsl = spaces.rgb ? _rgb_to_hsl(spaces.rgb) - : spaces.hsv ? _rgb_to_hsl(this.getRGB()) - : spaces.cmyk ? _rgb_to_hsl(this.getRGB()) - : spaces.hsv ? _rgb_to_hsl(this.getRGB()) - : {h: 0, s: 0, l: 0}; - spaces.hsl.h = _clip(spaces.hsl.h); - spaces.hsl.s = _clip(spaces.hsl.s); - spaces.hsl.l = _clip(spaces.hsl.l); - } - return $.extend({}, spaces.hsl); - }; - - this.getCMYK = function() { - if (!spaces.cmyk) { - spaces.cmyk = spaces.rgb ? _cmy_to_cmyk(_rgb_to_cmy(spaces.rgb)) - : spaces.hsv ? _cmy_to_cmyk(_rgb_to_cmy(this.getRGB())) - : spaces.hsl ? _cmy_to_cmyk(_rgb_to_cmy(this.getRGB())) - : spaces.lab ? _cmy_to_cmyk(_rgb_to_cmy(this.getRGB())) - : {c: 0, m: 0, y: 0, k: 1}; - spaces.cmyk.c = _clip(spaces.cmyk.c); - spaces.cmyk.m = _clip(spaces.cmyk.m); - spaces.cmyk.y = _clip(spaces.cmyk.y); - spaces.cmyk.k = _clip(spaces.cmyk.k); - } - return $.extend({}, spaces.cmyk); - }; - - this.getLAB = function() { - if (!spaces.lab) { - spaces.lab = spaces.rgb ? _xyz_to_lab(_rgb_to_xyz(spaces.rgb)) - : spaces.hsv ? _xyz_to_lab(_rgb_to_xyz(this.getRGB())) - : spaces.hsl ? _xyz_to_lab(_rgb_to_xyz(this.getRGB())) - : spaces.cmyk ? _xyz_to_lab(_rgb_to_xyz(this.getRGB())) - : {l: 0, a: 0, b: 0}; - spaces.lab.l = _clip(spaces.lab.l); - spaces.lab.a = _clip(spaces.lab.a); - spaces.lab.b = _clip(spaces.lab.b); - } - return $.extend({}, spaces.lab); - }; - - this.getChannels = function() { - return { - r: this.getRGB().r, - g: this.getRGB().g, - b: this.getRGB().b, - a: this.getAlpha(), - h: this.getHSV().h, - s: this.getHSV().s, - v: this.getHSV().v, - c: this.getCMYK().c, - m: this.getCMYK().m, - y: this.getCMYK().y, - k: this.getCMYK().k, - L: this.getLAB().l, - A: this.getLAB().a, - B: this.getLAB().b - }; - }; - - this.distance = function(color) { - var space = 'lab', - getter = 'get'+space.toUpperCase(), - a = this[getter](), - b = color[getter](), - distance = 0, - channel; - - for (channel in a) { - distance += Math.pow(a[channel] - b[channel], 2); - } - - return distance; - }; - - this.equals = function(color) { - var a = this.getRGB(), - b = color.getRGB(); - - return this.getAlpha() == color.getAlpha() - && a.r == b.r - && a.g == b.g - && a.b == b.b; - }; - - this.limit = function(steps) { - steps -= 1; - var rgb = this.getRGB(); - this.setRGB( - Math.round(rgb.r * steps) / steps, - Math.round(rgb.g * steps) / steps, - Math.round(rgb.b * steps) / steps - ); - }; - - this.toHex = function() { - var rgb = this.getRGB(); - return _hexify(rgb.r * 255) + _hexify(rgb.g * 255) + _hexify(rgb.b * 255); - }; - - this.toCSS = function() { - return '#' + this.toHex(); - }; - - this.normalize = function() { - this.setHSV(null, 1, 1); - return this; - }; - - this.copy = function() { - var rgb = this.getRGB(), - a = this.getAlpha(); - return new Color(rgb.r, rgb.g, rgb.b, a); - }; - - // Construct - if (args.length > 0) { - this.setRGB(args[0], args[1], args[2]); - this.setAlpha(args[3] === 0 ? 0 : args[3] || 1); - } - }; - - $.widget("vanderlee.colorpicker", { - options: { - alpha: false, // Show alpha controls and mode - altAlpha: true, // change opacity of altField as well? - altField: '', // selector for DOM elements which change background color on change. - altOnChange: true, // true to update on each change, false to update only on close. - altProperties: 'background-color', // comma separated list of any of 'background-color', 'color', 'border-color', 'outline-color' - autoOpen: false, // Open dialog automatically upon creation - buttonColorize: false, - buttonImage: 'images/ui-colorpicker.png', - buttonImageOnly: false, - buttonText: null, // Text on the button and/or title of button image. - closeOnEscape: true, // Close the dialog when the escape key is pressed. - closeOnOutside: true, // Close the dialog when clicking outside the dialog (not for inline) - color: '#00FF00', // Initial color (for inline only) - colorFormat: 'HEX', // Format string for output color format - draggable: true, // Make popup dialog draggable if header is visible. - duration: 'fast', - hsv: true, // Show HSV controls and modes - regional: '', - layout: { - map: [0, 0, 1, 5], // Left, Top, Width, Height (in table cells). - bar: [1, 0, 1, 5], - preview: [2, 0, 1, 1], - hsv: [2, 1, 1, 1], - rgb: [2, 2, 1, 1], - alpha: [2, 3, 1, 1], - hex: [2, 4, 1, 1], - lab: [3, 1, 1, 1], - cmyk: [3, 2, 1, 2], - swatches: [4, 0, 1, 5] - }, - limit: '', // Limit color "resolution": '', 'websafe', 'nibble', 'binary', 'name' - modal: false, // Modal dialog? - mode: 'h', // Initial editing mode, h, s, v, r, g, b or a - parts: '', // leave empty for automatic selection - rgb: true, // Show RGB controls and modes - showAnim: 'fadeIn', - showCancelButton: true, - showNoneButton: false, - showCloseButton: true, - showOn: 'focus', // 'focus', 'button', 'both' - showOptions: {}, - swatches: null, - title: null, - - close: null, - init: null, - select: null, - open: null - }, - - _create: function () { - var that = this, - text; - - ++_colorpicker_index; - - that.widgetEventPrefix = 'color'; - - that.opened = false; - that.generated = false; - that.inline = false; - that.changed = false; - - that.dialog = null; - that.button = null; - that.image = null; - that.overlay = null; - - that.mode = that.options.mode; - - if (that.options.swatches === null) { - that.options.swatches = _colors; - } - - if (this.element[0].nodeName.toLowerCase() === 'input' || !this.inline) { - that._setColor(that.element.val()); - - this._callback('init'); - - $('body').append(_container_popup); - that.dialog = $('.ui-colorpicker:last'); - - // Click outside/inside - $(document).mousedown(function (event) { - if (!that.opened || event.target === that.element[0] || that.overlay) { - return; - } - - // Check if clicked on any part of dialog - if (that.dialog.is(event.target) || that.dialog.has(event.target).length > 0) { - that.element.blur(); // inside window! - return; - } - - // Check if clicked on button - var p, - parents = $(event.target).parents(); - for (p = 0; p <= parents.length; ++p) { - if (that.button !== null && parents[p] === that.button[0]) { - return; - } - } - - // no closeOnOutside - if (!that.options.closeOnOutside) { - return; - } - - that.close(); - }); - - $(document).keydown(function (event) { - if (event.keyCode == 27 && that.opened && that.options.closeOnEscape) { - that.close(); - } - }); - - if (that.options.showOn === 'focus' || that.options.showOn === 'both') { - that.element.focus(function () { - that.open(); - }); - } - if (that.options.showOn === 'button' || that.options.showOn === 'both') { - if (that.options.buttonImage !== '') { - text = that.options.buttonText || that._getRegional('button'); - - that.image = $('').attr({ - 'src': that.options.buttonImage, - 'alt': text, - 'title': text - }); - - that._setImageBackground(); - } - - if (that.options.buttonImageOnly && that.image) { - that.button = that.image; - } else { - that.button = $('').html(that.image || that.options.buttonText).button(); - that.image = that.image ? $('img', that.button).first() : null; - } - that.button.insertAfter(that.element).click(function () { - that[that.opened ? 'close' : 'open'](); - }); - } - - if (that.options.autoOpen) { - that.open(); - } - - that.element.keydown(function (event) { - if (event.keyCode === 9) { - that.close(); - } - }).keyup(function (event) { - var color = _parseColor(that.element.val()); - if (!that.color.equals(color)) { - that.color = color; - that._change(); - } - }); - } else { - that.inline = true; - - $(this.element).html(_container_inline); - that.dialog = $('.ui-colorpicker', this.element); - - that._generate(); - - that.opened = true; - } - - return this; - }, - - _setOption: function(key, value){ - var that = this; - - switch (key) { - case "disabled": - if (value) { - that.dialog.addClass('ui-colorpicker-disabled'); - } else { - that.dialog.removeClass('ui-colorpicker-disabled'); - } - break; - } - - $.Widget.prototype._setOption.apply(that, arguments); - }, - - /* setBackground */ - _setImageBackground: function() { - if (this.image && this.options.buttonColorize) { - this.image.css('background-color', this.color.set? _formatColor('RGBA', this.color) : ''); - } - }, - - /** - * If an alternate field is specified, set it according to the current color. - */ - _setAltField: function () { - if (this.options.altOnChange && this.options.altField && this.options.altProperties) { - var index, - property, - properties = this.options.altProperties.split(','); - - for (index = 0; index <= properties.length; ++index) { - property = $.trim(properties[index]); - switch (property) { - case 'color': - case 'background-color': - case 'outline-color': - case 'border-color': - $(this.options.altField).css(property, this.color.set? this.color.toCSS() : ''); - break; - } - } - - if (this.options.altAlpha) { - $(this.options.altField).css('opacity', this.color.set? this.color.getAlpha() : ''); - } - } - }, - - _setColor: function(text) { - this.color = _parseColor(text); - this.currentColor = this.color.copy(); - - this._setImageBackground(); - this._setAltField(); - }, - - setColor: function(text) { - this._setColor(text); - this._change(this.color.set); - }, - - _generate: function () { - var that = this, - index, - part, - parts_list, - layout_parts; - - // Set color based on element? - that._setColor(that.inline? that.options.color : that.element.val()); - - // Determine the parts to include in this colorpicker - if (typeof that.options.parts === 'string') { - if (_parts_lists[that.options.parts]) { - parts_list = _parts_lists[that.options.parts]; - } else { - // automatic - parts_list = _parts_lists[that.inline ? 'inline' : 'popup']; - } - } else { - parts_list = that.options.parts; - } - - // Add any parts to the internal parts list - that.parts = {}; - $.each(parts_list, function(index, part) { - if (_parts[part]) { - that.parts[part] = new _parts[part](that); - } - }); - - if (!that.generated) { - layout_parts = []; - - $.each(that.options.layout, function(part, pos) { - if (that.parts[part]) { - layout_parts.push({ - 'part': part, - 'pos': pos - }); - } - }); - - $(_layoutTable(layout_parts, function(cell, x, y) { - var classes = ['ui-colorpicker-' + cell.part + '-container']; - - if (x > 0) { - classes.push('ui-colorpicker-padding-left'); - } - - if (y > 0) { - classes.push('ui-colorpicker-padding-top'); - } - - return ' 1 ? ' colspan="' + cell.pos[2] + '"' : '') - + (cell.pos[3] > 1 ? ' rowspan="' + cell.pos[3] + '"' : '') - + ' valign="top">'; - })).appendTo(that.dialog).addClass('ui-dialog-content ui-widget-content'); - - that._initAllParts(); - that._updateAllParts(); - that.generated = true; - } - }, - - _effectGeneric: function (element, show, slide, fade, callback) { - var that = this; - - if ($.effects && $.effects[that.options.showAnim]) { - element[show](that.options.showAnim, that.options.showOptions, that.options.duration, callback); - } else { - element[(that.options.showAnim === 'slideDown' ? - slide - : (that.options.showAnim === 'fadeIn' ? - fade - : show))]((that.options.showAnim ? that.options.duration : null), callback); - if (!that.options.showAnim || !that.options.duration) { - callback(); - } - } - }, - - _effectShow: function(element, callback) { - this._effectGeneric(element, 'show', 'slideDown', 'fadeIn', callback); - }, - - _effectHide: function(element, callback) { - this._effectGeneric(element, 'hide', 'slideUp', 'fadeOut', callback); - }, - - open: function() { - var that = this, - offset, - bottom, - right, - height, - width, - x, - y, - zIndex; - - if (!that.opened) { - that._generate(); - - offset = that.element.offset(); - bottom = $(window).height() + $(window).scrollTop(); - right = $(window).width() + $(window).scrollLeft(); - height = that.dialog.outerHeight(); - width = that.dialog.outerWidth(); - x = offset.left; - y = offset.top + that.element.outerHeight(); - - if (x + width > right) { - x = Math.max(0, right - width); - } - - if (y + height > bottom) { - if (offset.top - height >= $(window).scrollTop()) { - y = offset.top - height; - } else { - y = Math.max(0, bottom - height); - } - } - - that.dialog.css({'left': x, 'top': y}); - - // Automatically find highest z-index. - zIndex = 0; - $(that.element[0]).parents().each(function() { - var z = $(this).css('z-index'); - if ((typeof(z) === 'number' || typeof(z) === 'string') && z !== '' && !isNaN(z)) { - zIndex = z; - return false; - } - }); - - //@todo zIndexOffset option, to raise above other elements? - that.dialog.css('z-index', zIndex += 2); - - that.overlay = that.options.modal ? new $.ui.dialog.overlay(that) : null; - - that._effectShow(this.dialog); - that.opened = true; - that._callback('open', true); - - // Without waiting for domready the width of the map is 0 and we - // wind up with the cursor stuck in the upper left corner - $(function() { - that._repaintAllParts(); - }); - } - }, - - close: function () { - var that = this; - - that.currentColor = that.color.copy(); - that.changed = false; - - // tear down the interface - that._effectHide(that.dialog, function () { - that.dialog.empty(); - that.generated = false; - - that.opened = false; - that._callback('close', true); - }); - - if (that.overlay) { - that.overlay.destroy(); - } - }, - - destroy: function() { - this.element.unbind(); - - if (this.image !== null) { - this.image.remove(); - } - - if (this.button !== null) { - this.button.remove(); - } - - if (this.dialog !== null) { - this.dialog.remove(); - } - - if (this.overlay) { - this.overlay.destroy(); - } - }, - - _callback: function (callback, spaces) { - var that = this, - data, - lab; - - if (that.color.set) { - data = { - formatted: _formatColor(that.options.colorFormat, that.color) - }; - - lab = that.color.getLAB(); - lab.a = (lab.a * 2) - 1; - lab.b = (lab.b * 2) - 1; - - if (spaces === true) { - data.a = that.color.getAlpha(); - data.rgb = that.color.getRGB(); - data.hsv = that.color.getHSV(); - data.cmyk = that.color.getCMYK(); - data.hsl = that.color.getHSL(); - data.lab = lab; - } - - return that._trigger(callback, null, data); - } else { - return that._trigger(callback, null, { - formatted: '' - }); - } - }, - - _initAllParts: function () { - $.each(this.parts, function (index, part) { - if (part.init) { - part.init(); - } - }); - }, - - _updateAllParts: function () { - $.each(this.parts, function (index, part) { - if (part.update) { - part.update(); - } - }); - }, - - _repaintAllParts: function () { - $.each(this.parts, function (index, part) { - if (part.repaint) { - part.repaint(); - } - }); - }, - - _change: function (set /* = true */) { - this.color.set = (set !== false); - - this.changed = true; - - // Limit color palette - switch (this.options.limit) { - case 'websafe': - this.color.limit(6); - break; - - case 'nibble': - this.color.limit(16); - break; - - case 'binary': - this.color.limit(2); - break; - - case 'name': - var name = _closestName(this.color); - this.color.setRGB(_colors[name].r, _colors[name].g, _colors[name].b); - break; - } - - // update input element content - if (!this.inline) { - if (!this.color.set) { - this.element.val(''); - } else if (!this.color.equals(_parseColor(this.element.val()))) { - this.element.val(_formatColor(this.options.colorFormat, this.color)); - } - - this._setImageBackground(); - this._setAltField(); - } - - if (this.opened) { - this._repaintAllParts(); - } - - // callback - this._callback('select'); - }, - - // This will be deprecated by jQueryUI 1.9 widget - _hoverable: function (e) { - e.hover(function () { - e.addClass("ui-state-hover"); - }, function () { - e.removeClass("ui-state-hover"); - }); - }, - - // This will be deprecated by jQueryUI 1.9 widget - _focusable: function (e) { - e.focus(function () { - e.addClass("ui-state-focus"); - }).blur(function () { - e.removeClass("ui-state-focus"); - }); - }, - - _getRegional: function(name) { - return $.colorpicker.regional[this.options.regional][name] !== undefined ? - $.colorpicker.regional[this.options.regional][name] : $.colorpicker.regional[''][name]; - } - }); -}(jQuery)); \ No newline at end of file +/*jslint devel: true, bitwise: true, regexp: true, browser: true, confusion: true, unparam: true, eqeq: true, white: true, nomen: true, plusplus: true, maxerr: 50, indent: 4 */ +/*globals jQuery,Color,define */ + +/*! + * ColorPicker + * + * Copyright (c) 2011-2017 Martijn W. van der Lee + * Licensed under the MIT. + */ +/* Full-featured colorpicker for jQueryUI with full theming support. + * Most images from jPicker by Christopher T. Tillman. + * Sourcecode created from scratch by Martijn W. van der Lee. + */ +(function( factory ) { + if ( typeof define === 'function' && define.amd ) { + + // AMD. Register as an anonymous module. + define([ + 'jquery' + ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} (function ($) { + 'use strict'; + + var _colorpicker_index = 0, + + _container_popup = '', + _container_inlineFrame = '
', + _container_inline = '
', + + _intToHex = function (dec) { + var result = Math.round(dec).toString(16); + if (result.length === 1) { + result = ('0' + result); + } + return result.toLowerCase(); + }, + + _keycode = { + isPrint: function(keycode) { + return keycode == 32 // spacebar + || (keycode >= 48 && keycode <= 57) // number keys + || (keycode >= 65 && keycode <= 90) // letter keys + || (keycode >= 96 && keycode <= 111) // numpad keys + || (keycode >= 186 && keycode < 192) // ;=,-./` (in order) + || (keycode >= 219 && keycode < 222); // [\]' (in order) + }, + isHex: function(keycode) { + return (keycode >= 48 && keycode <= 57) // number keys + || (keycode >= 96 && keycode <= 105) // numpad keys + || (keycode >= 65 && keycode <= 70); // a-f + } + }, + + _layoutTable = function(layout, callback) { + var bitmap, + x, y, + width, height, + columns, rows, + index, + cell, + html, + w, h, + colspan, + walked; + + layout.sort(function(a, b) { + if (a.pos[1] === b.pos[1]) { + return a.pos[0] - b.pos[0]; + } + return a.pos[1] - b.pos[1]; + }); + + // Determine dimensions of the table + width = 0; + height = 0; + $.each (layout, function(index, part) { + width = Math.max(width, part.pos[0] + part.pos[2]); + height = Math.max(height, part.pos[1] + part.pos[3]); + }); + + // Initialize bitmap + bitmap = []; + for (x = 0; x < width; ++x) { + bitmap.push([]); + } + + // Mark rows and columns which have layout assigned + rows = []; + columns = []; + $.each(layout, function(index, part) { + // mark columns + for (x = 0; x < part.pos[2]; x += 1) { + columns[part.pos[0] + x] = true; + } + for (y = 0; y < part.pos[3]; y += 1) { + rows[part.pos[1] + y] = true; + } + }); + + // Generate the table + html = ''; + cell = layout[index = 0]; + for (y = 0; y < height; ++y) { + html += ''; + x = 0; + while (x < width) { + if (typeof cell !== 'undefined' && x === cell.pos[0] && y === cell.pos[1]) { + // Create a "real" cell + html += callback(cell, x, y); + + for (h = 0; h < cell.pos[3]; h +=1) { + for (w = 0; w < cell.pos[2]; w +=1) { + bitmap[x + w][y + h] = true; + } + } + + x += cell.pos[2]; + cell = layout[++index]; + } else { + // Fill in the gaps + colspan = 0; + walked = false; + + while (x < width && bitmap[x][y] === undefined && (cell === undefined || y < cell.pos[1] || (y === cell.pos[1] && x < cell.pos[0]))) { + if (columns[x] === true) { + colspan += 1; + } + walked = true; + x += 1; + } + + if (colspan > 0) { + html += ''; + } else if (!walked) { + x += 1; + } + } + } + html += ''; + } + + return '' + html + '
'; + }; + + $.colorpicker = new function() { + this.regional = { + '': { + ok: 'OK', + cancel: 'Cancel', + none: 'None', + button: 'Color', + title: 'Pick a color', + transparent: 'Transparent', + hsvH: 'H', + hsvS: 'S', + hsvV: 'V', + rgbR: 'R', + rgbG: 'G', + rgbB: 'B', + labL: 'L', + labA: 'a', + labB: 'b', + hslH: 'H', + hslS: 'S', + hslL: 'L', + cmykC: 'C', + cmykM: 'M', + cmykY: 'Y', + cmykK: 'K', + alphaA: 'A' + } + }; + + this.swatchesNames = { + 'html': 'HTML' + }; + + this.swatches = { + 'html': [ + {name: 'black', r: 0, g: 0, b: 0}, + {name: 'dimgray', r: 0.4117647058823529, g: 0.4117647058823529, b: 0.4117647058823529}, + {name: 'gray', r: 0.5019607843137255, g: 0.5019607843137255, b: 0.5019607843137255}, + {name: 'darkgray', r: 0.6627450980392157, g: 0.6627450980392157, b: 0.6627450980392157}, + {name: 'silver', r: 0.7529411764705882, g: 0.7529411764705882, b: 0.7529411764705882}, + {name: 'lightgrey', r: 0.8274509803921568, g: 0.8274509803921568, b: 0.8274509803921568}, + {name: 'gainsboro', r: 0.8627450980392157, g: 0.8627450980392157, b: 0.8627450980392157}, + {name: 'whitesmoke', r: 0.9607843137254902, g: 0.9607843137254902, b: 0.9607843137254902}, + {name: 'white', r: 1, g: 1, b: 1}, + {name: 'rosybrown', r: 0.7372549019607844, g: 0.5607843137254902, b: 0.5607843137254902}, + {name: 'indianred', r: 0.803921568627451, g: 0.3607843137254902, b: 0.3607843137254902}, + {name: 'brown', r: 0.6470588235294118, g: 0.16470588235294117, b: 0.16470588235294117}, + {name: 'firebrick', r: 0.6980392156862745, g: 0.13333333333333333, b: 0.13333333333333333}, + {name: 'lightcoral', r: 0.9411764705882353, g: 0.5019607843137255, b: 0.5019607843137255}, + {name: 'maroon', r: 0.5019607843137255, g: 0, b: 0}, + {name: 'darkred', r: 0.5450980392156862, g: 0, b: 0}, + {name: 'red', r: 1, g: 0, b: 0}, + {name: 'snow', r: 1, g: 0.9803921568627451, b: 0.9803921568627451}, + {name: 'salmon', r: 0.9803921568627451, g: 0.5019607843137255, b: 0.4470588235294118}, + {name: 'mistyrose', r: 1, g: 0.8941176470588236, b: 0.8823529411764706}, + {name: 'tomato', r: 1, g: 0.38823529411764707, b: 0.2784313725490196}, + {name: 'darksalmon', r: 0.9137254901960784, g: 0.5882352941176471, b: 0.47843137254901963}, + {name: 'orangered', r: 1, g: 0.27058823529411763, b: 0}, + {name: 'coral', r: 1, g: 0.4980392156862745, b: 0.3137254901960784}, + {name: 'lightsalmon', r: 1, g: 0.6274509803921569, b: 0.47843137254901963}, + {name: 'sienna', r: 0.6274509803921569, g: 0.3215686274509804, b: 0.17647058823529413}, + {name: 'seashell', r: 1, g: 0.9607843137254902, b: 0.9333333333333333}, + {name: 'chocolate', r: 0.8235294117647058, g: 0.4117647058823529, b: 0.11764705882352941}, + {name: 'saddlebrown', r: 0.5450980392156862, g: 0.27058823529411763, b: 0.07450980392156863}, + {name: 'sandybrown', r: 0.9568627450980393, g: 0.6431372549019608, b: 0.3764705882352941}, + {name: 'peachpuff', r: 1, g: 0.8549019607843137, b: 0.7254901960784313}, + {name: 'peru', r: 0.803921568627451, g: 0.5215686274509804, b: 0.24705882352941178}, + {name: 'linen', r: 0.9803921568627451, g: 0.9411764705882353, b: 0.9019607843137255}, + {name: 'darkorange', r: 1, g: 0.5490196078431373, b: 0}, + {name: 'bisque', r: 1, g: 0.8941176470588236, b: 0.7686274509803922}, + {name: 'burlywood', r: 0.8705882352941177, g: 0.7215686274509804, b: 0.5294117647058824}, + {name: 'tan', r: 0.8235294117647058, g: 0.7058823529411765, b: 0.5490196078431373}, + {name: 'antiquewhite', r: 0.9803921568627451, g: 0.9215686274509803, b: 0.8431372549019608}, + {name: 'navajowhite', r: 1, g: 0.8705882352941177, b: 0.6784313725490196}, + {name: 'blanchedalmond', r: 1, g: 0.9215686274509803, b: 0.803921568627451}, + {name: 'papayawhip', r: 1, g: 0.9372549019607843, b: 0.8352941176470589}, + {name: 'orange', r: 1, g: 0.6470588235294118, b: 0}, + {name: 'moccasin', r: 1, g: 0.8941176470588236, b: 0.7098039215686275}, + {name: 'wheat', r: 0.9607843137254902, g: 0.8705882352941177, b: 0.7019607843137254}, + {name: 'oldlace', r: 0.9921568627450981, g: 0.9607843137254902, b: 0.9019607843137255}, + {name: 'floralwhite', r: 1, g: 0.9803921568627451, b: 0.9411764705882353}, + {name: 'goldenrod', r: 0.8549019607843137, g: 0.6470588235294118, b: 0.12549019607843137}, + {name: 'darkgoldenrod', r: 0.7215686274509804, g: 0.5254901960784314, b: 0.043137254901960784}, + {name: 'cornsilk', r: 1, g: 0.9725490196078431, b: 0.8627450980392157}, + {name: 'gold', r: 1, g: 0.8431372549019608, b: 0}, + {name: 'palegoldenrod', r: 0.9333333333333333, g: 0.9098039215686274, b: 0.6666666666666666}, + {name: 'khaki', r: 0.9411764705882353, g: 0.9019607843137255, b: 0.5490196078431373}, + {name: 'lemonchiffon', r: 1, g: 0.9803921568627451, b: 0.803921568627451}, + {name: 'darkkhaki', r: 0.7411764705882353, g: 0.7176470588235294, b: 0.4196078431372549}, + {name: 'beige', r: 0.9607843137254902, g: 0.9607843137254902, b: 0.8627450980392157}, + {name: 'lightgoldenrodyellow', r: 0.9803921568627451, g: 0.9803921568627451, b: 0.8235294117647058}, + {name: 'olive', r: 0.5019607843137255, g: 0.5019607843137255, b: 0}, + {name: 'yellow', r: 1, g: 1, b: 0}, + {name: 'lightyellow', r: 1, g: 1, b: 0.8784313725490196}, + {name: 'ivory', r: 1, g: 1, b: 0.9411764705882353}, + {name: 'olivedrab', r: 0.4196078431372549, g: 0.5568627450980392, b: 0.13725490196078433}, + {name: 'yellowgreen', r: 0.6039215686274509, g: 0.803921568627451, b: 0.19607843137254902}, + {name: 'darkolivegreen', r: 0.3333333333333333, g: 0.4196078431372549, b: 0.1843137254901961}, + {name: 'greenyellow', r: 0.6784313725490196, g: 1, b: 0.1843137254901961}, + {name: 'lawngreen', r: 0.48627450980392156, g: 0.9882352941176471, b: 0}, + {name: 'chartreuse', r: 0.4980392156862745, g: 1, b: 0}, + {name: 'darkseagreen', r: 0.5607843137254902, g: 0.7372549019607844, b: 0.5607843137254902}, + {name: 'forestgreen', r: 0.13333333333333333, g: 0.5450980392156862, b: 0.13333333333333333}, + {name: 'limegreen', r: 0.19607843137254902, g: 0.803921568627451, b: 0.19607843137254902}, + {name: 'lightgreen', r: 0.5647058823529412, g: 0.9333333333333333, b: 0.5647058823529412}, + {name: 'palegreen', r: 0.596078431372549, g: 0.984313725490196, b: 0.596078431372549}, + {name: 'darkgreen', r: 0, g: 0.39215686274509803, b: 0}, + {name: 'green', r: 0, g: 0.5019607843137255, b: 0}, + {name: 'lime', r: 0, g: 1, b: 0}, + {name: 'honeydew', r: 0.9411764705882353, g: 1, b: 0.9411764705882353}, + {name: 'mediumseagreen', r: 0.23529411764705882, g: 0.7019607843137254, b: 0.44313725490196076}, + {name: 'seagreen', r: 0.1803921568627451, g: 0.5450980392156862, b: 0.3411764705882353}, + {name: 'springgreen', r: 0, g: 1, b: 0.4980392156862745}, + {name: 'mintcream', r: 0.9607843137254902, g: 1, b: 0.9803921568627451}, + {name: 'mediumspringgreen', r: 0, g: 0.9803921568627451, b: 0.6039215686274509}, + {name: 'mediumaquamarine', r: 0.4, g: 0.803921568627451, b: 0.6666666666666666}, + {name: 'aquamarine', r: 0.4980392156862745, g: 1, b: 0.8313725490196079}, + {name: 'turquoise', r: 0.25098039215686274, g: 0.8784313725490196, b: 0.8156862745098039}, + {name: 'lightseagreen', r: 0.12549019607843137, g: 0.6980392156862745, b: 0.6666666666666666}, + {name: 'mediumturquoise', r: 0.2823529411764706, g: 0.8196078431372549, b: 0.8}, + {name: 'darkslategray', r: 0.1843137254901961, g: 0.30980392156862746, b: 0.30980392156862746}, + {name: 'paleturquoise', r: 0.6862745098039216, g: 0.9333333333333333, b: 0.9333333333333333}, + {name: 'teal', r: 0, g: 0.5019607843137255, b: 0.5019607843137255}, + {name: 'darkcyan', r: 0, g: 0.5450980392156862, b: 0.5450980392156862}, + {name: 'darkturquoise', r: 0, g: 0.807843137254902, b: 0.8196078431372549}, + {name: 'aqua', r: 0, g: 1, b: 1}, + {name: 'cyan', r: 0, g: 1, b: 1}, + {name: 'lightcyan', r: 0.8784313725490196, g: 1, b: 1}, + {name: 'azure', r: 0.9411764705882353, g: 1, b: 1}, + {name: 'cadetblue', r: 0.37254901960784315, g: 0.6196078431372549, b: 0.6274509803921569}, + {name: 'powderblue', r: 0.6901960784313725, g: 0.8784313725490196, b: 0.9019607843137255}, + {name: 'lightblue', r: 0.6784313725490196, g: 0.8470588235294118, b: 0.9019607843137255}, + {name: 'deepskyblue', r: 0, g: 0.7490196078431373, b: 1}, + {name: 'skyblue', r: 0.5294117647058824, g: 0.807843137254902, b: 0.9215686274509803}, + {name: 'lightskyblue', r: 0.5294117647058824, g: 0.807843137254902, b: 0.9803921568627451}, + {name: 'steelblue', r: 0.27450980392156865, g: 0.5098039215686274, b: 0.7058823529411765}, + {name: 'aliceblue', r: 0.9411764705882353, g: 0.9725490196078431, b: 1}, + {name: 'dodgerblue', r: 0.11764705882352941, g: 0.5647058823529412, b: 1}, + {name: 'slategray', r: 0.4392156862745098, g: 0.5019607843137255, b: 0.5647058823529412}, + {name: 'lightslategray', r: 0.4666666666666667, g: 0.5333333333333333, b: 0.6}, + {name: 'lightsteelblue', r: 0.6901960784313725, g: 0.7686274509803922, b: 0.8705882352941177}, + {name: 'cornflowerblue', r: 0.39215686274509803, g: 0.5843137254901961, b: 0.9294117647058824}, + {name: 'royalblue', r: 0.2549019607843137, g: 0.4117647058823529, b: 0.8823529411764706}, + {name: 'midnightblue', r: 0.09803921568627451, g: 0.09803921568627451, b: 0.4392156862745098}, + {name: 'lavender', r: 0.9019607843137255, g: 0.9019607843137255, b: 0.9803921568627451}, + {name: 'navy', r: 0, g: 0, b: 0.5019607843137255}, + {name: 'darkblue', r: 0, g: 0, b: 0.5450980392156862}, + {name: 'mediumblue', r: 0, g: 0, b: 0.803921568627451}, + {name: 'blue', r: 0, g: 0, b: 1}, + {name: 'ghostwhite', r: 0.9725490196078431, g: 0.9725490196078431, b: 1}, + {name: 'darkslateblue', r: 0.2823529411764706, g: 0.23921568627450981, b: 0.5450980392156862}, + {name: 'slateblue', r: 0.41568627450980394, g: 0.35294117647058826, b: 0.803921568627451}, + {name: 'mediumslateblue', r: 0.4823529411764706, g: 0.40784313725490196, b: 0.9333333333333333}, + {name: 'mediumpurple', r: 0.5764705882352941, g: 0.4392156862745098, b: 0.8588235294117647}, + {name: 'blueviolet', r: 0.5411764705882353, g: 0.16862745098039217, b: 0.8862745098039215}, + {name: 'indigo', r: 0.29411764705882354, g: 0, b: 0.5098039215686274}, + {name: 'darkorchid', r: 0.6, g: 0.19607843137254902, b: 0.8}, + {name: 'darkviolet', r: 0.5803921568627451, g: 0, b: 0.8274509803921568}, + {name: 'mediumorchid', r: 0.7294117647058823, g: 0.3333333333333333, b: 0.8274509803921568}, + {name: 'thistle', r: 0.8470588235294118, g: 0.7490196078431373, b: 0.8470588235294118}, + {name: 'plum', r: 0.8666666666666667, g: 0.6274509803921569, b: 0.8666666666666667}, + {name: 'violet', r: 0.9333333333333333, g: 0.5098039215686274, b: 0.9333333333333333}, + {name: 'purple', r: 0.5019607843137255, g: 0, b: 0.5019607843137255}, + {name: 'darkmagenta', r: 0.5450980392156862, g: 0, b: 0.5450980392156862}, + {name: 'magenta', r: 1, g: 0, b: 1}, + {name: 'fuchsia', r: 1, g: 0, b: 1}, + {name: 'orchid', r: 0.8549019607843137, g: 0.4392156862745098, b: 0.8392156862745098}, + {name: 'mediumvioletred', r: 0.7803921568627451, g: 0.08235294117647059, b: 0.5215686274509804}, + {name: 'deeppink', r: 1, g: 0.0784313725490196, b: 0.5764705882352941}, + {name: 'hotpink', r: 1, g: 0.4117647058823529, b: 0.7058823529411765}, + {name: 'palevioletred', r: 0.8588235294117647, g: 0.4392156862745098, b: 0.5764705882352941}, + {name: 'lavenderblush', r: 1, g: 0.9411764705882353, b: 0.9607843137254902}, + {name: 'crimson', r: 0.8627450980392157, g: 0.0784313725490196, b: 0.23529411764705882}, + {name: 'pink', r: 1, g: 0.7529411764705882, b: 0.796078431372549}, + {name: 'lightpink', r: 1, g: 0.7137254901960784, b: 0.7568627450980392} + ] + }; + + this.writers = { + '#HEX': function(color, that) { + return that._formatColor('#rxgxbx', color); + } + , '#HEX3': function(color, that) { + var hex3 = $.colorpicker.writers.HEX3(color); + return hex3 === false? false : '#'+hex3; + } + , 'HEX': function(color, that) { + return that._formatColor('rxgxbx', color); + } + , 'HEX3': function(color, that) { + var rgb = color.getRGB(), + r = Math.round(rgb.r * 255), + g = Math.round(rgb.g * 255), + b = Math.round(rgb.b * 255); + + if (((r >>> 4) === (r &= 0xf)) + && ((g >>> 4) === (g &= 0xf)) + && ((b >>> 4) === (b &= 0xf))) { + return r.toString(16)+g.toString(16)+b.toString(16); + } + return false; + } + , '#HEXA': function(color, that) { + return that._formatColor('#rxgxbxax', color); + } + , '#HEXA4': function(color, that) { + var hexa4 = $.colorpicker.writers.HEXA4(color, that); + return hexa4 === false? false : '#'+hexa4; + } + , 'HEXA': function(color, that) { + return that._formatColor('rxgxbxax', color); + } + , 'HEXA4': function(color, that) { + var a = Math.round(color.getAlpha() * 255); + + if ((a >>> 4) === (a &= 0xf)) { + return $.colorpicker.writers.HEX3(color, that)+a.toString(16); + } + return false; + } + , 'RGB': function(color, that) { + return color.getAlpha() >= 1 + ? that._formatColor('rgb(rd,gd,bd)', color) + : false; + } + , 'RGBA': function(color, that) { + return that._formatColor('rgba(rd,gd,bd,af)', color); + } + , 'RGB%': function(color, that) { + return color.getAlpha() >= 1 + ? that._formatColor('rgb(rp%,gp%,bp%)', color) + : false; + } + , 'RGBA%': function(color, that) { + return that._formatColor('rgba(rp%,gp%,bp%,af)', color); + } + , 'HSL': function(color, that) { + return color.getAlpha() >= 1 + ? that._formatColor('hsl(hd,sd,vd)', color) + : false; + } + , 'HSLA': function(color, that) { + return that._formatColor('hsla(hd,sd,vd,af)', color); + } + , 'HSL%': function(color, that) { + return color.getAlpha() >= 1 + ? that._formatColor('hsl(hp%,sp%,vp%)', color) + : false; + } + , 'HSLA%': function(color, that) { + return that._formatColor('hsla(hp%,sp%,vp%,af)', color); + } + , 'NAME': function(color, that) { + return that._closestName(color); + } + , 'EXACT': function(color, that) { + return that._exactName(color); + } + }; + + this.parsers = { + '': function(color) { + if (color === '') { + return new $.colorpicker.Color(); + } + } + , 'NAME': function(color, that) { + var c = that._getSwatch($.trim(color)); + if (c) { + return new $.colorpicker.Color(c.r, c.g, c.b); + } + } + , 'RGBA': function(color) { + var m = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); + if (m) { + return new $.colorpicker.Color( + m[1] / 255, + m[2] / 255, + m[3] / 255, + parseFloat(m[4]) + ); + } + } + , 'RGBA%': function(color) { + var m = /^rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); + if (m) { + return new $.colorpicker.Color( + m[1] / 100, + m[2] / 100, + m[3] / 100, + m[4] / 100 + ); + } + } + , 'HSLA': function(color) { + var m = /^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); + if (m) { + return (new $.colorpicker.Color()).setHSL( + m[1] / 255, + m[2] / 255, + m[3] / 255).setAlpha(parseFloat(m[4])); + } + } + , 'HSLA%': function(color) { + var m = /^hsla?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(color); + if (m) { + return (new $.colorpicker.Color()).setHSL( + m[1] / 100, + m[2] / 100, + m[3] / 100).setAlpha(m[4] / 100); + } + } + , '#HEX': function(color) { + var m = /^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(m[1], 16) / 255, + parseInt(m[2], 16) / 255, + parseInt(m[3], 16) / 255 + ); + } + } + , '#HEX3': function(color) { + var m = /^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(String(m[1]) + m[1], 16) / 255, + parseInt(String(m[2]) + m[2], 16) / 255, + parseInt(String(m[3]) + m[3], 16) / 255 + ); + } + } + , 'HEX': function(color) { + var m = /^([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(m[1], 16) / 255, + parseInt(m[2], 16) / 255, + parseInt(m[3], 16) / 255 + ); + } + } + , 'HEX3': function(color) { + var m = /^([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(String(m[1]) + m[1], 16) / 255, + parseInt(String(m[2]) + m[2], 16) / 255, + parseInt(String(m[3]) + m[3], 16) / 255 + ); + } + } + , '#HEXA': function(color) { + var m = /^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(m[1], 16) / 255, + parseInt(m[2], 16) / 255, + parseInt(m[3], 16) / 255, + parseInt(m[4], 16) / 255 + ); + } + } + , '#HEXA4': function(color) { + var m = /^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(String(m[1]) + m[1], 16) / 255, + parseInt(String(m[2]) + m[2], 16) / 255, + parseInt(String(m[3]) + m[3], 16) / 255, + parseInt(String(m[4]) + m[4], 16) / 255 + ); + } + } + , 'HEXA': function(color) { + var m = /^([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(m[1], 16) / 255, + parseInt(m[2], 16) / 255, + parseInt(m[3], 16) / 255, + parseInt(m[4], 16) / 255 + ); + } + } + , 'HEXA4': function(color) { + var m = /^([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(color); + if (m) { + return new $.colorpicker.Color( + parseInt(String(m[1]) + m[1], 16) / 255, + parseInt(String(m[2]) + m[2], 16) / 255, + parseInt(String(m[3]) + m[3], 16) / 255, + parseInt(String(m[4]) + m[4], 16) / 255 + ); + } + } + }; + + this.partslists = { + 'full': ['header', 'map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'lab', 'cmyk', 'preview', 'swatches', 'footer'], + 'popup': ['map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'preview', 'footer'], + 'draggable': ['header', 'map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'preview', 'footer'], + 'inline': ['map', 'bar', 'hex', 'hsv', 'rgb', 'alpha', 'preview'] + }; + + this.limits = { + 'websafe': function(color) { + color.limit(6); + }, + 'nibble': function(color) { + color.limit(16); + }, + 'binary': function(color) { + color.limit(2); + }, + 'name': function(color, that) { + var swatch = that._getSwatch(that._closestName(color)); + color.setRGB(swatch.r, swatch.g, swatch.b); + } + }; + + this.parts = { + header: function (inst) { + var that = this, + part = null, + _html = function() { + var title = inst.options.title || inst._getRegional('title'), + html = '' + title + ''; + + if (!inst.inline && inst.options.showCloseButton) { + html += '' + + 'close'; + } + + return '
' + html + '
'; + }, + _onclick = function(event) { + event.preventDefault(); + inst.close(inst.options.revert); + }; + + this.init = function() { + part = $(_html()).prependTo(inst.dialog); + + var close = $('.ui-dialog-titlebar-close', part); + inst._hoverable(close); + inst._focusable(close); + close.on('click', _onclick); + + if (!inst.inline && inst.options.draggable) { + var draggableOptions = { + handle: part, + }; + if (inst.options.containment) { + draggableOptions.containment = inst.options.containment; + } + inst.dialog.draggable(draggableOptions); + } + }; + + this.disable = function (disable) { + $('.ui-dialog-titlebar-close', part)[disable ? 'off' : 'on']('click', _onclick); + }; + }, + + map: function (inst) { + var that = this, + part = null, + pointer, width, height, layers = {}, + _mousedown, _mouseup, _mousemove, _keydown, _html; + + _mousedown = function (event) { + if (!inst.opened) { + return; + } + + var offset = layers.p.offset(), + x = event.pageX - offset.left, + y = event.pageY - offset.top; + + if (x >= 0 && x < width && y >= 0 && y < height) { + event.stopImmediatePropagation(); + event.preventDefault(); + part.off('mousedown', _mousedown).focus(); + $(document).on('mouseup', _mouseup); + $(document).on('mousemove', _mousemove); + _mousemove(event); + } + }; + + _mouseup = function (event) { + event.stopImmediatePropagation(); + event.preventDefault(); + $(document).off('mouseup', _mouseup); + $(document).off('mousemove', _mousemove); + part.on('mousedown', _mousedown); + + inst._callback('stop'); + }; + + _mousemove = function (event) { + event.stopImmediatePropagation(); + event.preventDefault(); + + if (event.pageX === that.x && event.pageY === that.y) { + return; + } + that.x = event.pageX; + that.y = event.pageY; + + var offset = layers.p.offset(), + x = event.pageX - offset.left, + y = event.pageY - offset.top; + + x = Math.max(0, Math.min(x / width, 1)); + y = Math.max(0, Math.min(y / height, 1)); + + // interpret values + switch (inst.mode) { + case 'h': + inst.color.setHSV(null, x, 1 - y); + break; + + case 's': + case 'a': + inst.color.setHSV(x, null, 1 - y); + break; + + case 'v': + inst.color.setHSV(x, 1 - y, null); + break; + + case 'r': + inst.color.setRGB(null, 1 - y, x); + break; + + case 'g': + inst.color.setRGB(1 - y, null, x); + break; + + case 'b': + inst.color.setRGB(x, 1 - y, null); + break; + } + + inst._change(false); + }; + + _keydown = function(event) { + var x_channel_map = { + 'h': 's', + 's': 'h', + 'v': 'h', + 'r': 'b', + 'g': 'b', + 'b': 'r', + 'a': 'h' + }, + x_change = { + 37: -1, + 39: 1, + }, + y_channel_map = { + 'h': 'v', + 's': 'v', + 'v': 's', + 'r': 'g', + 'g': 'r', + 'b': 'g', + 'a': 'v' + }, + y_change = { + 38: 1, + 40: -1 + }, + set = { + 35: 0, + 36: 1 + }, + change, value; + + if (typeof x_change[event.which] !== 'undefined') { + value = inst.color.getChannel(x_channel_map[inst.mode]) * width; + change = x_change[event.which]; + if (event.shiftKey) { + change *= 10; + } else if (event.ctrlKey || event.metaKey) { + change *= width; + } + inst.color.setChannel(x_channel_map[inst.mode], (value + change) / width); + inst._change(false); + } else if (typeof y_change[event.which] !== 'undefined') { + value = inst.color.getChannel(y_channel_map[inst.mode]) * height; + change = y_change[event.which]; + if (event.shiftKey) { + change *= 10; + } else if (event.ctrlKey || event.metaKey) { + change *= height; + } + inst.color.setChannel(y_channel_map[inst.mode], (value + change) / height); + inst._change(false); + } else if (typeof set[event.which] !== 'undefined') { + inst.color.setChannel(x_channel_map[inst.mode], 1 - set[event.which]); + inst.color.setChannel(y_channel_map[inst.mode], set[event.which]); + inst._change(false); + } + }; + + _html = function () { + var html = '
' + + ' ' + + ' ' + + (inst.options.alpha ? ' ' : '') + + '
'; + return html; + }; + + this.init = function () { + part = $(_html()).appendTo($('.ui-colorpicker-map-container', inst.dialog)); + + part.on('mousedown', _mousedown); + part.on('keydown', _keydown); + + // cache + layers[1] = $('.ui-colorpicker-map-layer-1', part); + layers[2] = $('.ui-colorpicker-map-layer-2', part); + layers.a = $('.ui-colorpicker-map-layer-alpha', part); + layers.p = $('.ui-colorpicker-map-layer-pointer', part); + width = layers.p.width(); + height = layers.p.height(); + + pointer = $('.ui-colorpicker-map-pointer', part); + }; + + this.update = function () { + var step = ((inst.options.part.map.size || 256) * 65 / 64); + + switch (inst.mode) { + case 'h': + layers[1].css({'background-position': '0 0', 'opacity': ''}).show(); + layers[2].hide(); + break; + + case 's': + case 'a': + layers[1].css({'background-position': '0 ' + (-step) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 2) + 'px', 'opacity': ''}).show(); + break; + + case 'v': + part.css('background-color', 'black'); + layers[1].css({'background-position': '0 ' + (-step * 3) + 'px', 'opacity': ''}).show(); + layers[2].hide(); + break; + + case 'r': + layers[1].css({'background-position': '0 ' + (-step * 4) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 5) + 'px', 'opacity': ''}).show(); + break; + + case 'g': + layers[1].css({'background-position': '0 ' + (-step * 6) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 7) + 'px', 'opacity': ''}).show(); + break; + + case 'b': + layers[1].css({'background-position': '0 ' + (-step * 8) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 9) + 'px', 'opacity': ''}).show(); + break; + } + + that.repaint(); + }; + + this.repaint = function () { + var x = 0, + y = 0; + + switch (inst.mode) { + case 'h': + var hsv = inst.color.getHSV(); + x = hsv.s * width; + y = (1 - hsv.v) * width; + part.css('background-color', inst.color.copy().setHSV(null, 1, 1).toCSS()); + break; + + case 's': + case 'a': + var hsv = inst.color.getHSV(); + x = hsv.h * width; + y = (1 - hsv.v) * width; + layers[2].css('opacity', 1 - hsv.s); + break; + + case 'v': + var hsv = inst.color.getHSV(); + x = hsv.h * width; + y = (1 - hsv.s) * width; + layers[1].css('opacity', hsv.v); + break; + + case 'r': + var rgb = inst.color.getRGB(); + x = rgb.b * width; + y = (1 - rgb.g) * width; + layers[2].css('opacity', rgb.r); + break; + + case 'g': + var rgb = inst.color.getRGB(); + x = rgb.b * width; + y = (1 - rgb.r) * width; + layers[2].css('opacity', rgb.g); + break; + + case 'b': + var rgb = inst.color.getRGB(); + x = rgb.r * width; + y = (1 - rgb.g) * width; + layers[2].css('opacity', rgb.b); + break; + } + + if (inst.options.alpha) { + layers.a.css('opacity', 1 - inst.color.getAlpha()); + } + + pointer.css({ + 'left': x - 7, + 'top': y - 7 + }); + }; + + this.disable = function (disable) { + part[disable ? 'off' : 'on']('mousedown', _mousedown); + part[disable ? 'off' : 'on']('keydown', _keydown); + }; + }, + + bar: function (inst) { + var that = this, + part = null, + pointer, width, height, layers = {}, + _mousedown, _mouseup, _mousemove, _keydown, _html; + + _mousedown = function (event) { + if (!inst.opened) { + return; + } + + var offset = layers.p.offset(), + x = event.pageX - offset.left, + y = event.pageY - offset.top; + + if (x >= 0 && x < width && y >= 0 && y < height) { + event.stopImmediatePropagation(); + event.preventDefault(); + part.off('mousedown', _mousedown).focus(); + $(document).on('mouseup', _mouseup); + $(document).on('mousemove', _mousemove); + _mousemove(event); + } + }; + + _mouseup = function (event) { + event.stopImmediatePropagation(); + event.preventDefault(); + $(document).off('mouseup', _mouseup); + $(document).off('mousemove', _mousemove); + part.on('mousedown', _mousedown); + + inst._callback('stop'); + }; + + _mousemove = function (event) { + event.stopImmediatePropagation(); + event.preventDefault(); + + if (event.pageY === that.y) { + return; + } + that.y = event.pageY; + + var offset = layers.p.offset(), + y = event.pageY - offset.top; + + y = Math.max(0, Math.min(y / height, 1)); + + // interpret values + switch (inst.mode) { + case 'h': + inst.color.setHSV(1 - y, null, null); + break; + + case 's': + inst.color.setHSV(null, 1 - y, null); + break; + + case 'v': + inst.color.setHSV(null, null, 1 - y); + break; + + case 'r': + inst.color.setRGB(1 - y, null, null); + break; + + case 'g': + inst.color.setRGB(null, 1 - y, null); + break; + + case 'b': + inst.color.setRGB(null, null, 1 - y); + break; + + case 'a': + inst.color.setAlpha(1 - y); + break; + } + + inst._change(false); + }; + + _keydown = function(event) { + var change = { + 38: 1, + 40: -1, + 33: 10, + 34: -10 + }, + set = { + 35: 0, + 36: 1 + }, + change, value; + + if (typeof change[event.which] !== 'undefined') { + value = inst.color.getChannel(inst.mode) * height; + change = change[event.which]; + if (event.shiftKey) { + change *= 10; + } else if (event.ctrlKey || event.metaKey) { + change *= height; + } + inst.color.setChannel(inst.mode, (value + change) / height); + inst._change(false); + } else if (typeof set[event.which] !== 'undefined') { + inst.color.setChannel(inst.mode, set[event.which]); + inst._change(false); + } + }; + + _html = function () { + var html = '
' + + ' ' + + ' ' + + ' ' + + ' '; + + if (inst.options.alpha) { + html += ' ' + + ' '; + } + + html += '
'; + + return html; + }; + + this.init = function () { + part = $(_html()).appendTo($('.ui-colorpicker-bar-container', inst.dialog)); + + part.on('mousedown', _mousedown); + part.on('keydown', _keydown); + + // cache + layers[1] = $('.ui-colorpicker-bar-layer-1', part); + layers[2] = $('.ui-colorpicker-bar-layer-2', part); + layers[3] = $('.ui-colorpicker-bar-layer-3', part); + layers[4] = $('.ui-colorpicker-bar-layer-4', part); + layers.a = $('.ui-colorpicker-bar-layer-alpha', part); + layers.ab = $('.ui-colorpicker-bar-layer-alphabar', part); + layers.p = $('.ui-colorpicker-bar-layer-pointer', part); + width = layers.p.width(); + height = layers.p.height(); + + pointer = $('.ui-colorpicker-bar-pointer', part); + }; + + this.update = function () { + var step = ((inst.options.part.bar.size || 256) * 65 / 64); + + switch (inst.mode) { + case 'h': + case 's': + case 'v': + case 'r': + case 'g': + case 'b': + layers.a.show(); + layers.ab.hide(); + break; + + case 'a': + layers.a.hide(); + layers.ab.show(); + break; + } + + switch (inst.mode) { + case 'h': + layers[1].css({'background-position': '0 0', 'opacity': ''}).show(); + layers[2].hide(); + layers[3].hide(); + layers[4].hide(); + break; + + case 's': + layers[1].css({'background-position': '0 ' + (-step) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 2) + 'px', 'opacity': ''}).show(); + layers[3].hide(); + layers[4].hide(); + break; + + case 'v': + layers[1].css({'background-position': '0 ' + (-step * 2) + 'px', 'opacity': ''}).show(); + layers[2].hide(); + layers[3].hide(); + layers[4].hide(); + break; + + case 'r': + layers[1].css({'background-position': '0 ' + (-step * 6) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 5) + 'px', 'opacity': ''}).show(); + layers[3].css({'background-position': '0 ' + (-step * 3) + 'px', 'opacity': ''}).show(); + layers[4].css({'background-position': '0 ' + (-step * 4) + 'px', 'opacity': ''}).show(); + break; + + case 'g': + layers[1].css({'background-position': '0 ' + (-step * 10) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 9) + 'px', 'opacity': ''}).show(); + layers[3].css({'background-position': '0 ' + (-step * 7) + 'px', 'opacity': ''}).show(); + layers[4].css({'background-position': '0 ' + (-step * 8) + 'px', 'opacity': ''}).show(); + break; + + case 'b': + layers[1].css({'background-position': '0 ' + (-step * 14) + 'px', 'opacity': ''}).show(); + layers[2].css({'background-position': '0 ' + (-step * 13) + 'px', 'opacity': ''}).show(); + layers[3].css({'background-position': '0 ' + (-step * 11) + 'px', 'opacity': ''}).show(); + layers[4].css({'background-position': '0 ' + (-step * 12) + 'px', 'opacity': ''}).show(); + break; + + case 'a': + layers[1].hide(); + layers[2].hide(); + layers[3].hide(); + layers[4].hide(); + break; + } + + that.repaint(); + }; + + this.repaint = function () { + var y = 0; + + switch (inst.mode) { + case 'h': + y = (1 - inst.color.getHSV().h) * height; + break; + + case 's': + var hsv = inst.color.getHSV(); + y = (1 - hsv.s) * height; + layers[2].css('opacity', 1 - hsv.v); + part.css('background-color', inst.color.copy().setHSV(null, 1, null).toCSS()); + break; + + case 'v': + y = (1 - inst.color.getHSV().v) * height; + part.css('background-color', inst.color.copy().setHSV(null, null, 1).toCSS()); + break; + + case 'r': + var rgb = inst.color.getRGB(); + y = (1 - rgb.r) * height; + layers[2].css('opacity', Math.max(0, (rgb.b - rgb.g))); + layers[3].css('opacity', Math.max(0, (rgb.g - rgb.b))); + layers[4].css('opacity', Math.min(rgb.b, rgb.g)); + break; + + case 'g': + var rgb = inst.color.getRGB(); + y = (1 - rgb.g) * height; + layers[2].css('opacity', Math.max(0, (rgb.b - rgb.r))); + layers[3].css('opacity', Math.max(0, (rgb.r - rgb.b))); + layers[4].css('opacity', Math.min(rgb.r, rgb.b)); + break; + + case 'b': + var rgb = inst.color.getRGB(); + y = (1 - rgb.b) * height; + layers[2].css('opacity', Math.max(0, (rgb.r - rgb.g))); + layers[3].css('opacity', Math.max(0, (rgb.g - rgb.r))); + layers[4].css('opacity', Math.min(rgb.r, rgb.g)); + break; + + case 'a': + y = (1 - inst.color.getAlpha()) * height; + part.css('background-color', inst.color.copy().toCSS()); + break; + } + + if (inst.mode !== 'a') { + layers.a.css('opacity', 1 - inst.color.getAlpha()); + } + + pointer.css('top', y - 3); + }; + + this.disable = function (disable) { + part[disable ? 'off' : 'on']('mousedown', _mousedown); + part[disable ? 'off' : 'on']('keydown', _keydown); + }; + }, + + preview: function (inst) { + var that = this, + part = null, + both, + initial, initial_alpha, + current, current_alpha, + _html, + onclick = function () { + inst.color = inst.currentColor.copy(); + inst._change(); + }; + + _html = function () { + return '
' + + '
' + + '
' + + '
'; + }; + + this.init = function () { + part = $(_html()).appendTo($('.ui-colorpicker-preview-container', inst.dialog)); + + $('.ui-colorpicker-preview-initial', part).on('click', onclick); + + // cache + initial = $('.ui-colorpicker-preview-initial', part); + initial_alpha = $('.ui-colorpicker-preview-initial-alpha', part); + current = $('.ui-colorpicker-preview-current', part); + current_alpha = $('.ui-colorpicker-preview-current-alpha', part); + both = $('.ui-colorpicker-preview-initial-alpha, .ui-colorpicker-preview-current-alpha', part); + }; + + this.update = function () { + both[inst.options.alpha ? 'show' : 'hide'](); + + this.repaint(); + }; + + this.repaint = function () { + initial.css('background-color', inst.currentColor.set ? inst.currentColor.toCSS() : '').attr('title', inst.currentColor.set ? inst.currentColor.toCSS() : ''); + initial_alpha.css('opacity', 1 - inst.currentColor.getAlpha()); + current.css('background-color', inst.color.set ? inst.color.toCSS() : '').attr('title', inst.color.set ? inst.color.toCSS() : ''); + current_alpha.css('opacity', 1 - inst.color.getAlpha()); + }; + + this.disable = function (disable) { + $('.ui-colorpicker-preview-initial', part)[disable ? 'off' : 'on']('click', onclick); + }; + }, + + hsv: function (inst) { + var that = this, + part = null, + inputs = {}, + _html; + + _html = function () { + var html = ''; + + if (inst.options.hsv) { + html += '
°
' + + '
%
' + + '
%
'; + } + + return '
' + html + '
'; + }; + + this.init = function () { + part = $(_html()).appendTo($('.ui-colorpicker-hsv-container', inst.dialog)); + + $('.ui-colorpicker-mode', part).click(function () { + inst.mode = $(this).val(); + inst._updateAllParts(); + }); + + inputs.h = $('.ui-colorpicker-hsv-h .ui-colorpicker-number', part); + inputs.s = $('.ui-colorpicker-hsv-s .ui-colorpicker-number', part); + inputs.v = $('.ui-colorpicker-hsv-v .ui-colorpicker-number', part); + + $('.ui-colorpicker-number', part).on('input change keyup', function () { + inst.color.setHSV( + inputs.h.val() / 360, + inputs.s.val() / 100, + inputs.v.val() / 100 + ); + inst._change(); + }); + }; + + this.repaint = function () { + var hsv = inst.color.getHSV(); + inputs.h.val(Math.round(hsv.h * 360)); + inputs.s.val(Math.round(hsv.s * 100)); + inputs.v.val(Math.round(hsv.v * 100)); + }; + + this.update = function () { + $('.ui-colorpicker-mode', part).each(function () { + var $this = $(this); + $this.prop('checked', $this.val() === inst.mode); + }); + this.repaint(); + }; + + this.disable = function (disable) { + $(':input', part).prop('disabled', disable); + }; + }, + + rgb: function (inst) { + var that = this, + part = null, + inputs = {}, + _html; + + _html = function () { + var html = ''; + + if (inst.options.rgb) { + html += '
' + + '
' + + '
'; + } + + return '
' + html + '
'; + }; + + this.init = function () { + part = $(_html()).appendTo($('.ui-colorpicker-rgb-container', inst.dialog)); + + $('.ui-colorpicker-mode', part).click(function () { + inst.mode = $(this).val(); + inst._updateAllParts(); + }); + + inputs.r = $('.ui-colorpicker-rgb-r .ui-colorpicker-number', part); + inputs.g = $('.ui-colorpicker-rgb-g .ui-colorpicker-number', part); + inputs.b = $('.ui-colorpicker-rgb-b .ui-colorpicker-number', part); + + $('.ui-colorpicker-number', part).on('input change keyup', function () { + var r = $('.ui-colorpicker-rgb-r .ui-colorpicker-number', part).val(); + inst.color.setRGB( + inputs.r.val() / 255, + inputs.g.val() / 255, + inputs.b.val() / 255 + ); + + inst._change(); + }); + }; + + this.repaint = function () { + var rgb = inst.color.getRGB(); + inputs.r.val(Math.round(rgb.r * 255)); + inputs.g.val(Math.round(rgb.g * 255)); + inputs.b.val(Math.round(rgb.b * 255)); + }; + + this.update = function () { + $('.ui-colorpicker-mode', part).each(function () { + var $this = $(this); + $this.prop('checked', $this.val() === inst.mode); + }); + this.repaint(); + }; + + this.disable = function (disable) { + $(':input', part).prop('disabled', disable); + }; + }, + + lab: function (inst) { + var that = this, + part = null, + inputs = {}, + html = function () { + var html = ''; + + if (inst.options.hsv) { + html += '
' + + '
' + + '
'; + } + + return '
' + html + '
'; + }; + + this.init = function () { + var data = 0; + + part = $(html()).appendTo($('.ui-colorpicker-lab-container', inst.dialog)); + + inputs.l = $('.ui-colorpicker-lab-l .ui-colorpicker-number', part); + inputs.a = $('.ui-colorpicker-lab-a .ui-colorpicker-number', part); + inputs.b = $('.ui-colorpicker-lab-b .ui-colorpicker-number', part); + + $('.ui-colorpicker-number', part).on('input change keyup', function (event) { + inst.color.setLAB( + parseInt(inputs.l.val(), 10) / 100, + (parseInt(inputs.a.val(), 10) + 128) / 255, + (parseInt(inputs.b.val(), 10) + 128) / 255 + ); + inst._change(); + }); + }; + + this.repaint = function () { + var lab = inst.color.getLAB(); + inputs.l.val(Math.round(lab.l * 100)); + inputs.a.val(Math.round(lab.a * 255) - 128); + inputs.b.val(Math.round(lab.b * 255) - 128); + }; + + this.update = this.repaint; + + this.disable = function (disable) { + $(':input', part).prop('disabled', disable); + }; + }, + + cmyk: function (inst) { + var that = this, + part = null, + inputs = {}, + html = function () { + var html = ''; + + if (inst.options.hsv) { + html += '
%
' + + '
%
' + + '
%
' + + '
%
'; + } + + return '
' + html + '
'; + }; + + this.init = function () { + part = $(html()).appendTo($('.ui-colorpicker-cmyk-container', inst.dialog)); + + inputs.c = $('.ui-colorpicker-cmyk-c .ui-colorpicker-number', part); + inputs.m = $('.ui-colorpicker-cmyk-m .ui-colorpicker-number', part); + inputs.y = $('.ui-colorpicker-cmyk-y .ui-colorpicker-number', part); + inputs.k = $('.ui-colorpicker-cmyk-k .ui-colorpicker-number', part); + + $('.ui-colorpicker-number', part).on('input change keyup', function (event) { + inst.color.setCMYK( + parseInt(inputs.c.val(), 10) / 100, + parseInt(inputs.m.val(), 10) / 100, + parseInt(inputs.y.val(), 10) / 100, + parseInt(inputs.k.val(), 10) / 100 + ); + inst._change(); + }); + }; + + this.repaint = function () { + var cmyk = inst.color.getCMYK(); + inputs.c.val(Math.round(cmyk.c * 100)); + inputs.m.val(Math.round(cmyk.m * 100)); + inputs.y.val(Math.round(cmyk.y * 100)); + inputs.k.val(Math.round(cmyk.k * 100)); + }; + + this.update = this.repaint; + + this.disable = function (disable) { + $(':input', part).prop('disabled', disable); + }; + }, + + alpha: function (inst) { + var that = this, + part = null, + input, + html = function () { + var html = ''; + + if (inst.options.alpha) { + html += '
%
'; + } + + return '
' + html + '
'; + }; + + this.init = function () { + part = $(html()).appendTo($('.ui-colorpicker-alpha-container', inst.dialog)); + + $('.ui-colorpicker-mode', part).click(function () { + inst.mode = $(this).val(); + inst._updateAllParts(); + }); + + input = $('.ui-colorpicker-a .ui-colorpicker-number', part); + + $('.ui-colorpicker-number', part).on('input change keyup', function () { + inst.color.setAlpha(input.val() / 100); + inst._change(); + }); + }; + + this.update = function () { + $('.ui-colorpicker-mode', part).each(function () { + $(this).prop('checked', $(this).val() === inst.mode); + }); + this.repaint(); + }; + + this.repaint = function () { + input.val(Math.round(inst.color.getAlpha() * 100)); + }; + + this.disable = function (disable) { + $(':input', part).prop('disabled', disable); + }; + }, + + hex: function (inst) { + var that = this, + part = null, + inputs = {}, + parseHex = function(color) { + var c, + m; + + // {#}rgb + m = /^#?([a-fA-F0-9]{1,3})$/.exec(color); + if (m) { + c = parseInt(m[1], 16); + return new $.colorpicker.Color( + ((c >> 8) & 0xF) / 15, + ((c >> 4) & 0xF) / 15, + (c & 0xF) / 15 + ); + } + + // {#}rrggbb + m = /^#?([a-fA-F0-9]{1,6})$/.exec(color); + if (m) { + c = parseInt(m[1], 16); + return new $.colorpicker.Color( + ((c >> 16) & 0xFF) / 255, + ((c >> 8) & 0xFF) / 255, + (c & 0xFF) / 255 + ); + } + + return new $.colorpicker.Color(); + }, + html = function () { + var html = ''; + + if (inst.options.alpha) { + html += ''; + } + + html += ''; + + return '
' + html + '
'; + }; + + this.init = function () { + part = $(html()).appendTo($('.ui-colorpicker-hex-container', inst.dialog)); + + inputs.color = $('.ui-colorpicker-hex-input', part); + inputs.alpha = $('.ui-colorpicker-hex-alpha', part); + + inputs.color.on('keydown keyup', function(e) { + return e.ctrlKey || e.metaKey || _keycode.isHex(e.which) || !_keycode.isPrint(e.which); + }); + + // repeat here makes the invalid input disappear faster + inputs.color.on('change', function () { + if (/[^a-fA-F0-9]/.test(inputs.color.val())) { + inputs.color.val(inputs.color.val().replace(/[^a-fA-F0-9]/g, '')); + } + }); + + inputs.color.on('change keyup', function () { + // repeat here makes sure that the invalid input doesn't get parsed + inst.color = parseHex(inputs.color.val()).setAlpha(inst.color.getAlpha()); + inst._change(); + }); + + inputs.alpha.on('keydown keyup', function(e) { + return e.ctrlKey || e.metaKey || _keycode.isHex(e.which) || !_keycode.isPrint(e.which); + }); + + inputs.alpha.on('change', function () { + if (/[^a-fA-F0-9]/.test(inputs.alpha)) { + inputs.alpha.val(inputs.alpha.val().replace(/[^a-fA-F0-9]/g, '')); + } + }); + + inputs.alpha.on('change keyup', function () { + inst.color.setAlpha(parseInt(inputs.alpha.val(), 16) / 255); + inst._change(); + }); + }; + + this.repaint = function () { + if (!inputs.color.is(':focus')) { + inputs.color.val(inst.color.toHex(true)); + } + + if (!inputs.alpha.is(':focus')) { + inputs.alpha.val(_intToHex(inst.color.getAlpha() * 255)); + } + }; + + this.update = this.repaint; + + this.disable = function (disable) { + $(':input', part).prop('disabled', disable); + }; + }, + + swatches: function (inst) { + var that = this, + part = null, + html = function () { + var html = ''; + + inst._eachSwatch(function (name, color) { + var c = new $.colorpicker.Color(color.r, color.g, color.b), + css = c.toCSS(); + html += '
'; + }); + + return '
' + html + '
'; + }, + onclick = function () { + inst.color = inst._parseColor($(this).css('background-color')) || new $.colorpicker.Color(); + inst._change(); + }; + + this.init = function () { + part = $(html()); + $('.ui-colorpicker-swatches-container', inst.dialog).html(part); + $('.ui-colorpicker-swatch', part).on('click', onclick); + }; + + this.disable = function (disable) { + $('.ui-colorpicker-swatch', part)[disable ? 'off' : 'on']('click', onclick); + }; + }, + + footer: function (inst) { + var that = this, + part = null, + id_transparent = 'ui-colorpicker-special-transparent-' + inst.colorpicker_index, + id_none = 'ui-colorpicker-special-none-' + inst.colorpicker_index, + html = function () { + var html = ''; + + if (inst.options.alpha || (!inst.inline && inst.options.showNoneButton)) { + html += '
'; + + if (inst.options.alpha) { + html += ''; + } + if (!inst.inline && inst.options.showNoneButton) { + html += ''; + } + html += '
'; + } + + if (!inst.inline) { + html += '
'; + if (inst.options.showCancelButton) { + html += ''; + } + html += ''; + html += '
'; + } + + return '
' + html + '
'; + }; + + this.init = function () { + part = $(html()).appendTo(inst.dialog); + + $('.ui-colorpicker-ok', part).button().click(function () { + inst.close(); + }); + + $('.ui-colorpicker-cancel', part).button().click(function () { + inst.close(true); //cancel + }); + + $('.ui-colorpicker-buttonset', part)[$.fn.controlgroup ? 'controlgroup' : 'buttonset'](); + + $('.ui-colorpicker-special-color', part).click(function () { + inst._change(); + }); + + $('#'+id_none, part).click(function () { + inst.color.set = false; + inst._change(); + }); + + $('#'+id_transparent, part).click(function () { + inst.color.setAlpha(0); + inst._change(); + }); + }; + + this.repaint = function () { + $('.ui-colorpicker-special-none', part).prop('checked', !inst.color.set).button('refresh'); + $('.ui-colorpicker-special-transparent', part).prop('checked', inst.color.set && inst.color.getAlpha() === 0).button('refresh'); + $('.ui-colorpicker-ok', part).button(inst.changed ? 'enable' : 'disable'); + }; + + this.update = function () {}; + + this.disable = function (disabled) { + $(':input, :button', part).button(disabled ? 'disable' : 'enable'); + if (!disabled) { + $('.ui-colorpicker-ok', part).button(inst.changed ? 'enable' : 'disable'); + } + }; + } + }; + + this.Color = function () { + var spaces = { rgb: {r: 0, g: 0, b: 0}, + hsv: {h: 0, s: 0, v: 0}, + hsl: {h: 0, s: 0, l: 0}, + lab: {l: 0, a: 0, b: 0}, + cmyk: {c: 0, m: 0, y: 0, k: 1} + }, + a = 1, + illuminant = [0.9504285, 1, 1.0889], // CIE-L*ab D65/2' 1931 + args = arguments, + _clip = function(v) { + if (isNaN(v) || v === null) { + return 0; + } + if (typeof v == 'string') { + v = parseInt(v, 10); + } + return Math.max(0, Math.min(v, 1)); + }, + _hexify = function (number) { + var number = Math.round(number), + digits = '0123456789abcdef', + lsd = number % 16, + msd = (number - lsd) / 16, + hexified = digits.charAt(msd) + digits.charAt(lsd); + return hexified; + }, + _rgb_to_xyz = function(rgb) { + var r = (rgb.r > 0.04045) ? Math.pow((rgb.r + 0.055) / 1.055, 2.4) : rgb.r / 12.92, + g = (rgb.g > 0.04045) ? Math.pow((rgb.g + 0.055) / 1.055, 2.4) : rgb.g / 12.92, + b = (rgb.b > 0.04045) ? Math.pow((rgb.b + 0.055) / 1.055, 2.4) : rgb.b / 12.92; + + return { + x: r * 0.4124 + g * 0.3576 + b * 0.1805, + y: r * 0.2126 + g * 0.7152 + b * 0.0722, + z: r * 0.0193 + g * 0.1192 + b * 0.9505 + }; + }, + _xyz_to_rgb = function(xyz) { + var rgb = { + r: xyz.x * 3.2406 + xyz.y * -1.5372 + xyz.z * -0.4986, + g: xyz.x * -0.9689 + xyz.y * 1.8758 + xyz.z * 0.0415, + b: xyz.x * 0.0557 + xyz.y * -0.2040 + xyz.z * 1.0570 + }; + + rgb.r = (rgb.r > 0.0031308) ? 1.055 * Math.pow(rgb.r, (1 / 2.4)) - 0.055 : 12.92 * rgb.r; + rgb.g = (rgb.g > 0.0031308) ? 1.055 * Math.pow(rgb.g, (1 / 2.4)) - 0.055 : 12.92 * rgb.g; + rgb.b = (rgb.b > 0.0031308) ? 1.055 * Math.pow(rgb.b, (1 / 2.4)) - 0.055 : 12.92 * rgb.b; + + return rgb; + }, + _rgb_to_hsv = function(rgb) { + var minVal = Math.min(rgb.r, rgb.g, rgb.b), + maxVal = Math.max(rgb.r, rgb.g, rgb.b), + delta = maxVal - minVal, + del_R, del_G, del_B, + hsv = { + h: 0, + s: 0, + v: maxVal + }; + + if (delta === 0) { + hsv.h = 0; + hsv.s = 0; + } else { + hsv.s = delta / maxVal; + + del_R = (((maxVal - rgb.r) / 6) + (delta / 2)) / delta; + del_G = (((maxVal - rgb.g) / 6) + (delta / 2)) / delta; + del_B = (((maxVal - rgb.b) / 6) + (delta / 2)) / delta; + + if (rgb.r === maxVal) { + hsv.h = del_B - del_G; + } else if (rgb.g === maxVal) { + hsv.h = (1 / 3) + del_R - del_B; + } else if (rgb.b === maxVal) { + hsv.h = (2 / 3) + del_G - del_R; + } + + if (hsv.h < 0) { + hsv.h += 1; + } else if (hsv.h > 1) { + hsv.h -= 1; + } + } + + return hsv; + }, + _hsv_to_rgb = function(hsv) { + var rgb = { + r: 0, + g: 0, + b: 0 + }, + var_h, + var_i, + var_1, + var_2, + var_3; + + if (hsv.s === 0) { + rgb.r = rgb.g = rgb.b = hsv.v; + } else { + var_h = hsv.h === 1 ? 0 : hsv.h * 6; + var_i = Math.floor(var_h); + var_1 = hsv.v * (1 - hsv.s); + var_2 = hsv.v * (1 - hsv.s * (var_h - var_i)); + var_3 = hsv.v * (1 - hsv.s * (1 - (var_h - var_i))); + + if (var_i === 0) { + rgb.r = hsv.v; + rgb.g = var_3; + rgb.b = var_1; + } else if (var_i === 1) { + rgb.r = var_2; + rgb.g = hsv.v; + rgb.b = var_1; + } else if (var_i === 2) { + rgb.r = var_1; + rgb.g = hsv.v; + rgb.b = var_3; + } else if (var_i === 3) { + rgb.r = var_1; + rgb.g = var_2; + rgb.b = hsv.v; + } else if (var_i === 4) { + rgb.r = var_3; + rgb.g = var_1; + rgb.b = hsv.v; + } else { + rgb.r = hsv.v; + rgb.g = var_1; + rgb.b = var_2; + } + } + + return rgb; + }, + _rgb_to_hsl = function(rgb) { + var minVal = Math.min(rgb.r, rgb.g, rgb.b), + maxVal = Math.max(rgb.r, rgb.g, rgb.b), + delta = maxVal - minVal, + del_R, del_G, del_B, + hsl = { + h: 0, + s: 0, + l: (maxVal + minVal) / 2 + }; + + if (delta === 0) { + hsl.h = 0; + hsl.s = 0; + } else { + hsl.s = hsl.l < 0.5 ? delta / (maxVal + minVal) : delta / (2 - maxVal - minVal); + + del_R = (((maxVal - rgb.r) / 6) + (delta / 2)) / delta; + del_G = (((maxVal - rgb.g) / 6) + (delta / 2)) / delta; + del_B = (((maxVal - rgb.b) / 6) + (delta / 2)) / delta; + + if (rgb.r === maxVal) { + hsl.h = del_B - del_G; + } else if (rgb.g === maxVal) { + hsl.h = (1 / 3) + del_R - del_B; + } else if (rgb.b === maxVal) { + hsl.h = (2 / 3) + del_G - del_R; + } + + if (hsl.h < 0) { + hsl.h += 1; + } else if (hsl.h > 1) { + hsl.h -= 1; + } + } + + return hsl; + }, + _hsl_to_rgb = function(hsl) { + var var_1, + var_2, + hue_to_rgb = function(v1, v2, vH) { + if (vH < 0) { + vH += 1; + } + if (vH > 1) { + vH -= 1; + } + if ((6 * vH) < 1) { + return v1 + (v2 - v1) * 6 * vH; + } + if ((2 * vH) < 1) { + return v2; + } + if ((3 * vH) < 2) { + return v1 + (v2 - v1) * ((2 / 3) - vH) * 6; + } + return v1; + }; + + if (hsl.s === 0) { + return { + r: hsl.l, + g: hsl.l, + b: hsl.l + }; + } + + var_2 = (hsl.l < 0.5) ? hsl.l * (1 + hsl.s) : (hsl.l + hsl.s) - (hsl.s * hsl.l); + var_1 = 2 * hsl.l - var_2; + + return { + r: hue_to_rgb(var_1, var_2, hsl.h + (1 / 3)), + g: hue_to_rgb(var_1, var_2, hsl.h), + b: hue_to_rgb(var_1, var_2, hsl.h - (1 / 3)) + }; + }, + _xyz_to_lab = function(xyz) { + var x = xyz.x / illuminant[0], + y = xyz.y / illuminant[1], + z = xyz.z / illuminant[2]; + + x = (x > 0.008856) ? Math.pow(x, (1/3)) : (7.787 * x) + (16/116); + y = (y > 0.008856) ? Math.pow(y, (1/3)) : (7.787 * y) + (16/116); + z = (z > 0.008856) ? Math.pow(z, (1/3)) : (7.787 * z) + (16/116); + + return { + l: ((116 * y) - 16) / 100, // [0,100] + a: ((500 * (x - y)) + 128) / 255, // [-128,127] + b: ((200 * (y - z)) + 128) / 255 // [-128,127] + }; + }, + _lab_to_xyz = function(lab) { + var lab2 = { + l: lab.l * 100, + a: (lab.a * 255) - 128, + b: (lab.b * 255) - 128 + }, + xyz = { + x: 0, + y: (lab2.l + 16) / 116, + z: 0 + }; + + xyz.x = lab2.a / 500 + xyz.y; + xyz.z = xyz.y - lab2.b / 200; + + xyz.x = (Math.pow(xyz.x, 3) > 0.008856) ? Math.pow(xyz.x, 3) : (xyz.x - 16 / 116) / 7.787; + xyz.y = (Math.pow(xyz.y, 3) > 0.008856) ? Math.pow(xyz.y, 3) : (xyz.y - 16 / 116) / 7.787; + xyz.z = (Math.pow(xyz.z, 3) > 0.008856) ? Math.pow(xyz.z, 3) : (xyz.z - 16 / 116) / 7.787; + + xyz.x *= illuminant[0]; + xyz.y *= illuminant[1]; + xyz.z *= illuminant[2]; + + return xyz; + }, + _rgb_to_cmy = function(rgb) { + return { + c: 1 - (rgb.r), + m: 1 - (rgb.g), + y: 1 - (rgb.b) + }; + }, + _cmy_to_rgb = function(cmy) { + return { + r: 1 - (cmy.c), + g: 1 - (cmy.m), + b: 1 - (cmy.y) + }; + }, + _cmy_to_cmyk = function(cmy) { + var K = 1; + + if (cmy.c < K) { + K = cmy.c; + } + if (cmy.m < K) { + K = cmy.m; + } + if (cmy.y < K) { + K = cmy.y; + } + + if (K === 1) { + return { + c: 0, + m: 0, + y: 0, + k: 1 + }; + } + + return { + c: (cmy.c - K) / (1 - K), + m: (cmy.m - K) / (1 - K), + y: (cmy.y - K) / (1 - K), + k: K + }; + }, + _cmyk_to_cmy = function(cmyk) { + return { + c: cmyk.c * (1 - cmyk.k) + cmyk.k, + m: cmyk.m * (1 - cmyk.k) + cmyk.k, + y: cmyk.y * (1 - cmyk.k) + cmyk.k + }; + }; + + this.set = false; + + this.setAlpha = function(_a) { + if (_a !== null) { + a = _clip(_a); + } + this.set = true; + + return this; + }; + + this.getAlpha = function() { + return a; + }; + + this.setRGB = function(r, g, b) { + spaces = { rgb: this.getRGB() }; + if (r !== null) { + spaces.rgb.r = _clip(r); + } + if (g !== null) { + spaces.rgb.g = _clip(g); + } + if (b !== null) { + spaces.rgb.b = _clip(b); + } + this.set = true; + + return this; + }; + + this.getChannel = function(channel) { + switch (channel) { + case 'h': + case 's': + case 'v': + return this.getHSV()[channel]; + + case 'r': + case 'g': + case 'b': + return this.getRGB()[channel]; + + case 'a': + return this.getAlpha(); + } + + return null; + }; + + this.setChannel = function(channel, value) { + switch (channel) { + case 'h': + return this.setHSV(value, null, null); + + case 's': + return this.setHSV(null, value, null); + + case 'v': + return this.setHSV(null, null, value); + + case 'r': + return this.setRGB(value, null, null); + + case 'g': + return this.setRGB(null, value, null); + + case 'b': + return this.setRGB(null, null, value); + + case 'a': + return this.setAlpha(value); + } + + return this; + }; + + this.setHSV = function(h, s, v) { + spaces = {hsv: this.getHSV()}; + if (h !== null) { + spaces.hsv.h = _clip(h); + } + if (s !== null) { + spaces.hsv.s = _clip(s); + } + if (v !== null) { + spaces.hsv.v = _clip(v); + } + this.set = true; + + return this; + }; + + this.setHSL = function(h, s, l) { + spaces = {hsl: this.getHSL()}; + if (h !== null) { + spaces.hsl.h = _clip(h); + } + if (s !== null) { + spaces.hsl.s = _clip(s); + } + if (l !== null) { + spaces.hsl.l = _clip(l); + } + this.set = true; + + return this; + }; + + this.setLAB = function(l, a, b) { + spaces = {lab: this.getLAB()}; + if (l !== null) { + spaces.lab.l = _clip(l); + } + if (a !== null) { + spaces.lab.a = _clip(a); + } + if (b !== null) { + spaces.lab.b = _clip(b); + } + this.set = true; + + return this; + }; + + this.setCMYK = function(c, m, y, k) { + spaces = {cmyk: this.getCMYK()}; + if (c !== null) { + spaces.cmyk.c = _clip(c); + } + if (m !== null) { + spaces.cmyk.m = _clip(m); + } + if (y !== null) { + spaces.cmyk.y = _clip(y); + } + if (k !== null) { + spaces.cmyk.k = _clip(k); + } + this.set = true; + + return this; + }; + + this.getRGB = function() { + if (!spaces.rgb) { + spaces.rgb = spaces.lab ? _xyz_to_rgb(_lab_to_xyz(spaces.lab)) + : spaces.hsv ? _hsv_to_rgb(spaces.hsv) + : spaces.hsl ? _hsl_to_rgb(spaces.hsl) + : spaces.cmyk ? _cmy_to_rgb(_cmyk_to_cmy(spaces.cmyk)) + : {r: 0, g: 0, b: 0}; + spaces.rgb.r = _clip(spaces.rgb.r); + spaces.rgb.g = _clip(spaces.rgb.g); + spaces.rgb.b = _clip(spaces.rgb.b); + } + return $.extend({}, spaces.rgb); + }; + + this.getHSV = function() { + if (!spaces.hsv) { + spaces.hsv = spaces.lab ? _rgb_to_hsv(this.getRGB()) + : spaces.rgb ? _rgb_to_hsv(spaces.rgb) + : spaces.hsl ? _rgb_to_hsv(this.getRGB()) + : spaces.cmyk ? _rgb_to_hsv(this.getRGB()) + : {h: 0, s: 0, v: 0}; + spaces.hsv.h = _clip(spaces.hsv.h); + spaces.hsv.s = _clip(spaces.hsv.s); + spaces.hsv.v = _clip(spaces.hsv.v); + } + return $.extend({}, spaces.hsv); + }; + + this.getHSL = function() { + if (!spaces.hsl) { + spaces.hsl = spaces.rgb ? _rgb_to_hsl(spaces.rgb) + : spaces.hsv ? _rgb_to_hsl(this.getRGB()) + : spaces.cmyk ? _rgb_to_hsl(this.getRGB()) + : spaces.hsv ? _rgb_to_hsl(this.getRGB()) + : {h: 0, s: 0, l: 0}; + spaces.hsl.h = _clip(spaces.hsl.h); + spaces.hsl.s = _clip(spaces.hsl.s); + spaces.hsl.l = _clip(spaces.hsl.l); + } + return $.extend({}, spaces.hsl); + }; + + this.getCMYK = function() { + if (!spaces.cmyk) { + spaces.cmyk = spaces.rgb ? _cmy_to_cmyk(_rgb_to_cmy(spaces.rgb)) + : spaces.hsv ? _cmy_to_cmyk(_rgb_to_cmy(this.getRGB())) + : spaces.hsl ? _cmy_to_cmyk(_rgb_to_cmy(this.getRGB())) + : spaces.lab ? _cmy_to_cmyk(_rgb_to_cmy(this.getRGB())) + : {c: 0, m: 0, y: 0, k: 1}; + spaces.cmyk.c = _clip(spaces.cmyk.c); + spaces.cmyk.m = _clip(spaces.cmyk.m); + spaces.cmyk.y = _clip(spaces.cmyk.y); + spaces.cmyk.k = _clip(spaces.cmyk.k); + } + return $.extend({}, spaces.cmyk); + }; + + this.getLAB = function() { + if (!spaces.lab) { + spaces.lab = spaces.rgb ? _xyz_to_lab(_rgb_to_xyz(spaces.rgb)) + : spaces.hsv ? _xyz_to_lab(_rgb_to_xyz(this.getRGB())) + : spaces.hsl ? _xyz_to_lab(_rgb_to_xyz(this.getRGB())) + : spaces.cmyk ? _xyz_to_lab(_rgb_to_xyz(this.getRGB())) + : {l: 0, a: 0, b: 0}; + spaces.lab.l = _clip(spaces.lab.l); + spaces.lab.a = _clip(spaces.lab.a); + spaces.lab.b = _clip(spaces.lab.b); + } + return $.extend({}, spaces.lab); + }; + + this.getChannels = function() { + return { + r: this.getRGB().r, + g: this.getRGB().g, + b: this.getRGB().b, + a: this.getAlpha(), + h: this.getHSV().h, + s: this.getHSV().s, + v: this.getHSV().v, + c: this.getCMYK().c, + m: this.getCMYK().m, + y: this.getCMYK().y, + k: this.getCMYK().k, + L: this.getLAB().l, + A: this.getLAB().a, + B: this.getLAB().b + }; + }; + + this.getSpaces = function() { + return $.extend(true, {}, spaces); + }; + + this.distance = function(color) { + var space = 'lab', + getter = 'get'+space.toUpperCase(), + a = this[getter](), + b = color[getter](), + distance = 0, + channel; + + for (channel in a) { + distance += Math.pow(a[channel] - b[channel], 2); + } + + return distance; + }; + + this.equals = function(color) { + if (color) { + var a = this.getRGB(), + b = color.getRGB(); + + return this.set === color.set + && this.getAlpha() === color.getAlpha() + && a.r === b.r + && a.g === b.g + && a.b === b.b; + } + return false; + }; + + this.limit = function(steps) { + steps -= 1; + var rgb = this.getRGB(); + this.setRGB( + Math.round(rgb.r * steps) / steps, + Math.round(rgb.g * steps) / steps, + Math.round(rgb.b * steps) / steps + ); + }; + + this.toHex = function() { + var rgb = this.getRGB(); + return _hexify(rgb.r * 255) + _hexify(rgb.g * 255) + _hexify(rgb.b * 255); + }; + + this.toCSS = function() { + return '#' + this.toHex(); + }; + + this.copy = function() { + var color = new $.colorpicker.Color(this.getSpaces(), this.getAlpha()); + color.set = this.set; + return color; + }; + + // Construct + if (args.length === 2) { + spaces = args[0]; + this.setAlpha(args[1] === 0 ? 0 : args[1] || 1); + this.set = true; + } + if (args.length > 2) { + this.setRGB(args[0], args[1], args[2]); + this.setAlpha(args[3] === 0 ? 0 : args[3] || 1); + this.set = true; + } + }; + }(); + + $.widget('vanderlee.colorpicker', { + options: { + alpha: false, // Show alpha controls and mode + altAlpha: true, // change opacity of altField as well? + altField: '', // selector for DOM elements which change background color on change. + altOnChange: true, // true to update on each change, false to update only on close. + altProperties: 'background-color', // comma separated list of any of 'background-color', 'color', 'border-color', 'outline-color' + autoOpen: false, // Open dialog automatically upon creation + buttonClass: null, // If set, the button will get this/these classname(s). + buttonColorize: false, + buttonImage: 'images/ui-colorpicker.png', + buttonImageOnly: false, + buttonText: null, // Text on the button and/or title of button image. + cancelOnExit: false, // Should we revert to original value if user clicks outside? + closeOnEscape: true, // Close the dialog when the escape key is pressed. + closeOnOutside: true, // Close the dialog when clicking outside the dialog (not for inline) + color: '#00FF00', // Initial color (for inline only) + colorFormat: 'HEX', // Format string for output color format + disabled: false, // Disable or enable the colorpicker initially + draggable: true, // Make popup dialog draggable if header is visible. + containment: null, // Constrains dragging to within the bounds of the specified element or region. + duration: 'fast', + hideOn: 'button', // 'focus', 'click', 'button', 'alt', 'all' + hsv: true, // Show HSV controls and modes + inline: true, // Show any divs as inline by default + inlineFrame: true, // Show a border and background when inline. + layout: { + map: [0, 0, 1, 5], // Left, Top, Width, Height (in table cells). + bar: [1, 0, 1, 5], + preview: [2, 0, 1, 1], + hsv: [2, 1, 1, 1], + rgb: [2, 2, 1, 1], + alpha: [2, 3, 1, 1], + hex: [2, 4, 1, 1], + lab: [3, 1, 1, 1], + cmyk: [3, 2, 1, 2], + swatches: [4, 0, 1, 5] + }, + limit: '', // Limit color "resolution": '', 'websafe', 'nibble', 'binary', 'name' + modal: false, // Modal dialog? + mode: 'h', // Initial editing mode, h, s, v, r, g, b or a + okOnEnter: false, // Close (with OK) when pressing the enter key + parts: '', // leave empty for automatic selection + part: { + map: { size: 256 }, + bar: { size: 256 } + }, // options per part + position: null, + regional: '', + revert: false, // Revert color upon non + rgb: true, // Show RGB controls and modes + showAnim: 'fadeIn', + showCancelButton: true, + showNoneButton: false, + showCloseButton: true, + showOn: 'focus click alt', // 'focus', 'click', 'button', 'alt', 'all' + showOptions: {}, + swatches: null, // null for default or kv-object or names swatches set + swatchesWidth: 84, // width (in number of pixels) of swatches box. + title: null, + + cancel: null, + close: null, + init: null, + ok: null, + open: null, + select: null, + stop: null, + ready: null + }, + + _create: function () { + var that = this, + text; + + that.colorpicker_index = _colorpicker_index++; + + that.widgetEventPrefix = 'colorpicker'; + + that.opened = false; + that.generated = false; + that.inline = false; + that.changed = false; + + that.dialog = null; + that.button = null; + that.image = null; + that.overlay = null; + + that.events = { + window_resize: null, + document_keydown: null, + document_click_html: null + }; + + that.mode = that.options.mode; + + if (that.element.is('input') || that.options.inline === false) { + // Initial color + that._setColor(that.element.is('input') ? that.element.val() : that.options.color); + that._callback('init'); + + // showOn focus + if (/\bfocus|all|both\b/.test(that.options.showOn)) { + that.element.on('focus', function () { + that.open(); + }); + } + if (/\bfocus|all|both\b/.test(that.options.hideOn)) { + that.element.on('focusout', function (e) { + that.close(); + }); + } + + // showOn click + if (/\bclick|all|both\b/.test(that.options.showOn)) { + that.element.on('click', function (e) { + if (that.opened && /\bclick|all|both\b/.test(that.options.hideOn)) { + that.close(); + } else { + that.open(); + } + }); + } + + // showOn button + if (/\bbutton|all|both\b/.test(that.options.showOn)) { + if (that.options.buttonImage !== '') { + text = that.options.buttonText || that._getRegional('button'); + + that.image = $('').attr({ + 'src': that.options.buttonImage, + 'alt': text, + 'title': text + }); + if (that.options.buttonClass) { + that.image.attr('class', that.options.buttonClass); + } + + that._setImageBackground(); + } + + if (that.options.buttonImageOnly && that.image) { + that.button = that.image; + } else { + that.button = $('').html(that.image || that.options.buttonText).button(); + that.image = that.image ? $('img', that.button).first() : null; + } + that.button.insertAfter(that.element).click(function () { + if (!that.options.disabled) { + if (that.opened && /\bbutton|all|both\b/.test(that.options.hideOn)) { + that.close(); + } else { + that.open(); + } + } + }); + } + + // showOn alt + if (/\balt|all|both\b/.test(that.options.showOn)) { + $(that.options.altField).on('click', function () { + if (that.opened && /\balt|all|both\b/.test(that.options.hideOn)) { + that.close(); + } else { + that.open(); + } + }); + } + + if (that.options.autoOpen) { + that.open(); + } + + } else { + that.inline = true; + + that._generate(); + that.opened = true; + } + + // Disable Widget-style + (that.element.is(':disabled') || that.options.disabled) && that.disable(); + + // Set callback just before creation ending + that._callback('ready'); + + return this; + }, + + _setOption: function(key, value) { + switch (key) { + case 'disabled': + this[value ? 'disable' : 'enable'](); + break; + + case 'swatches': + this.options.swatches = value; + this.parts.swatches.init(); + break; + } + + $.Widget.prototype._setOption.apply(this, arguments); + }, + + enable: function () { + //$.Widget.prototype.enable.call(this); + this.element && this.element.prop('disabled', false); + this.button && this.button.prop('disabled', false); + this.dialog && this.dialog.removeClass('ui-colorpicker-disabled'); + this.options.disabled = false; + + this.parts && $.each(this.parts, function (index, part) { + part.disable && part.disable(false); + }); + }, + + disable: function () { + //$.Widget.prototype.disable.call(this); + this.element && this.element.prop('disabled', true); + this.button && this.button.prop('disabled', true); + this.dialog && this.dialog.addClass('ui-colorpicker-disabled'); + this.options.disabled = true; + + this.parts && $.each(this.parts, function (index, part) { + part.disable && part.disable(true); + }); + }, + + _setImageBackground: function() { + if (this.image && this.options.buttonColorize) { + this.image.css('background-color', this.color.set? this._formatColor('RGBA', this.color) : ''); + } + }, + + /** + * If an alternate field is specified, set it according to the current color. + */ + _setAltField: function () { + if (this.options.altOnChange && this.options.altField && this.options.altProperties) { + var index, + property, + properties = this.options.altProperties.split(','); + + for (index = 0; index <= properties.length; ++index) { + property = $.trim(properties[index]); + switch (property) { + case 'color': + case 'fill': + case 'stroke': + case 'background-color': + case 'backgroundColor': + case 'outline-color': + case 'border-color': + $(this.options.altField).css(property, this.color.set? this.color.toCSS() : ''); + break; + } + } + + this.options.altAlpha && + $(this.options.altField).css('opacity', this.color.set? this.color.getAlpha() : ''); + } + }, + + _setColor: function(text) { + this.color = this._parseColor(text) || new $.colorpicker.Color(); + this.currentColor = this.color.copy(); + + this._setImageBackground(); + this._setAltField(); + }, + + setColor: function(text) { + this._setColor(text); + this._change(); + }, + + getColor: function(format) { + return this._formatColor(format || this.options.colorFormat, this.color); + }, + + _generateInline: function() { + var that = this; + + $(that.element).html(that.options.inlineFrame ? _container_inlineFrame : _container_inline); + + that.dialog = $('.ui-colorpicker', that.element); + }, + + _generatePopup: function() { + var that = this; + + that.dialog = $(_container_popup).appendTo('body'); + + // Close on clicking outside window and controls + if (that.events.document_click_html === null) { + $(document).on('touchstart click', 'html', that.events.document_click_html = function (event) { + if (!that.opened || event.target === that.element[0] || that.overlay) { + return; + } + + // Check if clicked on any part of dialog + if (that.dialog.is(event.target) || that.dialog.has(event.target).length > 0) { + that.element.blur(); // inside window! + return; + } + + // Check if clicked on known external elements + var p, + parents = $(event.target).parents(); + // add the event.target in case of buttonImageOnly and closeOnOutside both are set to true + parents.push(event.target); + for (p = 0; p <= parents.length; ++p) { + // button + if (that.button !== null && parents[p] === that.button[0]) { + return; + } + // showOn alt + if (/\balt|all|both\b/.test(that.options.showOn) && $(that.options.altField).is(parents[p])) { + return; + } + } + + // no closeOnOutside + if (!that.options.closeOnOutside) { + return; + } + + // bring back the previous color if cancelOnExit is set to true + if (that.options.cancelOnExit) { + that.color = that.currentColor.copy(); + that._change(); + } + + that.close(that.options.revert); + }); + } + + if (that.events.document_keydown === null) { + $(document).on('keydown', that.events.document_keydown = function (event) { + // close on ESC key + if (that.opened && event.keyCode === 27 && that.options.closeOnEscape) { + that.close(that.options.revert); + } + + // OK on Enter key + if (that.opened && event.keyCode === 13 && that.options.okOnEnter) { + that.close(); + } + }); + } + + // Close (with OK) on tab key in element + that.element.keydown(function (event) { + if (event.keyCode === 9) { + that.close(); + } + }).keyup(function (event) { + var color = that._parseColor(that.element.val()); + if (color && !that.color.equals(color)) { + that.color = color; + that._change(); + } + }); + }, + + _generate: function () { + var that = this, + index, + part, + parts_list, + layout_parts, + table, + classes; + + that._setColor(that.inline || !that.element.is('input') ? that.options.color : that.element.val()); + + that[that.inline ? '_generateInline' : '_generatePopup'](); + + // Determine the parts to include in this colorpicker + if (typeof that.options.parts === 'string') { + if ($.colorpicker.partslists[that.options.parts]) { + parts_list = $.colorpicker.partslists[that.options.parts]; + } else { + // automatic + parts_list = $.colorpicker.partslists[that.inline ? 'inline' : 'popup']; + } + } else { + parts_list = that.options.parts; + } + + // Add any parts to the internal parts list + that.parts = {}; + $.each(parts_list, function(index, part) { + if ($.colorpicker.parts[part]) { + that.parts[part] = new $.colorpicker.parts[part](that); + } + }); + + if (!that.generated) { + layout_parts = []; + + $.each(that.options.layout, function(part, pos) { + if (that.parts[part]) { + layout_parts.push({ + 'part': part, + 'pos': pos + }); + } + }); + + table = $(_layoutTable(layout_parts, function(cell, x, y) { + classes = ['ui-colorpicker-' + cell.part + '-container']; + + if (x > 0) { + classes.push('ui-colorpicker-padding-left'); + } + + if (y > 0) { + classes.push('ui-colorpicker-padding-top'); + } + + return ' 1 ? ' colspan="' + cell.pos[2] + '"' : '') + + (cell.pos[3] > 1 ? ' rowspan="' + cell.pos[3] + '"' : '') + + ' valign="top">'; + })).appendTo(that.dialog); + if (that.options.inlineFrame) { + table.addClass('ui-dialog-content ui-widget-content'); + } + + that._initAllParts(); + that._updateAllParts(); + that.generated = true; + } + }, + + _effectGeneric: function (element, show, slide, fade, callback) { + var that = this; + + if ($.effects && $.effects[that.options.showAnim]) { + element[show](that.options.showAnim, that.options.showOptions, that.options.duration, callback); + } else { + element[(that.options.showAnim === 'slideDown' ? + slide + : (that.options.showAnim === 'fadeIn' ? + fade + : show))]((that.options.showAnim ? that.options.duration : null), callback); + if ($.isFunction(callback) && (!that.options.showAnim || !that.options.duration)) { + callback(); + } + } + }, + + _effectShow: function(element, callback) { + this._effectGeneric(element, 'show', 'slideDown', 'fadeIn', callback); + }, + + _effectHide: function(element, callback) { + this._effectGeneric(element, 'hide', 'slideUp', 'fadeOut', callback); + }, + + open: function() { + var that = this, + offset, + bottom, right, + height, width, + x, y, + zIndex, + element, + position; + + if (!that.opened) { + that._generate(); + + if (that.element.is(':hidden')) { + element = $('
').insertBefore(that.element); + } else { + element = that.element; + } + + if (that.element.is(':hidden')) { + element.remove(); + } + + // Automatically find highest z-index. + zIndex = 0; + $(that.element[0]).parents().each(function() { + var z = $(this).css('z-index'); + if ((typeof(z) === 'number' || typeof(z) === 'string') && z !== '' && !isNaN(z)) { + if (z > zIndex) { + zIndex = parseInt(z, 10); + return false; + } + } + else { + $(this).siblings().each(function() { + var z = $(this).css('z-index'); + if ((typeof(z) === 'number' || typeof(z) === 'string') && z !== '' && !isNaN(z)) { + if (z > zIndex) { + zIndex = parseInt(z, 10); + } + } + }); + } + }); + + zIndex += 2; + that.dialog.css('z-index', zIndex); + + if (that.options.modal) { + that.overlay = $('
').appendTo('body').css('z-index', zIndex - 1); + + if (that.events.window_resize !== null) { + $(window).off('resize', that.events.window_resize); + } + + that.events.window_resize = function() { + if (that.overlay) { + that.overlay.width($(document).width()); + that.overlay.height($(document).height()); + } + }, + + $(window).on('resize', that.events.window_resize); + that.events.window_resize(); + } + + that._effectShow(this.dialog); + + if (that.options.position) { + position = $.extend({}, that.options.position); + if (position.of === 'element') { + position.of = element; + } + } else { + position = { + my: 'left top', + at: 'left bottom', + of: element, + collision: 'flip' + }; + } + that.dialog.position(position); + + that.opened = true; + that._callback('open'); + + // Without waiting for domready the width of the map is 0 and we + // wind up with the cursor stuck in the upper left corner + $(function() { + that._repaintAllParts(); + }); + } + }, + + close: function (cancel) { + var that = this; + + if (!that.opened) { + return; + } + + if (cancel) { + that.color = that.currentColor.copy(); + that._change(); + that._callback('cancel'); + } else { + that.currentColor = that.color.copy(); + that._callback('ok'); + } + that.changed = false; + + if (that.overlay) { + $(window).off('resize', that.events.window_resize); + that.overlay.remove(); + } + + // tear down the interface + that._effectHide(that.dialog, function () { + that.dialog.remove(); + that.dialog = null; + that.generated = false; + + that.opened = false; + that._callback('close'); + }); + }, + + destroy: function() { + var that = this; + if (that.events.document_click_html !== null) { + $(document).off('touchstart click', 'html', that.events.document_click_html); + } + + if (that.events.document_keydown !== null) { + $(document).off('keydown', that.events.document_keydown); + } + + if (that.events.window_resize !== null) { + $(window).off('resize', that.events.window_resize); + } + + this.element.off(); + + if (this.overlay) { + this.overlay.remove(); + } + + if (this.dialog !== null) { + this.dialog.remove(); + } + + if (this.image !== null) { + this.image.remove(); + } + + if (this.button !== null) { + this.button.remove(); + } + }, + + _callback: function (callback) { + var that = this, + data, + lab; + + if (that.color.set) { + data = { + formatted: that._formatColor(that.options.colorFormat, that.color), + colorPicker: that + }; + + data.hex = that.color.toHex(); + data.css = that.color.toCSS(); + data.a = that.color.getAlpha(); + data.rgb = that.color.getRGB(); + data.hsv = that.color.getHSV(); + data.cmyk = that.color.getCMYK(); + data.hsl = that.color.getHSL(); + + lab = that.color.getLAB(); + lab.a = (lab.a * 2) - 1; + lab.b = (lab.b * 2) - 1; + data.lab = lab; + + return that._trigger(callback, null, data); + } else { + return that._trigger(callback, null, { + formatted: '', + colorPicker: that + }); + } + }, + + _initAllParts: function () { + $.each(this.parts, function (index, part) { + if (part.init) { + part.init(); + } + }); + }, + + _updateAllParts: function () { + $.each(this.parts, function (index, part) { + if (part.update) { + part.update(); + } + }); + }, + + _repaintAllParts: function () { + $.each(this.parts, function (index, part) { + if (part.repaint) { + part.repaint(); + } + }); + }, + + _change: function (stoppedChanging /* = true */) { + // Limit color palette + if (this.color.set && this.options.limit && $.colorpicker.limits[this.options.limit]) { + $.colorpicker.limits[this.options.limit](this.color, this); + } + + // Set changed if different from starting color + this.changed = !this.color.equals(this.currentColor); + + // update input element content + if (!this.inline) { + if (!this.color.set) { + if (this.element.val() !== '') { + this.element.val('').change(); + } + } else if (!this.color.equals(this._parseColor(this.element.val()))) { + this.element.val(this._formatColor(this.options.colorFormat, this.color)).change(); + } + + this._setImageBackground(); + } + + // Set the alt field + this._setAltField(); + + // update color option + this.options.color = this.color.set ? this.color.toCSS() : ''; + + if (this.opened) { + this._repaintAllParts(); + } + + // callbacks + this._callback('select'); + + if (typeof stoppedChanging === 'undefined' ? true : !!stoppedChanging) { + this._callback('stop'); + } + }, + + // This will be deprecated by jQueryUI 1.9 widget + _hoverable: function (e) { + e.hover(function () { + e.addClass('ui-state-hover'); + }, function () { + e.removeClass('ui-state-hover'); + }); + }, + + // This will be deprecated by jQueryUI 1.9 widget + _focusable: function (e) { + e.focus(function () { + e.addClass('ui-state-focus'); + }).blur(function () { + e.removeClass('ui-state-focus'); + }); + }, + + _getRegional: function(name) { + return $.colorpicker.regional[this.options.regional][name] !== undefined ? + $.colorpicker.regional[this.options.regional][name] : $.colorpicker.regional[''][name]; + }, + + _getSwatches: function() { + if (typeof(this.options.swatches) === 'string') { + return $.colorpicker.swatches[this.options.swatches]; + } + + if ($.isPlainObject(this.options.swatches)) { + return this.options.swatches; + } + + return $.colorpicker.swatches.html; + }, + + _eachSwatch: function (callback) { + var currentSwatches = this._getSwatches(), + name; + $.each(currentSwatches, function (nameOrIndex, swatch) { + name = $.isArray(currentSwatches) ? swatch.name : nameOrIndex; + return callback(name, swatch); + }); + }, + + _getSwatch: function(name) { + var swatch = false; + + this._eachSwatch(function(swatchName, current) { + if (swatchName.toLowerCase() == name.toLowerCase()) { + swatch = current; + return false; + } + }); + + return swatch; + }, + + _parseFormat: function(format, text) { + var that = this, + typeRegexps = { + x: function() {return '([0-9a-fA-F]{2})';} + , d: function() {return '([12]?[0-9]{1,2})';} + , f: function() {return '([0-9]*\\.?[0-9]*)';} + , p: function() {return '([0-9]*\\.?[0-9]*)';} + }, + typeConverters = { + x: function(v) {return parseInt(v, 16) / 255.;} + , d: function(v) {return v / 255.;} + , f: function(v) {return v;} + , p: function(v) {return v * 0.01;} + }, + setters = { + r: 'setRGB' + , g: 'setRGB' + , b: 'setRGB' + , h: 'setHSV' + , s: 'setHSV' + , v: 'setHSV' + , c: 'setCMYK' + , m: 'setCMYK' + , y: 'setCMYK' + , k: 'setCMYK' + , L: 'setLAB' + , A: 'setLAB' + , B: 'setLAB' + }, + setterChannels = { + setRGB: [ 'r', 'g', 'b'] + , setHSV: [ 'h', 's', 'v' ] + , setCMYK: [ 'c', 'm', 'y', 'k' ] + , setLAB: [ 'L', 'A', 'B' ] + }, + channels = [], + converters = [], + setter = null, + color, + pattern; + + // Construct pattern + pattern = format.replace(/[()\\^$.|?*+[\]]/g, function(m) { + return '\\'+m; + }); + + + pattern = pattern.replace(/\\?[argbhsvcmykLAB][xdfp]/g, function(variable) { + if (variable.match(/^\\/)) { + return variable.slice(1); + } + + var channel = variable.charAt(0), + type = variable.charAt(1); + + channels.push(channel); + converters.push(typeConverters[type]); + if (setters[channel]) { + setter = setters[channel]; + } + + return typeRegexps[type](); + }); + + if (setter) { + var values = text.match(new RegExp(pattern)); + if (values) { + var args = [], + channelIndex; + + values.shift(); + + $.each(setterChannels[setter], function(index, channel) { + channelIndex = $.inArray(channel, channels); + args[index] = converters[channelIndex](values[channelIndex]); + }); + + color = new $.colorpicker.Color(); + color[setter].apply(color, args); + } + } + + return color; + }, + + _parseColor: function(text) { + var that = this, + color; + + var formats = $.isArray(that.options.colorFormat) + ? that.options.colorFormat + : [ that.options.colorFormat ]; + + $.each(formats, function(index, format) { + if ($.colorpicker.parsers[format]) { + color = $.colorpicker.parsers[format](text, that); + } else { + color = that._parseFormat(format, text); + } + + if (color) { + return false; + } + }); + + if (!color) { + // fallback; check all registered parsers + $.each($.colorpicker.parsers, function(name, parser) { + color = parser(text, that); + if (color) { + return false; + } + }); + } + + if (color) { + return color; + } + + return false; + }, + + _exactName: function(color) { + var name = false; + + this._eachSwatch(function(n, swatch) { + if (color.equals(new $.colorpicker.Color(swatch.r, swatch.g, swatch.b))) { + name = n; + return false; + } + }); + + return name; + }, + + _closestName: function(color) { + var rgb = color.getRGB(), + distance = null, + name = false, + d; + + this._eachSwatch(function(n, swatch) { + d = color.distance(new $.colorpicker.Color(swatch.r, swatch.g, swatch.b)); + if (d < distance || distance === null) { + name = n; + if (d <= 1e-20) { // effectively 0 by maximum rounding error + return false; // can't get much closer than 0 + } + distance = d; // safety net + } + }); + + return name; + }, + + _formatColor: function (formats, color) { + var that = this, + text = null, + types = { 'x': function(v) {return _intToHex(v * 255);} + ,'d':function(v) {return Math.round(v * 255);} + ,'f':function(v) {return v;} + ,'p':function(v) {return v * 100.;} + }, + channels = color.getChannels(); + + if (!$.isArray(formats)) { + formats = [formats]; + } + + $.each(formats, function(index, format) { + if ($.colorpicker.writers[format]) { + text = $.colorpicker.writers[format](color, that); + return (text === false); + } else { + text = format.replace(/\\?[argbhsvcmykLAB][xdfp]/g, function(m) { + if (m.match(/^\\/)) { + return m.slice(1); + } + return types[m.charAt(1)](channels[m.charAt(0)]); + }); + return false; + } + }); + + return text; + } + }); + + return $.vanderlee.colorpicker; +})); diff --git a/js/jquery-colorpicker/package.json b/js/jquery-colorpicker/package.json new file mode 100644 index 0000000..4aaf298 --- /dev/null +++ b/js/jquery-colorpicker/package.json @@ -0,0 +1,32 @@ +{ + "name": "vanderlee-colorpicker", + "version": "1.2.20", + "homepage": "https://github.com/vanderlee/colorpicker", + "author": "Martijn van der Lee ", + "repository": { + "type": "git", + "url": "https://github.com/vanderlee/colorpicker" + }, + "description": "JQuery colorpicker: themeroller styling, RGB, HSL, CMYK and L*A*B support. Standard look & feel, configurable. Works as a popup or inline.", + "main": "jquery.colorpicker.js", + "keywords": [ + "jquery", + "colorpicker" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test" + ], + "dependencies": { + "jquery": ">=1.7.1", + "jquery-ui": ">=1.8.0" + }, + "devDependencies": { + "eslint": "^5.15.1", + "stylelint": "^9.10.1", + "stylelint-config-recommended": "^2.1.0" + } +} diff --git a/js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-parser.js b/js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-parser.js new file mode 100644 index 0000000..230daae --- /dev/null +++ b/js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-parser.js @@ -0,0 +1,13 @@ +jQuery(function($) { + $.colorpicker.parsers['CMYK'] = function (color) { + var m = /^cmyk\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/.exec(color); + if (m) { + return (new $.colorpicker.Color()).setCMYK( + m[1] / 255, + m[2] / 255, + m[3] / 255, + m[4] / 255 + ); + } + }; +}); diff --git a/js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js b/js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js new file mode 100644 index 0000000..0211dfb --- /dev/null +++ b/js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js @@ -0,0 +1,13 @@ +jQuery(function($) { + $.colorpicker.parsers['CMYK%'] = function (color) { + var m = /^cmyk\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*\)$/.exec(color); + if (m) { + return (new $.colorpicker.Color()).setCMYK( + m[1] / 100, + m[2] / 100, + m[3] / 100, + m[4] / 100 + ); + } + }; +}); diff --git a/js/jquery-colorpicker/parts/jquery.ui.colorpicker-memory.js b/js/jquery-colorpicker/parts/jquery.ui.colorpicker-memory.js new file mode 100644 index 0000000..1b13d82 --- /dev/null +++ b/js/jquery-colorpicker/parts/jquery.ui.colorpicker-memory.js @@ -0,0 +1,80 @@ +jQuery(function($) { + $.colorpicker.parts.memory = function (inst) { + var that = this, + container, + selectNode = function(node) { + inst.color = inst._parseColor($(node).css('backgroundColor')); + inst._change(); + }, + deleteNode = function(node) { + node.remove(); + }, + addNode = function(color) { + var $node = $('
').addClass('ui-colorpicker-swatch').css('backgroundColor', color); + $node.mousedown(function(e) { + e.stopPropagation(); + + if (!inst.options.disabled) { + switch (e.which) { + case 1: + selectNode(this); + break; + case 3: + deleteNode($node); + setMemory(); + break; + } + } + }).on('contextmenu', function(e) { + e.preventDefault(); + }); + + container.append($node); + }, + getMemory = function() { + if (window.localStorage) { + var memory = localStorage.getItem('colorpicker-memory'); + if (memory) { + return JSON.parse(memory); + } + } + return $.map((document.cookie.match(/\bcolorpicker-memory=([^;]*)/) || [0, ''])[1].split(','),unescape); + }; + setMemory = function() { + var colors = []; + $('> *', container).each(function() { + colors.push($(this).css('backgroundColor')); + }); + if (window.localStorage) { + localStorage.setItem('colorpicker-memory',JSON.stringify(colors)); + } + else { + var expdate=new Date(); + expdate.setDate(expdate.getDate() + (365 * 10)); + document.cookie = 'colorpicker-memory='+$.map(colors,escape).join()+';expires='+expdate.toUTCString(); + } + }; + + this.init = function () { + container = $('
') + .addClass('ui-colorpicker-memory ui-colorpicker-border ui-colorpicker-swatches') + .css({ + width: 84, + height: 84, + cursor: 'crosshair' + }) + .appendTo($('.ui-colorpicker-memory-container', inst.dialog)); + + $.each(getMemory(), function() { + addNode(this); + }); + + container.mousedown(function(e) { + if (!inst.options.disabled) { + addNode(inst.color.toCSS()); + setMemory(); + } + }); + }; + }; +}); diff --git a/js/jquery-colorpicker/parts/jquery.ui.colorpicker-rgbslider.js b/js/jquery-colorpicker/parts/jquery.ui.colorpicker-rgbslider.js new file mode 100644 index 0000000..5e861d3 --- /dev/null +++ b/js/jquery-colorpicker/parts/jquery.ui.colorpicker-rgbslider.js @@ -0,0 +1,80 @@ +jQuery(function($) { + /** + * Set a horizontal gradient background image on an element. + * Uses the now-deprecated $.browser + * @param $ element + * @param $.colorpicker.Color startColor + * @param $.colorpicker.Color endColor + * @returns {undefined} + */ + function setGradient(element, startColor, endColor) { + var start = startColor.toCSS(), + end = endColor.toCSS(), + styles = window.getComputedStyle(document.documentElement, ''), + prefix = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o']))[1]; + + element.css('background-image', '-'+prefix+'-linear-gradient(left, '+start+' 0%, '+end+' 100%)'); + } + + $.colorpicker.parts.rgbslider = function (inst) { + var that = this, + sliders = { r: $('
'), + g: $('
'), + b: $('
') + }; + + this.updateGradients = function () { + var color = inst.color.getRGB(); + + setGradient(sliders.r, new $.colorpicker.Color(0, color.g, color.b), new $.colorpicker.Color(1, color.g, color.b)); + setGradient(sliders.g, new $.colorpicker.Color(color.r, 0, color.b), new $.colorpicker.Color(color.r, 1, color.b)); + setGradient(sliders.b, new $.colorpicker.Color(color.r, color.g, 0), new $.colorpicker.Color(color.r, color.g, 1)); + }; + + this.init = function () { + $('
').append(sliders.r, sliders.g, sliders.b) + .appendTo($('.ui-colorpicker-rgbslider-container', inst.dialog)); + + function refresh() { + var r = sliders.r.slider('value') / 255, + g = sliders.g.slider('value') / 255, + b = sliders.b.slider('value') / 255; + + inst.color.setRGB(r, g, b); + inst._change(); + + that.updateGradients(); + } + + $(sliders.r).add(sliders.g).add(sliders.b).slider({ + min: 0, + max: 255, + step: 1, + slide: refresh, + change: refresh + }); + + this.updateGradients(); + }; + + this.repaint = function () { + $.each(inst.color.getRGB(), function (index, value) { + var input = sliders[index]; + value = Math.round(value * 255); + if (input.slider('value') !== value) { + input.slider('value', value); + } + }); + }; + + this.update = function () { + this.repaint(); + }; + + this.disable = function (disabled) { + sliders.r.slider(disabled ? 'disable' : 'enable'); + sliders.g.slider(disabled ? 'disable' : 'enable'); + sliders.b.slider(disabled ? 'disable' : 'enable'); + }; + }; +}); diff --git a/js/jquery-colorpicker/parts/jquery.ui.colorpicker-swatchesswitcher.js b/js/jquery-colorpicker/parts/jquery.ui.colorpicker-swatchesswitcher.js new file mode 100644 index 0000000..579bb85 --- /dev/null +++ b/js/jquery-colorpicker/parts/jquery.ui.colorpicker-swatchesswitcher.js @@ -0,0 +1,35 @@ +jQuery(function($) { + $.colorpicker.parts.swatchesswitcher = function (inst) { + var that = this, + part = null; + + this.init = function () { + var names = $.map($.colorpicker.swatches, function(v, name) { return name; }).sort(), + current = inst.options.swatches || 'html', + select = $('').appendTo('#qunit-fixture'); + var $altfield = $('
').appendTo('#qunit-fixture'); + + equal($altfield.css('backgroundColor'), 'rgba(0, 0, 0, 0)', 'Initial state, no color'); + + var jqcp = $input.colorpicker({ + altField: $altfield + }); + + equal($altfield.css('backgroundColor'), 'rgba(0, 0, 0, 0)', 'After creation, no color'); + + jqcp.colorpicker('open'); + + equal($altfield.css('backgroundColor'), 'rgba(0, 0, 0, 0)', 'After open, no color'); + + jqcp.colorpicker('close'); + + equal($altfield.css('backgroundColor'), 'rgba(0, 0, 0, 0)', 'After close, no color'); +}); + +asyncTest('Changing the color in input should trigger a \'change\' event on the input', function() { + expect(1); + + var $input = $('').appendTo('#qunit-fixture'); + + $input.change(function() { + ok(true, 'triggered'); + start(); + }); + + var jqcp = $input.colorpicker(); + + jqcp.colorpicker('setColor', 'red'); +}); diff --git a/js/jquery-colorpicker/test/index.html b/js/jquery-colorpicker/test/index.html new file mode 100644 index 0000000..2638a47 --- /dev/null +++ b/js/jquery-colorpicker/test/index.html @@ -0,0 +1,19 @@ + + + + + JQCP QUnit test + + + + + + + +
+
+ + + + + diff --git a/js/jquery-colorpicker/test/issues.js b/js/jquery-colorpicker/test/issues.js new file mode 100644 index 0000000..ebbc495 --- /dev/null +++ b/js/jquery-colorpicker/test/issues.js @@ -0,0 +1,22 @@ +module('issues'); + +test('#94: Clicking black swatch on empty input does not change input', function() { + expect(4); + + var $input = $('').appendTo('#qunit-fixture'); + var jqcp = $input.colorpicker({ + parts: ['swatches'] + }); + + equal($input.val(), '', 'Starts empty'); + + jqcp.colorpicker('open'); + equal($input.val(), '', 'Still empty on open'); + + $('.ui-colorpicker-swatch[title="white"]').click(); + equal($input.val(), 'ffffff', 'Clicking white, input white'); + + $input.val(''); + $('.ui-colorpicker-swatch[title="black"]').click(); + equal($input.val(), '000000', 'Clicking black, input black (remains empty in issue #94).'); +}); diff --git a/js/jquery-colorpicker/yarn.lock b/js/jquery-colorpicker/yarn.lock new file mode 100644 index 0000000..2409c28 --- /dev/null +++ b/js/jquery-colorpicker/yarn.lock @@ -0,0 +1,2799 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@>=7.1.0": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.3.4.tgz#921a5a13746c21e32445bf0798680e9d11a6530b" + integrity sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.3.4" + "@babel/helpers" "^7.2.0" + "@babel/parser" "^7.3.4" + "@babel/template" "^7.2.2" + "@babel/traverse" "^7.3.4" + "@babel/types" "^7.3.4" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.11" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.4.tgz#9aa48c1989257877a9d971296e5b73bfe72e446e" + integrity sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg== + dependencies: + "@babel/types" "^7.3.4" + jsesc "^2.5.1" + lodash "^4.17.11" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-split-export-declaration@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" + integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helpers@^7.2.0": + version "7.3.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.3.1.tgz#949eec9ea4b45d3210feb7dc1c22db664c9e44b9" + integrity sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA== + dependencies: + "@babel/template" "^7.1.2" + "@babel/traverse" "^7.1.5" + "@babel/types" "^7.3.0" + +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.2.2", "@babel/parser@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.4.tgz#a43357e4bbf4b92a437fb9e465c192848287f27c" + integrity sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ== + +"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" + integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.2.2" + "@babel/types" "^7.2.2" + +"@babel/traverse@^7.1.5", "@babel/traverse@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.3.4.tgz#1330aab72234f8dea091b08c4f8b9d05c7119e06" + integrity sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.3.4" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.3.4" + "@babel/types" "^7.3.4" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.11" + +"@babel/types@^7.0.0", "@babel/types@^7.2.2", "@babel/types@^7.3.0", "@babel/types@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.4.tgz#bf482eaeaffb367a28abbf9357a94963235d90ed" + integrity sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ== + dependencies: + esutils "^2.0.2" + lodash "^4.17.11" + to-fast-properties "^2.0.0" + +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@*": + version "11.11.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.3.tgz#7c6b0f8eaf16ae530795de2ad1b85d34bf2f5c58" + integrity sha512-wp6IOGu1lxsfnrD+5mX6qwSwWuqsdkKKxTN4aQc4wByHAKZJf9/D4KXPQ1POUjEbnCP5LMggB0OEFNY9OTsMqg== + +"@types/unist@*", "@types/unist@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" + integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== + +"@types/vfile-message@*": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/vfile-message/-/vfile-message-1.0.1.tgz#e1e9895cc6b36c462d4244e64e6d0b6eaf65355a" + integrity sha512-mlGER3Aqmq7bqR1tTTIVHq8KSAFFRyGbrxuM8C/H82g6k7r2fS+IMEkIu3D7JHzG10NvPdR8DNx0jr0pwpp4dA== + dependencies: + "@types/node" "*" + "@types/unist" "*" + +"@types/vfile@^3.0.0": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/vfile/-/vfile-3.0.2.tgz#19c18cd232df11ce6fa6ad80259bc86c366b09b9" + integrity sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw== + dependencies: + "@types/node" "*" + "@types/unist" "*" + "@types/vfile-message" "*" + +acorn-jsx@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" + integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== + +acorn@^6.0.7: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" + integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== + +ajv@^6.9.1: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + +array-union@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +autoprefixer@^9.0.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.0.tgz#7e51d0355c11596e6cf9a0afc9a44e86d1596c70" + integrity sha512-hMKcyHsZn5+qL6AUeP3c8OyuteZ4VaUlg+fWbyl8z7PqsKHF/Bf8/px3K6AT8aMzDkBo8Bc11245MM+itDBOxQ== + dependencies: + browserslist "^4.4.2" + caniuse-lite "^1.0.30000947" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.14" + postcss-value-parser "^3.3.1" + +bail@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.3.tgz#63cfb9ddbac829b02a3128cd53224be78e6c21a3" + integrity sha512-1X8CnjFVQ+a+KW36uBNMTU5s8+v5FzeqrP7hTG5aTb4aPreSbZJlhwPon9VKMuEVgV++JM+SQrALY3kr7eswdg== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +browserslist@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.4.2.tgz#6ea8a74d6464bb0bd549105f659b41197d8f0ba2" + integrity sha512-ISS/AIAiHERJ3d45Fz0AVYKkgcy+F/eJHzKEvv1j0wwKGKD9T3BrwKr/5g45L+Y4XIK5PlTqefHciRFcfE1Jxg== + dependencies: + caniuse-lite "^1.0.30000939" + electron-to-chromium "^1.3.113" + node-releases "^1.1.8" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + +callsites@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3" + integrity sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw== + +camelcase-keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= + dependencies: + camelcase "^4.1.0" + map-obj "^2.0.0" + quick-lru "^1.0.0" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000947: + version "1.0.30000947" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000947.tgz#c30305e9701449c22e97f4e9837cea3d76aa3273" + integrity sha512-ubgBUfufe5Oi3W1+EHyh2C3lfBIEcZ6bTuvl5wNOpIuRB978GF/Z+pQ7pGGUpeYRB0P+8C7i/3lt6xkeu2hwnA== + +ccount@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.3.tgz#f1cec43f332e2ea5a569fd46f9f5bde4e6102aff" + integrity sha512-Jt9tIBkRc9POUof7QA/VwWd+58fKkEEfI+/t1/eOlxKM7ZhrczNzMFefge7Ai+39y1pR/pP6cI19guHy3FSLmw== + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +character-entities-html4@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.2.tgz#c44fdde3ce66b52e8d321d6c1bf46101f0150610" + integrity sha512-sIrXwyna2+5b0eB9W149izTPJk/KkJTg6mEzDGibwBUkyH1SbDa+nf515Ppdi3MaH35lW0JFJDWeq9Luzes1Iw== + +character-entities-legacy@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.2.tgz#7c6defb81648498222c9855309953d05f4d63a9c" + integrity sha512-9NB2VbXtXYWdXzqrvAHykE/f0QJxzaKIpZ5QzNZrrgQ7Iyxr2vnfS8fCBNVW9nUEZE0lo57nxKRqnzY/dKrwlA== + +character-entities@^1.0.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.2.tgz#58c8f371c0774ef0ba9b2aca5f00d8f100e6e363" + integrity sha512-sMoHX6/nBiy3KKfC78dnEalnpn0Az0oSNvqUWYTtYrhRI5iUIYsROU48G+E+kMFQzqXaJ8kHJZ85n7y6/PHgwQ== + +character-reference-invalid@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.2.tgz#21e421ad3d84055952dab4a43a04e73cd425d3ed" + integrity sha512-7I/xceXfKyUJmSAn/jw8ve/9DyOP7XxufNYLI9Px7CmsKgEUaZLUTax6nZxGQtaoiZCjpu6cHPj20xC/vqRReQ== + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + +clone-regexp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/clone-regexp/-/clone-regexp-1.0.1.tgz#051805cd33173375d82118fc0918606da39fd60f" + integrity sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw== + dependencies: + is-regexp "^1.0.0" + is-supported-regexp-flag "^1.0.0" + +collapse-white-space@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.4.tgz#ce05cf49e54c3277ae573036a26851ba430a0091" + integrity sha512-YfQ1tAUZm561vpYD+5eyWN8+UsceQbSrqqlc/6zDY2gtAE+uZLSdkkovhnGpmCThsvKBFakq4EdY/FF93E8XIw== + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +convert-source-map@^1.1.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== + dependencies: + safe-buffer "~5.1.1" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +cosmiconfig@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.1.0.tgz#6c5c35e97f37f985061cdf653f114784231185cf" + integrity sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.9.0" + lodash.get "^4.4.2" + parse-json "^4.0.0" + +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + +debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^4.0.0, debug@^4.0.1, debug@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize-keys@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +dir-glob@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" + integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== + dependencies: + path-type "^3.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-serializer@0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-prop@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== + dependencies: + is-obj "^1.0.0" + +electron-to-chromium@^1.3.113: + version "1.3.116" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.116.tgz#1dbfee6a592a0c14ade77dbdfe54fef86387d702" + integrity sha512-NKwKAXzur5vFCZYBHpdWjTMO8QptNLNP80nItkSIgUOapPAo9Uia+RvkCaZJtO7fhQaVElSvBPWEc2ku6cKsPA== + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +entities@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +eslint-scope@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.2.tgz#5f10cd6cabb1965bf479fa65745673439e21cb0e" + integrity sha512-5q1+B/ogmHl8+paxtOKx38Z8LtWkVGuNt3+GQNErqwLl6ViNp/gdJGMCjZNxZ8j/VYjDNZ2Fo+eQc1TAVPIzbg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" + integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== + dependencies: + eslint-visitor-keys "^1.0.0" + +eslint-visitor-keys@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@^5.15.1: + version "5.15.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.15.1.tgz#8266b089fd5391e0009a047050795b1d73664524" + integrity sha512-NTcm6vQ+PTgN3UBsALw5BMhgO6i5EpIjQF/Xb5tIh3sk9QhrFafujUOczGz4J24JBlzWclSB9Vmx8d+9Z6bFCg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.2" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.12.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + +execall@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execall/-/execall-1.0.0.tgz#73d0904e395b3cab0658b08d09ec25307f29bb73" + integrity sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M= + dependencies: + clone-regexp "^1.0.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + +fast-glob@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.6.tgz#a5d5b697ec8deda468d85a74035290a025a95295" + integrity sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-4.0.0.tgz#633567d15364aefe0b299e1e217735e8f3a9f6e8" + integrity sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA== + dependencies: + flat-cache "^2.0.1" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" + integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + +glob@^7.1.2, glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +globals@^11.1.0, globals@^11.7.0: + version "11.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.11.0.tgz#dcf93757fa2de5486fbeed7118538adf789e9c2e" + integrity sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw== + +globby@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-9.1.0.tgz#e90f4d5134109e6d855abdd31bdb1b085428592e" + integrity sha512-VtYjhHr7ncls724Of5W6Kaahz0ag7dB4G62/2HsN+xEKG6SrPzM1AJMerGxQTwJGnN9reeyxdvXbuZYpfssCvg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^1.0.2" + dir-glob "^2.2.1" + fast-glob "^2.2.6" + glob "^7.1.3" + ignore "^4.0.3" + pify "^4.0.1" + slash "^2.0.0" + +globjoin@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" + integrity sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM= + +gonzales-pe@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/gonzales-pe/-/gonzales-pe-4.2.3.tgz#41091703625433285e0aee3aa47829fc1fbeb6f2" + integrity sha512-Kjhohco0esHQnOiqqdJeNz/5fyPkOMD/d6XVjwTAoPGUFh0mCollPUTUTa2OZy4dYNAqlPIQdTiNzJTWdd9Htw== + dependencies: + minimist "1.1.x" + +graceful-fs@^4.1.2: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +hosted-git-info@^2.1.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== + +html-tags@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-2.0.0.tgz#10b30a386085f43cede353cc8fa7cb0deeea668b" + integrity sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos= + +htmlparser2@^3.10.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^4.0.3, ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.0.4: + version "5.0.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.0.5.tgz#c663c548d6ce186fb33616a8ccb5d46e56bdbbf9" + integrity sha512-kOC8IUb8HSDMVcYrDVezCxpJkzSQWTAzf3olpKM6o9rM5zpojx23O0Fl8Wr4+qJ6ZbPEHqf1fdwev/DS7v7pmA== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-fresh@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" + integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-lazy@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-3.1.0.tgz#891279202c8a2280fdbd6674dbd8da1a1dfc67cc" + integrity sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ== + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +indent-string@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406" + integrity sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.11" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.0.0" + through "^2.3.6" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-alphabetical@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.2.tgz#1fa6e49213cb7885b75d15862fb3f3d96c884f41" + integrity sha512-V0xN4BYezDHcBSKb1QHUFMlR4as/XEuCZBzMJUU4n7+Cbt33SmUnSol+pnXFvLxSHNq2CemUXNdaXV6Flg7+xg== + +is-alphanumeric@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz#4a9cef71daf4c001c1d81d63d140cf53fd6889f4" + integrity sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ= + +is-alphanumerical@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.2.tgz#1138e9ae5040158dc6ff76b820acd6b7a181fd40" + integrity sha512-pyfU/0kHdISIgslFfZN9nfY1Gk3MquQgUm1mJTjdkEPpkAKNWuBTSqFwewOpR7N351VkErCiyV71zX7mlQQqsg== + dependencies: + is-alphabetical "^1.0.0" + is-decimal "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-buffer@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" + integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-decimal@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.2.tgz#894662d6a8709d307f3a276ca4339c8fa5dff0ff" + integrity sha512-TRzl7mOCchnhchN+f3ICUCzYvL9ul7R+TYOsZ8xia++knyZAJfv/uA1FvQXsAnYIl1T3B2X5E/J7Wb1QXiIBXg== + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= + dependencies: + is-extglob "^2.1.1" + +is-hexadecimal@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.2.tgz#b6e710d7d07bb66b98cb8cece5c9b4921deeb835" + integrity sha512-but/G3sapV3MNyqiDBLrOi4x8uCIw0RY3o/Vb5GT0sMFHrVV7731wFSVy41T5FO1og7G0gXLJh0MkgPRouko/A== + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= + +is-supported-regexp-flag@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.1.tgz#21ee16518d2c1dd3edd3e9a0d57e50207ac364ca" + integrity sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ== + +is-whitespace-character@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.2.tgz#ede53b4c6f6fb3874533751ec9280d01928d03ed" + integrity sha512-SzM+T5GKUCtLhlHFKt2SDAX2RFzfS6joT91F2/WSi9LxgFdsnhfPK/UIA+JhRR2xuyLdrCys2PiFDrtn1fU5hQ== + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-word-character@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.2.tgz#46a5dac3f2a1840898b91e576cd40d493f3ae553" + integrity sha512-T3FlsX8rCHAH8e7RE7PfOPZVFQlcV3XRF9eOOBQ1uf70OxO7CjjSOjeImMPCADBdYWcStAbVbYvJ1m2D3tb+EA== + +isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +jquery-ui@>=1.8.0: + version "1.12.1" + resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.12.1.tgz#bcb4045c8dd0539c134bc1488cdd3e768a7a9e51" + integrity sha1-vLQEXI3QU5wTS8FIjN0+dop6nlE= + +jquery@>=1.7.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.0.tgz#8de513fa0fa4b2c7d2e48a530e26f0596936efdf" + integrity sha512-ggRCXln9zEqv6OqAGXFEcshF5dSBvCkzj6Gm2gzuR5fWawaX8t7cxKVkkygKODrDAzKdoYw3l/e3pm3vlT4IbQ== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.12.0, js-yaml@^3.9.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json5@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + dependencies: + minimist "^1.2.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +known-css-properties@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.11.0.tgz#0da784f115ea77c76b81536d7052e90ee6c86a8a" + integrity sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w== + +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + +lodash@^4.17.11, lodash@^4.17.4: + version "4.17.14" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" + integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== + +log-symbols@^2.0.0, log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + +longest-streak@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.2.tgz#2421b6ba939a443bb9ffebf596585a50b4c38e2e" + integrity sha512-TmYTeEYxiAmSVdpbnQDXGtvYOIRsCMg89CVZzwzc2o7GFL1CjoiRPjH5ec0NFAVlAx3fVof9dX/t6KKRAo2OWA== + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +markdown-escapes@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.2.tgz#e639cbde7b99c841c0bacc8a07982873b46d2122" + integrity sha512-lbRZ2mE3Q9RtLjxZBZ9+IMl68DKIXaVAhwvwn9pmjnPLS0h/6kyBMgNhqi1xFJ/2yv6cSyv0jbiZavZv93JkkA== + +markdown-table@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.2.tgz#c78db948fa879903a41bce522e3b96f801c63786" + integrity sha512-NcWuJFHDA8V3wkDgR/j4+gZx+YQwstPgfQDV8ndUeWWzta3dnDTBxpVzqS9lkmJAuV5YX35lmyojl6HO5JXAgw== + +mathml-tag-names@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.0.tgz#490b70e062ee24636536e3d9481e333733d00f2c" + integrity sha512-3Zs9P/0zzwTob2pdgT0CHZuMbnSUSp8MB1bddfm+HDmnFWHGT4jvEZRf+2RuPoa+cjdn/z25SEt5gFTqdhvJAg== + +mdast-util-compact@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/mdast-util-compact/-/mdast-util-compact-1.0.2.tgz#c12ebe16fffc84573d3e19767726de226e95f649" + integrity sha512-d2WS98JSDVbpSsBfVvD9TaDMlqPRz7ohM/11G0rp5jOBb5q96RJ6YLszQ/09AAixyzh23FeIpCGqfaamEADtWg== + dependencies: + unist-util-visit "^1.1.0" + +meow@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + yargs-parser "^10.0.0" + +merge2@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" + integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== + +micromatch@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist-options@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@1.1.x: + version "1.1.3" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" + integrity sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag= + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-releases@^1.1.8: + version "1.1.10" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.10.tgz#5dbeb6bc7f4e9c85b899e2e7adcc0635c9b2adf7" + integrity sha512-KbUPCpfoBvb3oBkej9+nrU0/7xPlVhmhhUJ1PZqwIP5/1dJkRWKWD3OONjo6M2J7tSCBtDCumLwwqeI+DWWaLQ== + dependencies: + semver "^5.3.0" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= + +normalize-selector@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/normalize-selector/-/normalize-selector-0.2.0.tgz#d0b145eb691189c63a78d201dc4fdb1293ef0c03" + integrity sha1-0LFF62kRicY6eNIB3E/bEpPvDAM= + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +parent-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5" + integrity sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA== + dependencies: + callsites "^3.0.0" + +parse-entities@^1.0.2, parse-entities@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.2.1.tgz#2c761ced065ba7dc68148580b5a225e4918cdd69" + integrity sha512-NBWYLQm1KSoDKk7GAHyioLTvCZ5QjdH/ASBBQTD3iLiAWJXS5bg1jEWI8nIJ+vgVvsceBVBcDGRWSo0KVQBvvg== + dependencies: + character-entities "^1.0.0" + character-entities-legacy "^1.0.0" + character-reference-invalid "^1.0.0" + is-alphanumerical "^1.0.0" + is-decimal "^1.0.0" + is-hexadecimal "^1.0.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.0, pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss-html@^0.36.0: + version "0.36.0" + resolved "https://registry.yarnpkg.com/postcss-html/-/postcss-html-0.36.0.tgz#b40913f94eaacc2453fd30a1327ad6ee1f88b204" + integrity sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw== + dependencies: + htmlparser2 "^3.10.0" + +postcss-jsx@^0.36.0: + version "0.36.0" + resolved "https://registry.yarnpkg.com/postcss-jsx/-/postcss-jsx-0.36.0.tgz#b7685ed3d070a175ef0aa48f83d9015bd772c82d" + integrity sha512-/lWOSXSX5jlITCKFkuYU2WLFdrncZmjSVyNpHAunEgirZXLwI8RjU556e3Uz4mv0WVHnJA9d3JWb36lK9Yx99g== + dependencies: + "@babel/core" ">=7.1.0" + +postcss-less@^3.1.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-3.1.3.tgz#c827617861dddc029f55fcc5d4143dcd6fc8c5cd" + integrity sha512-S0LYoO278GVmyT1uCgr1h95L19dkmzuJDMdpSMCtv+bj15OoJXtFX6c/2AlyL4OEOauGTC7nuqfudVd5kzFtuA== + dependencies: + postcss "^7.0.14" + +postcss-markdown@^0.36.0: + version "0.36.0" + resolved "https://registry.yarnpkg.com/postcss-markdown/-/postcss-markdown-0.36.0.tgz#7f22849ae0e3db18820b7b0d5e7833f13a447560" + integrity sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ== + dependencies: + remark "^10.0.1" + unist-util-find-all-after "^1.0.2" + +postcss-media-query-parser@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" + integrity sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ= + +postcss-reporter@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss-reporter/-/postcss-reporter-6.0.1.tgz#7c055120060a97c8837b4e48215661aafb74245f" + integrity sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw== + dependencies: + chalk "^2.4.1" + lodash "^4.17.11" + log-symbols "^2.2.0" + postcss "^7.0.7" + +postcss-resolve-nested-selector@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz#29ccbc7c37dedfac304e9fff0bf1596b3f6a0e4e" + integrity sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4= + +postcss-safe-parser@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-4.0.1.tgz#8756d9e4c36fdce2c72b091bbc8ca176ab1fcdea" + integrity sha512-xZsFA3uX8MO3yAda03QrG3/Eg1LN3EPfjjf07vke/46HERLZyHrTsQ9E1r1w1W//fWEhtYNndo2hQplN2cVpCQ== + dependencies: + postcss "^7.0.0" + +postcss-sass@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/postcss-sass/-/postcss-sass-0.3.5.tgz#6d3e39f101a53d2efa091f953493116d32beb68c" + integrity sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A== + dependencies: + gonzales-pe "^4.2.3" + postcss "^7.0.1" + +postcss-scss@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-2.0.0.tgz#248b0a28af77ea7b32b1011aba0f738bda27dea1" + integrity sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug== + dependencies: + postcss "^7.0.0" + +postcss-selector-parser@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz#4f875f4afb0c96573d5cf4d74011aee250a7e865" + integrity sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU= + dependencies: + dot-prop "^4.1.1" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-syntax@^0.36.2: + version "0.36.2" + resolved "https://registry.yarnpkg.com/postcss-syntax/-/postcss-syntax-0.36.2.tgz#f08578c7d95834574e5593a82dfbfa8afae3b51c" + integrity sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w== + +postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.13, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.7: + version "7.0.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.14.tgz#4527ed6b1ca0d82c53ce5ec1a2041c2346bbd6e5" + integrity sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +quick-lru@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" + integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= + +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +readable-stream@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.2.0.tgz#de17f229864c120a9f56945756e4f32c4045245d" + integrity sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +redent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= + dependencies: + indent-string "^3.0.0" + strip-indent "^2.0.0" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +remark-parse@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-6.0.3.tgz#c99131052809da482108413f87b0ee7f52180a3a" + integrity sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg== + dependencies: + collapse-white-space "^1.0.2" + is-alphabetical "^1.0.0" + is-decimal "^1.0.0" + is-whitespace-character "^1.0.0" + is-word-character "^1.0.0" + markdown-escapes "^1.0.0" + parse-entities "^1.1.0" + repeat-string "^1.5.4" + state-toggle "^1.0.0" + trim "0.0.1" + trim-trailing-lines "^1.0.0" + unherit "^1.0.4" + unist-util-remove-position "^1.0.0" + vfile-location "^2.0.0" + xtend "^4.0.1" + +remark-stringify@^6.0.0: + version "6.0.4" + resolved "https://registry.yarnpkg.com/remark-stringify/-/remark-stringify-6.0.4.tgz#16ac229d4d1593249018663c7bddf28aafc4e088" + integrity sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg== + dependencies: + ccount "^1.0.0" + is-alphanumeric "^1.0.0" + is-decimal "^1.0.0" + is-whitespace-character "^1.0.0" + longest-streak "^2.0.1" + markdown-escapes "^1.0.0" + markdown-table "^1.1.0" + mdast-util-compact "^1.0.0" + parse-entities "^1.0.2" + repeat-string "^1.5.4" + state-toggle "^1.0.0" + stringify-entities "^1.0.1" + unherit "^1.0.4" + xtend "^4.0.1" + +remark@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/remark/-/remark-10.0.1.tgz#3058076dc41781bf505d8978c291485fe47667df" + integrity sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ== + dependencies: + remark-parse "^6.0.0" + remark-stringify "^6.0.0" + unified "^7.0.0" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.5.4, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +replace-ext@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0, resolve@^1.3.2: + version "1.10.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" + integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" + +rxjs@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" + integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== + dependencies: + tslib "^1.9.0" + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" + integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== + +specificity@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/specificity/-/specificity-0.4.1.tgz#aab5e645012db08ba182e151165738d00887b019" + integrity sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +state-toggle@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.1.tgz#c3cb0974f40a6a0f8e905b96789eb41afa1cde3a" + integrity sha512-Qe8QntFrrpWTnHwvwj2FZTgv+PKIsp0B9VxLzLLbSpPXWOgRgc5LVj/aTiSfK1RqIeF9jeC1UeOH8Q8y60A7og== + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string_decoder@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + dependencies: + safe-buffer "~5.1.0" + +stringify-entities@^1.0.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-1.3.2.tgz#a98417e5471fd227b3e45d3db1861c11caf668f7" + integrity sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A== + dependencies: + character-entities-html4 "^1.0.0" + character-entities-legacy "^1.0.0" + is-alphanumerical "^1.0.0" + is-hexadecimal "^1.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.1.0.tgz#55aaa54e33b4c0649a7338a43437b1887d153ec4" + integrity sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg== + dependencies: + ansi-regex "^4.1.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= + +strip-json-comments@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +style-search@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" + integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI= + +stylelint-config-recommended@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-2.1.0.tgz#f526d5c771c6811186d9eaedbed02195fee30858" + integrity sha512-ajMbivOD7JxdsnlS5945KYhvt7L/HwN6YeYF2BH6kE4UCLJR0YvXMf+2j7nQpJyYLZx9uZzU5G1ZOSBiWAc6yA== + +stylelint@^9.10.1: + version "9.10.1" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-9.10.1.tgz#5f0ee3701461dff1d68284e1386efe8f0677a75d" + integrity sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ== + dependencies: + autoprefixer "^9.0.0" + balanced-match "^1.0.0" + chalk "^2.4.1" + cosmiconfig "^5.0.0" + debug "^4.0.0" + execall "^1.0.0" + file-entry-cache "^4.0.0" + get-stdin "^6.0.0" + global-modules "^2.0.0" + globby "^9.0.0" + globjoin "^0.1.4" + html-tags "^2.0.0" + ignore "^5.0.4" + import-lazy "^3.1.0" + imurmurhash "^0.1.4" + known-css-properties "^0.11.0" + leven "^2.1.0" + lodash "^4.17.4" + log-symbols "^2.0.0" + mathml-tag-names "^2.0.1" + meow "^5.0.0" + micromatch "^3.1.10" + normalize-selector "^0.2.0" + pify "^4.0.0" + postcss "^7.0.13" + postcss-html "^0.36.0" + postcss-jsx "^0.36.0" + postcss-less "^3.1.0" + postcss-markdown "^0.36.0" + postcss-media-query-parser "^0.2.3" + postcss-reporter "^6.0.0" + postcss-resolve-nested-selector "^0.1.1" + postcss-safe-parser "^4.0.0" + postcss-sass "^0.3.5" + postcss-scss "^2.0.0" + postcss-selector-parser "^3.1.0" + postcss-syntax "^0.36.2" + postcss-value-parser "^3.3.0" + resolve-from "^4.0.0" + signal-exit "^3.0.2" + slash "^2.0.0" + specificity "^0.4.1" + string-width "^3.0.0" + style-search "^0.1.0" + sugarss "^2.0.0" + svg-tags "^1.0.0" + table "^5.0.0" + +sugarss@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sugarss/-/sugarss-2.0.0.tgz#ddd76e0124b297d40bf3cca31c8b22ecb43bc61d" + integrity sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ== + dependencies: + postcss "^7.0.2" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +svg-tags@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" + integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= + +table@^5.0.0, table@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/table/-/table-5.2.3.tgz#cde0cc6eb06751c009efab27e8c820ca5b67b7f2" + integrity sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ== + dependencies: + ajv "^6.9.1" + lodash "^4.17.11" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +trim-newlines@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +trim-trailing-lines@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.1.tgz#e0ec0810fd3c3f1730516b45f49083caaf2774d9" + integrity sha512-bWLv9BbWbbd7mlqqs2oQYnLD/U/ZqeJeJwbO0FG2zA1aTq+HTvxfHNKFa/HGCVyJpDiioUYaBhfiT6rgk+l4mg== + +trim@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" + integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= + +trough@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.3.tgz#e29bd1614c6458d44869fc28b255ab7857ef7c24" + integrity sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw== + +tslib@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +unherit@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.1.tgz#132748da3e88eab767e08fabfbb89c5e9d28628c" + integrity sha512-+XZuV691Cn4zHsK0vkKYwBEwB74T3IZIcxrgn2E4rKwTfFyI1zCh7X7grwh9Re08fdPlarIdyWgI8aVB3F5A5g== + dependencies: + inherits "^2.0.1" + xtend "^4.0.1" + +unified@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/unified/-/unified-7.1.0.tgz#5032f1c1ee3364bd09da12e27fdd4a7553c7be13" + integrity sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw== + dependencies: + "@types/unist" "^2.0.0" + "@types/vfile" "^3.0.0" + bail "^1.0.0" + extend "^3.0.0" + is-plain-obj "^1.1.0" + trough "^1.0.0" + vfile "^3.0.0" + x-is-string "^0.1.0" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + +unist-util-find-all-after@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unist-util-find-all-after/-/unist-util-find-all-after-1.0.2.tgz#9be49cfbae5ca1566b27536670a92836bf2f8d6d" + integrity sha512-nDl79mKpffXojLpCimVXnxhlH/jjaTnDuScznU9J4jjsaUtBdDbxmlc109XtcqxY4SDO0SwzngsxxW8DIISt1w== + dependencies: + unist-util-is "^2.0.0" + +unist-util-is@^2.0.0, unist-util-is@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.2.tgz#1193fa8f2bfbbb82150633f3a8d2eb9a1c1d55db" + integrity sha512-YkXBK/H9raAmG7KXck+UUpnKiNmUdB+aBGrknfQ4EreE1banuzrKABx3jP6Z5Z3fMSPMQQmeXBlKpCbMwBkxVw== + +unist-util-remove-position@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.2.tgz#86b5dad104d0bbfbeb1db5f5c92f3570575c12cb" + integrity sha512-XxoNOBvq1WXRKXxgnSYbtCF76TJrRoe5++pD4cCBsssSiWSnPEktyFrFLE8LTk3JW5mt9hB0Sk5zn4x/JeWY7Q== + dependencies: + unist-util-visit "^1.1.0" + +unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz#3f37fcf351279dcbca7480ab5889bb8a832ee1c6" + integrity sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ== + +unist-util-visit-parents@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.0.1.tgz#63fffc8929027bee04bfef7d2cce474f71cb6217" + integrity sha512-6B0UTiMfdWql4cQ03gDTCSns+64Zkfo2OCbK31Ov0uMizEz+CJeAp0cgZVb5Fhmcd7Bct2iRNywejT0orpbqUA== + dependencies: + unist-util-is "^2.1.2" + +unist-util-visit@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.0.tgz#1cb763647186dc26f5e1df5db6bd1e48b3cc2fb1" + integrity sha512-FiGu34ziNsZA3ZUteZxSFaczIjGmksfSgdKqBfOejrrfzyUy5b7YrlzT1Bcvi+djkYDituJDy2XB7tGTeBieKw== + dependencies: + unist-util-visit-parents "^2.0.0" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +vfile-location@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-2.0.4.tgz#2a5e7297dd0d9e2da4381464d04acc6b834d3e55" + integrity sha512-KRL5uXQPoUKu+NGvQVL4XLORw45W62v4U4gxJ3vRlDfI9QsT4ZN1PNXn/zQpKUulqGDpYuT0XDfp5q9O87/y/w== + +vfile-message@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-1.1.1.tgz#5833ae078a1dfa2d96e9647886cd32993ab313e1" + integrity sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA== + dependencies: + unist-util-stringify-position "^1.1.1" + +vfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/vfile/-/vfile-3.0.1.tgz#47331d2abe3282424f4a4bb6acd20a44c4121803" + integrity sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ== + dependencies: + is-buffer "^2.0.0" + replace-ext "1.0.0" + unist-util-stringify-position "^1.0.0" + vfile-message "^1.0.0" + +which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +x-is-string@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82" + integrity sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI= + +xtend@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= + +yargs-parser@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0"