forked from GeoTIFF/georaster-layer-for-leaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
georaster-layer-for-leaflet.min.js.map
1 lines (1 loc) · 290 KB
/
georaster-layer-for-leaflet.min.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap 12ef50580116f3b030ec","webpack:///(webpack)/buildin/module.js","webpack:///./georaster-layer-for-leaflet.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/chroma-js/chroma.js","webpack:///./node_modules/utm-utils/src/isUTM.js","webpack:///./node_modules/utm-utils/src/getProjString.js","webpack:///./node_modules/utm-utils/src/getZone.js","webpack:///./node_modules/utm-utils/src/getHemisphere.js"],"names":["module","exports","webpackPolyfill","deprecate","paths","children","Object","defineProperty","enumerable","get","l","i","EPSG4326","PROJ4_SUPPORTED_PROJECTIONS","Set","MAX_NORTHING","MAX_EASTING","ORIGIN","GeoRasterLayer","L","GridLayer","extend","initialize","options","georasters","georaster","Error","keys","length","forEach","key","same","ratio","height","width","sourceType","updateWhenIdle","updateWhenZooming","keepBuffer","debugLevel","resolution","Math","pow","undefined","console","log","every","values","rasters","reduce","result","concat","chroma","scale","setOptions","tileSize","getTileSize","tileHeight","y","tileWidth","x","pixelValuesToColorFn","numberOfRasters","error","getRasters","tileNwPoint","heightOfSampleInScreenPixels","widthOfSampleInScreenPixels","coords","numberOfSamplesAcross","numberOfSamplesDown","ymax","xmin","rasterCoordsForTileCoords","h","w","xCenterInMapPixels","yCenterInMapPixels","mapPoint","point","getMap","unproject","z","lat","lng","projection","floor","pixelHeight","pixelWidth","getProjector","inverse","Infinity","topLeft","bottomRight","getValuesOptions","bottom","left","right","top","isFinite","Promise","all","map","getValues","then","valuesByGeoRaster","createTile","done","tile","DomUtil","create","context","getContext","drawTile","inSimpleCRS","crs","CRS","Simple","rasterHeight","rasterWidth","getBounds","_northEast","xMinOfLayer","xMaxOfLayer","yMinOfLayer","yMaxOfLayer","boundsOfTile","_tileCoordsToBounds","xMinOfTileInMapCRS","getWest","xMaxOfTileInMapCRS","getEast","yMinOfTileInMapCRS","getSouth","yMaxOfTileInMapCRS","getNorth","rasterPixelsAcross","rasterPixelsDown","ceil","projector","topRight","bottomLeft","max","min","heightOfSampleInScreenPixelsInt","widthOfSampleInScreenPixelsInt","scaleBy","setTimeout","tileRasters","latWestPoint","yInTilePixels","round","yInRasterPixels","latLngPoint","xOfLayer","xInRasterPixels","inverted","yInSrc","xInSrc","band","customDrawFunction","rasterX","rasterY","sampleX","sampleY","sampledRaster","color","getColor","fillStyle","fillRect","initBounds","_bounds","_map","_mapToAdd","_isValidTile","infinite","globalBounds","_globalTileRange","wrapLng","wrapLat","bounds","layerBounds","latLngBounds","overlaps","leftCoords","rightCoords","numberOfValues","haveDataForAllBands","value","noDataValue","mins","ranges","palette","r","g","b","a","hex","updateColors","tiles","getActiveTiles","el","getTiles","_tiles","filter","isSupportedProjection","isUTM","has","getProjectionString","getProjString","xmax","ymin","minLatWest","latLng","maxLatEast","forward","proj4","_projector","array","item","size","window","self","originalModule","runtime","Op","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","configurable","writable","err","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","_invoke","makeInvokeMethod","tryCatch","fn","arg","type","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","constructor","displayName","defineIteratorMethods","method","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","next","state","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","object","reverse","pop","iterable","iteratorMethod","isNaN","skipTempReset","prev","charAt","slice","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","Color","DEG2RAD","LAB_CONSTANTS","PI","PITHIRD","RAD2DEG","TWOPI","_average_lrgb","_guess_formats","_guess_formats_sorted","_input","_interpolators","abs","atan2","bezier","blend","blend_f","brewer","burn","clip_rgb","cmyk2rgb","colors","cos","css2rgb","darken","dodge","each","hcg2rgb","hex2rgb","hsi2rgb","hsl2css","hsl2rgb","hsv2rgb","interpolate","interpolate_hsx","interpolate_lab","interpolate_lrgb","interpolate_num","interpolate_rgb","lab2lch","lab2rgb","lab_xyz","lch2lab","lch2rgb","lighten","limit","luminance_x","m","multiply","normal","num2rgb","overlay","rgb2cmyk","rgb2css","rgb2hcg","rgb2hex","rgb2hsi","rgb2hsl","rgb2hsv","rgb2lab","rgb2lch","rgb2luminance","rgb2num","rgb2temperature","rgb2xyz","rgb_xyz","rnd","root","screen","sin","sqrt","temperature2rgb","unpack","w3cx11","xyz_lab","xyz_rgb","classToType","len","o","ref","split","toLowerCase","strType","args","Array","rgb","_clipped","_unclipped","arguments","func","child","apply","version","chk","len1","me","mode","_rgb","sort","p","test","warn","OrRd","PuBu","BuPu","Oranges","BuGn","YlOrBr","YlGn","Reds","RdPu","Greens","YlGnBu","Purples","GnBu","Greys","YlOrRd","PuRd","Blues","PuBuGn","Viridis","Spectral","RdYlGn","RdBu","PiYG","PRGn","RdYlBu","BrBG","RdGy","PuOr","Set2","Accent","Set1","Set3","Dark2","Paired","Pastel2","Pastel1","results","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflower","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","laserlemon","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrod","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","maroon2","maroon3","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","purple2","purple3","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","Yn","Xn","Zn","t","t1","t2","t0","Kn","t3","ref1","lab","I","I0","I1","c","lab0","lab1","lab2","lab3","ref2","f","cubehelix","start","rotations","hue","gamma","lightness","dh","dl","fract","amp","cos_a","sin_a","s","random","code","digits","col1","col2","interpol","res","alpha","mix","k","v","rgba","n","lrgb","xyz0","xyz1","col","xyz","average","A","cnt","dx","dy","first","xyz2","splice","u","match","substr","parseInt","css","channels","hxa","str","Number","NaN","hsl","q","ref3","ref4","ref5","delta","hsv","num","_c","_g","hcg","aa","ab","join","named","lch","hcl","cmyk","gl","luminance","lum","cur_lum","eps","max_iter","lm","kelvin","temp","maxTemp","minTemp","temperature","K","contrast","l1","l2","distance","d","sum_sq","deltaE","C","L1","L2","a1","a2","b1","b2","c1","c2","c4","dH2","delA","delB","delC","delL","h1","sc","sh","sl","v1","v2","v3","modechan","channel","src","indexOf","set","clipped","amount","brighten","darker","brighter","saturate","desaturate","premultiply","c0","out","analyze","data","val","MAX_VALUE","sum","count","domain","limits","positions","_classes","_colorCache","_colors","_correctLightness","_domain","_fixed","_gamma","_max","_min","_mode","_nacol","_out","_padding","_pos","_spread","_useCache","classifyValue","getClass","resetCache","setColors","tmap","maxc","minc","bypassMap","classes","_m","range","_o","spread","correctLightness","L0","L_actual","L_diff","L_ideal","pol","padding","numColors","dd","dm","samples","cache","nodata","scales","cool","hot","add","visit","ac","ad","ae","af","ag","ah","ai","aj","ak","al","am","assignments","best","centroids","cluster","clusterSizes","dist","j","kClusters","max_log","min_log","mindist","nb_iters","newCentroids","pb","pr","ref10","ref11","ref12","ref13","ref14","ref6","ref7","ref8","ref9","repeat","tmpKMeansBreaks","LOG10E","acos","hsi","hue0","hue1","lbv","lbv0","lbv1","sat","sat0","sat1","n1","n2","projstr","startsWith","getZone","require","getHemisphere","zone","hemisphere","substring"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;;;;;;;AC7DAA,MAAM,CAACC,OAAP,GAAiB,UAASD,MAAT,EAAiB;AACjC,MAAG,CAACA,MAAM,CAACE,eAAX,EAA4B;AAC3BF,UAAM,CAACG,SAAP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MAAMyyB,OAAO,GAAGzyB,UAAU,CAAC+N,QAAX,EAAhB;AACA,SAAO0kB,OAAO,CAACC,UAAR,CAAmB,KAAnB,KAA6BD,OAAO,CAACC,UAAR,CAAmB,KAAnB,CAApC;AACH,CAHD,C;;;;;;ACAA,IAAMC,OAAO,GAAGC,mBAAO,CAAC,CAAD,CAAvB;;AACA,IAAMC,aAAa,GAAGD,mBAAO,CAAC,CAAD,CAA7B;;AAEAj4B,MAAM,CAACC,OAAP,GAAiB,SAASgN,aAAT,CAAwB5H,UAAxB,EAAoC;AACjD,MAAM8yB,IAAI,GAAGH,OAAO,CAAC3yB,UAAD,CAApB;AACA,MAAM+yB,UAAU,GAAGF,aAAa,CAAC7yB,UAAD,CAAhC;AACA,mCAA0B8yB,IAA1B,SAAiCC,UAAU,KAAK,GAAf,GAAqB,UAArB,GAAkC,GAAnE;AACH,CAJD,C;;;;;;ACHAp4B,MAAM,CAACC,OAAP,GAAiB,SAAS+3B,OAAT,CAAkB3yB,UAAlB,EAA8B;AAC3C,SAAOknB,MAAM,CAACL,QAAP,CAAgB7mB,UAAU,CAAC+N,QAAX,GAAsBilB,SAAtB,CAAgC,CAAhC,CAAhB,CAAP;AACH,CAFD,C;;;;;;ACAAr4B,MAAM,CAACC,OAAP,GAAiB,SAASi4B,aAAT,CAAwB7yB,UAAxB,EAAoC;AACjD,MAAMyyB,OAAO,GAAGzyB,UAAU,CAAC+N,QAAX,EAAhB;;AACA,MAAI0kB,OAAO,CAACC,UAAR,CAAmB,KAAnB,CAAJ,EAA+B;AAC7B,WAAO,GAAP;AACD,GAFD,MAEO,IAAID,OAAO,CAACC,UAAR,CAAmB,KAAnB,CAAJ,EAA+B;AACpC,WAAO,GAAP;AACD;AACF,CAPH,C","file":"georaster-layer-for-leaflet.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 12ef50580116f3b030ec","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// (webpack)/buildin/module.js","/* global L, proj4 */\nimport \"regenerator-runtime/runtime\";\nimport chroma from \"chroma-js\";\nimport isUTM from \"utm-utils/src/isUTM\";\nimport getProjString from \"utm-utils/src/getProjString\";\n\nconst EPSG4326 = 4326;\nconst PROJ4_SUPPORTED_PROJECTIONS = new Set([3857, 4269]);\nconst MAX_NORTHING = 1000;\nconst MAX_EASTING = 1000;\nconst ORIGIN = [0, 0];\n\nconst GeoRasterLayer = L.GridLayer.extend({\n initialize: function (options) {\n try {\n if (options.georasters) {\n this.georasters = options.georasters;\n } else if (options.georaster) {\n this.georasters = [options.georaster];\n } else {\n throw new Error(\"You initialized a GeoRasterLayer without a georaster or georasters value.\");\n }\n\n /*\n Unpacking values for use later.\n We do this in order to increase speed.\n */\n const keys = [\n \"height\",\n \"width\",\n \"noDataValue\",\n \"palette\",\n \"pixelHeight\",\n \"pixelWidth\",\n \"projection\",\n \"sourceType\",\n \"xmin\",\n \"xmax\",\n \"ymin\",\n \"ymax\"\n ];\n if (this.georasters.length > 1) {\n keys.forEach(key => {\n if (this.same(this.georasters, key)) {\n this[key] = this.georasters[0][key];\n } else {\n throw new Error(\"all GeoRasters must have the same \" + key);\n }\n });\n } else if (this.georasters.length === 1) {\n keys.forEach(key => {\n this[key] = this.georasters[0][key];\n });\n }\n\n // used later if simple projection\n this.ratio = this.height / this.width;\n\n if (this.sourceType === \"url\") {\n if (!options.updateWhenIdle) options.updateWhenIdle = false;\n if (!options.updateWhenZooming) options.updateWhenZooming = true;\n if (!options.keepBuffer) options.keepBuffer = 16;\n }\n\n if (!(\"debugLevel\" in options)) options.debugLevel = 1;\n if (!options.keepBuffer) options.keepBuffer = 25;\n if (!options.resolution) options.resolution = Math.pow(2, 5);\n if (options.updateWhenZooming === undefined) options.updateWhenZooming = false;\n\n this.debugLevel = options.debugLevel;\n if (this.debugLevel >= 1) console.log(\"georaster:\", options);\n\n if (this.georasters.every(georaster => typeof georaster.values === \"object\")) {\n this.rasters = this.georasters.reduce((result, georaster) => {\n result = result.concat(georaster.values);\n return result;\n }, []);\n if (this.debugLevel > 1) console.log(\"this.rasters:\", this.rasters);\n }\n\n this.chroma = chroma;\n this.scale = chroma.scale();\n\n L.setOptions(this, options);\n\n /*\n Caching the constant tile size, so we don't recalculate everytime we\n create a new tile\n */\n const tileSize = this.getTileSize();\n this.tileHeight = tileSize.y;\n this.tileWidth = tileSize.x;\n\n if (this.georasters.length > 1 && !options.pixelValuesToColorFn) {\n throw \"you must pass in a pixelValuesToColorFn if you are combining rasters\";\n }\n\n if (\n this.georasters.length === 1 &&\n this.georasters[0].sourceType === \"url\" &&\n this.georasters[0].numberOfRasters === 1 &&\n !options.pixelValuesToColorFn\n ) {\n // For COG, we can't determine a data min max for color scaling,\n // so pixelValuesToColorFn is required.\n throw \"pixelValuesToColorFn is a required option for single-band rasters initialized via URL\";\n }\n } catch (error) {\n console.error(\"ERROR initializing GeoTIFFLayer\", error);\n }\n },\n\n getRasters: function (options) {\n const {\n tileNwPoint,\n heightOfSampleInScreenPixels,\n widthOfSampleInScreenPixels,\n coords,\n numberOfSamplesAcross,\n numberOfSamplesDown,\n ymax,\n xmin\n } = options;\n if (this.debugLevel >= 1) console.log(\"starting getRasters with options:\", options);\n // called if georaster was constructed from URL and we need to get\n // data separately for each tile\n // aka 'COG mode'\n\n /*\n This function takes in coordinates in the rendered image tile and\n returns the y and x values in the original raster\n */\n const rasterCoordsForTileCoords = (h, w) => {\n const xCenterInMapPixels = tileNwPoint.x + (w + 0.5) * widthOfSampleInScreenPixels;\n const yCenterInMapPixels = tileNwPoint.y + (h + 0.5) * heightOfSampleInScreenPixels;\n\n const mapPoint = L.point(xCenterInMapPixels, yCenterInMapPixels);\n if (this.debugLevel >= 1) console.log(\"mapPoint:\", mapPoint);\n\n const { lat, lng } = this.getMap().unproject(mapPoint, coords.z);\n\n if (this.projection === EPSG4326) {\n return {\n y: Math.floor((ymax - lat) / this.pixelHeight),\n x: Math.floor((lng - xmin) / this.pixelWidth)\n };\n } else if (this.getProjector()) {\n /* source raster doesn't use latitude and longitude,\n so need to reproject point from lat/long to projection of raster\n */\n const [x, y] = this.getProjector().inverse([lng, lat]);\n if (x === Infinity || y === Infinity) {\n if (this.debugLevel >= 1) console.error(\"projector converted\", [lng, lat], \"to\", [x, y]);\n }\n return {\n y: Math.floor((ymax - y) / this.pixelHeight),\n x: Math.floor((x - xmin) / this.pixelWidth)\n };\n }\n };\n\n // careful not to flip min_y/max_y here\n const topLeft = rasterCoordsForTileCoords(0, 0);\n const bottomRight = rasterCoordsForTileCoords(numberOfSamplesDown - 1, numberOfSamplesAcross - 1);\n\n const getValuesOptions = {\n bottom: bottomRight.y,\n height: numberOfSamplesDown,\n left: topLeft.x,\n right: bottomRight.x,\n top: topLeft.y,\n width: numberOfSamplesAcross\n };\n if (!Object.values(getValuesOptions).every(isFinite)) {\n console.error(\"getRasters failed because not all values are finite:\", getValuesOptions);\n } else {\n return Promise.all(this.georasters.map(georaster => georaster.getValues(getValuesOptions))).then(\n valuesByGeoRaster =>\n valuesByGeoRaster.reduce((result, values) => {\n result = result.concat(values);\n return result;\n }, [])\n );\n }\n },\n\n createTile: function (coords, done) {\n /* This tile is the square piece of the Leaflet map that we draw on */\n const tile = L.DomUtil.create(\"canvas\", \"leaflet-tile\");\n tile.height = this.tileHeight;\n tile.width = this.tileWidth;\n const context = tile.getContext(\"2d\");\n\n return this.drawTile({ tile, coords, context, done });\n },\n\n drawTile: function ({ tile, coords, context, done }) {\n let error;\n\n const inSimpleCRS = this.getMap().options.crs === L.CRS.Simple;\n\n // Unpacking values for increased speed\n const { rasters, xmin, ymax } = this;\n const rasterHeight = this.height;\n const rasterWidth = this.width;\n\n const pixelHeight = inSimpleCRS ? this.getBounds()._northEast.lat / rasterHeight : this.pixelHeight;\n const pixelWidth = inSimpleCRS ? this.getBounds()._northEast.lng / rasterWidth : this.pixelWidth;\n\n // these values are used, so we don't try to sample outside of the raster\n const { xMinOfLayer, xMaxOfLayer, yMinOfLayer, yMaxOfLayer } = this;\n const boundsOfTile = this._tileCoordsToBounds(coords);\n\n const xMinOfTileInMapCRS = boundsOfTile.getWest();\n const xMaxOfTileInMapCRS = boundsOfTile.getEast();\n const yMinOfTileInMapCRS = boundsOfTile.getSouth();\n const yMaxOfTileInMapCRS = boundsOfTile.getNorth();\n\n let rasterPixelsAcross, rasterPixelsDown;\n if (inSimpleCRS || this.projection === EPSG4326) {\n // width of the Leaflet tile in number of pixels from original raster\n rasterPixelsAcross = Math.ceil((xMaxOfTileInMapCRS - xMinOfTileInMapCRS) / pixelWidth);\n rasterPixelsDown = Math.ceil((yMaxOfTileInMapCRS - yMinOfTileInMapCRS) / pixelHeight);\n } else if (this.getProjector()) {\n const projector = this.getProjector();\n // convert extent of Leaflet tile to projection of the georaster\n const topLeft = projector.inverse({ x: xMinOfTileInMapCRS, y: yMaxOfTileInMapCRS });\n const topRight = projector.inverse({ x: xMaxOfTileInMapCRS, y: yMaxOfTileInMapCRS });\n const bottomLeft = projector.inverse({ x: xMinOfTileInMapCRS, y: yMinOfTileInMapCRS });\n const bottomRight = projector.inverse({ x: xMaxOfTileInMapCRS, y: yMinOfTileInMapCRS });\n\n rasterPixelsAcross = Math.ceil(Math.max(topRight.x - topLeft.x, bottomRight.x - bottomLeft.x) / pixelWidth);\n rasterPixelsDown = Math.ceil(Math.max(topLeft.y - bottomLeft.y, topRight.y - bottomRight.y) / pixelHeight);\n }\n\n const { resolution } = this.options;\n\n // prevent sampling more times than number of pixels to display\n const numberOfSamplesAcross = Math.min(resolution, rasterPixelsAcross);\n const numberOfSamplesDown = Math.min(resolution, rasterPixelsDown);\n\n // set how large to display each sample in screen pixels\n const heightOfSampleInScreenPixels = this.tileHeight / numberOfSamplesDown;\n const heightOfSampleInScreenPixelsInt = Math.ceil(heightOfSampleInScreenPixels);\n const widthOfSampleInScreenPixels = this.tileWidth / numberOfSamplesAcross;\n const widthOfSampleInScreenPixelsInt = Math.ceil(widthOfSampleInScreenPixels);\n\n const map = this.getMap();\n const tileSize = this.getTileSize();\n\n // this converts tile coordinates (how many tiles down and right)\n // to pixels from left and top of tile pane\n const tileNwPoint = coords.scaleBy(tileSize);\n\n // render asynchronously so tiles show up as they finish instead of all at once (which blocks the UI)\n setTimeout(async () => {\n let tileRasters;\n if (!rasters) {\n tileRasters = await this.getRasters({\n tileNwPoint,\n heightOfSampleInScreenPixels,\n widthOfSampleInScreenPixels,\n coords,\n pixelHeight,\n pixelWidth,\n numberOfSamplesAcross,\n numberOfSamplesDown,\n ymax,\n xmin\n });\n }\n\n for (let h = 0; h < numberOfSamplesDown; h++) {\n const yCenterInMapPixels = tileNwPoint.y + (h + 0.5) * heightOfSampleInScreenPixels;\n const latWestPoint = L.point(tileNwPoint.x, yCenterInMapPixels);\n const { lat } = map.unproject(latWestPoint, coords.z);\n if (lat > yMinOfLayer && lat < yMaxOfLayer) {\n const yInTilePixels = Math.round(h * heightOfSampleInScreenPixels);\n\n let yInRasterPixels;\n if (inSimpleCRS || this.projection === EPSG4326) {\n yInRasterPixels = Math.floor((yMaxOfLayer - lat) / pixelHeight);\n } else {\n yInRasterPixels = null;\n }\n\n for (let w = 0; w < numberOfSamplesAcross; w++) {\n const latLngPoint = L.point(tileNwPoint.x + (w + 0.5) * widthOfSampleInScreenPixels, yCenterInMapPixels);\n const { lng: xOfLayer } = map.unproject(latLngPoint, coords.z);\n if (xOfLayer > xMinOfLayer && xOfLayer < xMaxOfLayer) {\n let xInRasterPixels;\n if (inSimpleCRS || this.projection === EPSG4326) {\n xInRasterPixels = Math.floor((xOfLayer - xMinOfLayer) / pixelWidth);\n } else if (this.getProjector()) {\n const inverted = this.getProjector().inverse({ x: xOfLayer, y: lat });\n const yInSrc = inverted.y;\n yInRasterPixels = Math.floor((ymax - yInSrc) / pixelHeight);\n if (yInRasterPixels < 0 || yInRasterPixels >= rasterHeight) continue;\n\n const xInSrc = inverted.x;\n xInRasterPixels = Math.floor((xInSrc - xmin) / pixelWidth);\n if (xInRasterPixels < 0 || xInRasterPixels >= rasterWidth) continue;\n }\n\n let values = null;\n if (tileRasters) {\n // get value from array specific to this tile\n values = tileRasters.map(band => band[h][w]);\n } else if (rasters) {\n // get value from array with data for entire raster\n values = rasters.map(band => {\n return band[yInRasterPixels][xInRasterPixels];\n });\n } else {\n done && done(\"no rasters are available for, so skipping value generation\");\n return;\n }\n\n // x-axis coordinate of the starting point of the rectangle representing the raster pixel\n const x = Math.round(w * widthOfSampleInScreenPixels);\n\n // y-axis coordinate of the starting point of the rectangle representing the raster pixel\n const y = yInTilePixels;\n\n // how many real screen pixels does a pixel of the sampled raster take up\n const width = widthOfSampleInScreenPixelsInt;\n const height = heightOfSampleInScreenPixelsInt;\n\n if (this.options.customDrawFunction) {\n this.options.customDrawFunction({\n values,\n context,\n x,\n y,\n width,\n height,\n rasterX: xInRasterPixels,\n rasterY: yInRasterPixels,\n sampleX: w,\n sampleY: h,\n sampledRaster: tileRasters\n });\n } else {\n const color = this.getColor(values);\n if (color) {\n context.fillStyle = color;\n context.fillRect(x, y, width, height);\n }\n }\n }\n }\n }\n }\n\n done && done(error, tile);\n }, 0);\n\n // return the tile so it can be rendered on screen\n return tile;\n },\n\n // method from https://github.com/Leaflet/Leaflet/blob/bb1d94ac7f2716852213dd11563d89855f8d6bb1/src/layer/ImageOverlay.js\n getBounds: function () {\n this.initBounds();\n return this._bounds;\n },\n\n getMap: function () {\n return this._map || this._mapToAdd;\n },\n\n _isValidTile: function (coords) {\n const crs = this.getMap().options.crs;\n\n if (!crs.infinite) {\n // don't load tile if it's out of bounds and not wrapped\n const globalBounds = this._globalTileRange;\n if (\n (!crs.wrapLng && (coords.x < globalBounds.min.x || coords.x > globalBounds.max.x)) ||\n (!crs.wrapLat && (coords.y < globalBounds.min.y || coords.y > globalBounds.max.y))\n ) {\n return false;\n }\n }\n\n const bounds = this.getBounds();\n\n if (!bounds) {\n return true;\n }\n\n const { x, y, z } = coords;\n\n const layerBounds = L.latLngBounds(bounds);\n\n const boundsOfTile = this._tileCoordsToBounds(coords);\n\n // check given tile coordinates\n if (layerBounds.overlaps(boundsOfTile)) return true;\n\n // if not within the original confines of the earth return false\n // we don't want wrapping if using Simple CRS\n if (crs === L.CRS.Simple) return false;\n\n // width of the globe in tiles at the given zoom level\n const width = Math.pow(2, z);\n\n // check one world to the left\n const leftCoords = L.point(x - width, y);\n leftCoords.z = z;\n if (layerBounds.overlaps(this._tileCoordsToBounds(leftCoords))) return true;\n\n // check one world to the right\n const rightCoords = L.point(x + width, y);\n rightCoords.z = z;\n if (layerBounds.overlaps(this._tileCoordsToBounds(rightCoords))) return true;\n\n return false;\n },\n\n getColor: function (values) {\n if (this.options.pixelValuesToColorFn) {\n return this.options.pixelValuesToColorFn(values);\n } else {\n const numberOfValues = values.length;\n const haveDataForAllBands = values.every(value => value !== undefined && value !== this.noDataValue);\n if (haveDataForAllBands) {\n if (numberOfValues == 1) {\n const { mins, ranges } = this.georasters[0];\n const value = values[0];\n if (this.palette) {\n const [r, g, b, a] = this.palette[value];\n return `rgba(${r},${g},${b},${a / 255})`;\n } else {\n return this.scale((values[0] - mins[0]) / ranges[0]).hex();\n }\n } else if (numberOfValues === 2) {\n return `rgb(${values[0]},${values[1]},0)`;\n } else if (numberOfValues === 3) {\n return `rgb(${values[0]},${values[1]},${values[2]})`;\n } else if (numberOfValues === 4) {\n return `rgba(${values[0]},${values[1]},${values[2]},${values[3] / 255})`;\n }\n }\n }\n },\n\n /**\n * The callback used to determine the colour based on the values of each pixel\n *\n * @callback pixelValuesToColorFn\n * @param {array | number} values - The pixel value depends on the image being rendered. Multiband images will be a tuple of one value per band. Single band images will be a single number\n * @returns {string} - Any valid CSS color string\n */\n\n /**\n * Redraws the active map tiles updating the pixel values using the supplie callback\n * @param {pixelValuesToColorFn} pixelValuesToColorFn - Callback that handles getting the pixel color\n * @param {Object} [options] - Configuration options passed to the method\n * @param {boolean} [options.debugLevel=0] - Overrides the global `debugLevel`. Set it to >=1 to allow output here when the global `debugLevel` = 0\n */\n updateColors(pixelValuesToColorFn, { debugLevel = this.debugLevel } = {}) {\n if (!pixelValuesToColorFn) {\n throw new Error(\"Missing pixelValuesToColorFn function\");\n }\n\n if (debugLevel >= 1) console.log(\"Start updating active tile pixel values\");\n\n // update option to ensure correct colours at other zoom levels.\n this.options.pixelValuesToColorFn = pixelValuesToColorFn;\n\n const tiles = this.getActiveTiles();\n if (!tiles) {\n console.error(\"No active tiles available\");\n return this;\n }\n\n if (debugLevel >= 1) console.log(\"Active tiles fetched\", tiles);\n\n tiles.forEach(tile => {\n const { coords, el } = tile;\n this.drawTile({ tile, coords, context: el.getContext(\"2d\") });\n });\n if (debugLevel >= 1) console.log(\"Finished updating active tile colours\");\n return this;\n },\n\n getTiles() {\n // transform _tiles object collection into an array\n return Object.values(this._tiles);\n },\n\n getActiveTiles() {\n const tiles = this.getTiles();\n // only return valid tiles\n return tiles.filter(tile => this._isValidTile(tile.coords));\n },\n\n isSupportedProjection: function (projection) {\n if (!projection) projection = this.projection;\n return isUTM(projection) || PROJ4_SUPPORTED_PROJECTIONS.has(projection);\n },\n\n getProjectionString: function (projection) {\n if (isUTM(projection)) {\n return getProjString(projection);\n }\n return `EPSG:${projection}`;\n },\n\n initBounds: function (options = this.options) {\n if (!this._bounds) {\n const { debugLevel, height, width, projection, xmin, xmax, ymin, ymax } = this;\n // check if map using Simple CRS\n if (this.getMap().options.crs === L.CRS.Simple) {\n if (height === width) {\n this._bounds = L.latLngBounds([ORIGIN, [MAX_NORTHING, MAX_EASTING]]);\n } else if (height > width) {\n this._bounds = L.latLngBounds([ORIGIN, [MAX_NORTHING, MAX_EASTING / this.ratio]]);\n } else if (width > height) {\n this._bounds = L.latLngBounds([ORIGIN, [MAX_NORTHING * this.ratio, MAX_EASTING]]);\n }\n } else if (projection === EPSG4326) {\n if (debugLevel >= 1) console.log(`georaster projection is in ${EPSG4326}`);\n const minLatWest = L.latLng(ymin, xmin);\n const maxLatEast = L.latLng(ymax, xmax);\n this._bounds = L.latLngBounds(minLatWest, maxLatEast);\n } else if (this.getProjector()) {\n if (debugLevel >= 1) console.log(\"projection is UTM or supported by proj4\");\n const bottomLeft = this.getProjector().forward({ x: xmin, y: ymin });\n const minLatWest = L.latLng(bottomLeft.y, bottomLeft.x);\n const topRight = this.getProjector().forward({ x: xmax, y: ymax });\n const maxLatEast = L.latLng(topRight.y, topRight.x);\n this._bounds = L.latLngBounds(minLatWest, maxLatEast);\n } else {\n throw `georaster-layer-for-leaflet does not support rasters with the projection ${projection}`;\n }\n\n // these values are used so we don't try to sample outside of the raster\n this.xMinOfLayer = this._bounds.getWest();\n this.xMaxOfLayer = this._bounds.getEast();\n this.yMaxOfLayer = this._bounds.getNorth();\n this.yMinOfLayer = this._bounds.getSouth();\n\n options.bounds = this._bounds;\n }\n },\n\n getProjector: function () {\n if (this.isSupportedProjection(this.projection)) {\n if (!proj4) {\n throw \"proj4 must be found in the global scope in order to load a raster that uses a UTM projection\";\n }\n if (!this._projector) {\n this._projector = proj4(this.getProjectionString(this.projection), `EPSG:${EPSG4326}`);\n if (this.debugLevel >= 1) console.log(\"projector set\");\n }\n return this._projector;\n }\n },\n\n same(array, key) {\n return new Set(array.map(item => item[key])).size === 1;\n }\n});\n\nif (typeof module !== \"undefined\" && typeof module.exports !== \"undefined\") {\n module.exports = GeoRasterLayer;\n}\nif (typeof window !== \"undefined\") {\n window[\"GeoRasterLayer\"] = GeoRasterLayer;\n} else if (typeof self !== \"undefined\") {\n self[\"GeoRasterLayer\"] = GeoRasterLayer; // jshint ignore:line\n}\n\n\n\n// WEBPACK FOOTER //\n// ./georaster-layer-for-leaflet.js","module.exports = function(originalModule) {\r\n\tif(!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true,\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// (webpack)/buildin/harmony-module.js","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/regenerator-runtime/runtime.js","\n/**\n * @license\n *\n * chroma.js - JavaScript library for color conversions\n * \n * Copyright (c) 2011-2017, Gregor Aisch\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * \n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * \n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * \n * 3. The name Gregor Aisch may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n */\n\n(function() {\n var Color, DEG2RAD, LAB_CONSTANTS, PI, PITHIRD, RAD2DEG, TWOPI, _average_lrgb, _guess_formats, _guess_formats_sorted, _input, _interpolators, abs, atan2, bezier, blend, blend_f, brewer, burn, chroma, clip_rgb, cmyk2rgb, colors, cos, css2rgb, darken, dodge, each, floor, hcg2rgb, hex2rgb, hsi2rgb, hsl2css, hsl2rgb, hsv2rgb, interpolate, interpolate_hsx, interpolate_lab, interpolate_lrgb, interpolate_num, interpolate_rgb, lab2lch, lab2rgb, lab_xyz, lch2lab, lch2rgb, lighten, limit, log, luminance_x, m, max, multiply, normal, num2rgb, overlay, pow, rgb2cmyk, rgb2css, rgb2hcg, rgb2hex, rgb2hsi, rgb2hsl, rgb2hsv, rgb2lab, rgb2lch, rgb2luminance, rgb2num, rgb2temperature, rgb2xyz, rgb_xyz, rnd, root, round, screen, sin, sqrt, temperature2rgb, type, unpack, w3cx11, xyz_lab, xyz_rgb,\n slice = [].slice;\n\n type = (function() {\n\n /*\n for browser-safe type checking+\n ported from jQuery's $.type\n */\n var classToType, len, name, o, ref;\n classToType = {};\n ref = \"Boolean Number String Function Array Date RegExp Undefined Null\".split(\" \");\n for (o = 0, len = ref.length; o < len; o++) {\n name = ref[o];\n classToType[\"[object \" + name + \"]\"] = name.toLowerCase();\n }\n return function(obj) {\n var strType;\n strType = Object.prototype.toString.call(obj);\n return classToType[strType] || \"object\";\n };\n })();\n\n limit = function(x, min, max) {\n if (min == null) {\n min = 0;\n }\n if (max == null) {\n max = 1;\n }\n if (x < min) {\n x = min;\n }\n if (x > max) {\n x = max;\n }\n return x;\n };\n\n unpack = function(args) {\n if (args.length >= 3) {\n return Array.prototype.slice.call(args);\n } else {\n return args[0];\n }\n };\n\n clip_rgb = function(rgb) {\n var i, o;\n rgb._clipped = false;\n rgb._unclipped = rgb.slice(0);\n for (i = o = 0; o < 3; i = ++o) {\n if (i < 3) {\n if (rgb[i] < 0 || rgb[i] > 255) {\n rgb._clipped = true;\n }\n if (rgb[i] < 0) {\n rgb[i] = 0;\n }\n if (rgb[i] > 255) {\n rgb[i] = 255;\n }\n } else if (i === 3) {\n if (rgb[i] < 0) {\n rgb[i] = 0;\n }\n if (rgb[i] > 1) {\n rgb[i] = 1;\n }\n }\n }\n if (!rgb._clipped) {\n delete rgb._unclipped;\n }\n return rgb;\n };\n\n PI = Math.PI, round = Math.round, cos = Math.cos, floor = Math.floor, pow = Math.pow, log = Math.log, sin = Math.sin, sqrt = Math.sqrt, atan2 = Math.atan2, max = Math.max, abs = Math.abs;\n\n TWOPI = PI * 2;\n\n PITHIRD = PI / 3;\n\n DEG2RAD = PI / 180;\n\n RAD2DEG = 180 / PI;\n\n chroma = function() {\n if (arguments[0] instanceof Color) {\n return arguments[0];\n }\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, arguments, function(){});\n };\n\n chroma[\"default\"] = chroma;\n\n _interpolators = [];\n\n if ((typeof module !== \"undefined\" && module !== null) && (module.exports != null)) {\n module.exports = chroma;\n }\n\n if (typeof define === 'function' && define.amd) {\n define([], function() {\n return chroma;\n });\n } else {\n root = typeof exports !== \"undefined\" && exports !== null ? exports : this;\n root.chroma = chroma;\n }\n\n chroma.version = '1.4.1';\n\n _input = {};\n\n _guess_formats = [];\n\n _guess_formats_sorted = false;\n\n Color = (function() {\n function Color() {\n var arg, args, chk, len, len1, me, mode, o, w;\n me = this;\n args = [];\n for (o = 0, len = arguments.length; o < len; o++) {\n arg = arguments[o];\n if (arg != null) {\n args.push(arg);\n }\n }\n if (args.length > 1) {\n mode = args[args.length - 1];\n }\n if (_input[mode] != null) {\n me._rgb = clip_rgb(_input[mode](unpack(args.slice(0, -1))));\n } else {\n if (!_guess_formats_sorted) {\n _guess_formats = _guess_formats.sort(function(a, b) {\n return b.p - a.p;\n });\n _guess_formats_sorted = true;\n }\n for (w = 0, len1 = _guess_formats.length; w < len1; w++) {\n chk = _guess_formats[w];\n mode = chk.test.apply(chk, args);\n if (mode) {\n break;\n }\n }\n if (mode) {\n me._rgb = clip_rgb(_input[mode].apply(_input, args));\n }\n }\n if (me._rgb == null) {\n console.warn('unknown format: ' + args);\n }\n if (me._rgb == null) {\n me._rgb = [0, 0, 0];\n }\n if (me._rgb.length === 3) {\n me._rgb.push(1);\n }\n }\n\n Color.prototype.toString = function() {\n return this.hex();\n };\n\n return Color;\n\n })();\n\n chroma._input = _input;\n\n\n /**\n \tColorBrewer colors for chroma.js\n \n \tCopyright (c) 2002 Cynthia Brewer, Mark Harrower, and The \n \tPennsylvania State University.\n \n \tLicensed under the Apache License, Version 2.0 (the \"License\"); \n \tyou may not use this file except in compliance with the License.\n \tYou may obtain a copy of the License at\t\n \thttp://www.apache.org/licenses/LICENSE-2.0\n \n \tUnless required by applicable law or agreed to in writing, software distributed\n \tunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n \tCONDITIONS OF ANY KIND, either express or implied. See the License for the\n \tspecific language governing permissions and limitations under the License.\n \n @preserve\n */\n\n chroma.brewer = brewer = {\n OrRd: ['#fff7ec', '#fee8c8', '#fdd49e', '#fdbb84', '#fc8d59', '#ef6548', '#d7301f', '#b30000', '#7f0000'],\n PuBu: ['#fff7fb', '#ece7f2', '#d0d1e6', '#a6bddb', '#74a9cf', '#3690c0', '#0570b0', '#045a8d', '#023858'],\n BuPu: ['#f7fcfd', '#e0ecf4', '#bfd3e6', '#9ebcda', '#8c96c6', '#8c6bb1', '#88419d', '#810f7c', '#4d004b'],\n Oranges: ['#fff5eb', '#fee6ce', '#fdd0a2', '#fdae6b', '#fd8d3c', '#f16913', '#d94801', '#a63603', '#7f2704'],\n BuGn: ['#f7fcfd', '#e5f5f9', '#ccece6', '#99d8c9', '#66c2a4', '#41ae76', '#238b45', '#006d2c', '#00441b'],\n YlOrBr: ['#ffffe5', '#fff7bc', '#fee391', '#fec44f', '#fe9929', '#ec7014', '#cc4c02', '#993404', '#662506'],\n YlGn: ['#ffffe5', '#f7fcb9', '#d9f0a3', '#addd8e', '#78c679', '#41ab5d', '#238443', '#006837', '#004529'],\n Reds: ['#fff5f0', '#fee0d2', '#fcbba1', '#fc9272', '#fb6a4a', '#ef3b2c', '#cb181d', '#a50f15', '#67000d'],\n RdPu: ['#fff7f3', '#fde0dd', '#fcc5c0', '#fa9fb5', '#f768a1', '#dd3497', '#ae017e', '#7a0177', '#49006a'],\n Greens: ['#f7fcf5', '#e5f5e0', '#c7e9c0', '#a1d99b', '#74c476', '#41ab5d', '#238b45', '#006d2c', '#00441b'],\n YlGnBu: ['#ffffd9', '#edf8b1', '#c7e9b4', '#7fcdbb', '#41b6c4', '#1d91c0', '#225ea8', '#253494', '#081d58'],\n Purples: ['#fcfbfd', '#efedf5', '#dadaeb', '#bcbddc', '#9e9ac8', '#807dba', '#6a51a3', '#54278f', '#3f007d'],\n GnBu: ['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081'],\n Greys: ['#ffffff', '#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252', '#252525', '#000000'],\n YlOrRd: ['#ffffcc', '#ffeda0', '#fed976', '#feb24c', '#fd8d3c', '#fc4e2a', '#e31a1c', '#bd0026', '#800026'],\n PuRd: ['#f7f4f9', '#e7e1ef', '#d4b9da', '#c994c7', '#df65b0', '#e7298a', '#ce1256', '#980043', '#67001f'],\n Blues: ['#f7fbff', '#deebf7', '#c6dbef', '#9ecae1', '#6baed6', '#4292c6', '#2171b5', '#08519c', '#08306b'],\n PuBuGn: ['#fff7fb', '#ece2f0', '#d0d1e6', '#a6bddb', '#67a9cf', '#3690c0', '#02818a', '#016c59', '#014636'],\n Viridis: ['#440154', '#482777', '#3f4a8a', '#31678e', '#26838f', '#1f9d8a', '#6cce5a', '#b6de2b', '#fee825'],\n Spectral: ['#9e0142', '#d53e4f', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#e6f598', '#abdda4', '#66c2a5', '#3288bd', '#5e4fa2'],\n RdYlGn: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850', '#006837'],\n RdBu: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#f7f7f7', '#d1e5f0', '#92c5de', '#4393c3', '#2166ac', '#053061'],\n PiYG: ['#8e0152', '#c51b7d', '#de77ae', '#f1b6da', '#fde0ef', '#f7f7f7', '#e6f5d0', '#b8e186', '#7fbc41', '#4d9221', '#276419'],\n PRGn: ['#40004b', '#762a83', '#9970ab', '#c2a5cf', '#e7d4e8', '#f7f7f7', '#d9f0d3', '#a6dba0', '#5aae61', '#1b7837', '#00441b'],\n RdYlBu: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee090', '#ffffbf', '#e0f3f8', '#abd9e9', '#74add1', '#4575b4', '#313695'],\n BrBG: ['#543005', '#8c510a', '#bf812d', '#dfc27d', '#f6e8c3', '#f5f5f5', '#c7eae5', '#80cdc1', '#35978f', '#01665e', '#003c30'],\n RdGy: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#ffffff', '#e0e0e0', '#bababa', '#878787', '#4d4d4d', '#1a1a1a'],\n PuOr: ['#7f3b08', '#b35806', '#e08214', '#fdb863', '#fee0b6', '#f7f7f7', '#d8daeb', '#b2abd2', '#8073ac', '#542788', '#2d004b'],\n Set2: ['#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3'],\n Accent: ['#7fc97f', '#beaed4', '#fdc086', '#ffff99', '#386cb0', '#f0027f', '#bf5b17', '#666666'],\n Set1: ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999'],\n Set3: ['#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9', '#bc80bd', '#ccebc5', '#ffed6f'],\n Dark2: ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666'],\n Paired: ['#a6cee3', '#1f78b4', '#b2df8a', '#33a02c', '#fb9a99', '#e31a1c', '#fdbf6f', '#ff7f00', '#cab2d6', '#6a3d9a', '#ffff99', '#b15928'],\n Pastel2: ['#b3e2cd', '#fdcdac', '#cbd5e8', '#f4cae4', '#e6f5c9', '#fff2ae', '#f1e2cc', '#cccccc'],\n Pastel1: ['#fbb4ae', '#b3cde3', '#ccebc5', '#decbe4', '#fed9a6', '#ffffcc', '#e5d8bd', '#fddaec', '#f2f2f2']\n };\n\n (function() {\n var key, results;\n results = [];\n for (key in brewer) {\n results.push(brewer[key.toLowerCase()] = brewer[key]);\n }\n return results;\n })();\n\n\n /**\n \tX11 color names\n \n \thttp://www.w3.org/TR/css3-color/#svg-color\n */\n\n w3cx11 = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflower: '#6495ed',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n laserlemon: '#ffff54',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrod: '#fafad2',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n maroon2: '#7f0000',\n maroon3: '#b03060',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n purple2: '#7f007f',\n purple3: '#a020f0',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n };\n\n chroma.colors = colors = w3cx11;\n\n lab2rgb = function() {\n var a, args, b, g, l, r, x, y, z;\n args = unpack(arguments);\n l = args[0], a = args[1], b = args[2];\n y = (l + 16) / 116;\n x = isNaN(a) ? y : y + a / 500;\n z = isNaN(b) ? y : y - b / 200;\n y = LAB_CONSTANTS.Yn * lab_xyz(y);\n x = LAB_CONSTANTS.Xn * lab_xyz(x);\n z = LAB_CONSTANTS.Zn * lab_xyz(z);\n r = xyz_rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z);\n g = xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z);\n b = xyz_rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z);\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n xyz_rgb = function(r) {\n return 255 * (r <= 0.00304 ? 12.92 * r : 1.055 * pow(r, 1 / 2.4) - 0.055);\n };\n\n lab_xyz = function(t) {\n if (t > LAB_CONSTANTS.t1) {\n return t * t * t;\n } else {\n return LAB_CONSTANTS.t2 * (t - LAB_CONSTANTS.t0);\n }\n };\n\n LAB_CONSTANTS = {\n Kn: 18,\n Xn: 0.950470,\n Yn: 1,\n Zn: 1.088830,\n t0: 0.137931034,\n t1: 0.206896552,\n t2: 0.12841855,\n t3: 0.008856452\n };\n\n rgb2lab = function() {\n var b, g, r, ref, ref1, x, y, z;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n ref1 = rgb2xyz(r, g, b), x = ref1[0], y = ref1[1], z = ref1[2];\n return [116 * y - 16, 500 * (x - y), 200 * (y - z)];\n };\n\n rgb_xyz = function(r) {\n if ((r /= 255) <= 0.04045) {\n return r / 12.92;\n } else {\n return pow((r + 0.055) / 1.055, 2.4);\n }\n };\n\n xyz_lab = function(t) {\n if (t > LAB_CONSTANTS.t3) {\n return pow(t, 1 / 3);\n } else {\n return t / LAB_CONSTANTS.t2 + LAB_CONSTANTS.t0;\n }\n };\n\n rgb2xyz = function() {\n var b, g, r, ref, x, y, z;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n r = rgb_xyz(r);\n g = rgb_xyz(g);\n b = rgb_xyz(b);\n x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / LAB_CONSTANTS.Xn);\n y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / LAB_CONSTANTS.Yn);\n z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / LAB_CONSTANTS.Zn);\n return [x, y, z];\n };\n\n chroma.lab = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['lab']), function(){});\n };\n\n _input.lab = lab2rgb;\n\n Color.prototype.lab = function() {\n return rgb2lab(this._rgb);\n };\n\n bezier = function(colors) {\n var I, I0, I1, c, lab0, lab1, lab2, lab3, ref, ref1, ref2;\n colors = (function() {\n var len, o, results;\n results = [];\n for (o = 0, len = colors.length; o < len; o++) {\n c = colors[o];\n results.push(chroma(c));\n }\n return results;\n })();\n if (colors.length === 2) {\n ref = (function() {\n var len, o, results;\n results = [];\n for (o = 0, len = colors.length; o < len; o++) {\n c = colors[o];\n results.push(c.lab());\n }\n return results;\n })(), lab0 = ref[0], lab1 = ref[1];\n I = function(t) {\n var i, lab;\n lab = (function() {\n var o, results;\n results = [];\n for (i = o = 0; o <= 2; i = ++o) {\n results.push(lab0[i] + t * (lab1[i] - lab0[i]));\n }\n return results;\n })();\n return chroma.lab.apply(chroma, lab);\n };\n } else if (colors.length === 3) {\n ref1 = (function() {\n var len, o, results;\n results = [];\n for (o = 0, len = colors.length; o < len; o++) {\n c = colors[o];\n results.push(c.lab());\n }\n return results;\n })(), lab0 = ref1[0], lab1 = ref1[1], lab2 = ref1[2];\n I = function(t) {\n var i, lab;\n lab = (function() {\n var o, results;\n results = [];\n for (i = o = 0; o <= 2; i = ++o) {\n results.push((1 - t) * (1 - t) * lab0[i] + 2 * (1 - t) * t * lab1[i] + t * t * lab2[i]);\n }\n return results;\n })();\n return chroma.lab.apply(chroma, lab);\n };\n } else if (colors.length === 4) {\n ref2 = (function() {\n var len, o, results;\n results = [];\n for (o = 0, len = colors.length; o < len; o++) {\n c = colors[o];\n results.push(c.lab());\n }\n return results;\n })(), lab0 = ref2[0], lab1 = ref2[1], lab2 = ref2[2], lab3 = ref2[3];\n I = function(t) {\n var i, lab;\n lab = (function() {\n var o, results;\n results = [];\n for (i = o = 0; o <= 2; i = ++o) {\n results.push((1 - t) * (1 - t) * (1 - t) * lab0[i] + 3 * (1 - t) * (1 - t) * t * lab1[i] + 3 * (1 - t) * t * t * lab2[i] + t * t * t * lab3[i]);\n }\n return results;\n })();\n return chroma.lab.apply(chroma, lab);\n };\n } else if (colors.length === 5) {\n I0 = bezier(colors.slice(0, 3));\n I1 = bezier(colors.slice(2, 5));\n I = function(t) {\n if (t < 0.5) {\n return I0(t * 2);\n } else {\n return I1((t - 0.5) * 2);\n }\n };\n }\n return I;\n };\n\n chroma.bezier = function(colors) {\n var f;\n f = bezier(colors);\n f.scale = function() {\n return chroma.scale(f);\n };\n return f;\n };\n\n chroma.cubehelix = function(start, rotations, hue, gamma, lightness) {\n var dh, dl, f;\n if (start == null) {\n start = 300;\n }\n if (rotations == null) {\n rotations = -1.5;\n }\n if (hue == null) {\n hue = 1;\n }\n if (gamma == null) {\n gamma = 1;\n }\n if (lightness == null) {\n lightness = [0, 1];\n }\n dh = 0;\n if (type(lightness) === 'array') {\n dl = lightness[1] - lightness[0];\n } else {\n dl = 0;\n lightness = [lightness, lightness];\n }\n f = function(fract) {\n var a, amp, b, cos_a, g, h, l, r, sin_a;\n a = TWOPI * ((start + 120) / 360 + rotations * fract);\n l = pow(lightness[0] + dl * fract, gamma);\n h = dh !== 0 ? hue[0] + fract * dh : hue;\n amp = h * l * (1 - l) / 2;\n cos_a = cos(a);\n sin_a = sin(a);\n r = l + amp * (-0.14861 * cos_a + 1.78277 * sin_a);\n g = l + amp * (-0.29227 * cos_a - 0.90649 * sin_a);\n b = l + amp * (+1.97294 * cos_a);\n return chroma(clip_rgb([r * 255, g * 255, b * 255, 1]));\n };\n f.start = function(s) {\n if (s == null) {\n return start;\n }\n start = s;\n return f;\n };\n f.rotations = function(r) {\n if (r == null) {\n return rotations;\n }\n rotations = r;\n return f;\n };\n f.gamma = function(g) {\n if (g == null) {\n return gamma;\n }\n gamma = g;\n return f;\n };\n f.hue = function(h) {\n if (h == null) {\n return hue;\n }\n hue = h;\n if (type(hue) === 'array') {\n dh = hue[1] - hue[0];\n if (dh === 0) {\n hue = hue[1];\n }\n } else {\n dh = 0;\n }\n return f;\n };\n f.lightness = function(h) {\n if (h == null) {\n return lightness;\n }\n if (type(h) === 'array') {\n lightness = h;\n dl = h[1] - h[0];\n } else {\n lightness = [h, h];\n dl = 0;\n }\n return f;\n };\n f.scale = function() {\n return chroma.scale(f);\n };\n f.hue(hue);\n return f;\n };\n\n chroma.random = function() {\n var code, digits, i, o;\n digits = '0123456789abcdef';\n code = '#';\n for (i = o = 0; o < 6; i = ++o) {\n code += digits.charAt(floor(Math.random() * 16));\n }\n return new Color(code);\n };\n\n _interpolators = [];\n\n interpolate = function(col1, col2, f, m) {\n var interpol, len, o, res;\n if (f == null) {\n f = 0.5;\n }\n if (m == null) {\n m = 'rgb';\n }\n\n /*\n interpolates between colors\n f = 0 --> me\n f = 1 --> col\n */\n if (type(col1) !== 'object') {\n col1 = chroma(col1);\n }\n if (type(col2) !== 'object') {\n col2 = chroma(col2);\n }\n for (o = 0, len = _interpolators.length; o < len; o++) {\n interpol = _interpolators[o];\n if (m === interpol[0]) {\n res = interpol[1](col1, col2, f, m);\n break;\n }\n }\n if (res == null) {\n throw \"color mode \" + m + \" is not supported\";\n }\n return res.alpha(col1.alpha() + f * (col2.alpha() - col1.alpha()));\n };\n\n chroma.interpolate = interpolate;\n\n Color.prototype.interpolate = function(col2, f, m) {\n return interpolate(this, col2, f, m);\n };\n\n chroma.mix = interpolate;\n\n Color.prototype.mix = Color.prototype.interpolate;\n\n _input.rgb = function() {\n var k, ref, results, v;\n ref = unpack(arguments);\n results = [];\n for (k in ref) {\n v = ref[k];\n results.push(v);\n }\n return results;\n };\n\n chroma.rgb = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['rgb']), function(){});\n };\n\n Color.prototype.rgb = function(round) {\n if (round == null) {\n round = true;\n }\n if (round) {\n return this._rgb.map(Math.round).slice(0, 3);\n } else {\n return this._rgb.slice(0, 3);\n }\n };\n\n Color.prototype.rgba = function(round) {\n if (round == null) {\n round = true;\n }\n if (!round) {\n return this._rgb.slice(0);\n }\n return [Math.round(this._rgb[0]), Math.round(this._rgb[1]), Math.round(this._rgb[2]), this._rgb[3]];\n };\n\n _guess_formats.push({\n p: 3,\n test: function(n) {\n var a;\n a = unpack(arguments);\n if (type(a) === 'array' && a.length === 3) {\n return 'rgb';\n }\n if (a.length === 4 && type(a[3]) === \"number\" && a[3] >= 0 && a[3] <= 1) {\n return 'rgb';\n }\n }\n });\n\n _input.lrgb = _input.rgb;\n\n interpolate_lrgb = function(col1, col2, f, m) {\n var xyz0, xyz1;\n xyz0 = col1._rgb;\n xyz1 = col2._rgb;\n return new Color(sqrt(pow(xyz0[0], 2) * (1 - f) + pow(xyz1[0], 2) * f), sqrt(pow(xyz0[1], 2) * (1 - f) + pow(xyz1[1], 2) * f), sqrt(pow(xyz0[2], 2) * (1 - f) + pow(xyz1[2], 2) * f), m);\n };\n\n _average_lrgb = function(colors) {\n var col, f, len, o, rgb, xyz;\n f = 1 / colors.length;\n xyz = [0, 0, 0, 0];\n for (o = 0, len = colors.length; o < len; o++) {\n col = colors[o];\n rgb = col._rgb;\n xyz[0] += pow(rgb[0], 2) * f;\n xyz[1] += pow(rgb[1], 2) * f;\n xyz[2] += pow(rgb[2], 2) * f;\n xyz[3] += rgb[3] * f;\n }\n xyz[0] = sqrt(xyz[0]);\n xyz[1] = sqrt(xyz[1]);\n xyz[2] = sqrt(xyz[2]);\n if (xyz[3] > 1) {\n xyz[3] = 1;\n }\n return new Color(clip_rgb(xyz));\n };\n\n _interpolators.push(['lrgb', interpolate_lrgb]);\n\n chroma.average = function(colors, mode) {\n var A, alpha, c, cnt, dx, dy, first, i, l, len, o, xyz, xyz2;\n if (mode == null) {\n mode = 'rgb';\n }\n l = colors.length;\n colors = colors.map(function(c) {\n return chroma(c);\n });\n first = colors.splice(0, 1)[0];\n if (mode === 'lrgb') {\n return _average_lrgb(colors);\n }\n xyz = first.get(mode);\n cnt = [];\n dx = 0;\n dy = 0;\n for (i in xyz) {\n xyz[i] = xyz[i] || 0;\n cnt.push(isNaN(xyz[i]) ? 0 : 1);\n if (mode.charAt(i) === 'h' && !isNaN(xyz[i])) {\n A = xyz[i] / 180 * PI;\n dx += cos(A);\n dy += sin(A);\n }\n }\n alpha = first.alpha();\n for (o = 0, len = colors.length; o < len; o++) {\n c = colors[o];\n xyz2 = c.get(mode);\n alpha += c.alpha();\n for (i in xyz) {\n if (!isNaN(xyz2[i])) {\n cnt[i] += 1;\n if (mode.charAt(i) === 'h') {\n A = xyz2[i] / 180 * PI;\n dx += cos(A);\n dy += sin(A);\n } else {\n xyz[i] += xyz2[i];\n }\n }\n }\n }\n for (i in xyz) {\n if (mode.charAt(i) === 'h') {\n A = atan2(dy / cnt[i], dx / cnt[i]) / PI * 180;\n while (A < 0) {\n A += 360;\n }\n while (A >= 360) {\n A -= 360;\n }\n xyz[i] = A;\n } else {\n xyz[i] = xyz[i] / cnt[i];\n }\n }\n return chroma(xyz, mode).alpha(alpha / l);\n };\n\n hex2rgb = function(hex) {\n var a, b, g, r, rgb, u;\n if (hex.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)) {\n if (hex.length === 4 || hex.length === 7) {\n hex = hex.substr(1);\n }\n if (hex.length === 3) {\n hex = hex.split(\"\");\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n u = parseInt(hex, 16);\n r = u >> 16;\n g = u >> 8 & 0xFF;\n b = u & 0xFF;\n return [r, g, b, 1];\n }\n if (hex.match(/^#?([A-Fa-f0-9]{8})$/)) {\n if (hex.length === 9) {\n hex = hex.substr(1);\n }\n u = parseInt(hex, 16);\n r = u >> 24 & 0xFF;\n g = u >> 16 & 0xFF;\n b = u >> 8 & 0xFF;\n a = round((u & 0xFF) / 0xFF * 100) / 100;\n return [r, g, b, a];\n }\n if ((_input.css != null) && (rgb = _input.css(hex))) {\n return rgb;\n }\n throw \"unknown color: \" + hex;\n };\n\n rgb2hex = function(channels, mode) {\n var a, b, g, hxa, r, str, u;\n if (mode == null) {\n mode = 'auto';\n }\n r = channels[0], g = channels[1], b = channels[2], a = channels[3];\n if (mode === 'auto') {\n mode = a < 1 ? 'rgba' : 'rgb';\n }\n r = Math.round(r);\n g = Math.round(g);\n b = Math.round(b);\n u = r << 16 | g << 8 | b;\n str = \"000000\" + u.toString(16);\n str = str.substr(str.length - 6);\n hxa = '0' + round(a * 255).toString(16);\n hxa = hxa.substr(hxa.length - 2);\n return \"#\" + (function() {\n switch (mode.toLowerCase()) {\n case 'rgba':\n return str + hxa;\n case 'argb':\n return hxa + str;\n default:\n return str;\n }\n })();\n };\n\n _input.hex = function(h) {\n return hex2rgb(h);\n };\n\n chroma.hex = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['hex']), function(){});\n };\n\n Color.prototype.hex = function(mode) {\n if (mode == null) {\n mode = 'auto';\n }\n return rgb2hex(this._rgb, mode);\n };\n\n _guess_formats.push({\n p: 4,\n test: function(n) {\n if (arguments.length === 1 && type(n) === \"string\") {\n return 'hex';\n }\n }\n });\n\n hsl2rgb = function() {\n var args, b, c, g, h, i, l, o, r, ref, s, t1, t2, t3;\n args = unpack(arguments);\n h = args[0], s = args[1], l = args[2];\n if (s === 0) {\n r = g = b = l * 255;\n } else {\n t3 = [0, 0, 0];\n c = [0, 0, 0];\n t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;\n t1 = 2 * l - t2;\n h /= 360;\n t3[0] = h + 1 / 3;\n t3[1] = h;\n t3[2] = h - 1 / 3;\n for (i = o = 0; o <= 2; i = ++o) {\n if (t3[i] < 0) {\n t3[i] += 1;\n }\n if (t3[i] > 1) {\n t3[i] -= 1;\n }\n if (6 * t3[i] < 1) {\n c[i] = t1 + (t2 - t1) * 6 * t3[i];\n } else if (2 * t3[i] < 1) {\n c[i] = t2;\n } else if (3 * t3[i] < 2) {\n c[i] = t1 + (t2 - t1) * ((2 / 3) - t3[i]) * 6;\n } else {\n c[i] = t1;\n }\n }\n ref = [round(c[0] * 255), round(c[1] * 255), round(c[2] * 255)], r = ref[0], g = ref[1], b = ref[2];\n }\n if (args.length > 3) {\n return [r, g, b, args[3]];\n } else {\n return [r, g, b];\n }\n };\n\n rgb2hsl = function(r, g, b) {\n var h, l, min, ref, s;\n if (r !== void 0 && r.length >= 3) {\n ref = r, r = ref[0], g = ref[1], b = ref[2];\n }\n r /= 255;\n g /= 255;\n b /= 255;\n min = Math.min(r, g, b);\n max = Math.max(r, g, b);\n l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = Number.NaN;\n } else {\n s = l < 0.5 ? (max - min) / (max + min) : (max - min) / (2 - max - min);\n }\n if (r === max) {\n h = (g - b) / (max - min);\n } else if (g === max) {\n h = 2 + (b - r) / (max - min);\n } else if (b === max) {\n h = 4 + (r - g) / (max - min);\n }\n h *= 60;\n if (h < 0) {\n h += 360;\n }\n return [h, s, l];\n };\n\n chroma.hsl = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['hsl']), function(){});\n };\n\n _input.hsl = hsl2rgb;\n\n Color.prototype.hsl = function() {\n return rgb2hsl(this._rgb);\n };\n\n hsv2rgb = function() {\n var args, b, f, g, h, i, p, q, r, ref, ref1, ref2, ref3, ref4, ref5, s, t, v;\n args = unpack(arguments);\n h = args[0], s = args[1], v = args[2];\n v *= 255;\n if (s === 0) {\n r = g = b = v;\n } else {\n if (h === 360) {\n h = 0;\n }\n if (h > 360) {\n h -= 360;\n }\n if (h < 0) {\n h += 360;\n }\n h /= 60;\n i = floor(h);\n f = h - i;\n p = v * (1 - s);\n q = v * (1 - s * f);\n t = v * (1 - s * (1 - f));\n switch (i) {\n case 0:\n ref = [v, t, p], r = ref[0], g = ref[1], b = ref[2];\n break;\n case 1:\n ref1 = [q, v, p], r = ref1[0], g = ref1[1], b = ref1[2];\n break;\n case 2:\n ref2 = [p, v, t], r = ref2[0], g = ref2[1], b = ref2[2];\n break;\n case 3:\n ref3 = [p, q, v], r = ref3[0], g = ref3[1], b = ref3[2];\n break;\n case 4:\n ref4 = [t, p, v], r = ref4[0], g = ref4[1], b = ref4[2];\n break;\n case 5:\n ref5 = [v, p, q], r = ref5[0], g = ref5[1], b = ref5[2];\n }\n }\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n rgb2hsv = function() {\n var b, delta, g, h, min, r, ref, s, v;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n min = Math.min(r, g, b);\n max = Math.max(r, g, b);\n delta = max - min;\n v = max / 255.0;\n if (max === 0) {\n h = Number.NaN;\n s = 0;\n } else {\n s = delta / max;\n if (r === max) {\n h = (g - b) / delta;\n }\n if (g === max) {\n h = 2 + (b - r) / delta;\n }\n if (b === max) {\n h = 4 + (r - g) / delta;\n }\n h *= 60;\n if (h < 0) {\n h += 360;\n }\n }\n return [h, s, v];\n };\n\n chroma.hsv = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['hsv']), function(){});\n };\n\n _input.hsv = hsv2rgb;\n\n Color.prototype.hsv = function() {\n return rgb2hsv(this._rgb);\n };\n\n num2rgb = function(num) {\n var b, g, r;\n if (type(num) === \"number\" && num >= 0 && num <= 0xFFFFFF) {\n r = num >> 16;\n g = (num >> 8) & 0xFF;\n b = num & 0xFF;\n return [r, g, b, 1];\n }\n console.warn(\"unknown num color: \" + num);\n return [0, 0, 0, 1];\n };\n\n rgb2num = function() {\n var b, g, r, ref;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n return (r << 16) + (g << 8) + b;\n };\n\n chroma.num = function(num) {\n return new Color(num, 'num');\n };\n\n Color.prototype.num = function(mode) {\n if (mode == null) {\n mode = 'rgb';\n }\n return rgb2num(this._rgb, mode);\n };\n\n _input.num = num2rgb;\n\n _guess_formats.push({\n p: 1,\n test: function(n) {\n if (arguments.length === 1 && type(n) === \"number\" && n >= 0 && n <= 0xFFFFFF) {\n return 'num';\n }\n }\n });\n\n hcg2rgb = function() {\n var _c, _g, args, b, c, f, g, h, i, p, q, r, ref, ref1, ref2, ref3, ref4, ref5, t, v;\n args = unpack(arguments);\n h = args[0], c = args[1], _g = args[2];\n c = c / 100;\n g = g / 100 * 255;\n _c = c * 255;\n if (c === 0) {\n r = g = b = _g;\n } else {\n if (h === 360) {\n h = 0;\n }\n if (h > 360) {\n h -= 360;\n }\n if (h < 0) {\n h += 360;\n }\n h /= 60;\n i = floor(h);\n f = h - i;\n p = _g * (1 - c);\n q = p + _c * (1 - f);\n t = p + _c * f;\n v = p + _c;\n switch (i) {\n case 0:\n ref = [v, t, p], r = ref[0], g = ref[1], b = ref[2];\n break;\n case 1:\n ref1 = [q, v, p], r = ref1[0], g = ref1[1], b = ref1[2];\n break;\n case 2:\n ref2 = [p, v, t], r = ref2[0], g = ref2[1], b = ref2[2];\n break;\n case 3:\n ref3 = [p, q, v], r = ref3[0], g = ref3[1], b = ref3[2];\n break;\n case 4:\n ref4 = [t, p, v], r = ref4[0], g = ref4[1], b = ref4[2];\n break;\n case 5:\n ref5 = [v, p, q], r = ref5[0], g = ref5[1], b = ref5[2];\n }\n }\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n rgb2hcg = function() {\n var _g, b, c, delta, g, h, min, r, ref;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n min = Math.min(r, g, b);\n max = Math.max(r, g, b);\n delta = max - min;\n c = delta * 100 / 255;\n _g = min / (255 - delta) * 100;\n if (delta === 0) {\n h = Number.NaN;\n } else {\n if (r === max) {\n h = (g - b) / delta;\n }\n if (g === max) {\n h = 2 + (b - r) / delta;\n }\n if (b === max) {\n h = 4 + (r - g) / delta;\n }\n h *= 60;\n if (h < 0) {\n h += 360;\n }\n }\n return [h, c, _g];\n };\n\n chroma.hcg = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['hcg']), function(){});\n };\n\n _input.hcg = hcg2rgb;\n\n Color.prototype.hcg = function() {\n return rgb2hcg(this._rgb);\n };\n\n css2rgb = function(css) {\n var aa, ab, hsl, i, m, o, rgb, w;\n css = css.toLowerCase();\n if ((chroma.colors != null) && chroma.colors[css]) {\n return hex2rgb(chroma.colors[css]);\n }\n if (m = css.match(/rgb\\(\\s*(\\-?\\d+),\\s*(\\-?\\d+)\\s*,\\s*(\\-?\\d+)\\s*\\)/)) {\n rgb = m.slice(1, 4);\n for (i = o = 0; o <= 2; i = ++o) {\n rgb[i] = +rgb[i];\n }\n rgb[3] = 1;\n } else if (m = css.match(/rgba\\(\\s*(\\-?\\d+),\\s*(\\-?\\d+)\\s*,\\s*(\\-?\\d+)\\s*,\\s*([01]|[01]?\\.\\d+)\\)/)) {\n rgb = m.slice(1, 5);\n for (i = w = 0; w <= 3; i = ++w) {\n rgb[i] = +rgb[i];\n }\n } else if (m = css.match(/rgb\\(\\s*(\\-?\\d+(?:\\.\\d+)?)%,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*\\)/)) {\n rgb = m.slice(1, 4);\n for (i = aa = 0; aa <= 2; i = ++aa) {\n rgb[i] = round(rgb[i] * 2.55);\n }\n rgb[3] = 1;\n } else if (m = css.match(/rgba\\(\\s*(\\-?\\d+(?:\\.\\d+)?)%,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)/)) {\n rgb = m.slice(1, 5);\n for (i = ab = 0; ab <= 2; i = ++ab) {\n rgb[i] = round(rgb[i] * 2.55);\n }\n rgb[3] = +rgb[3];\n } else if (m = css.match(/hsl\\(\\s*(\\-?\\d+(?:\\.\\d+)?),\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*\\)/)) {\n hsl = m.slice(1, 4);\n hsl[1] *= 0.01;\n hsl[2] *= 0.01;\n rgb = hsl2rgb(hsl);\n rgb[3] = 1;\n } else if (m = css.match(/hsla\\(\\s*(\\-?\\d+(?:\\.\\d+)?),\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)/)) {\n hsl = m.slice(1, 4);\n hsl[1] *= 0.01;\n hsl[2] *= 0.01;\n rgb = hsl2rgb(hsl);\n rgb[3] = +m[4];\n }\n return rgb;\n };\n\n rgb2css = function(rgba) {\n var mode;\n mode = rgba[3] < 1 ? 'rgba' : 'rgb';\n if (mode === 'rgb') {\n return mode + '(' + rgba.slice(0, 3).map(round).join(',') + ')';\n } else if (mode === 'rgba') {\n return mode + '(' + rgba.slice(0, 3).map(round).join(',') + ',' + rgba[3] + ')';\n } else {\n\n }\n };\n\n rnd = function(a) {\n return round(a * 100) / 100;\n };\n\n hsl2css = function(hsl, alpha) {\n var mode;\n mode = alpha < 1 ? 'hsla' : 'hsl';\n hsl[0] = rnd(hsl[0] || 0);\n hsl[1] = rnd(hsl[1] * 100) + '%';\n hsl[2] = rnd(hsl[2] * 100) + '%';\n if (mode === 'hsla') {\n hsl[3] = alpha;\n }\n return mode + '(' + hsl.join(',') + ')';\n };\n\n _input.css = function(h) {\n return css2rgb(h);\n };\n\n chroma.css = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['css']), function(){});\n };\n\n Color.prototype.css = function(mode) {\n if (mode == null) {\n mode = 'rgb';\n }\n if (mode.slice(0, 3) === 'rgb') {\n return rgb2css(this._rgb);\n } else if (mode.slice(0, 3) === 'hsl') {\n return hsl2css(this.hsl(), this.alpha());\n }\n };\n\n _input.named = function(name) {\n return hex2rgb(w3cx11[name]);\n };\n\n _guess_formats.push({\n p: 5,\n test: function(n) {\n if (arguments.length === 1 && (w3cx11[n] != null)) {\n return 'named';\n }\n }\n });\n\n Color.prototype.name = function(n) {\n var h, k;\n if (arguments.length) {\n if (w3cx11[n]) {\n this._rgb = hex2rgb(w3cx11[n]);\n }\n this._rgb[3] = 1;\n this;\n }\n h = this.hex('rgb');\n for (k in w3cx11) {\n if (h === w3cx11[k]) {\n return k;\n }\n }\n return h;\n };\n\n lch2lab = function() {\n\n /*\n Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel.\n These formulas were invented by David Dalrymple to obtain maximum contrast without going\n out of gamut if the parameters are in the range 0-1.\n \n A saturation multiplier was added by Gregor Aisch\n */\n var c, h, l, ref;\n ref = unpack(arguments), l = ref[0], c = ref[1], h = ref[2];\n h = h * DEG2RAD;\n return [l, cos(h) * c, sin(h) * c];\n };\n\n lch2rgb = function() {\n var L, a, args, b, c, g, h, l, r, ref, ref1;\n args = unpack(arguments);\n l = args[0], c = args[1], h = args[2];\n ref = lch2lab(l, c, h), L = ref[0], a = ref[1], b = ref[2];\n ref1 = lab2rgb(L, a, b), r = ref1[0], g = ref1[1], b = ref1[2];\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n lab2lch = function() {\n var a, b, c, h, l, ref;\n ref = unpack(arguments), l = ref[0], a = ref[1], b = ref[2];\n c = sqrt(a * a + b * b);\n h = (atan2(b, a) * RAD2DEG + 360) % 360;\n if (round(c * 10000) === 0) {\n h = Number.NaN;\n }\n return [l, c, h];\n };\n\n rgb2lch = function() {\n var a, b, g, l, r, ref, ref1;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n ref1 = rgb2lab(r, g, b), l = ref1[0], a = ref1[1], b = ref1[2];\n return lab2lch(l, a, b);\n };\n\n chroma.lch = function() {\n var args;\n args = unpack(arguments);\n return new Color(args, 'lch');\n };\n\n chroma.hcl = function() {\n var args;\n args = unpack(arguments);\n return new Color(args, 'hcl');\n };\n\n _input.lch = lch2rgb;\n\n _input.hcl = function() {\n var c, h, l, ref;\n ref = unpack(arguments), h = ref[0], c = ref[1], l = ref[2];\n return lch2rgb([l, c, h]);\n };\n\n Color.prototype.lch = function() {\n return rgb2lch(this._rgb);\n };\n\n Color.prototype.hcl = function() {\n return rgb2lch(this._rgb).reverse();\n };\n\n rgb2cmyk = function(mode) {\n var b, c, f, g, k, m, r, ref, y;\n if (mode == null) {\n mode = 'rgb';\n }\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n r = r / 255;\n g = g / 255;\n b = b / 255;\n k = 1 - Math.max(r, Math.max(g, b));\n f = k < 1 ? 1 / (1 - k) : 0;\n c = (1 - r - k) * f;\n m = (1 - g - k) * f;\n y = (1 - b - k) * f;\n return [c, m, y, k];\n };\n\n cmyk2rgb = function() {\n var alpha, args, b, c, g, k, m, r, y;\n args = unpack(arguments);\n c = args[0], m = args[1], y = args[2], k = args[3];\n alpha = args.length > 4 ? args[4] : 1;\n if (k === 1) {\n return [0, 0, 0, alpha];\n }\n r = c >= 1 ? 0 : 255 * (1 - c) * (1 - k);\n g = m >= 1 ? 0 : 255 * (1 - m) * (1 - k);\n b = y >= 1 ? 0 : 255 * (1 - y) * (1 - k);\n return [r, g, b, alpha];\n };\n\n _input.cmyk = function() {\n return cmyk2rgb(unpack(arguments));\n };\n\n chroma.cmyk = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['cmyk']), function(){});\n };\n\n Color.prototype.cmyk = function() {\n return rgb2cmyk(this._rgb);\n };\n\n _input.gl = function() {\n var i, k, o, rgb, v;\n rgb = (function() {\n var ref, results;\n ref = unpack(arguments);\n results = [];\n for (k in ref) {\n v = ref[k];\n results.push(v);\n }\n return results;\n }).apply(this, arguments);\n for (i = o = 0; o <= 2; i = ++o) {\n rgb[i] *= 255;\n }\n return rgb;\n };\n\n chroma.gl = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['gl']), function(){});\n };\n\n Color.prototype.gl = function() {\n var rgb;\n rgb = this._rgb;\n return [rgb[0] / 255, rgb[1] / 255, rgb[2] / 255, rgb[3]];\n };\n\n rgb2luminance = function(r, g, b) {\n var ref;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n r = luminance_x(r);\n g = luminance_x(g);\n b = luminance_x(b);\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n };\n\n luminance_x = function(x) {\n x /= 255;\n if (x <= 0.03928) {\n return x / 12.92;\n } else {\n return pow((x + 0.055) / 1.055, 2.4);\n }\n };\n\n interpolate_rgb = function(col1, col2, f, m) {\n var xyz0, xyz1;\n xyz0 = col1._rgb;\n xyz1 = col2._rgb;\n return new Color(xyz0[0] + f * (xyz1[0] - xyz0[0]), xyz0[1] + f * (xyz1[1] - xyz0[1]), xyz0[2] + f * (xyz1[2] - xyz0[2]), m);\n };\n\n _interpolators.push(['rgb', interpolate_rgb]);\n\n Color.prototype.luminance = function(lum, mode) {\n var cur_lum, eps, max_iter, rgba, test;\n if (mode == null) {\n mode = 'rgb';\n }\n if (!arguments.length) {\n return rgb2luminance(this._rgb);\n }\n rgba = this._rgb;\n if (lum === 0) {\n rgba = [0, 0, 0, this._rgb[3]];\n } else if (lum === 1) {\n rgba = [255, 255, 255, this[3]];\n } else {\n cur_lum = rgb2luminance(this._rgb);\n eps = 1e-7;\n max_iter = 20;\n test = function(l, h) {\n var lm, m;\n m = l.interpolate(h, 0.5, mode);\n lm = m.luminance();\n if (Math.abs(lum - lm) < eps || !max_iter--) {\n return m;\n }\n if (lm > lum) {\n return test(l, m);\n }\n return test(m, h);\n };\n if (cur_lum > lum) {\n rgba = test(chroma('black'), this).rgba();\n } else {\n rgba = test(this, chroma('white')).rgba();\n }\n }\n return chroma(rgba).alpha(this.alpha());\n };\n\n temperature2rgb = function(kelvin) {\n var b, g, r, temp;\n temp = kelvin / 100;\n if (temp < 66) {\n r = 255;\n g = -155.25485562709179 - 0.44596950469579133 * (g = temp - 2) + 104.49216199393888 * log(g);\n b = temp < 20 ? 0 : -254.76935184120902 + 0.8274096064007395 * (b = temp - 10) + 115.67994401066147 * log(b);\n } else {\n r = 351.97690566805693 + 0.114206453784165 * (r = temp - 55) - 40.25366309332127 * log(r);\n g = 325.4494125711974 + 0.07943456536662342 * (g = temp - 50) - 28.0852963507957 * log(g);\n b = 255;\n }\n return [r, g, b];\n };\n\n rgb2temperature = function() {\n var b, eps, g, maxTemp, minTemp, r, ref, rgb, temp;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n minTemp = 1000;\n maxTemp = 40000;\n eps = 0.4;\n while (maxTemp - minTemp > eps) {\n temp = (maxTemp + minTemp) * 0.5;\n rgb = temperature2rgb(temp);\n if ((rgb[2] / rgb[0]) >= (b / r)) {\n maxTemp = temp;\n } else {\n minTemp = temp;\n }\n }\n return round(temp);\n };\n\n chroma.temperature = chroma.kelvin = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['temperature']), function(){});\n };\n\n _input.temperature = _input.kelvin = _input.K = temperature2rgb;\n\n Color.prototype.temperature = function() {\n return rgb2temperature(this._rgb);\n };\n\n Color.prototype.kelvin = Color.prototype.temperature;\n\n chroma.contrast = function(a, b) {\n var l1, l2, ref, ref1;\n if ((ref = type(a)) === 'string' || ref === 'number') {\n a = new Color(a);\n }\n if ((ref1 = type(b)) === 'string' || ref1 === 'number') {\n b = new Color(b);\n }\n l1 = a.luminance();\n l2 = b.luminance();\n if (l1 > l2) {\n return (l1 + 0.05) / (l2 + 0.05);\n } else {\n return (l2 + 0.05) / (l1 + 0.05);\n }\n };\n\n chroma.distance = function(a, b, mode) {\n var d, i, l1, l2, ref, ref1, sum_sq;\n if (mode == null) {\n mode = 'lab';\n }\n if ((ref = type(a)) === 'string' || ref === 'number') {\n a = new Color(a);\n }\n if ((ref1 = type(b)) === 'string' || ref1 === 'number') {\n b = new Color(b);\n }\n l1 = a.get(mode);\n l2 = b.get(mode);\n sum_sq = 0;\n for (i in l1) {\n d = (l1[i] || 0) - (l2[i] || 0);\n sum_sq += d * d;\n }\n return Math.sqrt(sum_sq);\n };\n\n chroma.deltaE = function(a, b, L, C) {\n var L1, L2, a1, a2, b1, b2, c1, c2, c4, dH2, delA, delB, delC, delL, f, h1, ref, ref1, ref2, ref3, sc, sh, sl, t, v1, v2, v3;\n if (L == null) {\n L = 1;\n }\n if (C == null) {\n C = 1;\n }\n if ((ref = type(a)) === 'string' || ref === 'number') {\n a = new Color(a);\n }\n if ((ref1 = type(b)) === 'string' || ref1 === 'number') {\n b = new Color(b);\n }\n ref2 = a.lab(), L1 = ref2[0], a1 = ref2[1], b1 = ref2[2];\n ref3 = b.lab(), L2 = ref3[0], a2 = ref3[1], b2 = ref3[2];\n c1 = sqrt(a1 * a1 + b1 * b1);\n c2 = sqrt(a2 * a2 + b2 * b2);\n sl = L1 < 16.0 ? 0.511 : (0.040975 * L1) / (1.0 + 0.01765 * L1);\n sc = (0.0638 * c1) / (1.0 + 0.0131 * c1) + 0.638;\n h1 = c1 < 0.000001 ? 0.0 : (atan2(b1, a1) * 180.0) / PI;\n while (h1 < 0) {\n h1 += 360;\n }\n while (h1 >= 360) {\n h1 -= 360;\n }\n t = (h1 >= 164.0) && (h1 <= 345.0) ? 0.56 + abs(0.2 * cos((PI * (h1 + 168.0)) / 180.0)) : 0.36 + abs(0.4 * cos((PI * (h1 + 35.0)) / 180.0));\n c4 = c1 * c1 * c1 * c1;\n f = sqrt(c4 / (c4 + 1900.0));\n sh = sc * (f * t + 1.0 - f);\n delL = L1 - L2;\n delC = c1 - c2;\n delA = a1 - a2;\n delB = b1 - b2;\n dH2 = delA * delA + delB * delB - delC * delC;\n v1 = delL / (L * sl);\n v2 = delC / (C * sc);\n v3 = sh;\n return sqrt(v1 * v1 + v2 * v2 + (dH2 / (v3 * v3)));\n };\n\n Color.prototype.get = function(modechan) {\n var channel, i, me, mode, ref, src;\n me = this;\n ref = modechan.split('.'), mode = ref[0], channel = ref[1];\n src = me[mode]();\n if (channel) {\n i = mode.indexOf(channel);\n if (i > -1) {\n return src[i];\n } else {\n return console.warn('unknown channel ' + channel + ' in mode ' + mode);\n }\n } else {\n return src;\n }\n };\n\n Color.prototype.set = function(modechan, value) {\n var channel, i, me, mode, ref, src;\n me = this;\n ref = modechan.split('.'), mode = ref[0], channel = ref[1];\n if (channel) {\n src = me[mode]();\n i = mode.indexOf(channel);\n if (i > -1) {\n if (type(value) === 'string') {\n switch (value.charAt(0)) {\n case '+':\n src[i] += +value;\n break;\n case '-':\n src[i] += +value;\n break;\n case '*':\n src[i] *= +(value.substr(1));\n break;\n case '/':\n src[i] /= +(value.substr(1));\n break;\n default:\n src[i] = +value;\n }\n } else {\n src[i] = value;\n }\n } else {\n console.warn('unknown channel ' + channel + ' in mode ' + mode);\n }\n } else {\n src = value;\n }\n return chroma(src, mode).alpha(me.alpha());\n };\n\n Color.prototype.clipped = function() {\n return this._rgb._clipped || false;\n };\n\n Color.prototype.alpha = function(a) {\n if (arguments.length) {\n return chroma.rgb([this._rgb[0], this._rgb[1], this._rgb[2], a]);\n }\n return this._rgb[3];\n };\n\n Color.prototype.darken = function(amount) {\n var lab, me;\n if (amount == null) {\n amount = 1;\n }\n me = this;\n lab = me.lab();\n lab[0] -= LAB_CONSTANTS.Kn * amount;\n return chroma.lab(lab).alpha(me.alpha());\n };\n\n Color.prototype.brighten = function(amount) {\n if (amount == null) {\n amount = 1;\n }\n return this.darken(-amount);\n };\n\n Color.prototype.darker = Color.prototype.darken;\n\n Color.prototype.brighter = Color.prototype.brighten;\n\n Color.prototype.saturate = function(amount) {\n var lch, me;\n if (amount == null) {\n amount = 1;\n }\n me = this;\n lch = me.lch();\n lch[1] += amount * LAB_CONSTANTS.Kn;\n if (lch[1] < 0) {\n lch[1] = 0;\n }\n return chroma.lch(lch).alpha(me.alpha());\n };\n\n Color.prototype.desaturate = function(amount) {\n if (amount == null) {\n amount = 1;\n }\n return this.saturate(-amount);\n };\n\n Color.prototype.premultiply = function() {\n var a, rgb;\n rgb = this.rgb();\n a = this.alpha();\n return chroma(rgb[0] * a, rgb[1] * a, rgb[2] * a, a);\n };\n\n blend = function(bottom, top, mode) {\n if (!blend[mode]) {\n throw 'unknown blend mode ' + mode;\n }\n return blend[mode](bottom, top);\n };\n\n blend_f = function(f) {\n return function(bottom, top) {\n var c0, c1;\n c0 = chroma(top).rgb();\n c1 = chroma(bottom).rgb();\n return chroma(f(c0, c1), 'rgb');\n };\n };\n\n each = function(f) {\n return function(c0, c1) {\n var i, o, out;\n out = [];\n for (i = o = 0; o <= 3; i = ++o) {\n out[i] = f(c0[i], c1[i]);\n }\n return out;\n };\n };\n\n normal = function(a, b) {\n return a;\n };\n\n multiply = function(a, b) {\n return a * b / 255;\n };\n\n darken = function(a, b) {\n if (a > b) {\n return b;\n } else {\n return a;\n }\n };\n\n lighten = function(a, b) {\n if (a > b) {\n return a;\n } else {\n return b;\n }\n };\n\n screen = function(a, b) {\n return 255 * (1 - (1 - a / 255) * (1 - b / 255));\n };\n\n overlay = function(a, b) {\n if (b < 128) {\n return 2 * a * b / 255;\n } else {\n return 255 * (1 - 2 * (1 - a / 255) * (1 - b / 255));\n }\n };\n\n burn = function(a, b) {\n return 255 * (1 - (1 - b / 255) / (a / 255));\n };\n\n dodge = function(a, b) {\n if (a === 255) {\n return 255;\n }\n a = 255 * (b / 255) / (1 - a / 255);\n if (a > 255) {\n return 255;\n } else {\n return a;\n }\n };\n\n blend.normal = blend_f(each(normal));\n\n blend.multiply = blend_f(each(multiply));\n\n blend.screen = blend_f(each(screen));\n\n blend.overlay = blend_f(each(overlay));\n\n blend.darken = blend_f(each(darken));\n\n blend.lighten = blend_f(each(lighten));\n\n blend.dodge = blend_f(each(dodge));\n\n blend.burn = blend_f(each(burn));\n\n chroma.blend = blend;\n\n chroma.analyze = function(data) {\n var len, o, r, val;\n r = {\n min: Number.MAX_VALUE,\n max: Number.MAX_VALUE * -1,\n sum: 0,\n values: [],\n count: 0\n };\n for (o = 0, len = data.length; o < len; o++) {\n val = data[o];\n if ((val != null) && !isNaN(val)) {\n r.values.push(val);\n r.sum += val;\n if (val < r.min) {\n r.min = val;\n }\n if (val > r.max) {\n r.max = val;\n }\n r.count += 1;\n }\n }\n r.domain = [r.min, r.max];\n r.limits = function(mode, num) {\n return chroma.limits(r, mode, num);\n };\n return r;\n };\n\n chroma.scale = function(colors, positions) {\n var _classes, _colorCache, _colors, _correctLightness, _domain, _fixed, _gamma, _max, _min, _mode, _nacol, _out, _padding, _pos, _spread, _useCache, classifyValue, f, getClass, getColor, resetCache, setColors, tmap;\n _mode = 'rgb';\n _nacol = chroma('#ccc');\n _spread = 0;\n _fixed = false;\n _domain = [0, 1];\n _pos = [];\n _padding = [0, 0];\n _classes = false;\n _colors = [];\n _out = false;\n _min = 0;\n _max = 1;\n _correctLightness = false;\n _colorCache = {};\n _useCache = true;\n _gamma = 1;\n setColors = function(colors) {\n var c, col, o, ref, ref1, w;\n if (colors == null) {\n colors = ['#fff', '#000'];\n }\n if ((colors != null) && type(colors) === 'string' && (chroma.brewer != null)) {\n colors = chroma.brewer[colors] || chroma.brewer[colors.toLowerCase()] || colors;\n }\n if (type(colors) === 'array') {\n if (colors.length === 1) {\n colors = [colors[0], colors[0]];\n }\n colors = colors.slice(0);\n for (c = o = 0, ref = colors.length - 1; 0 <= ref ? o <= ref : o >= ref; c = 0 <= ref ? ++o : --o) {\n col = colors[c];\n if (type(col) === \"string\") {\n colors[c] = chroma(col);\n }\n }\n _pos.length = 0;\n for (c = w = 0, ref1 = colors.length - 1; 0 <= ref1 ? w <= ref1 : w >= ref1; c = 0 <= ref1 ? ++w : --w) {\n _pos.push(c / (colors.length - 1));\n }\n }\n resetCache();\n return _colors = colors;\n };\n getClass = function(value) {\n var i, n;\n if (_classes != null) {\n n = _classes.length - 1;\n i = 0;\n while (i < n && value >= _classes[i]) {\n i++;\n }\n return i - 1;\n }\n return 0;\n };\n tmap = function(t) {\n return t;\n };\n classifyValue = function(value) {\n var i, maxc, minc, n, val;\n val = value;\n if (_classes.length > 2) {\n n = _classes.length - 1;\n i = getClass(value);\n minc = _classes[0] + (_classes[1] - _classes[0]) * (0 + _spread * 0.5);\n maxc = _classes[n - 1] + (_classes[n] - _classes[n - 1]) * (1 - _spread * 0.5);\n val = _min + ((_classes[i] + (_classes[i + 1] - _classes[i]) * 0.5 - minc) / (maxc - minc)) * (_max - _min);\n }\n return val;\n };\n getColor = function(val, bypassMap) {\n var c, col, i, k, o, p, ref, t;\n if (bypassMap == null) {\n bypassMap = false;\n }\n if (isNaN(val) || val === null) {\n return _nacol;\n }\n if (!bypassMap) {\n if (_classes && _classes.length > 2) {\n c = getClass(val);\n t = c / (_classes.length - 2);\n } else if (_max !== _min) {\n t = (val - _min) / (_max - _min);\n } else {\n t = 1;\n }\n } else {\n t = val;\n }\n if (!bypassMap) {\n t = tmap(t);\n }\n if (_gamma !== 1) {\n t = pow(t, _gamma);\n }\n t = _padding[0] + (t * (1 - _padding[0] - _padding[1]));\n t = Math.min(1, Math.max(0, t));\n k = Math.floor(t * 10000);\n if (_useCache && _colorCache[k]) {\n col = _colorCache[k];\n } else {\n if (type(_colors) === 'array') {\n for (i = o = 0, ref = _pos.length - 1; 0 <= ref ? o <= ref : o >= ref; i = 0 <= ref ? ++o : --o) {\n p = _pos[i];\n if (t <= p) {\n col = _colors[i];\n break;\n }\n if (t >= p && i === _pos.length - 1) {\n col = _colors[i];\n break;\n }\n if (t > p && t < _pos[i + 1]) {\n t = (t - p) / (_pos[i + 1] - p);\n col = chroma.interpolate(_colors[i], _colors[i + 1], t, _mode);\n break;\n }\n }\n } else if (type(_colors) === 'function') {\n col = _colors(t);\n }\n if (_useCache) {\n _colorCache[k] = col;\n }\n }\n return col;\n };\n resetCache = function() {\n return _colorCache = {};\n };\n setColors(colors);\n f = function(v) {\n var c;\n c = chroma(getColor(v));\n if (_out && c[_out]) {\n return c[_out]();\n } else {\n return c;\n }\n };\n f.classes = function(classes) {\n var d;\n if (classes != null) {\n if (type(classes) === 'array') {\n _classes = classes;\n _domain = [classes[0], classes[classes.length - 1]];\n } else {\n d = chroma.analyze(_domain);\n if (classes === 0) {\n _classes = [d.min, d.max];\n } else {\n _classes = chroma.limits(d, 'e', classes);\n }\n }\n return f;\n }\n return _classes;\n };\n f.domain = function(domain) {\n var c, d, k, len, o, ref, w;\n if (!arguments.length) {\n return _domain;\n }\n _min = domain[0];\n _max = domain[domain.length - 1];\n _pos = [];\n k = _colors.length;\n if (domain.length === k && _min !== _max) {\n for (o = 0, len = domain.length; o < len; o++) {\n d = domain[o];\n _pos.push((d - _min) / (_max - _min));\n }\n } else {\n for (c = w = 0, ref = k - 1; 0 <= ref ? w <= ref : w >= ref; c = 0 <= ref ? ++w : --w) {\n _pos.push(c / (k - 1));\n }\n }\n _domain = [_min, _max];\n return f;\n };\n f.mode = function(_m) {\n if (!arguments.length) {\n return _mode;\n }\n _mode = _m;\n resetCache();\n return f;\n };\n f.range = function(colors, _pos) {\n setColors(colors, _pos);\n return f;\n };\n f.out = function(_o) {\n _out = _o;\n return f;\n };\n f.spread = function(val) {\n if (!arguments.length) {\n return _spread;\n }\n _spread = val;\n return f;\n };\n f.correctLightness = function(v) {\n if (v == null) {\n v = true;\n }\n _correctLightness = v;\n resetCache();\n if (_correctLightness) {\n tmap = function(t) {\n var L0, L1, L_actual, L_diff, L_ideal, max_iter, pol, t0, t1;\n L0 = getColor(0, true).lab()[0];\n L1 = getColor(1, true).lab()[0];\n pol = L0 > L1;\n L_actual = getColor(t, true).lab()[0];\n L_ideal = L0 + (L1 - L0) * t;\n L_diff = L_actual - L_ideal;\n t0 = 0;\n t1 = 1;\n max_iter = 20;\n while (Math.abs(L_diff) > 1e-2 && max_iter-- > 0) {\n (function() {\n if (pol) {\n L_diff *= -1;\n }\n if (L_diff < 0) {\n t0 = t;\n t += (t1 - t) * 0.5;\n } else {\n t1 = t;\n t += (t0 - t) * 0.5;\n }\n L_actual = getColor(t, true).lab()[0];\n return L_diff = L_actual - L_ideal;\n })();\n }\n return t;\n };\n } else {\n tmap = function(t) {\n return t;\n };\n }\n return f;\n };\n f.padding = function(p) {\n if (p != null) {\n if (type(p) === 'number') {\n p = [p, p];\n }\n _padding = p;\n return f;\n } else {\n return _padding;\n }\n };\n f.colors = function(numColors, out) {\n var dd, dm, i, o, ref, result, results, samples, w;\n if (arguments.length < 2) {\n out = 'hex';\n }\n result = [];\n if (arguments.length === 0) {\n result = _colors.slice(0);\n } else if (numColors === 1) {\n result = [f(0.5)];\n } else if (numColors > 1) {\n dm = _domain[0];\n dd = _domain[1] - dm;\n result = (function() {\n results = [];\n for (var o = 0; 0 <= numColors ? o < numColors : o > numColors; 0 <= numColors ? o++ : o--){ results.push(o); }\n return results;\n }).apply(this).map(function(i) {\n return f(dm + i / (numColors - 1) * dd);\n });\n } else {\n colors = [];\n samples = [];\n if (_classes && _classes.length > 2) {\n for (i = w = 1, ref = _classes.length; 1 <= ref ? w < ref : w > ref; i = 1 <= ref ? ++w : --w) {\n samples.push((_classes[i - 1] + _classes[i]) * 0.5);\n }\n } else {\n samples = _domain;\n }\n result = samples.map(function(v) {\n return f(v);\n });\n }\n if (chroma[out]) {\n result = result.map(function(c) {\n return c[out]();\n });\n }\n return result;\n };\n f.cache = function(c) {\n if (c != null) {\n _useCache = c;\n return f;\n } else {\n return _useCache;\n }\n };\n f.gamma = function(g) {\n if (g != null) {\n _gamma = g;\n return f;\n } else {\n return _gamma;\n }\n };\n f.nodata = function(d) {\n if (d != null) {\n _nacol = chroma(d);\n return f;\n } else {\n return _nacol;\n }\n };\n return f;\n };\n\n if (chroma.scales == null) {\n chroma.scales = {};\n }\n\n chroma.scales.cool = function() {\n return chroma.scale([chroma.hsl(180, 1, .9), chroma.hsl(250, .7, .4)]);\n };\n\n chroma.scales.hot = function() {\n return chroma.scale(['#000', '#f00', '#ff0', '#fff'], [0, .25, .75, 1]).mode('rgb');\n };\n\n chroma.analyze = function(data, key, filter) {\n var add, k, len, o, r, val, visit;\n r = {\n min: Number.MAX_VALUE,\n max: Number.MAX_VALUE * -1,\n sum: 0,\n values: [],\n count: 0\n };\n if (filter == null) {\n filter = function() {\n return true;\n };\n }\n add = function(val) {\n if ((val != null) && !isNaN(val)) {\n r.values.push(val);\n r.sum += val;\n if (val < r.min) {\n r.min = val;\n }\n if (val > r.max) {\n r.max = val;\n }\n r.count += 1;\n }\n };\n visit = function(val, k) {\n if (filter(val, k)) {\n if ((key != null) && type(key) === 'function') {\n return add(key(val));\n } else if ((key != null) && type(key) === 'string' || type(key) === 'number') {\n return add(val[key]);\n } else {\n return add(val);\n }\n }\n };\n if (type(data) === 'array') {\n for (o = 0, len = data.length; o < len; o++) {\n val = data[o];\n visit(val);\n }\n } else {\n for (k in data) {\n val = data[k];\n visit(val, k);\n }\n }\n r.domain = [r.min, r.max];\n r.limits = function(mode, num) {\n return chroma.limits(r, mode, num);\n };\n return r;\n };\n\n chroma.limits = function(data, mode, num) {\n var aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, assignments, best, centroids, cluster, clusterSizes, dist, i, j, kClusters, limits, max_log, min, min_log, mindist, n, nb_iters, newCentroids, o, p, pb, pr, ref, ref1, ref10, ref11, ref12, ref13, ref14, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, repeat, sum, tmpKMeansBreaks, v, value, values, w;\n if (mode == null) {\n mode = 'equal';\n }\n if (num == null) {\n num = 7;\n }\n if (type(data) === 'array') {\n data = chroma.analyze(data);\n }\n min = data.min;\n max = data.max;\n sum = data.sum;\n values = data.values.sort(function(a, b) {\n return a - b;\n });\n if (num === 1) {\n return [min, max];\n }\n limits = [];\n if (mode.substr(0, 1) === 'c') {\n limits.push(min);\n limits.push(max);\n }\n if (mode.substr(0, 1) === 'e') {\n limits.push(min);\n for (i = o = 1, ref = num - 1; 1 <= ref ? o <= ref : o >= ref; i = 1 <= ref ? ++o : --o) {\n limits.push(min + (i / num) * (max - min));\n }\n limits.push(max);\n } else if (mode.substr(0, 1) === 'l') {\n if (min <= 0) {\n throw 'Logarithmic scales are only possible for values > 0';\n }\n min_log = Math.LOG10E * log(min);\n max_log = Math.LOG10E * log(max);\n limits.push(min);\n for (i = w = 1, ref1 = num - 1; 1 <= ref1 ? w <= ref1 : w >= ref1; i = 1 <= ref1 ? ++w : --w) {\n limits.push(pow(10, min_log + (i / num) * (max_log - min_log)));\n }\n limits.push(max);\n } else if (mode.substr(0, 1) === 'q') {\n limits.push(min);\n for (i = aa = 1, ref2 = num - 1; 1 <= ref2 ? aa <= ref2 : aa >= ref2; i = 1 <= ref2 ? ++aa : --aa) {\n p = (values.length - 1) * i / num;\n pb = floor(p);\n if (pb === p) {\n limits.push(values[pb]);\n } else {\n pr = p - pb;\n limits.push(values[pb] * (1 - pr) + values[pb + 1] * pr);\n }\n }\n limits.push(max);\n } else if (mode.substr(0, 1) === 'k') {\n\n /*\n implementation based on\n http://code.google.com/p/figue/source/browse/trunk/figue.js#336\n simplified for 1-d input values\n */\n n = values.length;\n assignments = new Array(n);\n clusterSizes = new Array(num);\n repeat = true;\n nb_iters = 0;\n centroids = null;\n centroids = [];\n centroids.push(min);\n for (i = ab = 1, ref3 = num - 1; 1 <= ref3 ? ab <= ref3 : ab >= ref3; i = 1 <= ref3 ? ++ab : --ab) {\n centroids.push(min + (i / num) * (max - min));\n }\n centroids.push(max);\n while (repeat) {\n for (j = ac = 0, ref4 = num - 1; 0 <= ref4 ? ac <= ref4 : ac >= ref4; j = 0 <= ref4 ? ++ac : --ac) {\n clusterSizes[j] = 0;\n }\n for (i = ad = 0, ref5 = n - 1; 0 <= ref5 ? ad <= ref5 : ad >= ref5; i = 0 <= ref5 ? ++ad : --ad) {\n value = values[i];\n mindist = Number.MAX_VALUE;\n for (j = ae = 0, ref6 = num - 1; 0 <= ref6 ? ae <= ref6 : ae >= ref6; j = 0 <= ref6 ? ++ae : --ae) {\n dist = abs(centroids[j] - value);\n if (dist < mindist) {\n mindist = dist;\n best = j;\n }\n }\n clusterSizes[best]++;\n assignments[i] = best;\n }\n newCentroids = new Array(num);\n for (j = af = 0, ref7 = num - 1; 0 <= ref7 ? af <= ref7 : af >= ref7; j = 0 <= ref7 ? ++af : --af) {\n newCentroids[j] = null;\n }\n for (i = ag = 0, ref8 = n - 1; 0 <= ref8 ? ag <= ref8 : ag >= ref8; i = 0 <= ref8 ? ++ag : --ag) {\n cluster = assignments[i];\n if (newCentroids[cluster] === null) {\n newCentroids[cluster] = values[i];\n } else {\n newCentroids[cluster] += values[i];\n }\n }\n for (j = ah = 0, ref9 = num - 1; 0 <= ref9 ? ah <= ref9 : ah >= ref9; j = 0 <= ref9 ? ++ah : --ah) {\n newCentroids[j] *= 1 / clusterSizes[j];\n }\n repeat = false;\n for (j = ai = 0, ref10 = num - 1; 0 <= ref10 ? ai <= ref10 : ai >= ref10; j = 0 <= ref10 ? ++ai : --ai) {\n if (newCentroids[j] !== centroids[i]) {\n repeat = true;\n break;\n }\n }\n centroids = newCentroids;\n nb_iters++;\n if (nb_iters > 200) {\n repeat = false;\n }\n }\n kClusters = {};\n for (j = aj = 0, ref11 = num - 1; 0 <= ref11 ? aj <= ref11 : aj >= ref11; j = 0 <= ref11 ? ++aj : --aj) {\n kClusters[j] = [];\n }\n for (i = ak = 0, ref12 = n - 1; 0 <= ref12 ? ak <= ref12 : ak >= ref12; i = 0 <= ref12 ? ++ak : --ak) {\n cluster = assignments[i];\n kClusters[cluster].push(values[i]);\n }\n tmpKMeansBreaks = [];\n for (j = al = 0, ref13 = num - 1; 0 <= ref13 ? al <= ref13 : al >= ref13; j = 0 <= ref13 ? ++al : --al) {\n tmpKMeansBreaks.push(kClusters[j][0]);\n tmpKMeansBreaks.push(kClusters[j][kClusters[j].length - 1]);\n }\n tmpKMeansBreaks = tmpKMeansBreaks.sort(function(a, b) {\n return a - b;\n });\n limits.push(tmpKMeansBreaks[0]);\n for (i = am = 1, ref14 = tmpKMeansBreaks.length - 1; am <= ref14; i = am += 2) {\n v = tmpKMeansBreaks[i];\n if (!isNaN(v) && limits.indexOf(v) === -1) {\n limits.push(v);\n }\n }\n }\n return limits;\n };\n\n hsi2rgb = function(h, s, i) {\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/hsi2rgb.cpp\n */\n var args, b, g, r;\n args = unpack(arguments);\n h = args[0], s = args[1], i = args[2];\n if (isNaN(h)) {\n h = 0;\n }\n h /= 360;\n if (h < 1 / 3) {\n b = (1 - s) / 3;\n r = (1 + s * cos(TWOPI * h) / cos(PITHIRD - TWOPI * h)) / 3;\n g = 1 - (b + r);\n } else if (h < 2 / 3) {\n h -= 1 / 3;\n r = (1 - s) / 3;\n g = (1 + s * cos(TWOPI * h) / cos(PITHIRD - TWOPI * h)) / 3;\n b = 1 - (r + g);\n } else {\n h -= 2 / 3;\n g = (1 - s) / 3;\n b = (1 + s * cos(TWOPI * h) / cos(PITHIRD - TWOPI * h)) / 3;\n r = 1 - (g + b);\n }\n r = limit(i * r * 3);\n g = limit(i * g * 3);\n b = limit(i * b * 3);\n return [r * 255, g * 255, b * 255, args.length > 3 ? args[3] : 1];\n };\n\n rgb2hsi = function() {\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/rgb2hsi.cpp\n */\n var b, g, h, i, min, r, ref, s;\n ref = unpack(arguments), r = ref[0], g = ref[1], b = ref[2];\n TWOPI = Math.PI * 2;\n r /= 255;\n g /= 255;\n b /= 255;\n min = Math.min(r, g, b);\n i = (r + g + b) / 3;\n s = 1 - min / i;\n if (s === 0) {\n h = 0;\n } else {\n h = ((r - g) + (r - b)) / 2;\n h /= Math.sqrt((r - g) * (r - g) + (r - b) * (g - b));\n h = Math.acos(h);\n if (b > g) {\n h = TWOPI - h;\n }\n h /= TWOPI;\n }\n return [h * 360, s, i];\n };\n\n chroma.hsi = function() {\n return (function(func, args, ctor) {\n ctor.prototype = func.prototype;\n var child = new ctor, result = func.apply(child, args);\n return Object(result) === result ? result : child;\n })(Color, slice.call(arguments).concat(['hsi']), function(){});\n };\n\n _input.hsi = hsi2rgb;\n\n Color.prototype.hsi = function() {\n return rgb2hsi(this._rgb);\n };\n\n interpolate_hsx = function(col1, col2, f, m) {\n var dh, hue, hue0, hue1, lbv, lbv0, lbv1, res, sat, sat0, sat1, xyz0, xyz1;\n if (m === 'hsl') {\n xyz0 = col1.hsl();\n xyz1 = col2.hsl();\n } else if (m === 'hsv') {\n xyz0 = col1.hsv();\n xyz1 = col2.hsv();\n } else if (m === 'hcg') {\n xyz0 = col1.hcg();\n xyz1 = col2.hcg();\n } else if (m === 'hsi') {\n xyz0 = col1.hsi();\n xyz1 = col2.hsi();\n } else if (m === 'lch' || m === 'hcl') {\n m = 'hcl';\n xyz0 = col1.hcl();\n xyz1 = col2.hcl();\n }\n if (m.substr(0, 1) === 'h') {\n hue0 = xyz0[0], sat0 = xyz0[1], lbv0 = xyz0[2];\n hue1 = xyz1[0], sat1 = xyz1[1], lbv1 = xyz1[2];\n }\n if (!isNaN(hue0) && !isNaN(hue1)) {\n if (hue1 > hue0 && hue1 - hue0 > 180) {\n dh = hue1 - (hue0 + 360);\n } else if (hue1 < hue0 && hue0 - hue1 > 180) {\n dh = hue1 + 360 - hue0;\n } else {\n dh = hue1 - hue0;\n }\n hue = hue0 + f * dh;\n } else if (!isNaN(hue0)) {\n hue = hue0;\n if ((lbv1 === 1 || lbv1 === 0) && m !== 'hsv') {\n sat = sat0;\n }\n } else if (!isNaN(hue1)) {\n hue = hue1;\n if ((lbv0 === 1 || lbv0 === 0) && m !== 'hsv') {\n sat = sat1;\n }\n } else {\n hue = Number.NaN;\n }\n if (sat == null) {\n sat = sat0 + f * (sat1 - sat0);\n }\n lbv = lbv0 + f * (lbv1 - lbv0);\n return res = chroma[m](hue, sat, lbv);\n };\n\n _interpolators = _interpolators.concat((function() {\n var len, o, ref, results;\n ref = ['hsv', 'hsl', 'hsi', 'hcl', 'lch', 'hcg'];\n results = [];\n for (o = 0, len = ref.length; o < len; o++) {\n m = ref[o];\n results.push([m, interpolate_hsx]);\n }\n return results;\n })());\n\n interpolate_num = function(col1, col2, f, m) {\n var n1, n2;\n n1 = col1.num();\n n2 = col2.num();\n return chroma.num(n1 + (n2 - n1) * f, 'num');\n };\n\n _interpolators.push(['num', interpolate_num]);\n\n interpolate_lab = function(col1, col2, f, m) {\n var res, xyz0, xyz1;\n xyz0 = col1.lab();\n xyz1 = col2.lab();\n return res = new Color(xyz0[0] + f * (xyz1[0] - xyz0[0]), xyz0[1] + f * (xyz1[1] - xyz0[1]), xyz0[2] + f * (xyz1[2] - xyz0[2]), m);\n };\n\n _interpolators.push(['lab', interpolate_lab]);\n\n}).call(this);\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/chroma-js/chroma.js","module.exports = function isUTM(projection) {\n const projstr = projection.toString();\n return projstr.startsWith('326') || projstr.startsWith('327');\n}\n\n\n// WEBPACK FOOTER //\n// ./node_modules/utm-utils/src/isUTM.js","const getZone = require('./getZone');\nconst getHemisphere = require('./getHemisphere');\n\nmodule.exports = function getProjString (projection) {\n const zone = getZone(projection);\n const hemisphere = getHemisphere(projection);\n return `+proj=utm +zone=${zone}${hemisphere === 'S' ? ' +south ' : ' '}+ellps=WGS84 +datum=WGS84 +units=m +no_defs`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/utm-utils/src/getProjString.js","module.exports = function getZone (projection) {\n return Number.parseInt(projection.toString().substring(3));\n};\n\n\n// WEBPACK FOOTER //\n// ./node_modules/utm-utils/src/getZone.js","module.exports = function getHemisphere (projection) {\n const projstr = projection.toString();\n if (projstr.startsWith('326')) {\n return 'N';\n } else if (projstr.startsWith('327')) {\n return 'S';\n }\n }\n\n\n// WEBPACK FOOTER //\n// ./node_modules/utm-utils/src/getHemisphere.js"],"sourceRoot":""}