canvas-color-tracker
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -1,2 +0,2 @@ | ||
// Version 1.1.3 canvas-color-tracker - https://github.com/vasturiano/canvas-color-tracker | ||
// Version 1.1.4 canvas-color-tracker - https://github.com/vasturiano/canvas-color-tracker | ||
(function (global, factory) { | ||
@@ -63,16 +63,7 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
function createCommonjsModule(fn, basedir, module) { | ||
return module = { | ||
path: basedir, | ||
exports: {}, | ||
require: function (path, base) { | ||
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); | ||
} | ||
}, fn(module, module.exports), module.exports; | ||
function createCommonjsModule(fn) { | ||
var module = { exports: {} }; | ||
return fn(module, module.exports), module.exports; | ||
} | ||
function commonjsRequire () { | ||
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); | ||
} | ||
var tinycolor = createCommonjsModule(function (module) { | ||
@@ -1261,3 +1252,3 @@ // TinyColor v1.4.2 | ||
// Node: Export function | ||
if ( module.exports) { | ||
if (module.exports) { | ||
module.exports = tinycolor; | ||
@@ -1264,0 +1255,0 @@ } |
@@ -1,5 +0,5 @@ | ||
// Version 1.1.3 canvas-color-tracker - https://github.com/vasturiano/canvas-color-tracker | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).ColorTracker=r()}(this,(function(){"use strict";function t(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function r(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,r){if(!t)return;if("string"==typeof t)return n(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(t,r)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var i=function(t,r,e){return t(e={path:r,exports:{},require:function(t,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==r&&e.path)}},e.exports),e.exports}((function(t){!function(r){var e=/^\s+/,n=/\s+$/,i=0,a=r.round,o=r.min,s=r.max,f=r.random;function u(t,f){if(f=f||{},(t=t||"")instanceof u)return t;if(!(this instanceof u))return new u(t,f);var h=function(t){var i={r:0,g:0,b:0},a=1,f=null,u=null,h=null,l=!1,c=!1;"string"==typeof t&&(t=function(t){t=t.replace(e,"").replace(n,"").toLowerCase();var r,i=!1;if(R[t])t=R[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(r=z.rgb.exec(t))return{r:r[1],g:r[2],b:r[3]};if(r=z.rgba.exec(t))return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=z.hsl.exec(t))return{h:r[1],s:r[2],l:r[3]};if(r=z.hsla.exec(t))return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=z.hsv.exec(t))return{h:r[1],s:r[2],v:r[3]};if(r=z.hsva.exec(t))return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=z.hex8.exec(t))return{r:q(r[1]),g:q(r[2]),b:q(r[3]),a:E(r[4]),format:i?"name":"hex8"};if(r=z.hex6.exec(t))return{r:q(r[1]),g:q(r[2]),b:q(r[3]),format:i?"name":"hex"};if(r=z.hex4.exec(t))return{r:q(r[1]+""+r[1]),g:q(r[2]+""+r[2]),b:q(r[3]+""+r[3]),a:E(r[4]+""+r[4]),format:i?"name":"hex8"};if(r=z.hex3.exec(t))return{r:q(r[1]+""+r[1]),g:q(r[2]+""+r[2]),b:q(r[3]+""+r[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(P(t.r)&&P(t.g)&&P(t.b)?(g=t.r,b=t.g,d=t.b,i={r:255*M(g,255),g:255*M(b,255),b:255*M(d,255)},l=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):P(t.h)&&P(t.s)&&P(t.v)?(f=I(t.s),u=I(t.v),i=function(t,e,n){t=6*M(t,360),e=M(e,100),n=M(n,100);var i=r.floor(t),a=t-i,o=n*(1-e),s=n*(1-a*e),f=n*(1-(1-a)*e),u=i%6;return{r:255*[n,s,o,o,f,n][u],g:255*[f,n,n,s,o,o][u],b:255*[o,o,f,n,n,s][u]}}(t.h,f,u),l=!0,c="hsv"):P(t.h)&&P(t.s)&&P(t.l)&&(f=I(t.s),h=I(t.l),i=function(t,r,e){var n,i,a;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=M(t,360),r=M(r,100),e=M(e,100),0===r)n=i=a=e;else{var s=e<.5?e*(1+r):e+r-e*r,f=2*e-s;n=o(f,s,t+1/3),i=o(f,s,t),a=o(f,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,f,h),l=!0,c="hsl"),t.hasOwnProperty("a")&&(a=t.a));var g,b,d;return a=C(a),{ok:l,format:t.format||c,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(t);this._originalInput=t,this._r=h.r,this._g=h.g,this._b=h.b,this._a=h.a,this._roundA=a(100*this._a)/100,this._format=f.format||h.format,this._gradientType=f.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=h.ok,this._tc_id=i++}function h(t,r,e){t=M(t,255),r=M(r,255),e=M(e,255);var n,i,a=s(t,r,e),f=o(t,r,e),u=(a+f)/2;if(a==f)n=i=0;else{var h=a-f;switch(i=u>.5?h/(2-a-f):h/(a+f),a){case t:n=(r-e)/h+(r<e?6:0);break;case r:n=(e-t)/h+2;break;case e:n=(t-r)/h+4}n/=6}return{h:n,s:i,l:u}}function l(t,r,e){t=M(t,255),r=M(r,255),e=M(e,255);var n,i,a=s(t,r,e),f=o(t,r,e),u=a,h=a-f;if(i=0===a?0:h/a,a==f)n=0;else{switch(a){case t:n=(r-e)/h+(r<e?6:0);break;case r:n=(e-t)/h+2;break;case e:n=(t-r)/h+4}n/=6}return{h:n,s:i,v:u}}function c(t,r,e,n){var i=[T(a(t).toString(16)),T(a(r).toString(16)),T(a(e).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(t,r,e,n){return[T(B(n)),T(a(t).toString(16)),T(a(r).toString(16)),T(a(e).toString(16))].join("")}function b(t,r){r=0===r?0:r||10;var e=u(t).toHsl();return e.s-=r/100,e.s=j(e.s),u(e)}function d(t,r){r=0===r?0:r||10;var e=u(t).toHsl();return e.s+=r/100,e.s=j(e.s),u(e)}function p(t){return u(t).desaturate(100)}function m(t,r){r=0===r?0:r||10;var e=u(t).toHsl();return e.l+=r/100,e.l=j(e.l),u(e)}function _(t,r){r=0===r?0:r||10;var e=u(t).toRgb();return e.r=s(0,o(255,e.r-a(-r/100*255))),e.g=s(0,o(255,e.g-a(-r/100*255))),e.b=s(0,o(255,e.b-a(-r/100*255))),u(e)}function v(t,r){r=0===r?0:r||10;var e=u(t).toHsl();return e.l-=r/100,e.l=j(e.l),u(e)}function y(t,r){var e=u(t).toHsl(),n=(e.h+r)%360;return e.h=n<0?360+n:n,u(e)}function A(t){var r=u(t).toHsl();return r.h=(r.h+180)%360,u(r)}function x(t){var r=u(t).toHsl(),e=r.h;return[u(t),u({h:(e+120)%360,s:r.s,l:r.l}),u({h:(e+240)%360,s:r.s,l:r.l})]}function w(t){var r=u(t).toHsl(),e=r.h;return[u(t),u({h:(e+90)%360,s:r.s,l:r.l}),u({h:(e+180)%360,s:r.s,l:r.l}),u({h:(e+270)%360,s:r.s,l:r.l})]}function k(t){var r=u(t).toHsl(),e=r.h;return[u(t),u({h:(e+72)%360,s:r.s,l:r.l}),u({h:(e+216)%360,s:r.s,l:r.l})]}function S(t,r,e){r=r||6,e=e||30;var n=u(t).toHsl(),i=360/e,a=[u(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;)n.h=(n.h+i)%360,a.push(u(n));return a}function H(t,r){r=r||6;for(var e=u(t).toHsv(),n=e.h,i=e.s,a=e.v,o=[],s=1/r;r--;)o.push(u({h:n,s:i,v:a})),a=(a+s)%1;return o}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,i=this.toRgb();return t=i.r/255,e=i.g/255,n=i.b/255,.2126*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),r=a(360*t.h),e=a(100*t.s),n=a(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=h(this._r,this._g,this._b),r=a(360*t.h),e=a(100*t.s),n=a(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,n,i){var o=[T(a(t).toString(16)),T(a(r).toString(16)),T(a(e).toString(16)),T(B(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*M(this._r,255))+"%",g:a(100*M(this._g,255))+"%",b:a(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%)":"rgba("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(F[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+g(this._r,this._g,this._b,this._a),e=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=u(t);e="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(d,arguments)},greyscale:function(){return this._applyModification(p,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},u.fromRatio=function(t,r){if("object"==typeof t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]="a"===n?t[n]:I(t[n]));t=e}return u(t,r)},u.equals=function(t,r){return!(!t||!r)&&u(t).toRgbString()==u(r).toRgbString()},u.random=function(){return u.fromRatio({r:f(),g:f(),b:f()})},u.mix=function(t,r,e){e=0===e?0:e||50;var n=u(t).toRgb(),i=u(r).toRgb(),a=e/100;return u({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})}, | ||
// Version 1.1.4 canvas-color-tracker - https://github.com/vasturiano/canvas-color-tracker | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).ColorTracker=r()}(this,(function(){"use strict";function t(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function r(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,r){if(!t)return;if("string"==typeof t)return n(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(t,r)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var i=function(t){var r={exports:{}};return t(r,r.exports),r.exports}((function(t){!function(r){var e=/^\s+/,n=/\s+$/,i=0,a=r.round,o=r.min,s=r.max,f=r.random;function h(t,f){if(f=f||{},(t=t||"")instanceof h)return t;if(!(this instanceof h))return new h(t,f);var u=function(t){var i={r:0,g:0,b:0},a=1,f=null,h=null,u=null,l=!1,c=!1;"string"==typeof t&&(t=function(t){t=t.replace(e,"").replace(n,"").toLowerCase();var r,i=!1;if(R[t])t=R[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(r=z.rgb.exec(t))return{r:r[1],g:r[2],b:r[3]};if(r=z.rgba.exec(t))return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=z.hsl.exec(t))return{h:r[1],s:r[2],l:r[3]};if(r=z.hsla.exec(t))return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=z.hsv.exec(t))return{h:r[1],s:r[2],v:r[3]};if(r=z.hsva.exec(t))return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=z.hex8.exec(t))return{r:T(r[1]),g:T(r[2]),b:T(r[3]),a:O(r[4]),format:i?"name":"hex8"};if(r=z.hex6.exec(t))return{r:T(r[1]),g:T(r[2]),b:T(r[3]),format:i?"name":"hex"};if(r=z.hex4.exec(t))return{r:T(r[1]+""+r[1]),g:T(r[2]+""+r[2]),b:T(r[3]+""+r[3]),a:O(r[4]+""+r[4]),format:i?"name":"hex8"};if(r=z.hex3.exec(t))return{r:T(r[1]+""+r[1]),g:T(r[2]+""+r[2]),b:T(r[3]+""+r[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(P(t.r)&&P(t.g)&&P(t.b)?(g=t.r,b=t.g,d=t.b,i={r:255*M(g,255),g:255*M(b,255),b:255*M(d,255)},l=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):P(t.h)&&P(t.s)&&P(t.v)?(f=q(t.s),h=q(t.v),i=function(t,e,n){t=6*M(t,360),e=M(e,100),n=M(n,100);var i=r.floor(t),a=t-i,o=n*(1-e),s=n*(1-a*e),f=n*(1-(1-a)*e),h=i%6;return{r:255*[n,s,o,o,f,n][h],g:255*[f,n,n,s,o,o][h],b:255*[o,o,f,n,n,s][h]}}(t.h,f,h),l=!0,c="hsv"):P(t.h)&&P(t.s)&&P(t.l)&&(f=q(t.s),u=q(t.l),i=function(t,r,e){var n,i,a;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=M(t,360),r=M(r,100),e=M(e,100),0===r)n=i=a=e;else{var s=e<.5?e*(1+r):e+r-e*r,f=2*e-s;n=o(f,s,t+1/3),i=o(f,s,t),a=o(f,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,f,u),l=!0,c="hsl"),t.hasOwnProperty("a")&&(a=t.a));var g,b,d;return a=C(a),{ok:l,format:t.format||c,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=f.format||u.format,this._gradientType=f.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,r,e){t=M(t,255),r=M(r,255),e=M(e,255);var n,i,a=s(t,r,e),f=o(t,r,e),h=(a+f)/2;if(a==f)n=i=0;else{var u=a-f;switch(i=h>.5?u/(2-a-f):u/(a+f),a){case t:n=(r-e)/u+(r<e?6:0);break;case r:n=(e-t)/u+2;break;case e:n=(t-r)/u+4}n/=6}return{h:n,s:i,l:h}}function l(t,r,e){t=M(t,255),r=M(r,255),e=M(e,255);var n,i,a=s(t,r,e),f=o(t,r,e),h=a,u=a-f;if(i=0===a?0:u/a,a==f)n=0;else{switch(a){case t:n=(r-e)/u+(r<e?6:0);break;case r:n=(e-t)/u+2;break;case e:n=(t-r)/u+4}n/=6}return{h:n,s:i,v:h}}function c(t,r,e,n){var i=[I(a(t).toString(16)),I(a(r).toString(16)),I(a(e).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(t,r,e,n){return[I(B(n)),I(a(t).toString(16)),I(a(r).toString(16)),I(a(e).toString(16))].join("")}function b(t,r){r=0===r?0:r||10;var e=h(t).toHsl();return e.s-=r/100,e.s=j(e.s),h(e)}function d(t,r){r=0===r?0:r||10;var e=h(t).toHsl();return e.s+=r/100,e.s=j(e.s),h(e)}function p(t){return h(t).desaturate(100)}function _(t,r){r=0===r?0:r||10;var e=h(t).toHsl();return e.l+=r/100,e.l=j(e.l),h(e)}function m(t,r){r=0===r?0:r||10;var e=h(t).toRgb();return e.r=s(0,o(255,e.r-a(-r/100*255))),e.g=s(0,o(255,e.g-a(-r/100*255))),e.b=s(0,o(255,e.b-a(-r/100*255))),h(e)}function v(t,r){r=0===r?0:r||10;var e=h(t).toHsl();return e.l-=r/100,e.l=j(e.l),h(e)}function y(t,r){var e=h(t).toHsl(),n=(e.h+r)%360;return e.h=n<0?360+n:n,h(e)}function A(t){var r=h(t).toHsl();return r.h=(r.h+180)%360,h(r)}function x(t){var r=h(t).toHsl(),e=r.h;return[h(t),h({h:(e+120)%360,s:r.s,l:r.l}),h({h:(e+240)%360,s:r.s,l:r.l})]}function k(t){var r=h(t).toHsl(),e=r.h;return[h(t),h({h:(e+90)%360,s:r.s,l:r.l}),h({h:(e+180)%360,s:r.s,l:r.l}),h({h:(e+270)%360,s:r.s,l:r.l})]}function w(t){var r=h(t).toHsl(),e=r.h;return[h(t),h({h:(e+72)%360,s:r.s,l:r.l}),h({h:(e+216)%360,s:r.s,l:r.l})]}function S(t,r,e){r=r||6,e=e||30;var n=h(t).toHsl(),i=360/e,a=[h(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;)n.h=(n.h+i)%360,a.push(h(n));return a}function H(t,r){r=r||6;for(var e=h(t).toHsv(),n=e.h,i=e.s,a=e.v,o=[],s=1/r;r--;)o.push(h({h:n,s:i,v:a})),a=(a+s)%1;return o}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,i=this.toRgb();return t=i.r/255,e=i.g/255,n=i.b/255,.2126*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),r=a(360*t.h),e=a(100*t.s),n=a(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),r=a(360*t.h),e=a(100*t.s),n=a(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,n,i){var o=[I(a(t).toString(16)),I(a(r).toString(16)),I(a(e).toString(16)),I(B(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*M(this._r,255))+"%",g:a(100*M(this._g,255))+"%",b:a(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%)":"rgba("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(F[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+g(this._r,this._g,this._b,this._a),e=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=h(t);e="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(d,arguments)},greyscale:function(){return this._applyModification(p,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},h.fromRatio=function(t,r){if("object"==typeof t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]="a"===n?t[n]:q(t[n]));t=e}return h(t,r)},h.equals=function(t,r){return!(!t||!r)&&h(t).toRgbString()==h(r).toRgbString()},h.random=function(){return h.fromRatio({r:f(),g:f(),b:f()})},h.mix=function(t,r,e){e=0===e?0:e||50;var n=h(t).toRgb(),i=h(r).toRgb(),a=e/100;return h({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})}, | ||
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2) | ||
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2) | ||
u.readability=function(t,e){var n=u(t),i=u(e);return(r.max(n.getLuminance(),i.getLuminance())+.05)/(r.min(n.getLuminance(),i.getLuminance())+.05)},u.isReadable=function(t,r,e){var n,i,a=u.readability(t,r);switch(i=!1,(n=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(e)).level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},u.mostReadable=function(t,r,e){var n,i,a,o,s=null,f=0;i=(e=e||{}).includeFallbackColors,a=e.level,o=e.size;for(var h=0;h<r.length;h++)(n=u.readability(t,r[h]))>f&&(f=n,s=u(r[h]));return u.isReadable(t,s,{level:a,size:o})||!i?s:(e.includeFallbackColors=!1,u.mostReadable(t,["#fff","#000"],e))};var R=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},F=u.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(R);function C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function M(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=o(e,s(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),r.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function j(t){return o(1,s(0,t))}function q(t){return parseInt(t,16)}function T(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function B(t){return r.round(255*parseFloat(t)).toString(16)}function E(t){return q(t)/255}var O,L,N,z=(L="[\\s|\\(]+("+(O="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",N="[\\s|\\(]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",{CSS_UNIT:new RegExp(O),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function P(t){return!!z.CSS_UNIT.exec(t)}t.exports?t.exports=u:window.tinycolor=u}(Math)})),a=function(t,r,e){return(t<<16)+(r<<8)+e},o=function(t,r){return 123*t%Math.pow(2,r)};return function(){function n(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;t(this,n),this.csBits=r,this.registry=["__reserved for background__"]}var s,f,u;return s=n,(f=[{key:"register",value:function(t){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var r,e=this.registry.length,n=o(e,this.csBits),i=(r=e+(n<<24-this.csBits),"#".concat(Math.min(r,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(t),i}},{key:"lookup",value:function(t){var r,n,s,f,u="string"==typeof t?(r=i(t).toRgb(),n=r.r,s=r.g,f=r.b,a(n,s,f)):a.apply(void 0,e(t));if(!u)return null;var h=u&Math.pow(2,24-this.csBits)-1,l=u>>24-this.csBits&Math.pow(2,this.csBits)-1;return o(h,this.csBits)!==l||h>=this.registry.length?null:this.registry[h]}}])&&r(s.prototype,f),u&&r(s,u),n}()})); | ||
h.readability=function(t,e){var n=h(t),i=h(e);return(r.max(n.getLuminance(),i.getLuminance())+.05)/(r.min(n.getLuminance(),i.getLuminance())+.05)},h.isReadable=function(t,r,e){var n,i,a=h.readability(t,r);switch(i=!1,(n=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(e)).level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},h.mostReadable=function(t,r,e){var n,i,a,o,s=null,f=0;i=(e=e||{}).includeFallbackColors,a=e.level,o=e.size;for(var u=0;u<r.length;u++)(n=h.readability(t,r[u]))>f&&(f=n,s=h(r[u]));return h.isReadable(t,s,{level:a,size:o})||!i?s:(e.includeFallbackColors=!1,h.mostReadable(t,["#fff","#000"],e))};var R=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},F=h.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(R);function C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function M(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=o(e,s(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),r.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function j(t){return o(1,s(0,t))}function T(t){return parseInt(t,16)}function I(t){return 1==t.length?"0"+t:""+t}function q(t){return t<=1&&(t=100*t+"%"),t}function B(t){return r.round(255*parseFloat(t)).toString(16)}function O(t){return T(t)/255}var E,L,N,z=(L="[\\s|\\(]+("+(E="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?",N="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?",{CSS_UNIT:new RegExp(E),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function P(t){return!!z.CSS_UNIT.exec(t)}t.exports?t.exports=h:window.tinycolor=h}(Math)})),a=function(t,r,e){return(t<<16)+(r<<8)+e},o=function(t,r){return 123*t%Math.pow(2,r)};return function(){function n(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;t(this,n),this.csBits=r,this.registry=["__reserved for background__"]}var s,f,h;return s=n,(f=[{key:"register",value:function(t){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var r,e=this.registry.length,n=o(e,this.csBits),i=(r=e+(n<<24-this.csBits),"#".concat(Math.min(r,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(t),i}},{key:"lookup",value:function(t){var r,n,s,f,h="string"==typeof t?(r=i(t).toRgb(),n=r.r,s=r.g,f=r.b,a(n,s,f)):a.apply(void 0,e(t));if(!h)return null;var u=h&Math.pow(2,24-this.csBits)-1,l=h>>24-this.csBits&Math.pow(2,this.csBits)-1;return o(u,this.csBits)!==l||u>=this.registry.length?null:this.registry[u]}}])&&r(s.prototype,f),h&&r(s,h),n}()})); |
{ | ||
"name": "canvas-color-tracker", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "A utility to track objects on a canvas by unique px color", | ||
@@ -43,15 +43,15 @@ "unpkg": "dist/canvas-color-tracker.min.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.11.6", | ||
"@babel/plugin-proposal-class-properties": "^7.10.4", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.11.0", | ||
"@babel/preset-env": "^7.11.5", | ||
"@rollup/plugin-babel": "^5.2.1", | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"@babel/core": "^7.13.14", | ||
"@babel/plugin-proposal-class-properties": "^7.13.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.13.8", | ||
"@babel/preset-env": "^7.13.12", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^18.0.0", | ||
"@rollup/plugin-node-resolve": "^11.2.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.28.2", | ||
"rollup-plugin-dts": "^1.4.13", | ||
"rollup": "^2.44.0", | ||
"rollup-plugin-dts": "^3.0.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"typescript": "^4.0.3" | ||
"typescript": "^4.2.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
170897
1443