{"version":3,"sources":["common/useHelper.js","common/lib/palette.js"],"names":["languageSuffixes","pl","en","es","flagsDefinitions","ID","KOD","NAZWA","NAZWA_ANG","METHOD","Atou","b64","Str","decodeURIComponent","escape","atob","e","console","log","window","location","TranslationFromJson","json","key","_languageSuffixes$cur","currentLanguage","i18n","language","_localStorage","localStorage","getItem","_suffix","find","suffix","hasOwnProperty","IntlNumberFormat","number","precision","id_flagi","arguments","length","undefined","forceDOT","formattedNumber","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","useGrouping","format","GetAllIDs","data","children","map","m","concat","useHelper","translationFromJson","intlNumberFormat","atou","utoa","btoa","unescape","encodeURIComponent","Utoa","clearLocalStorage","async","except","itemsToKeep","uniq","forEach","get","then","val","clear","setItem","set","ClearLocalStorage","delay","Promise","resolve","setTimeout","miliseconds","Delay","splitStringToLength","_ref3","string","newLine","_ref","_result2","arr","split","result","subStr","simpleRegexp","RegExp","parseInt","_result","match","asArray","asText","join","i","word","push","SplitStringToLength","splitStringToSize","_ref4","width","_ref2","id","Date","now","div","document","createElement","setAttribute","style","display","position","top","left","innerText","body","appendChild","wordBreak","words","beforeBreak","height","offsetHeight","longest","Math","max","w","_removeEl","getElementById","removeChild","SplitStringToSize","isElementVisible","el","rect","getBoundingClientRect","vWidth","innerWidth","documentElement","clientWidth","vHeight","innerHeight","clientHeight","efp","x","y","elementFromPoint","right","bottom","contains","IsElementVisible","paletteGenerator","_ref5","scheme","n","PaletteGenerator","getAllIDs","_ref6","_add","_add2","_add3","_add4","_add5","_add6","_add7","_add8","add","palette","rgbColor","slice","primary","dark","title","name","varargs","num","colors","scheme_name","listSchemes","args","Array","prototype","call","apply","generate","color","proto","opt_begin","opt_end","INF","opt_index","Scheme","opt_groups","palettes","palettes_max","palettes_min","makeGenerator","self","color_func","bind","_number","abs","shrinking_takes_head","round","reverse","color_func_cyclic","groups","cbf_max","addPalette","opt_is_cbf","len","min","addPalettes","opt_max","opt_cbf_max","shrinkByTakingHead","enabled","opt_idx","setColorFunction","func","opt_cyclic","this","fromPalettes","withColorFunction","registered_schemes","register","g","opt_number","ret","cbf","substring","schemes","sort","a","b","opt_start","step","clamp","v","r","Number","toString","linearRgbColor","pow","hsvColor","h","opt_s","opt_v","s","floor","rgb","poly","erf","tolSequentialColor","tolDivergingColor","tolRainbowColor","YlGn","type","YlGnBu","GnBu","BuGn","PuBuGn","PuBu","BuPu","RdPu","PuRd","OrRd","YlOrRd","YlOrBr","Purples","Blues","Greens","Oranges","Reds","Greys","PuOr","BrBG","PRGn","PiYG","RdBu","RdGy","RdYlBu","Spectral","RdYlGn","Accent","Dark2","Paired","Pastel1","Pastel2","Set1","Set2","Set3","module","exports"],"mappings":";8FAAA,iOAKA,MAAMA,EAAmB,CACrBC,GAAI,CAAC,MAAO,IACZC,GAAI,CAAC,MAAO,OAAQ,MAAO,QAC3BC,GAAI,CAAC,MAAO,SAGHC,EAAmB,CAC5B,CACIC,GAAI,EACJC,IAAK,GACLC,MAAO,+BACPC,UAAW,+BACXC,OAAQ,8BAEZ,CACIJ,GAAI,EACJC,IAAK,IACLC,MAAO,mCACPC,UAAW,iBACXC,OAAQ,oDAEZ,CACIJ,GAAI,EACJC,IAAK,IACLC,MAAO,uEACPC,UAAW,kDACXC,OAAQ,IAEZ,CACIJ,GAAI,EACJC,IAAK,IACLC,MAAO,4DACPC,UAAW,mDACXC,OAAQ,IAEZ,CACIJ,GAAI,EACJC,IAAK,IACLC,MAAO,qJACPC,UACI,gHACJC,OAAQ,oDAEZ,CACIJ,GAAI,EACJC,IAAK,IACLC,MAAO,0EACPC,UAAW,eACXC,OAAQ,oDAIHC,EAAQC,IACjB,IAAIC,EAAM,GAEV,IAEI,OADAA,EAAMC,mBAAmBC,OAAOC,KAAKJ,KAC9BC,CACX,CAAE,MAAOI,GACLC,QAAQC,IAAIF,GACZG,OAAOC,SAAW,iBACtB,GAKSC,EAAsBA,CAACC,EAAMC,KAAS,IAADC,EAC9C,IAAIC,EAAkBC,IAAKC,SACQ,I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,EAAOC,UACtCD,EAAOC,QAAU9H,E","file":"static/js/6.a050e457.chunk.js","sourcesContent":["import i18n from \"../common/i18n\";\r\nimport uniq from \"lodash/uniq\";\r\nimport { get, set, clear } from \"../appStore/_idb\";\r\nimport palette from \"./lib/palette\";\r\n\r\nconst languageSuffixes = {\r\n pl: [\"_pl\", \"\"],\r\n en: [\"_en\", \"_ang\", \"_EN\", \"_ANG\"],\r\n es: [\"_es\", \"_spa\"],\r\n};\r\n\r\nexport const flagsDefinitions = [\r\n {\r\n ID: 1,\r\n KOD: \"\",\r\n NAZWA: \"Zjawisko wystąpiło\",\r\n NAZWA_ANG: \"Zjawisko wystąpiło\",\r\n METHOD: 'wyświetlamy \"wartosc\"',\r\n },\r\n {\r\n ID: 2,\r\n KOD: \"-\",\r\n NAZWA: \"Zjawisko nie wystąpiło\",\r\n NAZWA_ANG: \"Magnitude zero\",\r\n METHOD: 'zamiast \"wartosc\" wyświetlamy KOD czyli \"-\"',\r\n },\r\n {\r\n ID: 3,\r\n KOD: \"0\",\r\n NAZWA: \"Wartość mniejsza niż przyjęty format prezentacji\",\r\n NAZWA_ANG: \"Magnitude not zero, but less than 0,5 of a unit\",\r\n METHOD: \"\",\r\n },\r\n {\r\n ID: 4,\r\n KOD: \"0\",\r\n NAZWA: \"Zjawisko istniało w wielkości mniejszej od 0,05\",\r\n NAZWA_ANG: \"Magnitude not zero, but less than 0,05 of a unit\",\r\n METHOD: \"\",\r\n },\r\n {\r\n ID: 5,\r\n KOD: \".\",\r\n NAZWA: \"Brak informacji, konieczność zachowania tajemnicy statystycznej lub że wypełnienie pozycji jest niemożliwe albo niecelowe\",\r\n NAZWA_ANG:\r\n \"Data not available, classified data (statistical confidentiality) or providing data impossible or purposeless\",\r\n METHOD: 'zamiast \"wartosc\" wyświetlamy KOD czyli \".\"',\r\n },\r\n {\r\n ID: 6,\r\n KOD: \"*\",\r\n NAZWA: \"Dane zostały zmienione w stosunku do wcześniej opublikowanych\",\r\n NAZWA_ANG: \"Revised data\",\r\n METHOD: 'wyświetlamy \"wartosc\" i * czyli np. 99,00*',\r\n },\r\n];\r\n\r\nexport const Atou = (b64) => {\r\n let Str = \"\";\r\n\r\n try {\r\n Str = decodeURIComponent(escape(atob(b64)));\r\n return Str;\r\n } catch (e) {\r\n console.log(e);\r\n window.location = \"/404?e=wrongUrl\";\r\n }\r\n};\r\n\r\nexport const Utoa = (data) => btoa(unescape(encodeURIComponent(data)));\r\n\r\nexport const TranslationFromJson = (json, key) => {\r\n let currentLanguage = i18n.language;\r\n if (currentLanguage === \"cimode\") {\r\n currentLanguage = localStorage?.getItem(\"i18nextLng\", \"APP\");\r\n }\r\n\r\n if (typeof json === \"string\") return json;\r\n\r\n if (currentLanguage === \"pl\") return json?.[key] || \"\";\r\n const _suffix = languageSuffixes?.[currentLanguage]?.find((suffix) => json?.hasOwnProperty(key + suffix));\r\n\r\n if (_suffix) {\r\n return json?.[key + _suffix];\r\n } else {\r\n return \"The API has no fields for translation\";\r\n }\r\n};\r\n\r\nexport const IntlNumberFormat = (number, precision, id_flagi = 1, forceDOT) => {\r\n precision = precision === 0 ? 0 : precision > 0 && precision < 6 ? precision : 2;\r\n\r\n const currentLanguage = forceDOT ? \"en\" : i18n.language === \"pl\" ? \"uk\" : i18n.language;\r\n\r\n let formattedNumber = new Intl.NumberFormat(currentLanguage, {\r\n minimumFractionDigits: precision,\r\n maximumFractionDigits: precision,\r\n useGrouping: !forceDOT,\r\n }).format(number);\r\n\r\n switch (id_flagi) {\r\n case 1:\r\n return formattedNumber;\r\n case 2:\r\n return \"-\";\r\n case 3:\r\n return new Intl.NumberFormat(currentLanguage, {\r\n minimumFractionDigits: precision,\r\n maximumFractionDigits: precision,\r\n }).format(0);\r\n case 4:\r\n return new Intl.NumberFormat(currentLanguage, {\r\n minimumFractionDigits: precision,\r\n maximumFractionDigits: precision,\r\n }).format(0);\r\n case 5:\r\n return \".\";\r\n case 6:\r\n return formattedNumber + \"*\";\r\n case 666:\r\n break;\r\n default:\r\n return formattedNumber + \"*\";\r\n }\r\n\r\n return formattedNumber;\r\n};\r\n\r\nexport const ClearLocalStorage = (except) => {\r\n let itemsToKeep = [];\r\n except = uniq([...(except || []), \"x-a-t\", \"sver.\"]);\r\n if (except && except.length) {\r\n except.forEach((key) => {\r\n itemsToKeep[key] = localStorage.getItem(key) ? localStorage.getItem(key) : undefined;\r\n get(key).then((val) => {\r\n itemsToKeep[key] = itemsToKeep[key] ? itemsToKeep[key] : val;\r\n });\r\n });\r\n }\r\n console.log(\"%c CLEAR \", \"background:#F00;color:#FFF\", { itemsToKeep, except });\r\n localStorage.clear();\r\n clear().then(() => {\r\n if (except && except.length) {\r\n except.forEach((key) => {\r\n itemsToKeep[key] && localStorage.setItem(key, itemsToKeep[key]);\r\n itemsToKeep[key] && set(key, itemsToKeep[key]);\r\n });\r\n }\r\n });\r\n\r\n return itemsToKeep;\r\n};\r\n\r\nexport const Delay = async (miliseconds) => {\r\n await new Promise((resolve) => setTimeout(resolve, miliseconds));\r\n return true;\r\n};\r\n\r\nexport const StorageVersion = async () => {};\r\n\r\nexport const SplitStringToLength = ({ length, string, newLine = \"\\n\" }) => {\r\n let arr = string?.split(\" \");\r\n let result = [];\r\n let subStr = arr[0];\r\n\r\n const simpleRegexp = new RegExp(`.{1,${parseInt(length * 0.88)}}`, \"g\");\r\n\r\n /** no whitespaces */\r\n if (!string.match(/\\s/g)) {\r\n result = string.match(simpleRegexp);\r\n\r\n return { asArray: result, asText: result?.join(newLine) };\r\n }\r\n\r\n for (let i = 1; i < arr.length; i++) {\r\n let word = arr[i];\r\n if (subStr.length + word.length + 1 <= length) {\r\n subStr = subStr + \" \" + word;\r\n } else {\r\n result.push(subStr);\r\n subStr = word;\r\n }\r\n }\r\n if (subStr.length) {\r\n result.push(subStr);\r\n }\r\n\r\n return { asArray: result, asText: result?.join(newLine) };\r\n};\r\n\r\nexport const SplitStringToSize = ({ width, string }) => {\r\n const id = \"_SplitStringToSize\" + Date.now();\r\n\r\n let div = document.createElement(\"div\");\r\n div.setAttribute(\"id\", id);\r\n div.style.display = \"block\";\r\n div.style.position = \"absolute\";\r\n div.style.width = width + \"px\";\r\n div.style.top = -9999 + \"px\";\r\n div.style.left = -9999 + \"px\";\r\n div.innerText = string;\r\n document.body.appendChild(div);\r\n\r\n let wordBreak = [];\r\n let words = div.innerText.split(\" \");\r\n div.innerText = words[0];\r\n let beforeBreak = words[0];\r\n let height = div.offsetHeight;\r\n\r\n for (let i = 1; i < words.length; i++) {\r\n div.innerText += \" \" + words[i];\r\n if (div.offsetHeight > height) {\r\n height = div.offsetHeight;\r\n wordBreak.push(beforeBreak);\r\n beforeBreak = words[i];\r\n } else {\r\n beforeBreak += \" \" + words[i];\r\n }\r\n }\r\n\r\n wordBreak.push(beforeBreak);\r\n\r\n var longest = Math.max(...wordBreak?.map((w) => w.length));\r\n\r\n let _removeEl = document.getElementById(id);\r\n\r\n if (_removeEl) {\r\n document.body.removeChild(_removeEl);\r\n }\r\n\r\n return { asArray: wordBreak, longest };\r\n};\r\n\r\nexport const IsElementVisible = (el) => {\r\n var rect = el.getBoundingClientRect(),\r\n vWidth = window.innerWidth || document.documentElement.clientWidth,\r\n vHeight = window.innerHeight || document.documentElement.clientHeight,\r\n efp = function (x, y) {\r\n return document.elementFromPoint(x, y);\r\n };\r\n\r\n // Return false if it's not in the viewport\r\n if (rect.right < 0 || rect.bottom < 0 || rect.left > vWidth || rect.top > vHeight) return false;\r\n\r\n // Return true if any of its four corners are visible\r\n return (\r\n el.contains(efp(rect.left, rect.top)) ||\r\n el.contains(efp(rect.right, rect.top)) ||\r\n el.contains(efp(rect.right, rect.bottom)) ||\r\n el.contains(efp(rect.left, rect.bottom))\r\n );\r\n};\r\n\r\nexport const GetAllIDs = (data) => {\r\n let children = [];\r\n\r\n return data\r\n .map((m) => {\r\n if (m.children && m.children.length) {\r\n children = [...children, ...m.children];\r\n }\r\n return m;\r\n })\r\n .concat(children.length ? GetAllIDs(children) : children);\r\n};\r\n\r\nexport const useHelper = () => {\r\n const translationFromJson = (json, key) => TranslationFromJson(json, key);\r\n\r\n const intlNumberFormat = (number, precision, id_flagi, forceDOT) =>\r\n IntlNumberFormat(number, precision, id_flagi, forceDOT);\r\n\r\n const atou = (b64) => Atou(b64);\r\n\r\n const utoa = (data) => Utoa(data);\r\n\r\n const clearLocalStorage = async (except) => ClearLocalStorage(except);\r\n\r\n const delay = async (miliseconds) => Delay(miliseconds);\r\n\r\n const splitStringToLength = ({ length, string, newLine }) => SplitStringToLength({ length, string, newLine });\r\n\r\n const splitStringToSize = ({ width, string }) => SplitStringToSize({ width, string });\r\n\r\n const isElementVisible = (el) => IsElementVisible(el);\r\n\r\n const paletteGenerator = ({ scheme, n }) => PaletteGenerator({ scheme, n });\r\n\r\n const getAllIDs = (data) => GetAllIDs(data);\r\n\r\n return {\r\n translationFromJson,\r\n intlNumberFormat,\r\n atou,\r\n utoa,\r\n clearLocalStorage,\r\n delay,\r\n flagsDefinitions,\r\n splitStringToLength,\r\n splitStringToSize,\r\n isElementVisible,\r\n paletteGenerator,\r\n getAllIDs,\r\n };\r\n};\r\n\r\nexport default useHelper;\r\n\r\n/** Palette generator */\r\nexport const PaletteGenerator = ({ scheme, n = 7 }) => {\r\n // n = n ;\r\n let result = [];\r\n\r\n switch (scheme) {\r\n case \"mpn65\":\r\n result = add(\"Random\", \"mpn65\", null, n);\r\n break;\r\n case \"rainbow\":\r\n result = add(\"Rainbow\", \"rainbow\", 1, n);\r\n break;\r\n\r\n case \"gradient\":\r\n result = add(\"Red\", (x) => palette.rgbColor(x, 0, 0), null, n * 2)?.slice(-n);\r\n break;\r\n case \"gradient-red\":\r\n result = add(\"Red\", (x) => palette.rgbColor(x, 0, 0), null, n * 2)?.slice(-n);\r\n break;\r\n case \"gradient-green\":\r\n result = add(\"Green\", (x) => palette.rgbColor(0, x, 0), null, n * 2)?.slice(-n);\r\n break;\r\n case \"gradient-blue\":\r\n result = add(\"Blue\", (x) => palette.rgbColor(0, 0, x), null, n * 2)?.slice(-n);\r\n break;\r\n case \"gradient-yellow\":\r\n result = add(\"Yellow\", (x) => palette.rgbColor(x, x, 0), null, n * 2)?.slice(-n);\r\n break;\r\n case \"gradient-magenta\":\r\n result = add(\"Magenta\", (x) => palette.rgbColor(x, 0, x), null, n * 2)?.slice(-n);\r\n break;\r\n case \"gradient-cyan\":\r\n result = add(\"cyan\", (x) => palette.rgbColor(0, x, x), null, n * 2)?.slice(-n);\r\n break;\r\n case \"gradient-grayscale\":\r\n result = add(\"grayscale\", (x) => palette.rgbColor(x, x, x), null, n * 2)?.slice(-n);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n result = [\"#6677a1\", \"#bbd631\", ...result].slice(0, -2);\r\n\r\n return { primary: result, dark: result };\r\n};\r\n\r\nconst add = function (title, name, varargs, num) {\r\n var colors;\r\n if (typeof name === typeof add && !name.scheme_name) {\r\n colors = palette.generate(name, num);\r\n } else {\r\n var scheme = name;\r\n if (typeof name === \"string\") {\r\n title = name + \": \" + title;\r\n scheme = palette.listSchemes(name)[0];\r\n }\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n args[0] = num;\r\n colors = scheme.apply(scheme, args);\r\n }\r\n if (colors) {\r\n // colors = transformColors(colors, transform);\r\n colors = colors.map((color) => `#${color}`);\r\n }\r\n\r\n return colors;\r\n};\r\n","/** @license\r\n *\r\n * Colour Palette Generator script.\r\n * Copyright (c) 2014 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n * not use this file except in compliance with the License. You may\r\n * obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r\n * implied. See the License for the specific language governing\r\n * permissions and limitations under the License.\r\n *\r\n * Furthermore, ColorBrewer colour schemes are covered by the following:\r\n *\r\n * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and\r\n * The Pennsylvania State University.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n * not use this file except in compliance with the License. You may obtain\r\n * a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r\n * implied. See the License for the specific language governing\r\n * permissions and limitations under the License.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are\r\n * met:\r\n *\r\n * 1. Redistributions as source code must retain the above copyright\r\n * notice, this list of conditions and the following disclaimer.\r\n *\r\n * 2. The end-user documentation included with the redistribution, if any,\r\n * must include the following acknowledgment: \"This product includes color\r\n * specifications and designs developed by Cynthia Brewer\r\n * (http://colorbrewer.org/).\" Alternately, this acknowledgment may appear\r\n * in the software itself, if and wherever such third-party\r\n * acknowledgments normally appear.\r\n *\r\n * 4. The name \"ColorBrewer\" must not be used to endorse or promote products\r\n * derived from this software without prior written permission. For written\r\n * permission, please contact Cynthia Brewer at cbrewer@psu.edu.\r\n *\r\n * 5. Products derived from this software may not be called \"ColorBrewer\",\r\n * nor may \"ColorBrewer\" appear in their name, without prior written\r\n * permission of Cynthia Brewer.\r\n *\r\n * Furthermore, Solarized colour schemes are covered by the following:\r\n *\r\n * Copyright (c) 2011 Ethan Schoonover\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining\r\n * a copy of this software and associated documentation files (the\r\n * \"Software\"), to deal in the Software without restriction, including\r\n * without limitation the rights to use, copy, modify, merge, publish,\r\n * distribute, sublicense, and/or sell copies of the Software, and to\r\n * permit persons to whom the Software is furnished to do so, subject to\r\n * the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included\r\n * in all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n */\r\n// eslint-disable-next-line\r\n'use strict';\r\n\r\nvar palette = (function() {\r\n\r\n var proto = Array.prototype;\r\n var slice = function(arr, opt_begin, opt_end) {\r\n return proto.slice.apply(arr, proto.slice.call(arguments, 1));\r\n };\r\n\r\n var extend = function(arr, arr2) {\r\n return proto.push.apply(arr, arr2);\r\n };\r\n\r\n var function_type = typeof function() {};\r\n\r\n var INF = 1000000000; // As far as we're concerned, that's infinity. ;)\r\n\r\n\r\n /**\r\n * Generate a colour palette from given scheme.\r\n *\r\n * If scheme argument is not a function it is passed to palettes.listSchemes\r\n * function (along with the number argument). This may result in an array\r\n * of more than one available scheme. If that is the case, scheme at\r\n * opt_index position is taken.\r\n *\r\n * This allows using different palettes for different data without having to\r\n * name the schemes specifically, for example:\r\n *\r\n * palette_for_foo = palette('sequential', 10, 0);\r\n * palette_for_bar = palette('sequential', 10, 1);\r\n * palette_for_baz = palette('sequential', 10, 2);\r\n *\r\n * @param {!palette.SchemeType|string|palette.Palette} scheme Scheme to\r\n * generate palette for. Either a function constructed with\r\n * palette.Scheme object, or anything that palette.listSchemes accepts\r\n * as name argument.\r\n * @param {number} number Number of colours to return. If negative, absolute\r\n * value is taken and colours will be returned in reverse order.\r\n * @param {number=} opt_index If scheme is a name of a group or an array and\r\n * results in more than one scheme, index of the scheme to use. The\r\n * index wraps around.\r\n * @param {...*} varargs Additional arguments to pass to palette or colour\r\n * generator (if the chosen scheme uses those).\r\n * @return {Array} Array of abs(number) 'RRGGBB' strings or null if\r\n * no matching scheme was found.\r\n */\r\n var palette = function(scheme, number, opt_index, varargs) {\r\n number |= 0;\r\n // eslint-disable-next-line\r\n if (number == 0) {\r\n return [];\r\n }\r\n\r\n if (typeof scheme !== function_type) {\r\n var arr = palette.listSchemes(\r\n /** @type {string|palette.Palette} */ (scheme), number);\r\n if (!arr.length) {\r\n return null;\r\n }\r\n scheme = arr[(opt_index || 0) % arr.length];\r\n }\r\n\r\n var args = slice(arguments, 2);\r\n args[0] = number;\r\n return scheme.apply(scheme, args);\r\n };\r\n\r\n\r\n /**\r\n * Returns a callable colour scheme object.\r\n *\r\n * Just after being created, the scheme has no colour palettes and no way of\r\n * generating any, thus generate method will return null. To turn scheme\r\n * into a useful object, addPalette, addPalettes or setColorFunction methods\r\n * need to be used.\r\n *\r\n * To generate a colour palette with given number colours using function\r\n * returned by this method, just call it with desired number of colours.\r\n *\r\n * Since this function *returns* a callable object, it must *not* be used\r\n * with the new operator.\r\n *\r\n * @param {string} name Name of the scheme.\r\n * @param {string|!Array=} opt_groups A group name or list of\r\n * groups the scheme should be categorised under. Three typical groups\r\n * to use are 'qualitative', 'sequential' and 'diverging', but any\r\n * groups may be created.\r\n * @return {!palette.SchemeType} A colour palette generator function, which\r\n * in addition has methods and properties like a regular object. Think\r\n * of it as a callable object.\r\n */\r\n palette.Scheme = function(name, opt_groups) {\r\n /**\r\n * A map from a number to a colour palettes with given number of colours.\r\n * @type {!Object}\r\n */\r\n var palettes = {};\r\n\r\n /**\r\n * The biggest palette in palettes map.\r\n * @type {number}\r\n */\r\n var palettes_max = 0;\r\n\r\n /**\r\n * The smallest palette in palettes map.\r\n * @type {number}\r\n */\r\n var palettes_min = INF;\r\n\r\n var makeGenerator = function() {\r\n if (arguments.length <= 1) {\r\n return self.color_func.bind(self);\r\n } else {\r\n var args = slice(arguments);\r\n return function(x) {\r\n args[0] = x;\r\n return self.color_func.apply(self, args);\r\n };\r\n }\r\n };\r\n\r\n /**\r\n * Generate a colour palette from the scheme.\r\n *\r\n * If there was a palette added with addPalette (or addPalettes) with\r\n * enough colours, that palette will be used. Otherwise, if colour\r\n * function has been set using setColorFunction method, that function will\r\n * be used to generate the palette. Otherwise null is returned.\r\n *\r\n * @param {number} number Number of colours to return. If negative,\r\n * absolute value is taken and colours will be returned in reverse\r\n * order.\r\n * @param {...*} varargs Additional arguments to pass to palette or colour\r\n * generator (if the chosen scheme uses those).\r\n */\r\n var self = function(number, varargs) {\r\n number |= 0;\r\n if (!number) {\r\n return [];\r\n }\r\n\r\n var _number = number;\r\n number = Math.abs(number);\r\n\r\n if (number <= palettes_max) {\r\n for (var i = Math.max(number, palettes_min); !(i in palettes); ++i) {\r\n /* nop */\r\n }\r\n var colors = palettes[i];\r\n if (i > number) {\r\n var take_head =\r\n 'shrinking_takes_head' in colors ?\r\n colors.shrinking_takes_head : self.shrinking_takes_head;\r\n if (take_head) {\r\n colors = colors.slice(0, number);\r\n i = number;\r\n } else {\r\n return palette.generate(\r\n function(x) { return colors[Math.round(x)]; },\r\n _number, 0, colors.length - 1);\r\n }\r\n }\r\n colors = colors.slice();\r\n if (_number < 0) {\r\n colors.reverse();\r\n }\r\n return colors;\r\n\r\n } else if (self.color_func) {\r\n return palette.generate(makeGenerator.apply(self, arguments),\r\n _number, 0, 1, self.color_func_cyclic);\r\n\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n /**\r\n * The name of the palette.\r\n * @type {string}\r\n */\r\n self.scheme_name = name;\r\n\r\n /**\r\n * A list of groups the palette belongs to.\r\n * @type {!Array}\r\n */\r\n self.groups = opt_groups ?\r\n typeof opt_groups === 'string' ? [opt_groups] : opt_groups : [];\r\n\r\n /**\r\n * The biggest palette this scheme can generate.\r\n * @type {number}\r\n */\r\n self.max = 0;\r\n\r\n /**\r\n * The biggest palette this scheme can generate that is colour-blind\r\n * friendly.\r\n * @type {number}\r\n */\r\n self.cbf_max = INF;\r\n\r\n\r\n /**\r\n * Adds a colour palette to the colour scheme.\r\n *\r\n * @param {palette.Palette} palette An array of 'RRGGBB' strings\r\n * representing the palette to add.\r\n * @param {boolean=} opt_is_cbf Whether the palette is colourblind friendly.\r\n */\r\n self.addPalette = function(palette, opt_is_cbf) {\r\n var len = palette.length;\r\n if (len) {\r\n palettes[len] = palette;\r\n palettes_min = Math.min(palettes_min, len);\r\n palettes_max = Math.max(palettes_max, len);\r\n self.max = Math.max(self.max, len);\r\n // eslint-disable-next-line\r\n if (!opt_is_cbf && len != 1) {\r\n self.cbf_max = Math.min(self.cbf_max, len - 1);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Adds number of colour palettes to the colour scheme.\r\n *\r\n * @param {palette.PalettesList} palettes A map or an array of colour\r\n * palettes to add. If map, i.e. object, is used, properties should\r\n * use integer property names.\r\n * @param {number=} opt_max Size of the biggest palette in palettes set.\r\n * If not set, palettes must have a length property which will be used.\r\n * @param {number=} opt_cbf_max Size of the biggest palette which is still\r\n * colourblind friendly. 1 by default.\r\n */\r\n self.addPalettes = function(palettes, opt_max, opt_cbf_max) {\r\n opt_max = opt_max || palettes.length;\r\n for (var i = 0; i < opt_max; ++i) {\r\n if (i in palettes) {\r\n self.addPalette(palettes[i], true);\r\n }\r\n }\r\n self.cbf_max = Math.min(self.cbf_max, opt_cbf_max || 1);\r\n };\r\n\r\n /**\r\n * Enable shrinking palettes taking head of the list of colours.\r\n *\r\n * When user requests n-colour palette but the smallest palette added with\r\n * addPalette (or addPalettes) is m-colour one (where n < m), n colours\r\n * across the palette will be returned. For example:\r\n * var ex = palette.Scheme('ex');\r\n * ex.addPalette(['000000', 'bcbcbc', 'ffffff']);\r\n * var pal = ex(2);\r\n * // pal == ['000000', 'ffffff']\r\n *\r\n * This works for palettes where the distance between colours is\r\n * correlated to distance in the palette array, which is true in gradients\r\n * such as the one above.\r\n *\r\n * To turn this feature off shrinkByTakingHead can be set to true either\r\n * for all palettes in the scheme (if opt_idx is not given) or for palette\r\n * with given number of colours only. In general, setting the option for\r\n * given palette overwrites whatever has been set for the scheme. The\r\n * default, as described above, is false.\r\n *\r\n * Alternatively, the feature can be enabled by setting shrinking_takes_head\r\n * property for the palette Array or the scheme object.\r\n *\r\n * For example, all of the below give equivalent results:\r\n * var pal = ['ff0000', '00ff00', '0000ff'];\r\n *\r\n * var ex = palette.Scheme('ex');\r\n * ex.addPalette(pal); // ex(2) == ['ff0000', '0000ff']\r\n * ex.shrinkByTakingHead(true); // ex(2) == ['ff0000', '00ff00']\r\n *\r\n * ex = palette.Scheme('ex');\r\n * ex.addPalette(pal); // ex(2) == ['ff0000', '0000ff']\r\n * ex.shrinkByTakingHead(true, 3); // ex(2) == ['ff0000', '00ff00']\r\n *\r\n * ex = palette.Scheme('ex');\r\n * ex.addPalette(pal);\r\n * ex.addPalette(pal); // ex(2) == ['ff0000', '0000ff']\r\n * pal.shrinking_takes_head = true; // ex(2) == ['ff0000', '00ff00']\r\n *\r\n * @param {boolean} enabled Whether to enable or disable the “shrinking\r\n * takes head” feature. It is disabled by default.\r\n * @param {number=} opt_idx If given, the “shrinking takes head” option\r\n * for palette with given number of colours is set. If such palette\r\n * does not exist, nothing happens.\r\n */\r\n self.shrinkByTakingHead = function(enabled, opt_idx) {\r\n if (opt_idx !== void(0)) {\r\n if (opt_idx in palettes) {\r\n palettes[opt_idx].shrinking_takes_head = !!enabled;\r\n }\r\n } else {\r\n self.shrinking_takes_head = !!enabled;\r\n }\r\n };\r\n\r\n /**\r\n * Sets a colour generation function of the colour scheme.\r\n *\r\n * The function must accept a singe number argument whose value can be from\r\n * 0.0 to 1.0, and return a colour as an 'RRGGBB' string. This function\r\n * will be used when generating palettes, i.e. if 11-colour palette is\r\n * requested, this function will be called with arguments 0.0, 0.1, …, 1.0.\r\n *\r\n * If the palette generated by the function is colourblind friendly,\r\n * opt_is_cbf should be set to true.\r\n *\r\n * In some cases, it is not desirable to reach 1.0 when generating\r\n * a palette. This happens for hue-rainbows where the 0–1 range corresponds\r\n * to a 0°–360° range in hues, and since hue at 0° is the same as at 360°,\r\n * it's desired to stop short the end of the range when generating\r\n * a palette. To accomplish this, opt_cyclic should be set to true.\r\n *\r\n * @param {palette.ColorFunction} func A colour generator function.\r\n * @param {boolean=} opt_is_cbf Whether palette generate with the function\r\n * is colour-blind friendly.\r\n * @param {boolean=} opt_cyclic Whether colour at 0.0 is the same as the\r\n * one at 1.0.\r\n */\r\n self.setColorFunction = function(func, opt_is_cbf, opt_cyclic) {\r\n self.color_func = func;\r\n self.color_func_cyclic = !!opt_cyclic;\r\n self.max = INF;\r\n if (!opt_is_cbf && self.cbf_max === INF) {\r\n self.cbf_max = 1;\r\n }\r\n };\r\n\r\n self.color = function(x, varargs) {\r\n if (self.color_func) {\r\n return self.color_func.apply(this, arguments);\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n return self;\r\n };\r\n\r\n\r\n /**\r\n * Creates a new palette.Scheme and initialises it by calling addPalettes\r\n * method with the rest of the arguments.\r\n *\r\n * @param {string} name Name of the scheme.\r\n * @param {string|!Array} groups A group name or list of group\r\n * names the scheme belongs to.\r\n * @param {!Object|!Array}\r\n * palettes A map or an array of colour palettes to add. If map, i.e.\r\n * object, is used, properties should use integer property names.\r\n * @param {number=} opt_max Size of the biggest palette in palettes set.\r\n * If not set, palettes must have a length property which will be used.\r\n * @param {number=} opt_cbf_max Size of the biggest palette which is still\r\n * colourblind friendly. 1 by default.\r\n * @return {!palette.SchemeType} A colour palette generator function, which\r\n * in addition has methods and properties like a regular object. Think\r\n * of it as a callable object.\r\n */\r\n palette.Scheme.fromPalettes = function(name, groups,\r\n palettes, opt_max, opt_cbf_max) {\r\n var scheme = palette.Scheme(name, groups);\r\n scheme.addPalettes.apply(scheme, slice(arguments, 2));\r\n return scheme;\r\n };\r\n\r\n\r\n /**\r\n * Creates a new palette.Scheme and initialises it by calling\r\n * setColorFunction method with the rest of the arguments.\r\n *\r\n * @param {string} name Name of the scheme.\r\n * @param {string|!Array} groups A group name or list of group\r\n * names the scheme belongs to.\r\n * @param {palette.ColorFunction} func A colour generator function.\r\n * @param {boolean=} opt_is_cbf Whether palette generate with the function\r\n * is colour-blind friendly.\r\n * @param {boolean=} opt_cyclic Whether colour at 0.0 is the same as the\r\n * one at 1.0.\r\n * @return {!palette.SchemeType} A colour palette generator function, which\r\n * in addition has methods and properties like a regular object. Think\r\n * of it as a callable object.\r\n */\r\n palette.Scheme.withColorFunction = function(name, groups,\r\n func, opt_is_cbf, opt_cyclic) {\r\n var scheme = palette.Scheme(name, groups);\r\n scheme.setColorFunction.apply(scheme, slice(arguments, 2));\r\n return scheme;\r\n };\r\n\r\n\r\n /**\r\n * A map of registered schemes. Maps a scheme or group name to a list of\r\n * scheme objects. Property name is either 'n-' for single scheme\r\n * names or 'g-' for scheme group names.\r\n *\r\n * @type {!Object>}\r\n */\r\n var registered_schemes = {};\r\n\r\n\r\n /**\r\n * Registers a new colour scheme.\r\n *\r\n * @param {!palette.SchemeType} scheme The scheme to add.\r\n */\r\n palette.register = function(scheme) {\r\n registered_schemes['n-' + scheme.scheme_name] = [scheme];\r\n scheme.groups.forEach(function(g) {\r\n (registered_schemes['g-' + g] =\r\n registered_schemes['g-' + g] || []).push(scheme);\r\n });\r\n (registered_schemes['g-all'] =\r\n registered_schemes['g-all'] || []).push(scheme);\r\n };\r\n\r\n\r\n /**\r\n * List all schemes that match given name and number of colours.\r\n *\r\n * name argument can be either a string or an array of strings. In the\r\n * former case, the function acts as if the argument was an array with name\r\n * as a single argument (i.e. “palette.listSchemes('foo')” is exactly the same\r\n * as “palette.listSchemes(['foo'])”).\r\n *\r\n * Each name can be either name of a palette (e.g. 'tol-sq' for Paul Tol's\r\n * sequential palette), or a name of a group (e.g. 'sequential' for all\r\n * sequential palettes). Name can therefore map to a single scheme or\r\n * several schemes.\r\n *\r\n * Furthermore, name can be suffixed with '-cbf' to indicate that only\r\n * schemes that are colourblind friendly should be returned. For example,\r\n * 'rainbow' returns a HSV rainbow scheme, but because it is not colourblind\r\n * friendly, 'rainbow-cbf' returns no schemes.\r\n *\r\n * Some schemes may produce colourblind friendly palettes for some number of\r\n * colours. For example ColorBrewer's Dark2 scheme is colourblind friendly\r\n * if no more than 3 colours are generated. If opt_number is not specified,\r\n * 'qualitative-cbf' will include 'cb-Dark2' but if opt_number is given as,\r\n * say, 5 it won't.\r\n *\r\n * Name can also be 'all' which will return all registered schemes.\r\n * Naturally, 'all-cbf' will return all colourblind friendly schemes.\r\n *\r\n * Schemes are added to the library using palette.register. Schemes are\r\n * created using palette.Scheme function. By default, the following schemes\r\n * are available:\r\n *\r\n * Name Description\r\n * -------------- -----------------------------------------------------\r\n * tol Paul Tol's qualitative scheme, cbf, max 12 colours.\r\n * tol-dv Paul Tol's diverging scheme, cbf.\r\n * tol-sq Paul Tol's sequential scheme, cbf.\r\n * tol-rainbow Paul Tol's qualitative scheme, cbf.\r\n *\r\n * rainbow A rainbow palette.\r\n *\r\n * cb-YlGn ColorBrewer sequential schemes.\r\n * cb-YlGnBu\r\n * cb-GnBu\r\n * cb-BuGn\r\n * cb-PuBuGn\r\n * cb-PuBu\r\n * cb-BuPu\r\n * cb-RdPu\r\n * cb-PuRd\r\n * cb-OrRd\r\n * cb-YlOrRd\r\n * cb-YlOrBr\r\n * cb-Purples\r\n * cb-Blues\r\n * cb-Greens\r\n * cb-Oranges\r\n * cb-Reds\r\n * cb-Greys\r\n *\r\n * cb-PuOr ColorBrewer diverging schemes.\r\n * cb-BrBG\r\n * cb-PRGn\r\n * cb-PiYG\r\n * cb-RdBu\r\n * cb-RdGy\r\n * cb-RdYlBu\r\n * cb-Spectral\r\n * cb-RdYlGn\r\n *\r\n * cb-Accent ColorBrewer qualitative schemes.\r\n * cb-Dark2\r\n * cb-Paired\r\n * cb-Pastel1\r\n * cb-Pastel2\r\n * cb-Set1\r\n * cb-Set2\r\n * cb-Set3\r\n *\r\n * sol-base Solarized base colours.\r\n * sol-accent Solarized accent colours.\r\n *\r\n * The following groups are also available by default:\r\n *\r\n * Name Description\r\n * -------------- -----------------------------------------------------\r\n * all All registered schemes.\r\n * sequential All sequential schemes.\r\n * diverging All diverging schemes.\r\n * qualitative All qualitative schemes.\r\n * cb-sequential All ColorBrewer sequential schemes.\r\n * cb-diverging All ColorBrewer diverging schemes.\r\n * cb-qualitative All ColorBrewer qualitative schemes.\r\n *\r\n * You can read more about Paul Tol's palettes at http://www.sron.nl/~pault/.\r\n * You can read more about ColorBrewer at http://colorbrewer2.org.\r\n *\r\n * @param {string|!Array} name A name of a colour scheme, of\r\n * a group of colour schemes, or an array of any of those.\r\n * @param {number=} opt_number When requesting only colourblind friendly\r\n * schemes, number of colours the scheme must provide generating such\r\n * that the palette is still colourblind friendly. 2 by default.\r\n * @return {!Array} An array of colour scheme objects\r\n * matching the criteria. Sorted by scheme name.\r\n */\r\n palette.listSchemes = function(name, opt_number) {\r\n if (!opt_number) {\r\n opt_number = 2;\r\n } else if (opt_number < 0) {\r\n opt_number = -opt_number;\r\n }\r\n\r\n var ret = [];\r\n (typeof name === 'string' ? [name] : name).forEach(function(n) {\r\n var cbf = n.substring(n.length - 4) === '-cbf';\r\n if (cbf) {\r\n n = n.substring(0, n.length - 4);\r\n }\r\n var schemes =\r\n registered_schemes['g-' + n] ||\r\n registered_schemes['n-' + n] ||\r\n [];\r\n for (var i = 0, scheme; (scheme = schemes[i]); ++i) {\r\n if ((cbf ? scheme.cbf : scheme.max) >= opt_number) {\r\n ret.push(scheme);\r\n }\r\n }\r\n });\r\n\r\n ret.sort(function(a, b) {\r\n return a.scheme_name >= b.scheme_name ?\r\n a.scheme_name > b.scheme_name ? 1 : 0 : -1;\r\n });\r\n return ret;\r\n };\r\n\r\n\r\n /**\r\n * Generates a palette using given colour generating function.\r\n *\r\n * The color_func callback must accept a singe number argument whose value\r\n * can vary from 0.0 to 1.0 (or in general from opt_start to opt_end), and\r\n * return a colour as an 'RRGGBB' string. This function will be used when\r\n * generating palettes, i.e. if 11-colour palette is requested, this\r\n * function will be called with arguments 0.0, 0.1, …, 1.0.\r\n *\r\n * In some cases, it is not desirable to reach 1.0 when generating\r\n * a palette. This happens for hue-rainbows where the 0–1 range corresponds\r\n * to a 0°–360° range in hues, and since hue at 0° is the same as at 360°,\r\n * it's desired to stop short the end of the range when generating\r\n * a palette. To accomplish this, opt_cyclic should be set to true.\r\n *\r\n * opt_start and opt_end may be used to change the range the colour\r\n * generation function is called with. opt_end may be less than opt_start\r\n * which will case to traverse the range in reverse. Another way to reverse\r\n * the palette is requesting negative number of colours. The two methods do\r\n * not always lead to the same results (especially if opt_cyclic is set).\r\n *\r\n * @param {palette.ColorFunction} color_func A colours generating callback\r\n * function.\r\n * @param {number} number Number of colours to generate in the palette. If\r\n * number is negative, colours in the palette will be reversed. If only\r\n * one colour is requested, colour at opt_start will be returned.\r\n * @param {number=} opt_start Optional starting point for the palette\r\n * generation function. Zero by default.\r\n * @param {number=} opt_end Optional ending point for the palette generation\r\n * function. One by default.\r\n * @param {boolean=} opt_cyclic If true, function will assume colour at\r\n * point opt_start is the same as one at opt_end.\r\n * @return {palette.Palette} An array of 'RRGGBB' colours.\r\n */\r\n palette.generate = function(color_func, number, opt_start, opt_end,\r\n opt_cyclic) {\r\n if (Math.abs(number) < 1) {\r\n return [];\r\n }\r\n\r\n opt_start = opt_start === void(0) ? 0 : opt_start;\r\n opt_end = opt_end === void(0) ? 1 : opt_end;\r\n\r\n if (Math.abs(number) < 2) {\r\n return [color_func(opt_start)];\r\n }\r\n\r\n var i = Math.abs(number);\r\n var x = opt_start;\r\n var ret = [];\r\n var step = (opt_end - opt_start) / (opt_cyclic ? i : (i - 1));\r\n\r\n for (; --i >= 0; x += step) {\r\n ret.push(color_func(x));\r\n }\r\n if (number < 0) {\r\n ret.reverse();\r\n }\r\n return ret;\r\n };\r\n\r\n\r\n /**\r\n * Clamps value to [0, 1] range.\r\n * @param {number} v Number to limit value of.\r\n * @return {number} If v is inside of [0, 1] range returns v, otherwise\r\n * returns 0 or 1 depending which side of the range v is closer to.\r\n */\r\n var clamp = function(v) {\r\n return v > 0 ? (v < 1 ? v : 1) : 0;\r\n };\r\n\r\n /**\r\n * Converts r, g, b triple into RRGGBB hex representation.\r\n * @param {number} r Red value of the colour in the range [0, 1].\r\n * @param {number} g Green value of the colour in the range [0, 1].\r\n * @param {number} b Blue value of the colour in the range [0, 1].\r\n * @return {string} A lower-case RRGGBB representation of the colour.\r\n */\r\n palette.rgbColor = function(r, g, b) {\r\n return [r, g, b].map(function(v) {\r\n v = Number(Math.round(clamp(v) * 255)).toString(16);\r\n // eslint-disable-next-line\r\n return v.length == 1 ? '0' + v : v;\r\n }).join('');\r\n };\r\n\r\n /**\r\n * Converts a linear r, g, b triple into RRGGBB hex representation.\r\n * @param {number} r Linear red value of the colour in the range [0, 1].\r\n * @param {number} g Linear green value of the colour in the range [0, 1].\r\n * @param {number} b Linear blue value of the colour in the range [0, 1].\r\n * @return {string} A lower-case RRGGBB representation of the colour.\r\n */\r\n palette.linearRgbColor = function(r, g, b) {\r\n // http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_RGB.html\r\n return [r, g, b].map(function(v) {\r\n v = clamp(v);\r\n if (v <= 0.0031308) {\r\n v = 12.92 * v;\r\n } else {\r\n v = 1.055 * Math.pow(v, 1 / 2.4) - 0.055;\r\n }\r\n v = Number(Math.round(v * 255)).toString(16);\r\n // eslint-disable-next-line\r\n return v.length == 1 ? '0' + v : v;\r\n }).join('');\r\n };\r\n\r\n /**\r\n * Converts an HSV colours to RRGGBB hex representation.\r\n * @param {number} h Hue in the range [0, 1].\r\n * @param {number=} opt_s Saturation in the range [0, 1]. One by default.\r\n * @param {number=} opt_v Value in the range [0, 1]. One by default.\r\n * @return {string} An RRGGBB representation of the colour.\r\n */\r\n palette.hsvColor = function(h, opt_s, opt_v) {\r\n h *= 6;\r\n var s = opt_s === void(0) ? 1 : clamp(opt_s);\r\n var v = opt_v === void(0) ? 1 : clamp(opt_v);\r\n var x = v * (1 - s * Math.abs(h % 2 - 1));\r\n var m = v * (1 - s);\r\n switch (Math.floor(h) % 6) {\r\n case 0: return palette.rgbColor(v, x, m);\r\n case 1: return palette.rgbColor(x, v, m);\r\n case 2: return palette.rgbColor(m, v, x);\r\n case 3: return palette.rgbColor(m, x, v);\r\n case 4: return palette.rgbColor(x, m, v);\r\n default: return palette.rgbColor(v, m, x);\r\n }\r\n };\r\n\r\n palette.register(palette.Scheme.withColorFunction(\r\n 'rainbow', 'qualitative', palette.hsvColor, false, true));\r\n\r\n return palette;\r\n})();\r\n\r\n\r\n/** @typedef {function(number): string} */\r\n// palette.ColorFunction;\r\n\r\n/** @typedef {!Array} */\r\n// palette.Palette;\r\n\r\n/** @typedef {!Object|!Array} */\r\n// palette.PalettesList;\r\n\r\n/**\r\n * @typedef {\r\n * function(number, ...?): Array|\r\n * {\r\n * scheme_name: string,\r\n * groups: !Array,\r\n * max: number,\r\n * cbf_max: number,\r\n * addPalette: function(!Array, boolean=),\r\n * addPalettes: function(palette.PalettesList, number=, number=),\r\n * shrinkByTakingHead: function(boolean, number=),\r\n * setColorFunction: function(palette.ColorFunction, boolean=, boolean=),\r\n * color: function(number, ...?): ?string}}\r\n */\r\n// palette.SchemeType;\r\n\r\n\r\n/* mpn65 palette start here. ************************************************/\r\n\r\n/* The ‘mpn65’ palette is designed for systems which show many graphs which\r\n don’t have custom colour palettes chosen by humans or if number of necessary\r\n colours isn’t know a priori. */\r\n\r\n(function() {\r\n var scheme = palette.Scheme.fromPalettes('mpn65', 'qualitative', [[\r\n 'ff0029', '377eb8', '66a61e', '984ea3', '00d2d5', 'ff7f00', 'af8d00',\r\n '7f80cd', 'b3e900', 'c42e60', 'a65628', 'f781bf', '8dd3c7', 'bebada',\r\n 'fb8072', '80b1d3', 'fdb462', 'fccde5', 'bc80bd', 'ffed6f', 'c4eaff',\r\n 'cf8c00', '1b9e77', 'd95f02', 'e7298a', 'e6ab02', 'a6761d', '0097ff',\r\n '00d067', '000000', '252525', '525252', '737373', '969696', 'bdbdbd',\r\n 'f43600', '4ba93b', '5779bb', '927acc', '97ee3f', 'bf3947', '9f5b00',\r\n 'f48758', '8caed6', 'f2b94f', 'eff26e', 'e43872', 'd9b100', '9d7a00',\r\n '698cff', 'd9d9d9', '00d27e', 'd06800', '009f82', 'c49200', 'cbe8ff',\r\n 'fecddf', 'c27eb6', '8cd2ce', 'c4b8d9', 'f883b0', 'a49100', 'f48800',\r\n '27d0df', 'a04a9b'\r\n ]]);\r\n scheme.shrinkByTakingHead(true);\r\n palette.register(scheme);\r\n})();\r\n\r\n/* Paul Tol's schemes start here. *******************************************/\r\n/* See http://www.sron.nl/~pault/ */\r\n\r\n(function() {\r\n var rgb = palette.rgbColor;\r\n\r\n /**\r\n * Calculates value of a polynomial at given point.\r\n * For example, poly(x, 1, 2, 3) calculates value of “1 + 2*x + 3*X²”.\r\n * @param {number} x Value to calculate polynomial for.\r\n * @param {...number} varargs Coefficients of the polynomial specified in\r\n * the order of rising powers of x including constant as the first\r\n * variable argument.\r\n */\r\n var poly = function(x, varargs) {\r\n var i = arguments.length - 1, n = arguments[i];\r\n while (i > 1) {\r\n n = n * x + arguments[--i];\r\n }\r\n return n;\r\n };\r\n\r\n /**\r\n * Calculate approximate value of error function with maximum error of 0.0005.\r\n * See .\r\n * @param {number} x Argument of the error function.\r\n * @return {number} Value of error function for x.\r\n */\r\n var erf = function(x) {\r\n // https://en.wikipedia.org/wiki/Error_function#Approximation_with_elementary_functions\r\n // This produces a maximum error of 0.0005 which is more then we need. In\r\n // the worst case, that error is multiplied by four and then divided by two\r\n // before being multiplied by 255, so in the end, the error is multiplied by\r\n // 510 which produces 0.255 which is less than a single colour step.\r\n var y = poly(Math.abs(x), 1, 0.278393, 0.230389, 0.000972, 0.078108);\r\n y *= y; // y^2\r\n y *= y; // y^4\r\n y = 1 - 1 / y;\r\n return x < 0 ? -y : y;\r\n };\r\n\r\n palette.register(palette.Scheme.fromPalettes('tol', 'qualitative', [\r\n ['4477aa'],\r\n ['4477aa', 'cc6677'],\r\n ['4477aa', 'ddcc77', 'cc6677'],\r\n ['4477aa', '117733', 'ddcc77', 'cc6677'],\r\n ['332288', '88ccee', '117733', 'ddcc77', 'cc6677'],\r\n ['332288', '88ccee', '117733', 'ddcc77', 'cc6677', 'aa4499'],\r\n ['332288', '88ccee', '44aa99', '117733', 'ddcc77', 'cc6677', 'aa4499'],\r\n ['332288', '88ccee', '44aa99', '117733', '999933', 'ddcc77', 'cc6677',\r\n 'aa4499'],\r\n ['332288', '88ccee', '44aa99', '117733', '999933', 'ddcc77', 'cc6677',\r\n '882255', 'aa4499'],\r\n ['332288', '88ccee', '44aa99', '117733', '999933', 'ddcc77', '661100',\r\n 'cc6677', '882255', 'aa4499'],\r\n ['332288', '6699cc', '88ccee', '44aa99', '117733', '999933', 'ddcc77',\r\n '661100', 'cc6677', '882255', 'aa4499'],\r\n ['332288', '6699cc', '88ccee', '44aa99', '117733', '999933', 'ddcc77',\r\n '661100', 'cc6677', 'aa4466', '882255', 'aa4499']\r\n ], 12, 12));\r\n\r\n /**\r\n * Calculates a colour along Paul Tol's sequential colours axis.\r\n * See figure 7 and equation 1.\r\n * @param {number} x Position of the colour on the axis in the [0, 1] range.\r\n * @return {string} An RRGGBB representation of the colour.\r\n */\r\n palette.tolSequentialColor = function(x) {\r\n return rgb(1 - 0.392 * (1 + erf((x - 0.869) / 0.255)),\r\n 1.021 - 0.456 * (1 + erf((x - 0.527) / 0.376)),\r\n 1 - 0.493 * (1 + erf((x - 0.272) / 0.309)));\r\n };\r\n\r\n palette.register(palette.Scheme.withColorFunction(\r\n 'tol-sq', 'sequential', palette.tolSequentialColor, true));\r\n\r\n /**\r\n * Calculates a colour along Paul Tol's diverging colours axis.\r\n * See figure 8 and equation 2.\r\n * @param {number} x Position of the colour on the axis in the [0, 1] range.\r\n * @return {string} An RRGGBB representation of the colour.\r\n */\r\n palette.tolDivergingColor = function(x) {\r\n var g = poly(x, 0.572, 1.524, -1.811) / poly(x, 1, -0.291, 0.1574);\r\n return rgb(poly(x, 0.235, -2.13, 26.92, -65.5, 63.5, -22.36),\r\n g * g,\r\n 1 / poly(x, 1.579, -4.03, 12.92, -31.4, 48.6, -23.36));\r\n };\r\n\r\n palette.register(palette.Scheme.withColorFunction(\r\n 'tol-dv', 'diverging', palette.tolDivergingColor, true));\r\n\r\n /**\r\n * Calculates a colour along Paul Tol's rainbow colours axis.\r\n * See figure 13 and equation 3.\r\n * @param {number} x Position of the colour on the axis in the [0, 1] range.\r\n * @return {string} An RRGGBB representation of the colour.\r\n */\r\n palette.tolRainbowColor = function(x) {\r\n return rgb(poly(x, 0.472, -0.567, 4.05) / poly(x, 1, 8.72, -19.17, 14.1),\r\n poly(x, 0.108932, -1.22635, 27.284, -98.577, 163.3, -131.395,\r\n 40.634),\r\n 1 / poly(x, 1.97, 3.54, -68.5, 243, -297, 125));\r\n };\r\n\r\n palette.register(palette.Scheme.withColorFunction(\r\n 'tol-rainbow', 'qualitative', palette.tolRainbowColor, true));\r\n})();\r\n\r\n\r\n/* Solarized colour schemes start here. *************************************/\r\n/* See http://ethanschoonover.com/solarized */\r\n\r\n(function() {\r\n /*\r\n * Those are not really designed to be used in graphs, but we're keeping\r\n * them here in case someone cares.\r\n */\r\n palette.register(palette.Scheme.fromPalettes('sol-base', 'sequential', [\r\n ['002b36', '073642', '586e75', '657b83', '839496', '93a1a1', 'eee8d5',\r\n 'fdf6e3']\r\n ], 1, 8));\r\n palette.register(palette.Scheme.fromPalettes('sol-accent', 'qualitative', [\r\n ['b58900', 'cb4b16', 'dc322f', 'd33682', '6c71c4', '268bd2', '2aa198',\r\n '859900']\r\n ]));\r\n})();\r\n\r\n\r\n/* ColorBrewer colour schemes start here. ***********************************/\r\n/* See http://colorbrewer2.org/ */\r\n\r\n(function() {\r\n var schemes = {\r\n YlGn: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['f7fcb9', 'addd8e', '31a354'],\r\n 4: ['ffffcc', 'c2e699', '78c679', '238443'],\r\n 5: ['ffffcc', 'c2e699', '78c679', '31a354', '006837'],\r\n 6: ['ffffcc', 'd9f0a3', 'addd8e', '78c679', '31a354', '006837'],\r\n 7: ['ffffcc', 'd9f0a3', 'addd8e', '78c679', '41ab5d', '238443',\r\n '005a32'],\r\n 8: ['ffffe5', 'f7fcb9', 'd9f0a3', 'addd8e', '78c679', '41ab5d',\r\n '238443', '005a32'],\r\n 9: ['ffffe5', 'f7fcb9', 'd9f0a3', 'addd8e', '78c679', '41ab5d',\r\n '238443', '006837', '004529']\r\n },\r\n YlGnBu: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['edf8b1', '7fcdbb', '2c7fb8'],\r\n 4: ['ffffcc', 'a1dab4', '41b6c4', '225ea8'],\r\n 5: ['ffffcc', 'a1dab4', '41b6c4', '2c7fb8', '253494'],\r\n 6: ['ffffcc', 'c7e9b4', '7fcdbb', '41b6c4', '2c7fb8', '253494'],\r\n 7: ['ffffcc', 'c7e9b4', '7fcdbb', '41b6c4', '1d91c0', '225ea8',\r\n '0c2c84'],\r\n 8: ['ffffd9', 'edf8b1', 'c7e9b4', '7fcdbb', '41b6c4', '1d91c0',\r\n '225ea8', '0c2c84'],\r\n 9: ['ffffd9', 'edf8b1', 'c7e9b4', '7fcdbb', '41b6c4', '1d91c0',\r\n '225ea8', '253494', '081d58']\r\n },\r\n GnBu: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['e0f3db', 'a8ddb5', '43a2ca'],\r\n 4: ['f0f9e8', 'bae4bc', '7bccc4', '2b8cbe'],\r\n 5: ['f0f9e8', 'bae4bc', '7bccc4', '43a2ca', '0868ac'],\r\n 6: ['f0f9e8', 'ccebc5', 'a8ddb5', '7bccc4', '43a2ca', '0868ac'],\r\n 7: ['f0f9e8', 'ccebc5', 'a8ddb5', '7bccc4', '4eb3d3', '2b8cbe',\r\n '08589e'],\r\n 8: ['f7fcf0', 'e0f3db', 'ccebc5', 'a8ddb5', '7bccc4', '4eb3d3',\r\n '2b8cbe', '08589e'],\r\n 9: ['f7fcf0', 'e0f3db', 'ccebc5', 'a8ddb5', '7bccc4', '4eb3d3',\r\n '2b8cbe', '0868ac', '084081']\r\n },\r\n BuGn: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['e5f5f9', '99d8c9', '2ca25f'],\r\n 4: ['edf8fb', 'b2e2e2', '66c2a4', '238b45'],\r\n 5: ['edf8fb', 'b2e2e2', '66c2a4', '2ca25f', '006d2c'],\r\n 6: ['edf8fb', 'ccece6', '99d8c9', '66c2a4', '2ca25f', '006d2c'],\r\n 7: ['edf8fb', 'ccece6', '99d8c9', '66c2a4', '41ae76', '238b45',\r\n '005824'],\r\n 8: ['f7fcfd', 'e5f5f9', 'ccece6', '99d8c9', '66c2a4', '41ae76',\r\n '238b45', '005824'],\r\n 9: ['f7fcfd', 'e5f5f9', 'ccece6', '99d8c9', '66c2a4', '41ae76',\r\n '238b45', '006d2c', '00441b']\r\n },\r\n PuBuGn: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['ece2f0', 'a6bddb', '1c9099'],\r\n 4: ['f6eff7', 'bdc9e1', '67a9cf', '02818a'],\r\n 5: ['f6eff7', 'bdc9e1', '67a9cf', '1c9099', '016c59'],\r\n 6: ['f6eff7', 'd0d1e6', 'a6bddb', '67a9cf', '1c9099', '016c59'],\r\n 7: ['f6eff7', 'd0d1e6', 'a6bddb', '67a9cf', '3690c0', '02818a',\r\n '016450'],\r\n 8: ['fff7fb', 'ece2f0', 'd0d1e6', 'a6bddb', '67a9cf', '3690c0',\r\n '02818a', '016450'],\r\n 9: ['fff7fb', 'ece2f0', 'd0d1e6', 'a6bddb', '67a9cf', '3690c0',\r\n '02818a', '016c59', '014636']\r\n },\r\n PuBu: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['ece7f2', 'a6bddb', '2b8cbe'],\r\n 4: ['f1eef6', 'bdc9e1', '74a9cf', '0570b0'],\r\n 5: ['f1eef6', 'bdc9e1', '74a9cf', '2b8cbe', '045a8d'],\r\n 6: ['f1eef6', 'd0d1e6', 'a6bddb', '74a9cf', '2b8cbe', '045a8d'],\r\n 7: ['f1eef6', 'd0d1e6', 'a6bddb', '74a9cf', '3690c0', '0570b0',\r\n '034e7b'],\r\n 8: ['fff7fb', 'ece7f2', 'd0d1e6', 'a6bddb', '74a9cf', '3690c0',\r\n '0570b0', '034e7b'],\r\n 9: ['fff7fb', 'ece7f2', 'd0d1e6', 'a6bddb', '74a9cf', '3690c0',\r\n '0570b0', '045a8d', '023858']\r\n },\r\n BuPu: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['e0ecf4', '9ebcda', '8856a7'],\r\n 4: ['edf8fb', 'b3cde3', '8c96c6', '88419d'],\r\n 5: ['edf8fb', 'b3cde3', '8c96c6', '8856a7', '810f7c'],\r\n 6: ['edf8fb', 'bfd3e6', '9ebcda', '8c96c6', '8856a7', '810f7c'],\r\n 7: ['edf8fb', 'bfd3e6', '9ebcda', '8c96c6', '8c6bb1', '88419d',\r\n '6e016b'],\r\n 8: ['f7fcfd', 'e0ecf4', 'bfd3e6', '9ebcda', '8c96c6', '8c6bb1',\r\n '88419d', '6e016b'],\r\n 9: ['f7fcfd', 'e0ecf4', 'bfd3e6', '9ebcda', '8c96c6', '8c6bb1',\r\n '88419d', '810f7c', '4d004b']\r\n },\r\n RdPu: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['fde0dd', 'fa9fb5', 'c51b8a'],\r\n 4: ['feebe2', 'fbb4b9', 'f768a1', 'ae017e'],\r\n 5: ['feebe2', 'fbb4b9', 'f768a1', 'c51b8a', '7a0177'],\r\n 6: ['feebe2', 'fcc5c0', 'fa9fb5', 'f768a1', 'c51b8a', '7a0177'],\r\n 7: ['feebe2', 'fcc5c0', 'fa9fb5', 'f768a1', 'dd3497', 'ae017e',\r\n '7a0177'],\r\n 8: ['fff7f3', 'fde0dd', 'fcc5c0', 'fa9fb5', 'f768a1', 'dd3497',\r\n 'ae017e', '7a0177'],\r\n 9: ['fff7f3', 'fde0dd', 'fcc5c0', 'fa9fb5', 'f768a1', 'dd3497',\r\n 'ae017e', '7a0177', '49006a']\r\n },\r\n PuRd: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['e7e1ef', 'c994c7', 'dd1c77'],\r\n 4: ['f1eef6', 'd7b5d8', 'df65b0', 'ce1256'],\r\n 5: ['f1eef6', 'd7b5d8', 'df65b0', 'dd1c77', '980043'],\r\n 6: ['f1eef6', 'd4b9da', 'c994c7', 'df65b0', 'dd1c77', '980043'],\r\n 7: ['f1eef6', 'd4b9da', 'c994c7', 'df65b0', 'e7298a', 'ce1256',\r\n '91003f'],\r\n 8: ['f7f4f9', 'e7e1ef', 'd4b9da', 'c994c7', 'df65b0', 'e7298a',\r\n 'ce1256', '91003f'],\r\n 9: ['f7f4f9', 'e7e1ef', 'd4b9da', 'c994c7', 'df65b0', 'e7298a',\r\n 'ce1256', '980043', '67001f']\r\n },\r\n OrRd: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['fee8c8', 'fdbb84', 'e34a33'],\r\n 4: ['fef0d9', 'fdcc8a', 'fc8d59', 'd7301f'],\r\n 5: ['fef0d9', 'fdcc8a', 'fc8d59', 'e34a33', 'b30000'],\r\n 6: ['fef0d9', 'fdd49e', 'fdbb84', 'fc8d59', 'e34a33', 'b30000'],\r\n 7: ['fef0d9', 'fdd49e', 'fdbb84', 'fc8d59', 'ef6548', 'd7301f',\r\n '990000'],\r\n 8: ['fff7ec', 'fee8c8', 'fdd49e', 'fdbb84', 'fc8d59', 'ef6548',\r\n 'd7301f', '990000'],\r\n 9: ['fff7ec', 'fee8c8', 'fdd49e', 'fdbb84', 'fc8d59', 'ef6548',\r\n 'd7301f', 'b30000', '7f0000']\r\n },\r\n YlOrRd: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['ffeda0', 'feb24c', 'f03b20'],\r\n 4: ['ffffb2', 'fecc5c', 'fd8d3c', 'e31a1c'],\r\n 5: ['ffffb2', 'fecc5c', 'fd8d3c', 'f03b20', 'bd0026'],\r\n 6: ['ffffb2', 'fed976', 'feb24c', 'fd8d3c', 'f03b20', 'bd0026'],\r\n 7: ['ffffb2', 'fed976', 'feb24c', 'fd8d3c', 'fc4e2a', 'e31a1c',\r\n 'b10026'],\r\n 8: ['ffffcc', 'ffeda0', 'fed976', 'feb24c', 'fd8d3c', 'fc4e2a',\r\n 'e31a1c', 'b10026'],\r\n 9: ['ffffcc', 'ffeda0', 'fed976', 'feb24c', 'fd8d3c', 'fc4e2a',\r\n 'e31a1c', 'bd0026', '800026']\r\n },\r\n YlOrBr: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['fff7bc', 'fec44f', 'd95f0e'],\r\n 4: ['ffffd4', 'fed98e', 'fe9929', 'cc4c02'],\r\n 5: ['ffffd4', 'fed98e', 'fe9929', 'd95f0e', '993404'],\r\n 6: ['ffffd4', 'fee391', 'fec44f', 'fe9929', 'd95f0e', '993404'],\r\n 7: ['ffffd4', 'fee391', 'fec44f', 'fe9929', 'ec7014', 'cc4c02',\r\n '8c2d04'],\r\n 8: ['ffffe5', 'fff7bc', 'fee391', 'fec44f', 'fe9929', 'ec7014',\r\n 'cc4c02', '8c2d04'],\r\n 9: ['ffffe5', 'fff7bc', 'fee391', 'fec44f', 'fe9929', 'ec7014',\r\n 'cc4c02', '993404', '662506']\r\n },\r\n Purples: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['efedf5', 'bcbddc', '756bb1'],\r\n 4: ['f2f0f7', 'cbc9e2', '9e9ac8', '6a51a3'],\r\n 5: ['f2f0f7', 'cbc9e2', '9e9ac8', '756bb1', '54278f'],\r\n 6: ['f2f0f7', 'dadaeb', 'bcbddc', '9e9ac8', '756bb1', '54278f'],\r\n 7: ['f2f0f7', 'dadaeb', 'bcbddc', '9e9ac8', '807dba', '6a51a3',\r\n '4a1486'],\r\n 8: ['fcfbfd', 'efedf5', 'dadaeb', 'bcbddc', '9e9ac8', '807dba',\r\n '6a51a3', '4a1486'],\r\n 9: ['fcfbfd', 'efedf5', 'dadaeb', 'bcbddc', '9e9ac8', '807dba',\r\n '6a51a3', '54278f', '3f007d']\r\n },\r\n Blues: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['deebf7', '9ecae1', '3182bd'],\r\n 4: ['eff3ff', 'bdd7e7', '6baed6', '2171b5'],\r\n 5: ['eff3ff', 'bdd7e7', '6baed6', '3182bd', '08519c'],\r\n 6: ['eff3ff', 'c6dbef', '9ecae1', '6baed6', '3182bd', '08519c'],\r\n 7: ['eff3ff', 'c6dbef', '9ecae1', '6baed6', '4292c6', '2171b5',\r\n '084594'],\r\n 8: ['f7fbff', 'deebf7', 'c6dbef', '9ecae1', '6baed6', '4292c6',\r\n '2171b5', '084594'],\r\n 9: ['f7fbff', 'deebf7', 'c6dbef', '9ecae1', '6baed6', '4292c6',\r\n '2171b5', '08519c', '08306b']\r\n },\r\n Greens: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['e5f5e0', 'a1d99b', '31a354'],\r\n 4: ['edf8e9', 'bae4b3', '74c476', '238b45'],\r\n 5: ['edf8e9', 'bae4b3', '74c476', '31a354', '006d2c'],\r\n 6: ['edf8e9', 'c7e9c0', 'a1d99b', '74c476', '31a354', '006d2c'],\r\n 7: ['edf8e9', 'c7e9c0', 'a1d99b', '74c476', '41ab5d', '238b45',\r\n '005a32'],\r\n 8: ['f7fcf5', 'e5f5e0', 'c7e9c0', 'a1d99b', '74c476', '41ab5d',\r\n '238b45', '005a32'],\r\n 9: ['f7fcf5', 'e5f5e0', 'c7e9c0', 'a1d99b', '74c476', '41ab5d',\r\n '238b45', '006d2c', '00441b']\r\n },\r\n Oranges: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['fee6ce', 'fdae6b', 'e6550d'],\r\n 4: ['feedde', 'fdbe85', 'fd8d3c', 'd94701'],\r\n 5: ['feedde', 'fdbe85', 'fd8d3c', 'e6550d', 'a63603'],\r\n 6: ['feedde', 'fdd0a2', 'fdae6b', 'fd8d3c', 'e6550d', 'a63603'],\r\n 7: ['feedde', 'fdd0a2', 'fdae6b', 'fd8d3c', 'f16913', 'd94801',\r\n '8c2d04'],\r\n 8: ['fff5eb', 'fee6ce', 'fdd0a2', 'fdae6b', 'fd8d3c', 'f16913',\r\n 'd94801', '8c2d04'],\r\n 9: ['fff5eb', 'fee6ce', 'fdd0a2', 'fdae6b', 'fd8d3c', 'f16913',\r\n 'd94801', 'a63603', '7f2704']\r\n },\r\n Reds: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['fee0d2', 'fc9272', 'de2d26'],\r\n 4: ['fee5d9', 'fcae91', 'fb6a4a', 'cb181d'],\r\n 5: ['fee5d9', 'fcae91', 'fb6a4a', 'de2d26', 'a50f15'],\r\n 6: ['fee5d9', 'fcbba1', 'fc9272', 'fb6a4a', 'de2d26', 'a50f15'],\r\n 7: ['fee5d9', 'fcbba1', 'fc9272', 'fb6a4a', 'ef3b2c', 'cb181d',\r\n '99000d'],\r\n 8: ['fff5f0', 'fee0d2', 'fcbba1', 'fc9272', 'fb6a4a', 'ef3b2c',\r\n 'cb181d', '99000d'],\r\n 9: ['fff5f0', 'fee0d2', 'fcbba1', 'fc9272', 'fb6a4a', 'ef3b2c',\r\n 'cb181d', 'a50f15', '67000d']\r\n },\r\n Greys: {\r\n type: 'sequential',\r\n cbf: 42,\r\n 3: ['f0f0f0', 'bdbdbd', '636363'],\r\n 4: ['f7f7f7', 'cccccc', '969696', '525252'],\r\n 5: ['f7f7f7', 'cccccc', '969696', '636363', '252525'],\r\n 6: ['f7f7f7', 'd9d9d9', 'bdbdbd', '969696', '636363', '252525'],\r\n 7: ['f7f7f7', 'd9d9d9', 'bdbdbd', '969696', '737373', '525252',\r\n '252525'],\r\n 8: ['ffffff', 'f0f0f0', 'd9d9d9', 'bdbdbd', '969696', '737373',\r\n '525252', '252525'],\r\n 9: ['ffffff', 'f0f0f0', 'd9d9d9', 'bdbdbd', '969696', '737373',\r\n '525252', '252525', '000000']\r\n },\r\n PuOr: {\r\n type: 'diverging',\r\n cbf: 42,\r\n 3: ['f1a340', 'f7f7f7', '998ec3'],\r\n 4: ['e66101', 'fdb863', 'b2abd2', '5e3c99'],\r\n 5: ['e66101', 'fdb863', 'f7f7f7', 'b2abd2', '5e3c99'],\r\n 6: ['b35806', 'f1a340', 'fee0b6', 'd8daeb', '998ec3', '542788'],\r\n 7: ['b35806', 'f1a340', 'fee0b6', 'f7f7f7', 'd8daeb', '998ec3',\r\n '542788'],\r\n 8: ['b35806', 'e08214', 'fdb863', 'fee0b6', 'd8daeb', 'b2abd2',\r\n '8073ac', '542788'],\r\n 9: ['b35806', 'e08214', 'fdb863', 'fee0b6', 'f7f7f7', 'd8daeb',\r\n 'b2abd2', '8073ac', '542788'],\r\n 10: ['7f3b08', 'b35806', 'e08214', 'fdb863', 'fee0b6', 'd8daeb',\r\n 'b2abd2', '8073ac', '542788', '2d004b'],\r\n 11: ['7f3b08', 'b35806', 'e08214', 'fdb863', 'fee0b6', 'f7f7f7',\r\n 'd8daeb', 'b2abd2', '8073ac', '542788', '2d004b']\r\n },\r\n BrBG: {\r\n type: 'diverging',\r\n cbf: 42,\r\n 3: ['d8b365', 'f5f5f5', '5ab4ac'],\r\n 4: ['a6611a', 'dfc27d', '80cdc1', '018571'],\r\n 5: ['a6611a', 'dfc27d', 'f5f5f5', '80cdc1', '018571'],\r\n 6: ['8c510a', 'd8b365', 'f6e8c3', 'c7eae5', '5ab4ac', '01665e'],\r\n 7: ['8c510a', 'd8b365', 'f6e8c3', 'f5f5f5', 'c7eae5', '5ab4ac',\r\n '01665e'],\r\n 8: ['8c510a', 'bf812d', 'dfc27d', 'f6e8c3', 'c7eae5', '80cdc1',\r\n '35978f', '01665e'],\r\n 9: ['8c510a', 'bf812d', 'dfc27d', 'f6e8c3', 'f5f5f5', 'c7eae5',\r\n '80cdc1', '35978f', '01665e'],\r\n 10: ['543005', '8c510a', 'bf812d', 'dfc27d', 'f6e8c3', 'c7eae5',\r\n '80cdc1', '35978f', '01665e', '003c30'],\r\n 11: ['543005', '8c510a', 'bf812d', 'dfc27d', 'f6e8c3', 'f5f5f5',\r\n 'c7eae5', '80cdc1', '35978f', '01665e', '003c30']\r\n },\r\n PRGn: {\r\n type: 'diverging',\r\n cbf: 42,\r\n 3: ['af8dc3', 'f7f7f7', '7fbf7b'],\r\n 4: ['7b3294', 'c2a5cf', 'a6dba0', '008837'],\r\n 5: ['7b3294', 'c2a5cf', 'f7f7f7', 'a6dba0', '008837'],\r\n 6: ['762a83', 'af8dc3', 'e7d4e8', 'd9f0d3', '7fbf7b', '1b7837'],\r\n 7: ['762a83', 'af8dc3', 'e7d4e8', 'f7f7f7', 'd9f0d3', '7fbf7b',\r\n '1b7837'],\r\n 8: ['762a83', '9970ab', 'c2a5cf', 'e7d4e8', 'd9f0d3', 'a6dba0',\r\n '5aae61', '1b7837'],\r\n 9: ['762a83', '9970ab', 'c2a5cf', 'e7d4e8', 'f7f7f7', 'd9f0d3',\r\n 'a6dba0', '5aae61', '1b7837'],\r\n 10: ['40004b', '762a83', '9970ab', 'c2a5cf', 'e7d4e8', 'd9f0d3',\r\n 'a6dba0', '5aae61', '1b7837', '00441b'],\r\n 11: ['40004b', '762a83', '9970ab', 'c2a5cf', 'e7d4e8', 'f7f7f7',\r\n 'd9f0d3', 'a6dba0', '5aae61', '1b7837', '00441b']\r\n },\r\n PiYG: {\r\n type: 'diverging',\r\n cbf: 42,\r\n 3: ['e9a3c9', 'f7f7f7', 'a1d76a'],\r\n 4: ['d01c8b', 'f1b6da', 'b8e186', '4dac26'],\r\n 5: ['d01c8b', 'f1b6da', 'f7f7f7', 'b8e186', '4dac26'],\r\n 6: ['c51b7d', 'e9a3c9', 'fde0ef', 'e6f5d0', 'a1d76a', '4d9221'],\r\n 7: ['c51b7d', 'e9a3c9', 'fde0ef', 'f7f7f7', 'e6f5d0', 'a1d76a',\r\n '4d9221'],\r\n 8: ['c51b7d', 'de77ae', 'f1b6da', 'fde0ef', 'e6f5d0', 'b8e186',\r\n '7fbc41', '4d9221'],\r\n 9: ['c51b7d', 'de77ae', 'f1b6da', 'fde0ef', 'f7f7f7', 'e6f5d0',\r\n 'b8e186', '7fbc41', '4d9221'],\r\n 10: ['8e0152', 'c51b7d', 'de77ae', 'f1b6da', 'fde0ef', 'e6f5d0',\r\n 'b8e186', '7fbc41', '4d9221', '276419'],\r\n 11: ['8e0152', 'c51b7d', 'de77ae', 'f1b6da', 'fde0ef', 'f7f7f7',\r\n 'e6f5d0', 'b8e186', '7fbc41', '4d9221', '276419']\r\n },\r\n RdBu: {\r\n type: 'diverging',\r\n cbf: 42,\r\n 3: ['ef8a62', 'f7f7f7', '67a9cf'],\r\n 4: ['ca0020', 'f4a582', '92c5de', '0571b0'],\r\n 5: ['ca0020', 'f4a582', 'f7f7f7', '92c5de', '0571b0'],\r\n 6: ['b2182b', 'ef8a62', 'fddbc7', 'd1e5f0', '67a9cf', '2166ac'],\r\n 7: ['b2182b', 'ef8a62', 'fddbc7', 'f7f7f7', 'd1e5f0', '67a9cf',\r\n '2166ac'],\r\n 8: ['b2182b', 'd6604d', 'f4a582', 'fddbc7', 'd1e5f0', '92c5de',\r\n '4393c3', '2166ac'],\r\n 9: ['b2182b', 'd6604d', 'f4a582', 'fddbc7', 'f7f7f7', 'd1e5f0',\r\n '92c5de', '4393c3', '2166ac'],\r\n 10: ['67001f', 'b2182b', 'd6604d', 'f4a582', 'fddbc7', 'd1e5f0',\r\n '92c5de', '4393c3', '2166ac', '053061'],\r\n 11: ['67001f', 'b2182b', 'd6604d', 'f4a582', 'fddbc7', 'f7f7f7',\r\n 'd1e5f0', '92c5de', '4393c3', '2166ac', '053061']\r\n },\r\n RdGy: {\r\n type: 'diverging',\r\n cbf: 42,\r\n 3: ['ef8a62', 'ffffff', '999999'],\r\n 4: ['ca0020', 'f4a582', 'bababa', '404040'],\r\n 5: ['ca0020', 'f4a582', 'ffffff', 'bababa', '404040'],\r\n 6: ['b2182b', 'ef8a62', 'fddbc7', 'e0e0e0', '999999', '4d4d4d'],\r\n 7: ['b2182b', 'ef8a62', 'fddbc7', 'ffffff', 'e0e0e0', '999999',\r\n '4d4d4d'],\r\n 8: ['b2182b', 'd6604d', 'f4a582', 'fddbc7', 'e0e0e0', 'bababa',\r\n '878787', '4d4d4d'],\r\n 9: ['b2182b', 'd6604d', 'f4a582', 'fddbc7', 'ffffff', 'e0e0e0',\r\n 'bababa', '878787', '4d4d4d'],\r\n 10: ['67001f', 'b2182b', 'd6604d', 'f4a582', 'fddbc7', 'e0e0e0',\r\n 'bababa', '878787', '4d4d4d', '1a1a1a'],\r\n 11: ['67001f', 'b2182b', 'd6604d', 'f4a582', 'fddbc7', 'ffffff',\r\n 'e0e0e0', 'bababa', '878787', '4d4d4d', '1a1a1a']\r\n },\r\n RdYlBu: {\r\n type: 'diverging',\r\n cbf: 42,\r\n 3: ['fc8d59', 'ffffbf', '91bfdb'],\r\n 4: ['d7191c', 'fdae61', 'abd9e9', '2c7bb6'],\r\n 5: ['d7191c', 'fdae61', 'ffffbf', 'abd9e9', '2c7bb6'],\r\n 6: ['d73027', 'fc8d59', 'fee090', 'e0f3f8', '91bfdb', '4575b4'],\r\n 7: ['d73027', 'fc8d59', 'fee090', 'ffffbf', 'e0f3f8', '91bfdb',\r\n '4575b4'],\r\n 8: ['d73027', 'f46d43', 'fdae61', 'fee090', 'e0f3f8', 'abd9e9',\r\n '74add1', '4575b4'],\r\n 9: ['d73027', 'f46d43', 'fdae61', 'fee090', 'ffffbf', 'e0f3f8',\r\n 'abd9e9', '74add1', '4575b4'],\r\n 10: ['a50026', 'd73027', 'f46d43', 'fdae61', 'fee090', 'e0f3f8',\r\n 'abd9e9', '74add1', '4575b4', '313695'],\r\n 11: ['a50026', 'd73027', 'f46d43', 'fdae61', 'fee090', 'ffffbf',\r\n 'e0f3f8', 'abd9e9', '74add1', '4575b4', '313695']\r\n },\r\n Spectral: {\r\n type: 'diverging',\r\n cbf: 0,\r\n 3: ['fc8d59', 'ffffbf', '99d594'],\r\n 4: ['d7191c', 'fdae61', 'abdda4', '2b83ba'],\r\n 5: ['d7191c', 'fdae61', 'ffffbf', 'abdda4', '2b83ba'],\r\n 6: ['d53e4f', 'fc8d59', 'fee08b', 'e6f598', '99d594', '3288bd'],\r\n 7: ['d53e4f', 'fc8d59', 'fee08b', 'ffffbf', 'e6f598', '99d594',\r\n '3288bd'],\r\n 8: ['d53e4f', 'f46d43', 'fdae61', 'fee08b', 'e6f598', 'abdda4',\r\n '66c2a5', '3288bd'],\r\n 9: ['d53e4f', 'f46d43', 'fdae61', 'fee08b', 'ffffbf', 'e6f598',\r\n 'abdda4', '66c2a5', '3288bd'],\r\n 10: ['9e0142', 'd53e4f', 'f46d43', 'fdae61', 'fee08b', 'e6f598',\r\n 'abdda4', '66c2a5', '3288bd', '5e4fa2'],\r\n 11: ['9e0142', 'd53e4f', 'f46d43', 'fdae61', 'fee08b', 'ffffbf',\r\n 'e6f598', 'abdda4', '66c2a5', '3288bd', '5e4fa2']\r\n },\r\n RdYlGn: {\r\n type: 'diverging',\r\n cbf: 0,\r\n 3: ['fc8d59', 'ffffbf', '91cf60'],\r\n 4: ['d7191c', 'fdae61', 'a6d96a', '1a9641'],\r\n 5: ['d7191c', 'fdae61', 'ffffbf', 'a6d96a', '1a9641'],\r\n 6: ['d73027', 'fc8d59', 'fee08b', 'd9ef8b', '91cf60', '1a9850'],\r\n 7: ['d73027', 'fc8d59', 'fee08b', 'ffffbf', 'd9ef8b', '91cf60',\r\n '1a9850'],\r\n 8: ['d73027', 'f46d43', 'fdae61', 'fee08b', 'd9ef8b', 'a6d96a',\r\n '66bd63', '1a9850'],\r\n 9: ['d73027', 'f46d43', 'fdae61', 'fee08b', 'ffffbf', 'd9ef8b',\r\n 'a6d96a', '66bd63', '1a9850'],\r\n 10: ['a50026', 'd73027', 'f46d43', 'fdae61', 'fee08b', 'd9ef8b',\r\n 'a6d96a', '66bd63', '1a9850', '006837'],\r\n 11: ['a50026', 'd73027', 'f46d43', 'fdae61', 'fee08b', 'ffffbf',\r\n 'd9ef8b', 'a6d96a', '66bd63', '1a9850', '006837']\r\n },\r\n Accent: {\r\n type: 'qualitative',\r\n cbf: 0,\r\n 3: ['7fc97f', 'beaed4', 'fdc086'],\r\n 4: ['7fc97f', 'beaed4', 'fdc086', 'ffff99'],\r\n 5: ['7fc97f', 'beaed4', 'fdc086', 'ffff99', '386cb0'],\r\n 6: ['7fc97f', 'beaed4', 'fdc086', 'ffff99', '386cb0', 'f0027f'],\r\n 7: ['7fc97f', 'beaed4', 'fdc086', 'ffff99', '386cb0', 'f0027f',\r\n 'bf5b17'],\r\n 8: ['7fc97f', 'beaed4', 'fdc086', 'ffff99', '386cb0', 'f0027f',\r\n 'bf5b17', '666666']\r\n },\r\n Dark2: {\r\n type: 'qualitative',\r\n cbf: 3,\r\n 3: ['1b9e77', 'd95f02', '7570b3'],\r\n 4: ['1b9e77', 'd95f02', '7570b3', 'e7298a'],\r\n 5: ['1b9e77', 'd95f02', '7570b3', 'e7298a', '66a61e'],\r\n 6: ['1b9e77', 'd95f02', '7570b3', 'e7298a', '66a61e', 'e6ab02'],\r\n 7: ['1b9e77', 'd95f02', '7570b3', 'e7298a', '66a61e', 'e6ab02',\r\n 'a6761d'],\r\n 8: ['1b9e77', 'd95f02', '7570b3', 'e7298a', '66a61e', 'e6ab02',\r\n 'a6761d', '666666']\r\n },\r\n Paired: {\r\n type: 'qualitative',\r\n cbf: 4,\r\n 3: ['a6cee3', '1f78b4', 'b2df8a'],\r\n 4: ['a6cee3', '1f78b4', 'b2df8a', '33a02c'],\r\n 5: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99'],\r\n 6: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c'],\r\n 7: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c',\r\n 'fdbf6f'],\r\n 8: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c',\r\n 'fdbf6f', 'ff7f00'],\r\n 9: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c',\r\n 'fdbf6f', 'ff7f00', 'cab2d6'],\r\n 10: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c',\r\n 'fdbf6f', 'ff7f00', 'cab2d6', '6a3d9a'],\r\n 11: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c',\r\n 'fdbf6f', 'ff7f00', 'cab2d6', '6a3d9a', 'ffff99'],\r\n 12: ['a6cee3', '1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c',\r\n 'fdbf6f', 'ff7f00', 'cab2d6', '6a3d9a', 'ffff99', 'b15928']\r\n },\r\n Pastel1: {\r\n type: 'qualitative',\r\n cbf: 0,\r\n 3: ['fbb4ae', 'b3cde3', 'ccebc5'],\r\n 4: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4'],\r\n 5: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4', 'fed9a6'],\r\n 6: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4', 'fed9a6', 'ffffcc'],\r\n 7: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4', 'fed9a6', 'ffffcc',\r\n 'e5d8bd'],\r\n 8: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4', 'fed9a6', 'ffffcc',\r\n 'e5d8bd', 'fddaec'],\r\n 9: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4', 'fed9a6', 'ffffcc',\r\n 'e5d8bd', 'fddaec', 'f2f2f2']\r\n },\r\n Pastel2: {\r\n type: 'qualitative',\r\n cbf: 0,\r\n 3: ['b3e2cd', 'fdcdac', 'cbd5e8'],\r\n 4: ['b3e2cd', 'fdcdac', 'cbd5e8', 'f4cae4'],\r\n 5: ['b3e2cd', 'fdcdac', 'cbd5e8', 'f4cae4', 'e6f5c9'],\r\n 6: ['b3e2cd', 'fdcdac', 'cbd5e8', 'f4cae4', 'e6f5c9', 'fff2ae'],\r\n 7: ['b3e2cd', 'fdcdac', 'cbd5e8', 'f4cae4', 'e6f5c9', 'fff2ae',\r\n 'f1e2cc'],\r\n 8: ['b3e2cd', 'fdcdac', 'cbd5e8', 'f4cae4', 'e6f5c9', 'fff2ae',\r\n 'f1e2cc', 'cccccc']\r\n },\r\n Set1: {\r\n type: 'qualitative',\r\n cbf: 0,\r\n 3: ['e41a1c', '377eb8', '4daf4a'],\r\n 4: ['e41a1c', '377eb8', '4daf4a', '984ea3'],\r\n 5: ['e41a1c', '377eb8', '4daf4a', '984ea3', 'ff7f00'],\r\n 6: ['e41a1c', '377eb8', '4daf4a', '984ea3', 'ff7f00', 'ffff33'],\r\n 7: ['e41a1c', '377eb8', '4daf4a', '984ea3', 'ff7f00', 'ffff33',\r\n 'a65628'],\r\n 8: ['e41a1c', '377eb8', '4daf4a', '984ea3', 'ff7f00', 'ffff33',\r\n 'a65628', 'f781bf'],\r\n 9: ['e41a1c', '377eb8', '4daf4a', '984ea3', 'ff7f00', 'ffff33',\r\n 'a65628', 'f781bf', '999999']\r\n },\r\n Set2: {\r\n type: 'qualitative',\r\n cbf: 3,\r\n 3: ['66c2a5', 'fc8d62', '8da0cb'],\r\n 4: ['66c2a5', 'fc8d62', '8da0cb', 'e78ac3'],\r\n 5: ['66c2a5', 'fc8d62', '8da0cb', 'e78ac3', 'a6d854'],\r\n 6: ['66c2a5', 'fc8d62', '8da0cb', 'e78ac3', 'a6d854', 'ffd92f'],\r\n 7: ['66c2a5', 'fc8d62', '8da0cb', 'e78ac3', 'a6d854', 'ffd92f',\r\n 'e5c494'],\r\n 8: ['66c2a5', 'fc8d62', '8da0cb', 'e78ac3', 'a6d854', 'ffd92f',\r\n 'e5c494', 'b3b3b3']\r\n },\r\n Set3: {\r\n type: 'qualitative',\r\n cbf: 0,\r\n 3: ['8dd3c7', 'ffffb3', 'bebada'],\r\n 4: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072'],\r\n 5: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3'],\r\n 6: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3', 'fdb462'],\r\n 7: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3', 'fdb462',\r\n 'b3de69'],\r\n 8: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3', 'fdb462',\r\n 'b3de69', 'fccde5'],\r\n 9: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3', 'fdb462',\r\n 'b3de69', 'fccde5', 'd9d9d9'],\r\n 10: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3', 'fdb462',\r\n 'b3de69', 'fccde5', 'd9d9d9', 'bc80bd'],\r\n 11: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3', 'fdb462',\r\n 'b3de69', 'fccde5', 'd9d9d9', 'bc80bd', 'ccebc5'],\r\n 12: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3', 'fdb462',\r\n 'b3de69', 'fccde5', 'd9d9d9', 'bc80bd', 'ccebc5', 'ffed6f']\r\n }\r\n };\r\n\r\n for (var name in schemes) {\r\n var scheme = schemes[name];\r\n scheme = palette.Scheme.fromPalettes(\r\n 'cb-' + name, [scheme.type, 'cb-' + scheme.type], scheme, 12, scheme.cbf);\r\n palette.register(scheme);\r\n }\r\n})();\r\n\r\nif(typeof module === \"object\" && module.exports) {\r\n module.exports = palette\r\n}\r\n"],"sourceRoot":""}