Socket
Socket
Sign inDemoInstall

react-color-picker

Package Overview
Dependencies
42
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.4 to 2.1.5

4

dist/react-color-picker.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ColorPicker=e(require("React")):t.ColorPicker=e(t.React)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}(function(t){for(var e in t)switch(typeof t[e]){case"number":t[e]=t[t[e]];break;case"object":t[e]=function(e){var n=e.slice(1),i=t[e[0]];return function(t,e,r){i.apply(null,[t,e,r].concat(n))}}(t[e])}return t}([function(t,e,n){"use strict";function i(){}var r=n(8),o=n(2).copy,s=n(4),a=r.createFactory(n(57)),h=r.createFactory(n(58)),u=s.toHsv,f=r.createClass({displayName:"ColorPicker",getDefaultProps:function(){return{defaultColor:n(6),saturationWidth:300,saturationHeight:300,hueHeight:null,hueWidth:30,hueMargin:10}},getInitialState:function(){return{value:this.props.defaultValue}},prepareClasses:function(t){t.push("cp")},prepareProps:function(t){var e=[t.className||""];return this.prepareClasses(e),t.className=e.join(" "),t},render:function(){var t=this.prepareProps(o(this.props)),e=this.props.hueStyle||{};e.marginLeft=this.props.hueMargin;var n=t.value?this.toColorValue(this.props.value):null,i=n?null:this.toColorValue(this.state.value||t.defaultValue||t.defaultColor),s={onDrag:this.handleSaturationDrag,onChange:this.handleSaturationChange,onMouseDown:this.handleSaturationMouseDown,height:t.saturationHeight,width:t.saturationWidth,inPicker:!0},u={onDrag:this.handleHueDrag,onChange:this.handleHueChange,height:t.hueHeight||t.saturationHeight,width:t.hueWidth,inPicker:!0,style:e};return this.state.dragHue&&((n||i).h=this.state.dragHue),n?(s.value=o(n),u.value=o(n)):(s.defaultValue=o(i),u.defaultValue=o(i)),r.DOM.div(t,h(s),a(u))},toColorValue:function(t){return"string"==typeof t?u(t):t},toStringValue:n(7),handleChange:function(t){this.state.dragHue=null,t=o(t);var e=this.toStringValue(t);(this.props.onChange||i)(e,t)},handleSaturationChange:function(t){this.handleChange(t)},handleHueChange:function(t){this.handleChange(t)},handleHueDrag:function(t){this.handleDrag(t)},handleSaturationDrag:function(t){this.handleDrag(t)},handleDrag:function(t){this.props.value||this.setState({value:t}),(this.props.onDrag||i)(this.toStringValue(t),t)},handleSaturationMouseDown:function(t){this.setState({dragHue:t.h})}});f.HueSpectrum=a,f.SaturationSpectrum=h,t.exports=f},[59,52],function(t,e,n){t.exports=function(){"use strict";var t=Object.prototype.hasOwnProperty,e="object",i="undefined";return{copy:n(18),copyIf:n(19),copyAs:function(n,i){var r={};if(i=i||1,null!=n&&typeof n===e)for(var o in n)t.call(n,o)&&(r[o]=i);return r},copyList:n(9),copyListIf:n(10),copyKeys:n(20),copyKeysIf:n(21),copyExceptKeys:function(n,i,r){if(i=i||{},r=r||{},null!=n&&typeof n===e)for(var o in n)t.call(n,o)&&!t.call(r,o)&&(i[o]=n[o]);return i},bindCopyKeys:function(n,r,o){if(2==arguments.length&&(o=r,r=null),r=r||{},null!=n&&typeof n===e&&null!=o&&typeof o===e){var s,a,h,u;for(var f in o)t.call(o,f)&&(a=o[f],s=typeof a,u=n[f],h=typeof u,h!==i&&(r["string"==s?a:f]="function"==h?u.bind(n):u))}return r}}}()},function(t){"use strict";function e(t,e){function n(i){function r(){var r=arguments.length,o=[].concat(i);return r&&o.push.apply(o,arguments),o.length<e?n(o):t.apply(this,o)}return r}return"number"!=typeof e&&(e=t.length),n([])}t.exports=e},function(t,e,n){"use strict";function i(t){return h(t)}function r(t){var e=i(t).toHsl().h;return i({h:e,s:100,l:50,a:1})}function o(t){return h.fromRatio(t)}function s(t,e){return e>1&&(e/=100),t=i(t).toRgb(),t.a=e,i(t)}function a(t){return i(t).toHsv()}var h=n(55);"undefined"!=typeof window&&(window.tinycolor=h);var u={toColor:i,toPure:r,fromRatio:o,toAlpha:s,toHsv:a};"undefined"!=typeof window&&(window.color=u),t.exports=u},function(t){"use strict";t.exports=function(t){return"number"==typeof t&&isFinite(t)}},function(t){t.exports="red"},function(t,e,n){"use strict";var i=n(2).copy,r=n(4).toColor;t.exports=function(t){return t=r(i(t)),1==t.toRgb().a?t.toHexString():t.toRgbString()}},function(e){e.exports=t},function(t){"use strict";var e="undefined";t.exports=function(t,n,i){arguments.length<3&&(i=n,n=null),n=n||{},i=i||Object.keys(t);for(var r,o=0,s=i.length;s>o;o++)r=i[o],typeof t[r]!==e&&(n[i[o]]=t[i[o]]);return n}},function(t){"use strict";var e="undefined";t.exports=function(t,n,i){arguments.length<3&&(i=n,n=null),n=n||{},i=i||Object.keys(t);for(var r,o=0,s=i.length;s>o;o++)r=i[o],typeof t[r]!==e&&typeof n[r]===e&&(n[r]=t[r]);return n}},function(t){"use strict";var e=Array.prototype.slice;t.exports=function(t,n){return function(){var i=e.call(n||[]);return arguments.length&&i.push.apply(i,arguments),t.apply(this,i)}}},function(t){"use strict";var e=Array.prototype.slice;t.exports=function(t,n){return function(){return Array.isArray(n)||(n=e.call(n||[])),t.apply(this,n)}}},function(t,e,n){var i=n(38);t.exports=function(t,e){return i(e.length)(t,e)}},function(t){"use strict";function e(t,e){function n(i){function r(){var r=arguments.length,o=[].concat(i);return r&&o.push.apply(o,arguments),o.length<e?n(o):t.apply(this,o)}return r}return"number"!=typeof e&&(e=t.length),n([])}var n=Object.prototype.hasOwnProperty;t.exports=e(function(t,e){return n.call(t,e)})},function(t){"use strict";t.exports=function(t){var e=!0;return t.right<t.left&&(e=!1,t.right=t.left),t.bottom<t.top&&(e=!1,t.bottom=t.top),e}},function(t,e,n){"use strict";function i(){}var r=n(1),o=n(2).copy,s=n(22),a=n(4).toHsv;t.exports={toColorValue:function(t){return"string"==typeof t?a(t):{h:t.h,s:t.s,v:t.v,a:t.a}},onMouseDown:function(t){t.preventDefault();var e=r.fromDOM(this.getDOMNode()),n=this.getEventInfo(t,e);s(t,{scope:this,constrainTo:e,onDragStart:function(t,e){e.initialPoint=n,this.handleDragStart(t)},onDrag:function(t,n){var i=this.getEventInfo(t,e);this.updateColor(i),this.handleDrag(t,n)},onDrop:function(t,n){var i=this.getEventInfo(t,e);this.updateColor(i),this.handleDrop(t,n)}}),this.updateColor(n),this.handleMouseDown(t,{initialPoint:n})},handleMouseDown:function(t,e){(this.props.onMouseDown||i).apply(this,this.getColors()),this.handleDrag(t,e)},handleUpdate:function(t,e){var n=e.diff||{top:0,left:0},i=e.initialPoint;if(i){var r,o;this.state.top=r=i.y+n.top,this.state.left=o=i.x+n.left,this.state.mouseDown={x:o,y:r,width:i.width,height:i.height}}this.props.inPicker||this.props.value||this.setState({value:this.hsv})},handleDragStart:function(){},handleDrag:function(t,e){this.handleUpdate(t,e),(this.props.onDrag||i).apply(this,this.getColors())},handleDrop:function(t,e){this.handleUpdate(t,e),this.state.mouseDown=!1,(this.props.onChange||i).apply(this,this.getColors())},getColors:function(){var t=this.props.inPicker?this.hsv:this.toStringValue(this.hsv),e=[t];return this.props.inPicker||e.push(o(this.hsv)),e},getEventInfo:function(t,e){e=e||r.fromDOM(this.getDOMNode());var n=t.clientX-e.left,i=t.clientY-e.top;return{x:n,y:i,width:e.getWidth(),height:e.getHeight()}}}},function(t){"use strict";t.exports=function(t){var e=t.height,n=t.width;return t.x<0&&(t.x=0),t.x>=n&&(t.x=n),t.y<0&&(t.y=0),t.y>=e&&(t.y=e),t}},function(t){"use strict";var e=Object.prototype.hasOwnProperty,n="object";t.exports=function(t,i){if(i=i||{},null!=t&&typeof t===n)for(var r in t)e.call(t,r)&&(i[r]=t[r]);return i}},function(t){"use strict";var e=Object.prototype.hasOwnProperty,n="object",i="undefined";t.exports=function(t,r){if(r=r||{},null!=t&&typeof t===n)for(var o in t)e.call(t,o)&&typeof r[o]===i&&(r[o]=t[o]);return r}},function(t,e,n){"use strict";var i="undefined",r="object",o=Object.prototype.hasOwnProperty,s=n(9);t.exports=function(t,e,n){if(arguments.length<3&&(n=e,e=null),e=e||{},!n||Array.isArray(n))return s(t,e,n);if(null!=t&&typeof t===r&&null!=n&&typeof n===r){var a,h;for(var u in n)o.call(n,u)&&(h=n[u],a=typeof h,typeof t[u]!==i&&(e["string"==a?h:u]=t[u]))}return e}},function(t,e,n){"use strict";var i="undefined",r="object",o=Object.prototype.hasOwnProperty,s=n(10);t.exports=function(t,e,n){if(arguments.length<3&&(n=e,e=null),e=e||{},!n||Array.isArray(n))return s(t,e,n);if(null!=t&&typeof t===r&&null!=n&&typeof n===r){var a,h,u;for(var f in n)o.call(n,f)&&(h=n[f],a=typeof h,u="string"==a?h:f,typeof t[f]!==i&&typeof e[u]===i&&(e[u]=t[f]))}return e}},function(t,e,n){"use strict";var i=n(28),r=n(2).copy,o=n(27),s=function(t){this.config=t};r({initDrag:function(t){this.onDragInit(t);var e=i.once(this.onDragStart,this),n=function(t){e(t),this.onDrag(t)}.bind(this),r=function(t){this.onDrop(t),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)}.bind(this);window.addEventListener("mousemove",n,!1),window.addEventListener("mouseup",r)},onDragInit:function(t){var e={diff:{left:0,top:0}};this.state={config:e};this.state.initPageCoords={pageX:t.pageX,pageY:t.pageY};this.config.region&&(this.state.initialRegion=o.from(this.config.region),this.state.dragRegion=e.dragRegion=this.state.initialRegion.clone()),this.config.constrainTo&&(this.state.constrainTo=o.from(this.config.constrainTo)),this.callConfig("onDragInit",t)},onDragStart:function(t){this.state.didDrag=this.state.config.didDrag=!0,this.callConfig("onDragStart",t)},onDrag:function(t){var e=this.state.config,n=this.state.initPageCoords,i=e.diff={left:t.pageX-n.pageX,top:t.pageY-n.pageY};if(this.state.initialRegion){var r=e.dragRegion;r.set(this.state.initialRegion),r.shift(i),this.state.constrainTo&&(r.constrainTo(this.state.constrainTo),i.left=r.left-this.state.initialRegion.left,i.top=r.top-this.state.initialRegion.top),e.dragRegion=r}this.callConfig("onDrag",t)},onDrop:function(t){this.callConfig("onDrop",t),this.state=null},callConfig:function(t,e){var n=this.state.config,i=[e,n],r=this.config[t];r&&r.apply(this,i)}},s.prototype),t.exports=function(t,e){if(e.scope){var n={scope:1,region:1,constrainTo:1};Object.keys(e).forEach(function(t){var i=e[t];t in n||"function"==typeof i&&(e[t]=i.bind(e.scope))})}var i=new s(e);return i.initDrag(t),i}},function(t,e,n){"use strict";var i=n(1);i.prototype.alignToRegion=function(t,e){return i.align(this,t,e),this},i.prototype.alignToPoint=function(t,e){return i.alignToPoint(this,t,e),this}},function(t,e,n){"use strict";var i=n(1);i.align=function(t,e,n){return e=i.from(e),n=(n||"c-c").split("-"),2!=n.length&&console.warn("Incorrect region alignment! The align parameter need to be in the form 'br-c', that is, a - separated string!",n),i.alignToPoint(t,e.getPoint(n[1]),n[0])},i.alignToPoint=function(t,e,n){t=i.from(t);var r=t.getPoint(n),o=0,s={};return null!=r.x&&null!=e.x&&(o++,s.left=e.x-r.x),null!=r.y&&null!=e.y&&(o++,s.top=e.y-r.y),o&&t.shift(s),t}},function(t,e,n){"use strict";function i(t,e,n,i){e=r.from(e),i=i||{};var o=i.constrain,s=i.sync,a=i.offset||[],h=!1,u=!1,f=t.clone();Array.isArray(n)||(n=n?[n]:[]),Array.isArray(a)||(a=a?[a]:[]),o&&(o=o===!0?r.getDocRegion():o.getRegion()),s&&(s.size?(h=!0,u=!0):(h=s===!0?!0:s.width||!1,u=s===!0?!0:s.height||!1)),h&&f.setWidth(e.getWidth()),u&&f.setHeight(e.getHeight());for(var c,l,g,p,d=0,v=n.length,m=-1,b=-1;v>d;d++){if(l=n[d],c=a[d],f.alignToRegion(e,l),c&&(Array.isArray(c)||(c=a[d]=[c.x||c.left,c.y||c.top]),f.shift({left:c[0],top:c[1]})),!o)return t.set(f),l;if(g=f.getIntersection(o),g&&g.equals(f))return t.set(f),l;g&&(p=g.getArea())>m&&(m=p,b=d)}return~b?(l=n[b],c=a[b],f.alignToRegion(e,l),c&&f.shift({left:c[0],top:c[1]}),g=f.getIntersection(o),f.setRegion(g),f.alignToRegion(e,l),c&&f.shift({left:c[0],top:c[1]}),t.set(f),l):void 0}var r=n(1);t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){t=o.from(t);var s=t.clone(),a=r(s,e,n,i);return{position:a,region:s,widthChanged:s.getWidth()!=t.getWidth(),heightChanged:s.getHeight()!=t.getHeight(),positionChanged:s.equalsPosition(t)}}var r=n(25),o=n(1);t.exports=i},function(t,e,n){"use strict";var i=n(1);n(24),n(23);var r=n(26);i.alignRegions=function(t,e,n,i){var o=r(t,e,n,i),s=o.region;return s.equals(t)||t.setRegion(s),o.position},i.prototype.alignTo=function(t,e,n){n=n||{};var o=this,s=i.from(t),a=r(o,s,e,n),h=a.region;return h.equalsSize(o)||this.setSize(h.getSize()),h.equalsPosition(o)||this.setPosition(h.getPosition(),{absolute:!!n.absolute}),a.position},t.exports=i},function(t,e,n){var i=function(t){setTimeout(t,0)},r=clearTimeout,o=Array.prototype.slice,s=n(3),a=function(t,e,n){if(n="function"==typeof n?n:function(t){return t},Array.isArray(e)){for(var i,r=0,o=e.length;o>r;r++)if(i=e[r],t(i,r,e))return n(i,r,e)}else if("object"==typeof e)for(var s,i,a=Object.keys(e),r=0,o=a.length;o>r;r++)if(s=a[r],i=e[s],t(i,s,e))return n(i,s,e)},h=s(a,2),u=s(function(t,e){return a(t,e,function(t,e){return e})}),f=function(t){return Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))}),t},c=n(31),l=n(30),g=n(37),p=n(11),d=n(29),v=n(12),m=n(33),b=function(t,e){return function(){var n=o.call(arguments,e||0);return t.apply(this,n)}},y=function(t,e,n){return function(){var i=[].from(arguments),r={stop:!1};n&&i.push(r);var o=e.apply(this,i);if(n){if(r.stop===!0)return o}else if(o===!1)return o;return t.apply(this,arguments)}},_=function(t,e,n){var r=1*e==e;return 2!=arguments.length||r?r||(e=0):(n=e,e=0),function(){var r=n||this,o=arguments;return 0>e?void t.apply(r,o):void(e||!i?setTimeout(function(){t.apply(r,o)},e):i(function(){t.apply(r,o)}))}},x=function(t,e){return _(t,0,e)},w=function(t,e,n){var o=-1;return function(){var s=n||this,a=arguments;if(0>e)return void t.apply(s,a);var h=e||!i,u=h?clearTimeout:r,f=h?setTimeout:i;-1!==o&&u(o),o=f(function(){t.apply(s,a),s=null},e)}},C=function(t,e,n){var i,r,o=-1;return function(){i=n||this,r=arguments,-1!==o||(o=setTimeout(function(){t.apply(i,r),i=null,o=-1},e))}},D=function(t,e,n){var i,r,o=-1,s=0,a=0,h={},u=!0;return r=i=function(){var f=arguments,c=n||this;u&&(h[s++]={args:f,scope:c}),-1!==o||(o=setTimeout(function(){t.apply(c,f),o=-1,a++,s!==a?(r=p(i,h[a].args).bind(h[a].scope),delete h[a],u=!1,r.apply(c),u=!0):h={}},e))}};t.exports={map:n(34),dot:n(32),maxArgs:n(35),compose:c,self:function(t){return t},buffer:w,delay:_,defer:x,skipArgs:b,intercept:function(t,e,n){return y(e,t,n)},throttle:C,spread:D,chain:function(t,e,n){return l(e,n,t)},before:function(t,e){return l("before",e,t)},after:function(t,e){return l("after",e,t)},curry:s,once:g,bindArgs:d,bindArgsArray:p,lockArgs:m,lockArgsArray:v,bindFunctionsOf:f,find:h,findIndex:u,newify:n(36)}},function(t,e,n){"use strict";var i=Array.prototype.slice,r=n(11);t.exports=function(t){return r(t,i.call(arguments,1))}},function(t){"use strict";function e(t,e,n){return function(){"before"===t&&n.apply(this,arguments);var i=e.apply(this,arguments);return"before"!==t&&n.apply(this,arguments),i}}t.exports=e},function(t){"use strict";function e(t,e){return function(){return t(e.apply(this,arguments))}}t.exports=function(){for(var t=arguments,n=t.length,i=0,r=t[0];++i<n;)r=e(r,t[i]);return r}},function(t,e,n){"use strict";var i=n(3);t.exports=i(function(t,e){return void 0!=e?e[t]:void 0})},function(t,e,n){"use strict";var i=Array.prototype.slice,r=n(12);t.exports=function(t){return r(t,i.call(arguments,1))}},function(t,e,n){"use strict";var i=n(3);t.exports=i(function(t,e){return void 0!=e?e.map(t):t(e)})},function(t,e,n){"use strict";{var i=Array.prototype.slice;n(3)}t.exports=function(t,e){return function(){return t.apply(this,i.call(arguments,0,e))}}},function(t,e,n){"use strict";var i=n(13),r=n(3);t.exports=r(i)},function(t){"use once";function e(t,e){var n,i;return function(){return n?i:(n=!0,i=t.apply(e||this,arguments))}}t.exports=e},function(t){t.exports=function(){"use strict";var t={};return function(e){if(!t[e]){for(var n=[],i=0;e>i;i++)n.push("a["+i+"]");t[e]=new Function("c","a","return new c("+n.join(",")+")")}return t[e]}}()},[59,46],function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Arguments]"===e.apply(t)||!!t.callee}},function(t){"use strict";t.exports=function(t){return Array.isArray(t)}},function(t){"use strict";t.exports=function(t){return"boolean"==typeof t}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Date]"===e.apply(t)}},function(t,e,n){"use strict";var i=n(5);t.exports=function(t){return i(t)&&t===parseFloat(t,10)&&!(t===parseInt(t,10))}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Function]"===e.apply(t)}},function(t,e,n){"use strict";t.exports={numeric:n(48),number:n(5),"int":n(47),"float":n(44),string:n(51),"function":n(45),object:n(49),arguments:n(40),"boolean":n(42),date:n(43),regexp:n(50),array:n(41)}},function(t,e,n){"use strict";var i=n(5);t.exports=function(t){return i(t)&&t===parseInt(t,10)}},function(t){"use strict";t.exports=function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Object]"===e.apply(t)}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object RegExp]"===e.apply(t)}},function(t){"use strict";t.exports=function(t){return"string"==typeof t}},function(t,e,n){"use strict";var i=n(14),r=n(13),o=n(2),s=o.copyList,a=o.copy,h=n(39).object,u=n(56).EventEmitter,f=n(53),c=n(15),l={cy:"YCenter",cx:"XCenter",t:"Top",tc:"TopCenter",tl:"TopLeft",tr:"TopRight",b:"Bottom",bc:"BottomCenter",bl:"BottomLeft",br:"BottomRight",l:"Left",lc:"LeftCenter",r:"Right",rc:"RightCenter",c:"Center"},g=function(t,e,n,i){return this instanceof g?(u.call(this),h(t)?(s(t,this,["top","right","bottom","left"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),t.emitChangeEvents&&(this.emitChangeEvents=t.emitChangeEvents)):(this.top=t,this.right=e,this.bottom=n,this.left=i),this[0]=this.left,this[1]=this.top,void c(this)):r(g,arguments)};f(g,u),a({emitChangeEvents:!1,getRegion:function(t){return t?this.clone():this},setRegion:function(t){return this.set(t instanceof g?t.get():t),this},validate:function(){return g.validate(this)},_before:function(){return this.emitChangeEvents?s(this,{},["left","top","bottom","right"]):void 0},_after:function(t){this.emitChangeEvents&&((this.top!=t.top||this.left!=t.left)&&this.emitPositionChange(),(this.right!=t.right||this.bottom!=t.bottom)&&this.emitSizeChange())},notifyPositionChange:function(){this.emit("changeposition",this)},emitPositionChange:function(){this.notifyPositionChange()},notifySizeChange:function(){this.emit("changesize",this)},emitSizeChange:function(){this.notifySizeChange()},add:function(t){var e,n=this._before();for(e in t)i(t,e)&&(this[e]+=t[e]);return this[0]=this.left,this[1]=this.top,this._after(n),this},substract:function(t){var e,n=this._before();for(e in t)i(t,e)&&(this[e]-=t[e]);return this[0]=this.left,this[1]=this.top,this._after(n),this},getSize:function(){return{width:this.getWidth(),height:this.getHeight()}},setPosition:function(t){var e=this.getWidth(),n=this.getHeight();return t.left&&(t.right=t.left+e),t.top&&(t.bottom=t.top+n),this.set(t)},setSize:function(t){return t.height&&t.width?this.set({right:this.left+t.width,bottom:this.top+t.height}):(t.width&&this.setWidth(t.width),t.height&&this.setHeight(t.height),this)},setWidth:function(t){return this.set({right:this.left+t})},setHeight:function(t){return this.set({bottom:this.top+t})},set:function(t){var e=this._before();return s(t,this,["left","top","bottom","right"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),this[0]=this.left,this[1]=this.top,this._after(e),this},get:function(t){return t?this[t]:s(this,{},["left","right","top","bottom"])},shift:function(t){var e=this._before();return t.top&&(this.top+=t.top,this.bottom+=t.top),t.left&&(this.left+=t.left,this.right+=t.left),this[0]=this.left,this[1]=this.top,this._after(e),this},unshift:function(t){return t.top&&(t.top*=-1),t.left&&(t.left*=-1),this.shift(t)},equals:function(t){return this.equalsPosition(t)&&this.equalsSize(t)},equalsSize:function(t){var e=t instanceof g,n={width:null==t.width&&e?t.getWidth():t.width,height:null==t.height&&e?t.getHeight():t.height};return this.getWidth()==n.width&&this.getHeight()==n.height},equalsPosition:function(t){return this.top==t.top&&this.left==t.left},addLeft:function(t){var e=this._before();return this.left=this[0]=this.left+t,this._after(e),this},addTop:function(t){var e=this._before();return this.top=this[1]=this.top+t,this._after(e),this},addBottom:function(t){var e=this._before();return this.bottom+=t,this._after(e),this},addRight:function(t){var e=this._before();return this.right+=t,this._after(e),this},minTop:function(){return this.expand({top:1})},maxBottom:function(){return this.expand({bottom:1})},minLeft:function(){return this.expand({left:1})},maxRight:function(){return this.expand({right:1})},expand:function(t,e){var n,r=e||g.getDocRegion(),o=[],a=this._before();for(n in t)i(t,n)&&o.push(n);return s(r,this,o),this[0]=this.left,this[1]=this.top,this._after(a),this},clone:function(){return new g({top:this.top,left:this.left,right:this.right,bottom:this.bottom})},containsPoint:function(t,e){return 1==arguments.length&&(e=t.y,t=t.x),this.left<=t&&t<=this.right&&this.top<=e&&e<=this.bottom},containsRegion:function(t){return this.containsPoint(t.left,t.top)&&this.containsPoint(t.right,t.bottom)},diffHeight:function(t){return this.diff(t,{top:!0,bottom:!0})},diffWidth:function(t){return this.diff(t,{left:!0,right:!0})},diff:function(t,e){var n,r={};for(n in e)i(e,n)&&(r[n]=this[n]-t[n]);return r},getPosition:function(){return{left:this.left,top:this.top}},getPoint:function(t,e){l[t]||console.warn("The position ",t," could not be found! Available options are tl, bl, tr, br, l, r, t, b.");var n="getPoint"+l[t],i=this[n]();return e?{left:i.x,top:i.y}:i},getPointYCenter:function(){return{x:null,y:this.top+this.getHeight()/2}},getPointXCenter:function(){return{x:this.left+this.getWidth()/2,y:null}},getPointTop:function(){return{x:null,y:this.top}},getPointTopCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top}},getPointTopLeft:function(){return{x:this.left,y:this.top}},getPointTopRight:function(){return{x:this.right,y:this.top}},getPointBottom:function(){return{x:null,y:this.bottom}},getPointBottomCenter:function(){return{x:this.left+this.getWidth()/2,y:this.bottom}},getPointBottomLeft:function(){return{x:this.left,y:this.bottom}},getPointBottomRight:function(){return{x:this.right,y:this.bottom}},getPointLeft:function(){return{x:this.left,y:null}},getPointLeftCenter:function(){return{x:this.left,y:this.top+this.getHeight()/2}},getPointRight:function(){return{x:this.right,y:null}},getPointRightCenter:function(){return{x:this.right,y:this.top+this.getHeight()/2}},getPointCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top+this.getHeight()/2}},getHeight:function(){return this.bottom-this.top},getWidth:function(){return this.right-this.left},getTop:function(){return this.top},getLeft:function(){return this.left},getBottom:function(){return this.bottom},getRight:function(){return this.right},getArea:function(){return this.getWidth()*this.getHeight()},constrainTo:function(t){var e,n=this.getIntersection(t);if(!n||!n.equals(this)){var i=t.getWidth(),r=t.getHeight();return this.getWidth()>i&&(this.left=t.left,this.setWidth(i)),this.getHeight()>r&&(this.top=t.top,this.setHeight(r)),e={},this.right>t.right&&(e.left=t.right-this.right),this.bottom>t.bottom&&(e.top=t.bottom-this.bottom),this.left<t.left&&(e.left=t.left-this.left),this.top<t.top&&(e.top=t.top-this.top),this.shift(e),!0}return!1},__IS_REGION:!0},g.prototype),Object.defineProperties(g.prototype,{width:{get:function(){return this.getWidth()},set:function(t){return this.setWidth(t)}},height:{get:function(){return this.getHeight()},set:function(t){return this.setHeight(t)}}}),n(54)(g),t.exports=g},function(t){"use strict";t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}},function(t,e,n){"use strict";var i=n(14),r=n(15);t.exports=function(t){var e=Math.max,n=Math.min,o={init:function(){var e,n,r={getIntersection:!0,getIntersectionArea:!0,getIntersectionHeight:!0,getIntersectionWidth:!0,getUnion:!0},o=t.prototype,s=i(r);for(n in r)s(n)&&(e=r[n],"string"!=typeof e&&(e=n),function(e,n,i){e[n]=function(e){return t[i]||console.warn("cannot find method ",i," on ",t),t[i](this,e)}}(o,e,n))},validate:r,getDocRegion:function(){return t.fromDOM(document.documentElement)},from:function(e){return e.__IS_REGION?e:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?t.fromDOM(e):e.type&&"undefined"!=typeof e.pageX&&"undefined"!=typeof e.pageY?t.fromEvent(e):t(e)},fromEvent:function(e){return t.fromPoint({x:e.pageX,y:e.pageY})},fromDOM:function(e){var n=e.getBoundingClientRect();return new t({top:n.top,left:n.left,bottom:n.bottom,right:n.right})},getIntersection:function(e,n){var i=this.getIntersectionArea(e,n);return i?new t(i):!1},getIntersectionWidth:function(t,i){var r=n(t.right,i.right),o=e(t.left,i.left);return r>o?r-o:0},getIntersectionHeight:function(t,i){var r=e(t.top,i.top),o=n(t.bottom,i.bottom);return o>r?o-r:0},getIntersectionArea:function(t,i){var r=e(t.top,i.top),o=n(t.right,i.right),s=n(t.bottom,i.bottom),a=e(t.left,i.left);return s>r&&o>a?{top:r,right:o,bottom:s,left:a,width:o-a,height:s-r}:!1},getUnion:function(i,r){var o=n(i.top,r.top),s=e(i.right,r.right),a=e(i.bottom,r.bottom),h=n(i.left,r.left);return new t(o,s,a,h)},getRegion:function(e){return t.from(e)},fromPoint:function(e){return new t({top:e.y,bottom:e.y,left:e.x,right:e.x})}};Object.keys(o).forEach(function(e){t[e]=o[e]}),t.init()}},function(t,e,n){var i;!function(){function r(t){var e={r:0,g:0,b:0},n=1,i=!1,r=!1;return"string"==typeof t&&(t=E(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=o(t.r,t.g,t.b),i=!0,r="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=L(t.s),t.v=L(t.v),e=u(t.h,t.s,t.v),i=!0,r="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=L(t.s),t.l=L(t.l),e=a(t.h,t.s,t.l),i=!0,r="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=S(n),{ok:i,format:t.format||r,r:z(255,V(e.r,0)),g:z(255,V(e.g,0)),b:z(255,V(e.b,0)),a:n}}function o(t,e,n){return{r:255*H(t,255),g:255*H(e,255),b:255*H(n,255)}}function s(t,e,n){t=H(t,255),e=H(e,255),n=H(n,255);var i,r,o=V(t,e,n),s=z(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var h=o-s;switch(r=a>.5?h/(2-o-s):h/(o+s),o){case t:i=(e-n)/h+(n>e?6:0);break;case e:i=(n-t)/h+2;break;case n:i=(t-e)/h+4}i/=6}return{h:i,s:r,l:a}}function a(t,e,n){function i(t,e,n){return 0>n&&(n+=1),n>1&&(n-=1),1/6>n?t+6*(e-t)*n:.5>n?e:2/3>n?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=H(t,360),e=H(e,100),n=H(n,100),0===e)r=o=s=n;else{var a=.5>n?n*(1+e):n+e-n*e,h=2*n-a;r=i(h,a,t+1/3),o=i(h,a,t),s=i(h,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function h(t,e,n){t=H(t,255),e=H(e,255),n=H(n,255);var i,r,o=V(t,e,n),s=z(t,e,n),a=o,h=o-s;if(r=0===o?0:h/o,o==s)i=0;else{switch(o){case t:i=(e-n)/h+(n>e?6:0);break;case e:i=(n-t)/h+2;break;case n:i=(t-e)/h+4}i/=6}return{h:i,s:r,v:a}}function u(t,e,n){t=6*H(t,360),e=H(e,100),n=H(n,100);var i=N.floor(t),r=t-i,o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),h=i%6,u=[n,s,o,o,a,n][h],f=[a,n,n,s,o,o][h],c=[o,o,a,n,n,s][h];return{r:255*u,g:255*f,b:255*c}}function f(t,e,n,i){var r=[O(q(t).toString(16)),O(q(e).toString(16)),O(q(n).toString(16))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function c(t,e,n,i){var r=[O(T(i)),O(q(t).toString(16)),O(q(e).toString(16)),O(q(n).toString(16))];return r.join("")}function l(t,e){e=0===e?0:e||10;var n=X(t).toHsl();return n.s-=e/100,n.s=R(n.s),X(n)}function g(t,e){e=0===e?0:e||10;var n=X(t).toHsl();return n.s+=e/100,n.s=R(n.s),X(n)}function p(t){return X(t).desaturate(100)}function d(t,e){e=0===e?0:e||10;var n=X(t).toHsl();return n.l+=e/100,n.l=R(n.l),X(n)}function v(t,e){e=0===e?0:e||10;var n=X(t).toRgb();return n.r=V(0,z(255,n.r-q(255*-(e/100)))),n.g=V(0,z(255,n.g-q(255*-(e/100)))),n.b=V(0,z(255,n.b-q(255*-(e/100)))),X(n)}function m(t,e){e=0===e?0:e||10;var n=X(t).toHsl();return n.l-=e/100,n.l=R(n.l),X(n)}function b(t,e){var n=X(t).toHsl(),i=(q(n.h)+e)%360;return n.h=0>i?360+i:i,X(n)}function y(t){var e=X(t).toHsl();return e.h=(e.h+180)%360,X(e)}function _(t){var e=X(t).toHsl(),n=e.h;return[X(t),X({h:(n+120)%360,s:e.s,l:e.l}),X({h:(n+240)%360,s:e.s,l:e.l})]}function x(t){var e=X(t).toHsl(),n=e.h;return[X(t),X({h:(n+90)%360,s:e.s,l:e.l}),X({h:(n+180)%360,s:e.s,l:e.l}),X({h:(n+270)%360,s:e.s,l:e.l})]}function w(t){var e=X(t).toHsl(),n=e.h;return[X(t),X({h:(n+72)%360,s:e.s,l:e.l}),X({h:(n+216)%360,s:e.s,l:e.l})]}function C(t,e,n){e=e||6,n=n||30;var i=X(t).toHsl(),r=360/n,o=[X(t)];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(X(i));return o}function D(t,e){e=e||6;for(var n=X(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(X({h:i,s:r,v:o})),o=(o+a)%1;return s}function P(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function S(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function H(t,e){A(t)&&(t="100%");var n=M(t);return t=z(e,V(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),N.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function R(t){return z(1,V(0,t))}function k(t){return parseInt(t,16)}function A(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function M(t){return"string"==typeof t&&-1!=t.indexOf("%")}function O(t){return 1==t.length?"0"+t:""+t}function L(t){return 1>=t&&(t=100*t+"%"),t}function T(t){return Math.round(255*parseFloat(t)).toString(16)}function j(t){return k(t)/255}function E(t){t=t.replace(I,"").replace(F,"").toLowerCase();var e=!1;if(U[t])t=U[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=K.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=K.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=K.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=K.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=K.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=K.hex8.exec(t))?{a:j(n[1]),r:k(n[2]),g:k(n[3]),b:k(n[4]),format:e?"name":"hex8"}:(n=K.hex6.exec(t))?{r:k(n[1]),g:k(n[2]),b:k(n[3]),format:e?"name":"hex"}:(n=K.hex3.exec(t))?{r:k(n[1]+""+n[1]),g:k(n[2]+""+n[2]),b:k(n[3]+""+n[3]),format:e?"name":"hex"}:!1}var I=/^[\s,#]+/,F=/\s+$/,W=0,N=Math,q=N.round,z=N.min,V=N.max,B=N.random,X=function $(t,e){if(t=t?t:"",e=e||{},t instanceof $)return t;if(!(this instanceof $))return new $(t,e);var n=r(t);this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=q(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=q(this._r)),this._g<1&&(this._g=q(this._g)),this._b<1&&(this._b=q(this._b)),this._ok=n.ok,this._tc_id=W++};X.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},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},setAlpha:function(t){return this._a=S(t),this._roundA=q(100*this._a)/100,this},toHsv:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=h(this._r,this._g,this._b),e=q(360*t.h),n=q(100*t.s),i=q(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=s(this._r,this._g,this._b),e=q(360*t.h),n=q(100*t.s),i=q(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"
},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return c(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:q(this._r),g:q(this._g),b:q(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+q(this._r)+", "+q(this._g)+", "+q(this._b)+")":"rgba("+q(this._r)+", "+q(this._g)+", "+q(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:q(100*H(this._r,255))+"%",g:q(100*H(this._g,255))+"%",b:q(100*H(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+q(100*H(this._r,255))+"%, "+q(100*H(this._g,255))+"%, "+q(100*H(this._b,255))+"%)":"rgba("+q(100*H(this._r,255))+"%, "+q(100*H(this._g,255))+"%, "+q(100*H(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:Y[f(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+c(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var r=X(t);n=r.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0,r=!e&&i&&("hex"===t||"hex6"===t||"hex3"===t||"name"===t);return r?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(d,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(m,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(p,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},X.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:L(t[i]));t=n}return X(t,e)},X.equals=function(t,e){return t&&e?X(t).toRgbString()==X(e).toRgbString():!1},X.random=function(){return X.fromRatio({r:B(),g:B(),b:B()})},X.mix=function(t,e,n){n=0===n?0:n||50;var i,r=X(t).toRgb(),o=X(e).toRgb(),s=n/100,a=2*s-1,h=o.a-r.a;i=a*h==-1?a:(a+h)/(1+a*h),i=(i+1)/2;var u=1-i,f={r:o.r*i+r.r*u,g:o.g*i+r.g*u,b:o.b*i+r.b*u,a:o.a*s+r.a*(1-s)};return X(f)},X.readability=function(t,e){var n=X(t),i=X(e),r=n.toRgb(),o=i.toRgb(),s=n.getBrightness(),a=i.getBrightness(),h=Math.max(r.r,o.r)-Math.min(r.r,o.r)+Math.max(r.g,o.g)-Math.min(r.g,o.g)+Math.max(r.b,o.b)-Math.min(r.b,o.b);return{brightness:Math.abs(s-a),color:h}},X.isReadable=function(t,e){var n=X.readability(t,e);return n.brightness>125&&n.color>500},X.mostReadable=function(t,e){for(var n=null,i=0,r=!1,o=0;o<e.length;o++){var s=X.readability(t,e[o]),a=s.brightness>125&&s.color>500,h=3*(s.brightness/125)+s.color/500;(a&&!r||a&&r&&h>i||!a&&!r&&h>i)&&(r=a,i=h,n=X(e[o]))}return n};var U=X.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",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"},Y=X.hexNames=P(U),K=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+i),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})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof t&&t.exports?t.exports=X:(i=function(){return X}.call(e,n,e,t),!(void 0!==i&&(t.exports=i)))}()},function(t){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},e.prototype.emit=function(t){var e,i,s,a,h,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(i=this._events[t],o(i))return!1;if(n(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:for(s=arguments.length,a=new Array(s-1),h=1;s>h;h++)a[h-1]=arguments[h];i.apply(this,a)}else if(r(i)){for(s=arguments.length,a=new Array(s-1),h=1;s>h;h++)a[h-1]=arguments[h];for(u=i.slice(),s=u.length,h=0;s>h;h++)u[h].apply(this,a)}return!0},e.prototype.addListener=function(t,i){var s;if(!n(i))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(i.listener)?i.listener:i),this._events[t]?r(this._events[t])?this._events[t].push(i):this._events[t]=[this._events[t],i]:this._events[t]=i,r(this._events[t])&&!this._events[t].warned){var s;s=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var r=!1;return i.listener=e,this.on(t,i),this},e.prototype.removeListener=function(t,e){var i,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=this._events[t],s=i.length,o=-1,i===e||n(i.listener)&&i.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(i)){for(a=s;a-->0;)if(i[a]===e||i[a].listener&&i[a].listener===e){o=a;break}if(0>o)return this;1===i.length?(i.length=0,delete this._events[t]):i.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},e.prototype.removeAllListeners=function(t){var e,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[t],n(i))this.removeListener(t,i);else for(;i.length;)this.removeListener(t,i[i.length-1]);return delete this._events[t],this},e.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},e.listenerCount=function(t,e){var i;return i=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}},function(t,e,n){"use strict";var i=n(8),r=n(1),o=n(2).copy,s=n(16),a=n(17);t.exports=i.createClass(o(s,{displayName:"HueSpectrum",getDefaultProps:function(){return{height:300,width:30,pointerSize:3,defaultColor:n(6)}},getInitialState:function(){return{h:0}},componentDidUpdate:function(){},componentDidMount:function(){this.updateDragPositionIf()},updateDragPositionIf:function(){this.props.height||this.setState({})},render:function(){this.hsv=this.toColorValue(this.state.value||this.props.value||this.props.defaultValue||this.props.defaultColor),360!=this.state.h||this.hsv.h||(this.hsv.h=360);var t=this.props.style||{};this.props.height&&(t.height=this.props.height),this.props.width&&(t.width=this.props.width);var e={height:this.props.pointerSize},n=this.getDragPosition();return null!=n&&(e.top=n,e.display="block"),i.DOM.div({className:"cp-hue-spectrum",style:t,onMouseDown:this.onMouseDown},i.DOM.div({className:"cp-hue-drag",style:e},i.DOM.div({className:"inner"})))},getDragPosition:function(t){if(t=t||this.hsv,!this.props.height&&!this.isMounted())return null;var e=this.props.height||r.fromDOM(this.getDOMNode()).getHeight(),n=this.props.pointerSize,i=Math.round(t.h*e/360),o=Math.round(n/2);return i-o},updateColor:function(t){t=a(t),this.hsv.h=360*t.y/t.height,0!=this.hsv.h&&(this.state.h=this.hsv.h),this.state.h=0!=this.hsv.h?this.hsv.h:0},toStringValue:n(7)}))},function(t,e,n){"use strict";var i=n(8),r=n(1),o=n(2).copy,s=n(4).fromRatio,a=n(16),h=n(17);t.exports=i.createClass(o(a,{displayName:"SaturationSpectrum",getDefaultProps:function(){return{height:300,width:300,pointerSize:7,defaultColor:n(6)}},getInitialState:function(){return{pointerTop:null,pointerLeft:null}},componentDidUpdate:function(){},componentDidMount:function(){this.updateDragPositionIf()},updateDragPositionIf:function(){this.props.height&&this.props.width||this.setState({})},getDragPosition:function(t){t=t||this.hsv;var e=this.props.width,n=this.props.height,i=e&&n;if(!i&&!this.isMounted())return null;var o;i||(o=r.fromDOM(this.getDOMNode()),n=n||o.getHeight(),e=e||o.getWidth());var s=t.s*e,a=n-t.v*n,h=this.props.pointerSize,u=Math.floor(h/2);return this.props.value&&this.state.mouseDown&&(s=this.state.mouseDown.x),{left:s-u,top:a-u}},prepareBackgroundColor:function(t){var e=t;return s({h:e.h,s:1,v:1}).toRgbString()},render:function(){var t=this.state.value||this.props.value||this.props.defaultValue||this.props.defaultColor;this.hsv=this.toColorValue(t);var e=this.props.style||{};this.props.height&&(e.height=this.props.height),this.props.width&&(e.width=this.props.width),e.backgroundColor=this.prepareBackgroundColor(this.hsv);var n={width:this.props.pointerSize,height:this.props.pointerSize},r=this.getDragPosition();return r&&(n.top=r.top,n.left=r.left,n.display="block"),i.DOM.div({className:"cp-saturation-spectrum",style:e,onMouseDown:this.onMouseDown},i.DOM.div({className:"cp-saturation-white"},i.DOM.div({className:"cp-saturation-black"})),i.DOM.div({className:"cp-saturation-drag",style:n},i.DOM.div({className:"inner"})))},getSaturationForPoint:function(t){return t.x/t.width},getColorValueForPoint:function(t){return(t.height-t.y)/t.height},updateColor:function(t){t=h(t),this.hsv.s=this.getSaturationForPoint(t),this.hsv.v=this.getColorValueForPoint(t)},toStringValue:n(7)}))},function(t,e,n,i){t.exports=n(i)}]))});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ColorPicker=e(require("React")):t.ColorPicker=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}(function(t){for(var e in t)switch(typeof t[e]){case"number":t[e]=t[t[e]];break;case"object":t[e]=function(e){var i=e.slice(1),n=t[e[0]];return function(t,e,r){n.apply(null,[t,e,r].concat(i))}}(t[e])}return t}([function(t,e,i){"use strict";function n(){}var r=i(8),o=i(1),s=i(3),h=r.createFactory(i(53)),a=r.createFactory(i(54)),u=s.toHsv,f=r.createClass({displayName:"ColorPicker",getDefaultProps:function(){return{defaultColor:i(6),saturationWidth:300,saturationHeight:300,hueHeight:null,hueWidth:30,hueMargin:10}},getInitialState:function(){return{value:this.props.defaultValue}},prepareClasses:function(t){t.push("cp")},prepareProps:function(t){var e=[t.className||""];return this.prepareClasses(e),t.className=e.join(" "),t},render:function(){var t=this.prepareProps(o({},this.props)),e=this.props.hueStyle||{};e.marginLeft=this.props.hueMargin;var i=t.value?this.toColorValue(this.props.value):null,n=i?null:this.toColorValue(this.state.value||t.defaultValue||t.defaultColor),s={onDrag:this.handleSaturationDrag,onChange:this.handleSaturationChange,onMouseDown:this.handleSaturationMouseDown,height:t.saturationHeight,width:t.saturationWidth,inPicker:!0},u={onDrag:this.handleHueDrag,onChange:this.handleHueChange,height:t.hueHeight||t.saturationHeight,width:t.hueWidth,inPicker:!0,style:e};return this.state.dragHue&&((i||n).h=this.state.dragHue),i?(s.value=o({},i),u.value=o({},i)):(s.defaultValue=o({},n),u.defaultValue=o({},n)),r.DOM.div(t,a(s),h(u))},toColorValue:function(t){return"string"==typeof t?u(t):t},toStringValue:i(7),handleChange:function(t){this.state.dragHue=null,t=o({},t);var e=this.toStringValue(t);(this.props.onChange||n)(e,t)},handleSaturationChange:function(t){this.handleChange(t)},handleHueChange:function(t){this.handleChange(t)},handleHueDrag:function(t){this.handleDrag(t)},handleSaturationDrag:function(t){this.handleDrag(t)},handleDrag:function(t){this.props.value||this.setState({value:t}),(this.props.onDrag||n)(this.toStringValue(t),t)},handleSaturationMouseDown:function(t){this.setState({dragHue:t.h})}});f.HueSpectrum=h,f.SaturationSpectrum=a,t.exports=f},function(t){"use strict";function e(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t){for(var i,n,r=e(t),o=1;o<arguments.length;o++){i=arguments[o],n=Object.keys(Object(i));for(var s=0;s<n.length;s++)r[n[s]]=i[n[s]]}return r}},[55,31],function(t,e,i){"use strict";function n(t){return a(t)}function r(t){var e=n(t).toHsl().h;return n({h:e,s:100,l:50,a:1})}function o(t){return a.fromRatio(t)}function s(t,e){return e>1&&(e/=100),t=n(t).toRgb(),t.a=e,n(t)}function h(t){return n(t).toHsv()}var a=i(52);"undefined"!=typeof window&&(window.tinycolor=a);var u={toColor:n,toPure:r,fromRatio:o,toAlpha:s,toHsv:h};"undefined"!=typeof window&&(window.color=u),t.exports=u},[55,49],function(t){"use strict";t.exports=function(t){return"number"==typeof t&&isFinite(t)}},function(t){t.exports="red"},function(t,e,i){"use strict";var n=i(1),r=i(3).toColor;t.exports=function(t){return t=r(n({},t)),1==t.toRgb().a?t.toHexString():t.toRgbString()}},function(e){e.exports=t},function(t){"use strict";var e="undefined";t.exports=function(t,i,n){arguments.length<3&&(n=i,i=null),i=i||{},n=n||Object.keys(t);for(var r,o=0,s=n.length;s>o;o++)r=n[o],typeof t[r]!==e&&(i[n[o]]=t[n[o]]);return i}},function(t){"use strict";var e="undefined";t.exports=function(t,i,n){arguments.length<3&&(n=i,i=null),i=i||{},n=n||Object.keys(t);for(var r,o=0,s=n.length;s>o;o++)r=n[o],typeof t[r]!==e&&typeof i[r]===e&&(i[r]=t[r]);return i}},function(t){"use strict";function e(t,e){function i(n){function r(){var r=arguments.length,o=[].concat(n);return r&&o.push.apply(o,arguments),o.length<e?i(o):t.apply(this,o)}return r}return"number"!=typeof e&&(e=t.length),i([])}var i=Object.prototype.hasOwnProperty;t.exports=e(function(t,e){return i.call(t,e)})},function(t){"use strict";t.exports=function(t){var e=!0;return t.right<t.left&&(e=!1,t.right=t.left),t.bottom<t.top&&(e=!1,t.bottom=t.top),e}},function(t,e,i){var n=i(35);t.exports=function(t,e){return n(e.length)(t,e)}},11,12,function(t){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function n(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(t){if(!n(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},e.prototype.emit=function(t){var e,n,s,h,a,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],o(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(s=arguments.length,h=new Array(s-1),a=1;s>a;a++)h[a-1]=arguments[a];n.apply(this,h)}else if(r(n)){for(s=arguments.length,h=new Array(s-1),a=1;s>a;a++)h[a-1]=arguments[a];for(u=n.slice(),s=u.length,a=0;s>a;a++)u[a].apply(this,h)}return!0},e.prototype.addListener=function(t,n){var s;if(!i(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(n.listener)?n.listener:n),this._events[t]?r(this._events[t])?this._events[t].push(n):this._events[t]=[this._events[t],n]:this._events[t]=n,r(this._events[t])&&!this._events[t].warned){var s;s=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},e.prototype.removeListener=function(t,e){var n,o,s,h;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,o=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(h=s;h-->0;)if(n[h]===e||n[h].listener&&n[h].listener===e){o=h;break}if(0>o)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},e.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},e.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},e.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},function(t,e,i){"use strict";function n(){}var r=i(4),o=i(1),s=i(24),h=i(3).toHsv;t.exports={toColorValue:function(t){return"string"==typeof t?h(t):{h:t.h,s:t.s,v:t.v,a:t.a}},onMouseDown:function(t){t.preventDefault();var e=r.fromDOM(this.getDOMNode()),i=this.getEventInfo(t,e);s(t,{scope:this,constrainTo:e,onDragStart:function(t,e){e.initialPoint=i,this.handleDragStart(t)},onDrag:function(t,i){var n=this.getEventInfo(t,e);this.updateColor(n),this.handleDrag(t,i)},onDrop:function(t,i){var n=this.getEventInfo(t,e);this.updateColor(n),this.handleDrop(t,i)}}),this.updateColor(i),this.handleMouseDown(t,{initialPoint:i})},handleMouseDown:function(t,e){(this.props.onMouseDown||n).apply(this,this.getColors()),this.handleDrag(t,e)},handleUpdate:function(t,e){var i=e.diff||{top:0,left:0},n=e.initialPoint;if(n){var r,o;this.state.top=r=n.y+i.top,this.state.left=o=n.x+i.left,this.state.mouseDown={x:o,y:r,width:n.width,height:n.height}}this.props.inPicker||this.props.value||this.setState({value:this.hsv})},handleDragStart:function(){},handleDrag:function(t,e){this.handleUpdate(t,e),(this.props.onDrag||n).apply(this,this.getColors())},handleDrop:function(t,e){this.handleUpdate(t,e),this.state.mouseDown=!1,(this.props.onChange||n).apply(this,this.getColors())},getColors:function(){var t=this.props.inPicker?this.hsv:this.toStringValue(this.hsv),e=[t];return this.props.inPicker||e.push(o({},this.hsv)),e},getEventInfo:function(t,e){e=e||r.fromDOM(this.getDOMNode());var i=t.clientX-e.left,n=t.clientY-e.top;return{x:i,y:n,width:e.getWidth(),height:e.getHeight()}}}},function(t){"use strict";t.exports=function(t){var e=t.height,i=t.width;return t.x<0&&(t.x=0),t.x>=i&&(t.x=i),t.y<0&&(t.y=0),t.y>=e&&(t.y=e),t}},function(t){"use strict";var e=Object.prototype.hasOwnProperty,i="object";t.exports=function(t,n){if(n=n||{},null!=t&&typeof t===i)for(var r in t)e.call(t,r)&&(n[r]=t[r]);return n}},function(t){"use strict";var e=Object.prototype.hasOwnProperty,i="object",n="undefined";t.exports=function(t,r){if(r=r||{},null!=t&&typeof t===i)for(var o in t)e.call(t,o)&&typeof r[o]===n&&(r[o]=t[o]);return r}},function(t,e,i){"use strict";var n="undefined",r="object",o=Object.prototype.hasOwnProperty,s=i(9);t.exports=function(t,e,i){if(arguments.length<3&&(i=e,e=null),e=e||{},!i||Array.isArray(i))return s(t,e,i);if(null!=t&&typeof t===r&&null!=i&&typeof i===r){var h,a;for(var u in i)o.call(i,u)&&(a=i[u],h=typeof a,typeof t[u]!==n&&(e["string"==h?a:u]=t[u]))}return e}},function(t,e,i){"use strict";var n="undefined",r="object",o=Object.prototype.hasOwnProperty,s=i(10);t.exports=function(t,e,i){if(arguments.length<3&&(i=e,e=null),e=e||{},!i||Array.isArray(i))return s(t,e,i);if(null!=t&&typeof t===r&&null!=i&&typeof i===r){var h,a,u;for(var f in i)o.call(i,f)&&(a=i[f],h=typeof a,u="string"==h?a:f,typeof t[f]!==n&&typeof e[u]===n&&(e[u]=t[f]))}return e}},function(t,e,i){t.exports=function(){"use strict";var t=Object.prototype.hasOwnProperty,e="object",n="undefined";return{copy:i(19),copyIf:i(20),copyAs:function(i,n){var r={};if(n=n||1,null!=i&&typeof i===e)for(var o in i)t.call(i,o)&&(r[o]=n);return r},copyList:i(9),copyListIf:i(10),copyKeys:i(21),copyKeysIf:i(22),copyExceptKeys:function(i,n,r){if(n=n||{},r=r||{},null!=i&&typeof i===e)for(var o in i)t.call(i,o)&&!t.call(r,o)&&(n[o]=i[o]);return n},bindCopyKeys:function(i,r,o){if(2==arguments.length&&(o=r,r=null),r=r||{},null!=i&&typeof i===e&&null!=o&&typeof o===e){var s,h,a,u;for(var f in o)t.call(o,f)&&(h=o[f],s=typeof h,u=i[f],a=typeof u,a!==n&&(r["string"==s?h:f]="function"==a?u.bind(i):u))}return r}}}()},function(t,e,i){"use strict";function n(t){var e,i=t.pageX,n=t.pageY;return s&&t.touches&&(e=t.touches[0])&&(i=e.pageX,n=e.pageY),{pageX:i,pageY:n}}var r=i(1),o=i(30),s=i(25),h=i(34),a=function(t){this.config=t},u={move:s?"touchmove":"mousemove",up:s?"touchend":"mouseup"};r(a.prototype,{initDrag:function(t){this.onDragInit(t);var e=h(this.onDragStart,this),i=s?t.target:window,n=function(t){e(t),this.onDrag(t)}.bind(this),r=function(t){this.onDrop(t),i.removeEventListener(u.move,n),i.removeEventListener(u.up,r)}.bind(this);i.addEventListener(u.move,n,!1),i.addEventListener(u.up,r)},onDragInit:function(t){var e={diff:{left:0,top:0}};this.state={config:e},this.config.region&&(this.state.initialRegion=o.from(this.config.region),this.state.dragRegion=e.dragRegion=this.state.initialRegion.clone()),this.config.constrainTo&&(this.state.constrainTo=o.from(this.config.constrainTo)),this.callConfig("onDragInit",t)},onDragStart:function(t){this.state.initPageCoords=n(t),this.state.didDrag=this.state.config.didDrag=!0,this.callConfig("onDragStart",t)},onDrag:function(t){var e=this.state.config,i=this.state.initPageCoords,r=n(t),o=e.diff={left:r.pageX-i.pageX,top:r.pageY-i.pageY};if(this.state.initialRegion){var s=e.dragRegion;s.set(this.state.initialRegion),s.shift(o),this.state.constrainTo&&(s.constrainTo(this.state.constrainTo),o.left=s.left-this.state.initialRegion.left,o.top=s.top-this.state.initialRegion.top),e.dragRegion=s}this.callConfig("onDrag",t)},onDrop:function(t){this.callConfig("onDrop",t),this.state=null},callConfig:function(t,e){var i=this.state.config,n=[e,i],r=this.config[t];r&&r.apply(this,n)}}),t.exports=function(t,e){if(e.scope){var i={scope:1,region:1,constrainTo:1};Object.keys(e).forEach(function(t){var n=e[t];t in i||"function"==typeof n&&(e[t]=n.bind(e.scope))})}var n=new a(e);return n.initDrag(t),n}},function(t,e){(function(e){t.exports="ontouchstart"in e||e.DocumentTouch&&document instanceof DocumentTouch}).call(e,function(){return this}())},function(t,e,i){"use strict";var n=i(2);n.prototype.alignToRegion=function(t,e){return n.align(this,t,e),this},n.prototype.alignToPoint=function(t,e){return n.alignToPoint(this,t,e),this}},function(t,e,i){"use strict";var n=i(2);n.align=function(t,e,i){return e=n.from(e),i=(i||"c-c").split("-"),2!=i.length&&console.warn("Incorrect region alignment! The align parameter need to be in the form 'br-c', that is, a - separated string!",i),n.alignToPoint(t,e.getPoint(i[1]),i[0])},n.alignToPoint=function(t,e,i){t=n.from(t);var r=t.getPoint(i),o=0,s={};return null!=r.x&&null!=e.x&&(o++,s.left=e.x-r.x),null!=r.y&&null!=e.y&&(o++,s.top=e.y-r.y),o&&t.shift(s),t}},function(t,e,i){"use strict";function n(t,e,i,n){e=r.from(e),n=n||{};var o=n.constrain,s=n.sync,h=n.offset||[],a=!1,u=!1,f=t.clone();Array.isArray(i)||(i=i?[i]:[]),Array.isArray(h)||(h=h?[h]:[]),o&&(o=o===!0?r.getDocRegion():o.getRegion()),s&&(s.size?(a=!0,u=!0):(a=s===!0?!0:s.width||!1,u=s===!0?!0:s.height||!1)),a&&f.setWidth(e.getWidth()),u&&f.setHeight(e.getHeight());for(var c,g,l,p,d=0,m=i.length,v=-1,b=-1;m>d;d++){if(g=i[d],c=h[d],f.alignToRegion(e,g),c&&(Array.isArray(c)||(c=h[d]=[c.x||c.left,c.y||c.top]),f.shift({left:c[0],top:c[1]})),!o)return t.set(f),g;if(l=f.getIntersection(o),l&&l.equals(f))return t.set(f),g;l&&(p=l.getArea())>v&&(v=p,b=d)}return~b?(g=i[b],c=h[b],f.alignToRegion(e,g),c&&f.shift({left:c[0],top:c[1]}),l=f.getIntersection(o),f.setRegion(l),f.alignToRegion(e,g),c&&f.shift({left:c[0],top:c[1]}),t.set(f),g):void 0}var r=i(2);t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){t=o.from(t);var s=t.clone(),h=r(s,e,i,n);return{position:h,region:s,widthChanged:s.getWidth()!=t.getWidth(),heightChanged:s.getHeight()!=t.getHeight(),positionChanged:s.equalsPosition(t)}}var r=i(28),o=i(2);t.exports=n},function(t,e,i){"use strict";var n=i(2);i(27),i(26);var r=i(29);n.alignRegions=function(t,e,i,n){var o=r(t,e,i,n),s=o.region;return s.equals(t)||t.setRegion(s),o.position},n.prototype.alignTo=function(t,e,i){i=i||{};var o=this,s=n.from(t),h=r(o,s,e,i),a=h.region;return a.equalsSize(o)||this.setSize(a.getSize()),a.equalsPosition(o)||this.setPosition(a.getPosition(),{absolute:!!i.absolute}),h.position},t.exports=n},function(t,e,i){"use strict";function n(t,e,i){return t&&i.forEach(function(i){r(t,i)&&(e[i]=t[i])}),e}var r=i(11),o=i(13),s=i(1),h=i(16).EventEmitter,a=i(32),u=i(12),f=Object.prototype.toString,c=function(t){return"[object Object]"===f.apply(t)},g={cy:"YCenter",cx:"XCenter",t:"Top",tc:"TopCenter",tl:"TopLeft",tr:"TopRight",b:"Bottom",bc:"BottomCenter",bl:"BottomLeft",br:"BottomRight",l:"Left",lc:"LeftCenter",r:"Right",rc:"RightCenter",c:"Center"},l=function(t,e,i,r){return this instanceof l?(h.call(this),c(t)?(n(t,this,["top","right","bottom","left"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),t.emitChangeEvents&&(this.emitChangeEvents=t.emitChangeEvents)):(this.top=t,this.right=e,this.bottom=i,this.left=r),this[0]=this.left,this[1]=this.top,void u(this)):o(l,arguments)};a(l,h),s(l.prototype,{emitChangeEvents:!1,getRegion:function(t){return t?this.clone():this},setRegion:function(t){return this.set(t instanceof l?t.get():t),this},validate:function(){return l.validate(this)},_before:function(){return this.emitChangeEvents?n(this,{},["left","top","bottom","right"]):void 0},_after:function(t){this.emitChangeEvents&&((this.top!=t.top||this.left!=t.left)&&this.emitPositionChange(),(this.right!=t.right||this.bottom!=t.bottom)&&this.emitSizeChange())},notifyPositionChange:function(){this.emit("changeposition",this)},emitPositionChange:function(){this.notifyPositionChange()},notifySizeChange:function(){this.emit("changesize",this)},emitSizeChange:function(){this.notifySizeChange()},add:function(t){var e,i=this._before();for(e in t)r(t,e)&&(this[e]+=t[e]);return this[0]=this.left,this[1]=this.top,this._after(i),this},substract:function(t){var e,i=this._before();for(e in t)r(t,e)&&(this[e]-=t[e]);return this[0]=this.left,this[1]=this.top,this._after(i),this},getSize:function(){return{width:this.width,height:this.height}},setPosition:function(t){var e=this.width,i=this.height;return void 0!=t.left&&(t.right=t.left+e),void 0!=t.top&&(t.bottom=t.top+i),this.set(t)},setSize:function(t){return void 0!=t.height&&void 0!=t.width?this.set({right:this.left+t.width,bottom:this.top+t.height}):(void 0!=t.width&&this.setWidth(t.width),void 0!=t.height&&this.setHeight(t.height),this)},setWidth:function(t){return this.set({right:this.left+t})},setHeight:function(t){return this.set({bottom:this.top+t})},set:function(t){var e=this._before();return n(t,this,["left","top","bottom","right"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),this[0]=this.left,this[1]=this.top,this._after(e),this},get:function(t){return t?this[t]:n(this,{},["left","right","top","bottom"])},shift:function(t){var e=this._before();return t.top&&(this.top+=t.top,this.bottom+=t.top),t.left&&(this.left+=t.left,this.right+=t.left),this[0]=this.left,this[1]=this.top,this._after(e),this},unshift:function(t){return t.top&&(t.top*=-1),t.left&&(t.left*=-1),this.shift(t)},equals:function(t){return this.equalsPosition(t)&&this.equalsSize(t)},equalsSize:function(t){var e=t instanceof l,i={width:null==t.width&&e?t.getWidth():t.width,height:null==t.height&&e?t.getHeight():t.height};return this.getWidth()==i.width&&this.getHeight()==i.height},equalsPosition:function(t){return this.top==t.top&&this.left==t.left},addLeft:function(t){var e=this._before();return this.left=this[0]=this.left+t,this._after(e),this},addTop:function(t){var e=this._before();return this.top=this[1]=this.top+t,this._after(e),this},addBottom:function(t){var e=this._before();return this.bottom+=t,this._after(e),this},addRight:function(t){var e=this._before();return this.right+=t,this._after(e),this},minTop:function(){return this.expand({top:1})},maxBottom:function(){return this.expand({bottom:1})},minLeft:function(){return this.expand({left:1})},maxRight:function(){return this.expand({right:1})},expand:function(t,e){var i,o=e||l.getDocRegion(),s=[],h=this._before();for(i in t)r(t,i)&&s.push(i);return n(o,this,s),this[0]=this.left,this[1]=this.top,this._after(h),this},clone:function(){return new l({top:this.top,left:this.left,right:this.right,bottom:this.bottom})},containsPoint:function(t,e){return 1==arguments.length&&(e=t.y,t=t.x),this.left<=t&&t<=this.right&&this.top<=e&&e<=this.bottom},containsRegion:function(t){return this.containsPoint(t.left,t.top)&&this.containsPoint(t.right,t.bottom)},diffHeight:function(t){return this.diff(t,{top:!0,bottom:!0})},diffWidth:function(t){return this.diff(t,{left:!0,right:!0})},diff:function(t,e){var i,n={};for(i in e)r(e,i)&&(n[i]=this[i]-t[i]);return n},getPosition:function(){return{left:this.left,top:this.top}},getPoint:function(t,e){g[t]||console.warn("The position ",t," could not be found! Available options are tl, bl, tr, br, l, r, t, b.");var i="getPoint"+g[t],n=this[i]();return e?{left:n.x,top:n.y}:n},getPointYCenter:function(){return{x:null,y:this.top+this.getHeight()/2}},getPointXCenter:function(){return{x:this.left+this.getWidth()/2,y:null}},getPointTop:function(){return{x:null,y:this.top}},getPointTopCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top}},getPointTopLeft:function(){return{x:this.left,y:this.top}},getPointTopRight:function(){return{x:this.right,y:this.top}},getPointBottom:function(){return{x:null,y:this.bottom}},getPointBottomCenter:function(){return{x:this.left+this.getWidth()/2,y:this.bottom}},getPointBottomLeft:function(){return{x:this.left,y:this.bottom}},getPointBottomRight:function(){return{x:this.right,y:this.bottom}},getPointLeft:function(){return{x:this.left,y:null}},getPointLeftCenter:function(){return{x:this.left,y:this.top+this.getHeight()/2}},getPointRight:function(){return{x:this.right,y:null}},getPointRightCenter:function(){return{x:this.right,y:this.top+this.getHeight()/2}},getPointCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top+this.getHeight()/2}},getHeight:function(){return this.bottom-this.top},getWidth:function(){return this.right-this.left},getTop:function(){return this.top},getLeft:function(){return this.left},getBottom:function(){return this.bottom},getRight:function(){return this.right},getArea:function(){return this.getWidth()*this.getHeight()},constrainTo:function(t){var e,i=this.getIntersection(t);if(!i||!i.equals(this)){var n=t.getWidth(),r=t.getHeight();return this.getWidth()>n&&(this.left=t.left,this.setWidth(n)),this.getHeight()>r&&(this.top=t.top,this.setHeight(r)),e={},this.right>t.right&&(e.left=t.right-this.right),this.bottom>t.bottom&&(e.top=t.bottom-this.bottom),this.left<t.left&&(e.left=t.left-this.left),this.top<t.top&&(e.top=t.top-this.top),this.shift(e),!0}return!1},__IS_REGION:!0}),Object.defineProperties(l.prototype,{width:{get:function(){return this.getWidth()},set:function(t){return this.setWidth(t)}},height:{get:function(){return this.getHeight()},set:function(t){return this.setHeight(t)}}}),i(33)(l),t.exports=l},function(t){"use strict";t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}},function(t,e,i){"use strict";var n=i(11),r=i(12);t.exports=function(t){var e=Math.max,i=Math.min,o={init:function(){var e,i,r={getIntersection:!0,getIntersectionArea:!0,getIntersectionHeight:!0,getIntersectionWidth:!0,getUnion:!0},o=t.prototype,s=n(r);for(i in r)s(i)&&(e=r[i],"string"!=typeof e&&(e=i),function(e,i,n){e[i]=function(e){return t[n]||console.warn("cannot find method ",n," on ",t),t[n](this,e)}}(o,e,i))},validate:r,getDocRegion:function(){return t.fromDOM(document.documentElement)},from:function(e){if(e.__IS_REGION)return e;if("undefined"!=typeof document){if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return t.fromDOM(e);if(e.type&&"undefined"!=typeof e.pageX&&"undefined"!=typeof e.pageY)return t.fromEvent(e)}return t(e)},fromEvent:function(e){return t.fromPoint({x:e.pageX,y:e.pageY})},fromDOM:function(e){var i=e.getBoundingClientRect();return new t({top:i.top,left:i.left,bottom:i.bottom,right:i.right})},getIntersection:function(e,i){var n=this.getIntersectionArea(e,i);return n?new t(n):!1},getIntersectionWidth:function(t,n){var r=i(t.right,n.right),o=e(t.left,n.left);return r>o?r-o:0},getIntersectionHeight:function(t,n){var r=e(t.top,n.top),o=i(t.bottom,n.bottom);return o>r?o-r:0},getIntersectionArea:function(t,n){var r=e(t.top,n.top),o=i(t.right,n.right),s=i(t.bottom,n.bottom),h=e(t.left,n.left);return s>r&&o>h?{top:r,right:o,bottom:s,left:h,width:o-h,height:s-r}:!1},getUnion:function(n,r){var o=i(n.top,r.top),s=e(n.right,r.right),h=e(n.bottom,r.bottom),a=i(n.left,r.left);return new t(o,s,h,a)},getRegion:function(e){return t.from(e)},fromPoint:function(e){return new t({top:e.y,bottom:e.y,left:e.x,right:e.x})}};Object.keys(o).forEach(function(e){t[e]=o[e]}),t.init()}},function(t){"use once";t.exports=function(t,e){var i,n;return function(){return i?n:(i=!0,n=t.apply(e||this,arguments))}}},function(t){t.exports=function(){"use strict";var t={};return function(e){if(!t[e]){for(var i=[],n=0;e>n;n++)i.push("a["+n+"]");t[e]=new Function("c","a","return new c("+i.join(",")+")")}return t[e]}}()},[55,43],function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Arguments]"===e.apply(t)||!!t.callee}},function(t){"use strict";t.exports=function(t){return Array.isArray(t)}},function(t){"use strict";t.exports=function(t){return"boolean"==typeof t}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Date]"===e.apply(t)}},function(t,e,i){"use strict";var n=i(5);t.exports=function(t){return n(t)&&t===parseFloat(t,10)&&!(t===parseInt(t,10))}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Function]"===e.apply(t)}},function(t,e,i){"use strict";t.exports={numeric:i(45),number:i(5),"int":i(44),"float":i(41),string:i(48),"function":i(42),object:i(46),arguments:i(37),"boolean":i(39),date:i(40),regexp:i(47),array:i(38)}},function(t,e,i){"use strict";var n=i(5);t.exports=function(t){return n(t)&&t===parseInt(t,10)}},function(t){"use strict";t.exports=function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object Object]"===e.apply(t)}},function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){return"[object RegExp]"===e.apply(t)}},function(t){"use strict";t.exports=function(t){return"string"==typeof t}},function(t,e,i){"use strict";var n=i(14),r=i(13),o=i(23),s=o.copyList,h=o.copy,a=i(36).object,u=i(16).EventEmitter,f=i(50),c=i(15),g={cy:"YCenter",cx:"XCenter",t:"Top",tc:"TopCenter",tl:"TopLeft",tr:"TopRight",b:"Bottom",bc:"BottomCenter",bl:"BottomLeft",br:"BottomRight",l:"Left",lc:"LeftCenter",r:"Right",rc:"RightCenter",c:"Center"},l=function(t,e,i,n){return this instanceof l?(u.call(this),a(t)?(s(t,this,["top","right","bottom","left"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),t.emitChangeEvents&&(this.emitChangeEvents=t.emitChangeEvents)):(this.top=t,this.right=e,this.bottom=i,this.left=n),this[0]=this.left,this[1]=this.top,void c(this)):r(l,arguments)};f(l,u),h({emitChangeEvents:!1,getRegion:function(t){return t?this.clone():this},setRegion:function(t){return this.set(t instanceof l?t.get():t),this},validate:function(){return l.validate(this)},_before:function(){return this.emitChangeEvents?s(this,{},["left","top","bottom","right"]):void 0},_after:function(t){this.emitChangeEvents&&((this.top!=t.top||this.left!=t.left)&&this.emitPositionChange(),(this.right!=t.right||this.bottom!=t.bottom)&&this.emitSizeChange())},notifyPositionChange:function(){this.emit("changeposition",this)},emitPositionChange:function(){this.notifyPositionChange()},notifySizeChange:function(){this.emit("changesize",this)},emitSizeChange:function(){this.notifySizeChange()},add:function(t){var e,i=this._before();for(e in t)n(t,e)&&(this[e]+=t[e]);return this[0]=this.left,this[1]=this.top,this._after(i),this},substract:function(t){var e,i=this._before();for(e in t)n(t,e)&&(this[e]-=t[e]);return this[0]=this.left,this[1]=this.top,this._after(i),this},getSize:function(){return{width:this.getWidth(),height:this.getHeight()}},setPosition:function(t){var e=this.getWidth(),i=this.getHeight();return t.left&&(t.right=t.left+e),t.top&&(t.bottom=t.top+i),this.set(t)},setSize:function(t){return t.height&&t.width?this.set({right:this.left+t.width,bottom:this.top+t.height}):(t.width&&this.setWidth(t.width),t.height&&this.setHeight(t.height),this)},setWidth:function(t){return this.set({right:this.left+t})},setHeight:function(t){return this.set({bottom:this.top+t})},set:function(t){var e=this._before();return s(t,this,["left","top","bottom","right"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),this[0]=this.left,this[1]=this.top,this._after(e),this},get:function(t){return t?this[t]:s(this,{},["left","right","top","bottom"])},shift:function(t){var e=this._before();return t.top&&(this.top+=t.top,this.bottom+=t.top),t.left&&(this.left+=t.left,this.right+=t.left),this[0]=this.left,this[1]=this.top,this._after(e),this},unshift:function(t){return t.top&&(t.top*=-1),t.left&&(t.left*=-1),this.shift(t)},equals:function(t){return this.equalsPosition(t)&&this.equalsSize(t)},equalsSize:function(t){var e=t instanceof l,i={width:null==t.width&&e?t.getWidth():t.width,height:null==t.height&&e?t.getHeight():t.height};return this.getWidth()==i.width&&this.getHeight()==i.height},equalsPosition:function(t){return this.top==t.top&&this.left==t.left},addLeft:function(t){var e=this._before();return this.left=this[0]=this.left+t,this._after(e),this},addTop:function(t){var e=this._before();return this.top=this[1]=this.top+t,this._after(e),this},addBottom:function(t){var e=this._before();return this.bottom+=t,this._after(e),this},addRight:function(t){var e=this._before();return this.right+=t,this._after(e),this},minTop:function(){return this.expand({top:1})},maxBottom:function(){return this.expand({bottom:1})},minLeft:function(){return this.expand({left:1})},maxRight:function(){return this.expand({right:1})},expand:function(t,e){var i,r=e||l.getDocRegion(),o=[],h=this._before();for(i in t)n(t,i)&&o.push(i);return s(r,this,o),this[0]=this.left,this[1]=this.top,this._after(h),this},clone:function(){return new l({top:this.top,left:this.left,right:this.right,bottom:this.bottom})},containsPoint:function(t,e){return 1==arguments.length&&(e=t.y,t=t.x),this.left<=t&&t<=this.right&&this.top<=e&&e<=this.bottom},containsRegion:function(t){return this.containsPoint(t.left,t.top)&&this.containsPoint(t.right,t.bottom)},diffHeight:function(t){return this.diff(t,{top:!0,bottom:!0})},diffWidth:function(t){return this.diff(t,{left:!0,right:!0})},diff:function(t,e){var i,r={};for(i in e)n(e,i)&&(r[i]=this[i]-t[i]);return r},getPosition:function(){return{left:this.left,top:this.top}},getPoint:function(t,e){g[t]||console.warn("The position ",t," could not be found! Available options are tl, bl, tr, br, l, r, t, b.");var i="getPoint"+g[t],n=this[i]();return e?{left:n.x,top:n.y}:n},getPointYCenter:function(){return{x:null,y:this.top+this.getHeight()/2}},getPointXCenter:function(){return{x:this.left+this.getWidth()/2,y:null}},getPointTop:function(){return{x:null,y:this.top}},getPointTopCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top}},getPointTopLeft:function(){return{x:this.left,y:this.top}},getPointTopRight:function(){return{x:this.right,y:this.top}},getPointBottom:function(){return{x:null,y:this.bottom}},getPointBottomCenter:function(){return{x:this.left+this.getWidth()/2,y:this.bottom}},getPointBottomLeft:function(){return{x:this.left,y:this.bottom}},getPointBottomRight:function(){return{x:this.right,y:this.bottom}},getPointLeft:function(){return{x:this.left,y:null}},getPointLeftCenter:function(){return{x:this.left,y:this.top+this.getHeight()/2}},getPointRight:function(){return{x:this.right,y:null}
},getPointRightCenter:function(){return{x:this.right,y:this.top+this.getHeight()/2}},getPointCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top+this.getHeight()/2}},getHeight:function(){return this.bottom-this.top},getWidth:function(){return this.right-this.left},getTop:function(){return this.top},getLeft:function(){return this.left},getBottom:function(){return this.bottom},getRight:function(){return this.right},getArea:function(){return this.getWidth()*this.getHeight()},constrainTo:function(t){var e,i=this.getIntersection(t);if(!i||!i.equals(this)){var n=t.getWidth(),r=t.getHeight();return this.getWidth()>n&&(this.left=t.left,this.setWidth(n)),this.getHeight()>r&&(this.top=t.top,this.setHeight(r)),e={},this.right>t.right&&(e.left=t.right-this.right),this.bottom>t.bottom&&(e.top=t.bottom-this.bottom),this.left<t.left&&(e.left=t.left-this.left),this.top<t.top&&(e.top=t.top-this.top),this.shift(e),!0}return!1},__IS_REGION:!0},l.prototype),Object.defineProperties(l.prototype,{width:{get:function(){return this.getWidth()},set:function(t){return this.setWidth(t)}},height:{get:function(){return this.getHeight()},set:function(t){return this.setHeight(t)}}}),i(51)(l),t.exports=l},32,function(t,e,i){"use strict";var n=i(14),r=i(15);t.exports=function(t){var e=Math.max,i=Math.min,o={init:function(){var e,i,r={getIntersection:!0,getIntersectionArea:!0,getIntersectionHeight:!0,getIntersectionWidth:!0,getUnion:!0},o=t.prototype,s=n(r);for(i in r)s(i)&&(e=r[i],"string"!=typeof e&&(e=i),function(e,i,n){e[i]=function(e){return t[n]||console.warn("cannot find method ",n," on ",t),t[n](this,e)}}(o,e,i))},validate:r,getDocRegion:function(){return t.fromDOM(document.documentElement)},from:function(e){return e.__IS_REGION?e:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?t.fromDOM(e):e.type&&"undefined"!=typeof e.pageX&&"undefined"!=typeof e.pageY?t.fromEvent(e):t(e)},fromEvent:function(e){return t.fromPoint({x:e.pageX,y:e.pageY})},fromDOM:function(e){var i=e.getBoundingClientRect();return new t({top:i.top,left:i.left,bottom:i.bottom,right:i.right})},getIntersection:function(e,i){var n=this.getIntersectionArea(e,i);return n?new t(n):!1},getIntersectionWidth:function(t,n){var r=i(t.right,n.right),o=e(t.left,n.left);return r>o?r-o:0},getIntersectionHeight:function(t,n){var r=e(t.top,n.top),o=i(t.bottom,n.bottom);return o>r?o-r:0},getIntersectionArea:function(t,n){var r=e(t.top,n.top),o=i(t.right,n.right),s=i(t.bottom,n.bottom),h=e(t.left,n.left);return s>r&&o>h?{top:r,right:o,bottom:s,left:h,width:o-h,height:s-r}:!1},getUnion:function(n,r){var o=i(n.top,r.top),s=e(n.right,r.right),h=e(n.bottom,r.bottom),a=i(n.left,r.left);return new t(o,s,h,a)},getRegion:function(e){return t.from(e)},fromPoint:function(e){return new t({top:e.y,bottom:e.y,left:e.x,right:e.x})}};Object.keys(o).forEach(function(e){t[e]=o[e]}),t.init()}},function(t,e,i){var n;!function(){function r(t){var e={r:0,g:0,b:0},i=1,n=!1,r=!1;return"string"==typeof t&&(t=I(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=o(t.r,t.g,t.b),n=!0,r="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=T(t.s),t.v=T(t.v),e=u(t.h,t.s,t.v),n=!0,r="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=T(t.s),t.l=T(t.l),e=h(t.h,t.s,t.l),n=!0,r="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=S(i),{ok:n,format:t.format||r,r:q(255,F(e.r,0)),g:q(255,F(e.g,0)),b:q(255,F(e.b,0)),a:i}}function o(t,e,i){return{r:255*H(t,255),g:255*H(e,255),b:255*H(i,255)}}function s(t,e,i){t=H(t,255),e=H(e,255),i=H(i,255);var n,r,o=F(t,e,i),s=q(t,e,i),h=(o+s)/2;if(o==s)n=r=0;else{var a=o-s;switch(r=h>.5?a/(2-o-s):a/(o+s),o){case t:n=(e-i)/a+(i>e?6:0);break;case e:n=(i-t)/a+2;break;case i:n=(t-e)/a+4}n/=6}return{h:n,s:r,l:h}}function h(t,e,i){function n(t,e,i){return 0>i&&(i+=1),i>1&&(i-=1),1/6>i?t+6*(e-t)*i:.5>i?e:2/3>i?t+(e-t)*(2/3-i)*6:t}var r,o,s;if(t=H(t,360),e=H(e,100),i=H(i,100),0===e)r=o=s=i;else{var h=.5>i?i*(1+e):i+e-i*e,a=2*i-h;r=n(a,h,t+1/3),o=n(a,h,t),s=n(a,h,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function a(t,e,i){t=H(t,255),e=H(e,255),i=H(i,255);var n,r,o=F(t,e,i),s=q(t,e,i),h=o,a=o-s;if(r=0===o?0:a/o,o==s)n=0;else{switch(o){case t:n=(e-i)/a+(i>e?6:0);break;case e:n=(i-t)/a+2;break;case i:n=(t-e)/a+4}n/=6}return{h:n,s:r,v:h}}function u(t,e,i){t=6*H(t,360),e=H(e,100),i=H(i,100);var n=z.floor(t),r=t-n,o=i*(1-e),s=i*(1-r*e),h=i*(1-(1-r)*e),a=n%6,u=[i,s,o,o,h,i][a],f=[h,i,i,s,o,o][a],c=[o,o,h,i,i,s][a];return{r:255*u,g:255*f,b:255*c}}function f(t,e,i,n){var r=[L(B(t).toString(16)),L(B(e).toString(16)),L(B(i).toString(16))];return n&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function c(t,e,i,n){var r=[L(E(n)),L(B(t).toString(16)),L(B(e).toString(16)),L(B(i).toString(16))];return r.join("")}function g(t,e){e=0===e?0:e||10;var i=X(t).toHsl();return i.s-=e/100,i.s=R(i.s),X(i)}function l(t,e){e=0===e?0:e||10;var i=X(t).toHsl();return i.s+=e/100,i.s=R(i.s),X(i)}function p(t){return X(t).desaturate(100)}function d(t,e){e=0===e?0:e||10;var i=X(t).toHsl();return i.l+=e/100,i.l=R(i.l),X(i)}function m(t,e){e=0===e?0:e||10;var i=X(t).toRgb();return i.r=F(0,q(255,i.r-B(255*-(e/100)))),i.g=F(0,q(255,i.g-B(255*-(e/100)))),i.b=F(0,q(255,i.b-B(255*-(e/100)))),X(i)}function v(t,e){e=0===e?0:e||10;var i=X(t).toHsl();return i.l-=e/100,i.l=R(i.l),X(i)}function b(t,e){var i=X(t).toHsl(),n=(B(i.h)+e)%360;return i.h=0>n?360+n:n,X(i)}function y(t){var e=X(t).toHsl();return e.h=(e.h+180)%360,X(e)}function _(t){var e=X(t).toHsl(),i=e.h;return[X(t),X({h:(i+120)%360,s:e.s,l:e.l}),X({h:(i+240)%360,s:e.s,l:e.l})]}function x(t){var e=X(t).toHsl(),i=e.h;return[X(t),X({h:(i+90)%360,s:e.s,l:e.l}),X({h:(i+180)%360,s:e.s,l:e.l}),X({h:(i+270)%360,s:e.s,l:e.l})]}function w(t){var e=X(t).toHsl(),i=e.h;return[X(t),X({h:(i+72)%360,s:e.s,l:e.l}),X({h:(i+216)%360,s:e.s,l:e.l})]}function C(t,e,i){e=e||6,i=i||30;var n=X(t).toHsl(),r=360/i,o=[X(t)];for(n.h=(n.h-(r*e>>1)+720)%360;--e;)n.h=(n.h+r)%360,o.push(X(n));return o}function P(t,e){e=e||6;for(var i=X(t).toHsv(),n=i.h,r=i.s,o=i.v,s=[],h=1/e;e--;)s.push(X({h:n,s:r,v:o})),o=(o+h)%1;return s}function D(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}function S(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function H(t,e){M(t)&&(t="100%");var i=k(t);return t=q(e,F(0,parseFloat(t))),i&&(t=parseInt(t*e,10)/100),z.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function R(t){return q(1,F(0,t))}function O(t){return parseInt(t,16)}function M(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function k(t){return"string"==typeof t&&-1!=t.indexOf("%")}function L(t){return 1==t.length?"0"+t:""+t}function T(t){return 1>=t&&(t=100*t+"%"),t}function E(t){return Math.round(255*parseFloat(t)).toString(16)}function A(t){return O(t)/255}function I(t){t=t.replace(j,"").replace(W,"").toLowerCase();var e=!1;if(Y[t])t=Y[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var i;return(i=G.rgb.exec(t))?{r:i[1],g:i[2],b:i[3]}:(i=G.rgba.exec(t))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=G.hsl.exec(t))?{h:i[1],s:i[2],l:i[3]}:(i=G.hsla.exec(t))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=G.hsv.exec(t))?{h:i[1],s:i[2],v:i[3]}:(i=G.hsva.exec(t))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=G.hex8.exec(t))?{a:A(i[1]),r:O(i[2]),g:O(i[3]),b:O(i[4]),format:e?"name":"hex8"}:(i=G.hex6.exec(t))?{r:O(i[1]),g:O(i[2]),b:O(i[3]),format:e?"name":"hex"}:(i=G.hex3.exec(t))?{r:O(i[1]+""+i[1]),g:O(i[2]+""+i[2]),b:O(i[3]+""+i[3]),format:e?"name":"hex"}:!1}var j=/^[\s,#]+/,W=/\s+$/,N=0,z=Math,B=z.round,q=z.min,F=z.max,V=z.random,X=function K(t,e){if(t=t?t:"",e=e||{},t instanceof K)return t;if(!(this instanceof K))return new K(t,e);var i=r(t);this._originalInput=t,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=B(100*this._a)/100,this._format=e.format||i.format,this._gradientType=e.gradientType,this._r<1&&(this._r=B(this._r)),this._g<1&&(this._g=B(this._g)),this._b<1&&(this._b=B(this._b)),this._ok=i.ok,this._tc_id=N++};X.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},setAlpha:function(t){return this._a=S(t),this._roundA=B(100*this._a)/100,this},toHsv:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=a(this._r,this._g,this._b),e=B(360*t.h),i=B(100*t.s),n=B(100*t.v);return 1==this._a?"hsv("+e+", "+i+"%, "+n+"%)":"hsva("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=s(this._r,this._g,this._b),e=B(360*t.h),i=B(100*t.s),n=B(100*t.l);return 1==this._a?"hsl("+e+", "+i+"%, "+n+"%)":"hsla("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return c(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:B(this._r),g:B(this._g),b:B(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+B(this._r)+", "+B(this._g)+", "+B(this._b)+")":"rgba("+B(this._r)+", "+B(this._g)+", "+B(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:B(100*H(this._r,255))+"%",g:B(100*H(this._g,255))+"%",b:B(100*H(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+B(100*H(this._r,255))+"%, "+B(100*H(this._g,255))+"%, "+B(100*H(this._b,255))+"%)":"rgba("+B(100*H(this._r,255))+"%, "+B(100*H(this._g,255))+"%, "+B(100*H(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:U[f(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+c(this._r,this._g,this._b,this._a),i=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var r=X(t);i=r.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+i+")"},toString:function(t){var e=!!t;t=t||this._format;var i=!1,n=this._a<1&&this._a>=0,r=!e&&n&&("hex"===t||"hex6"===t||"hex3"===t||"name"===t);return r?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString())},_applyModification:function(t,e){var i=t.apply(null,[this].concat([].slice.call(e)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(d,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(l,arguments)},greyscale:function(){return this._applyModification(p,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},X.fromRatio=function(t,e){if("object"==typeof t){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]="a"===n?t[n]:T(t[n]));t=i}return X(t,e)},X.equals=function(t,e){return t&&e?X(t).toRgbString()==X(e).toRgbString():!1},X.random=function(){return X.fromRatio({r:V(),g:V(),b:V()})},X.mix=function(t,e,i){i=0===i?0:i||50;var n,r=X(t).toRgb(),o=X(e).toRgb(),s=i/100,h=2*s-1,a=o.a-r.a;n=h*a==-1?h:(h+a)/(1+h*a),n=(n+1)/2;var u=1-n,f={r:o.r*n+r.r*u,g:o.g*n+r.g*u,b:o.b*n+r.b*u,a:o.a*s+r.a*(1-s)};return X(f)},X.readability=function(t,e){var i=X(t),n=X(e),r=i.toRgb(),o=n.toRgb(),s=i.getBrightness(),h=n.getBrightness(),a=Math.max(r.r,o.r)-Math.min(r.r,o.r)+Math.max(r.g,o.g)-Math.min(r.g,o.g)+Math.max(r.b,o.b)-Math.min(r.b,o.b);return{brightness:Math.abs(s-h),color:a}},X.isReadable=function(t,e){var i=X.readability(t,e);return i.brightness>125&&i.color>500},X.mostReadable=function(t,e){for(var i=null,n=0,r=!1,o=0;o<e.length;o++){var s=X.readability(t,e[o]),h=s.brightness>125&&s.color>500,a=3*(s.brightness/125)+s.color/500;(h&&!r||h&&r&&a>n||!h&&!r&&a>n)&&(r=h,n=a,i=X(e[o]))}return i};var Y=X.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"},U=X.hexNames=D(Y),G=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",i="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",r="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+r),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})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof t&&t.exports?t.exports=X:(n=function(){return X}.call(e,i,e,t),!(void 0!==n&&(t.exports=n)))}()},function(t,e,i){"use strict";var n=i(8),r=i(4),o=i(1),s=i(17),h=i(18);t.exports=n.createClass(o({displayName:"HueSpectrum",getDefaultProps:function(){return{height:300,width:30,pointerSize:3,defaultColor:i(6)}},getInitialState:function(){return{h:0}},componentDidUpdate:function(){},componentDidMount:function(){this.updateDragPositionIf()},updateDragPositionIf:function(){this.props.height||this.setState({})},render:function(){this.hsv=this.toColorValue(this.state.value||this.props.value||this.props.defaultValue||this.props.defaultColor),360!=this.state.h||this.hsv.h||(this.hsv.h=360);var t=o({},this.props.style);this.props.height&&(t.height=this.props.height),this.props.width&&(t.width=this.props.width);var e={height:this.props.pointerSize},i=this.getDragPosition();return null!=i&&(e.top=i,e.display="block"),n.DOM.div({className:"cp-hue-spectrum",style:t,onMouseDown:this.onMouseDown},n.DOM.div({className:"cp-hue-drag",style:e},n.DOM.div({className:"inner"})))},getDragPosition:function(t){if(t=t||this.hsv,!this.props.height&&!this.isMounted())return null;var e=this.props.height||r.fromDOM(this.getDOMNode()).getHeight(),i=this.props.pointerSize,n=Math.round(t.h*e/360),o=Math.round(i/2);return n-o},updateColor:function(t){t=h(t),this.hsv.h=360*t.y/t.height,0!=this.hsv.h&&(this.state.h=this.hsv.h),this.state.h=0!=this.hsv.h?this.hsv.h:0},toStringValue:i(7)},s))},function(t,e,i){"use strict";var n=i(8),r=i(4),o=i(1),s=i(3).fromRatio,h=i(17),a=i(18);t.exports=n.createClass(o({displayName:"SaturationSpectrum",getDefaultProps:function(){return{height:300,width:300,pointerSize:7,defaultColor:i(6)}},getInitialState:function(){return{pointerTop:null,pointerLeft:null}},componentDidUpdate:function(){},componentDidMount:function(){this.updateDragPositionIf()},updateDragPositionIf:function(){this.props.height&&this.props.width||this.setState({})},getDragPosition:function(t){t=t||this.hsv;var e=this.props.width,i=this.props.height,n=e&&i;if(!n&&!this.isMounted())return null;var o;n||(o=r.fromDOM(this.getDOMNode()),i=i||o.getHeight(),e=e||o.getWidth());var s=t.s*e,h=i-t.v*i,a=this.props.pointerSize,u=Math.floor(a/2);return this.props.value&&this.state.mouseDown&&(s=this.state.mouseDown.x),{left:s-u,top:h-u}},prepareBackgroundColor:function(t){var e=t,i=s({h:e.h%360/360,s:1,v:1});return i.toRgbString()},render:function(){var t=this.state.value||this.props.value||this.props.defaultValue||this.props.defaultColor;this.hsv=this.toColorValue(t);var e=this.props.style||{};this.props.height&&(e.height=this.props.height),this.props.width&&(e.width=this.props.width),e.backgroundColor=this.prepareBackgroundColor(this.hsv);var i={width:this.props.pointerSize,height:this.props.pointerSize},r=this.getDragPosition();return r&&(i.top=r.top,i.left=r.left,i.display="block"),n.DOM.div({className:"cp-saturation-spectrum",style:e,onMouseDown:this.onMouseDown},n.DOM.div({className:"cp-saturation-white"},n.DOM.div({className:"cp-saturation-black"})),n.DOM.div({className:"cp-saturation-drag",style:i},n.DOM.div({className:"inner"})))},getSaturationForPoint:function(t){return t.x/t.width},getColorValueForPoint:function(t){return(t.height-t.y)/t.height},updateColor:function(t){t=a(t),this.hsv.s=this.getSaturationForPoint(t),this.hsv.v=this.getColorValueForPoint(t)},toStringValue:i(7)},h))},function(t,e,i,n){t.exports=i(n)}]))});

@@ -6,3 +6,3 @@ 'use strict';

var React = require('react')
var ColorPicker = require('./src/index')
var ColorPicker = require('./src')
var HueSpectrum = require('./src/HueSpectrum')

@@ -13,3 +13,3 @@ var SaturationSpectrum = require('./src/SaturationSpectrum')

var COLOR = '#234653'
var COLOR = '#F28281'
var picker

@@ -26,2 +26,3 @@

onDrag: function(c){
// console.log(c)
onDrag(c)

@@ -32,4 +33,9 @@ this.setState({})

render: function(){
return <ColorPicker defaultValue={COLOR} onDrag={this.onDrag} saturationHeight={500}/>
// setTimeout(function(){
// this.setState({})
// }.bind(this), 100)
return <div>
<ColorPicker defaultValue={COLOR} onDrag={this.onDrag} saturationHeight={500}/>
<div style={{background: COLOR, width: 100, height: 100}} />
</div>
}

@@ -39,3 +45,3 @@ })

React.renderComponent(<App />, document.body)
React.render(<App />, document.body)

@@ -5,4 +5,3 @@ 'use strict'

var Region = require('region')
var copy = require('copy-utils').copy
var assign = require('object-assign')
var common = require('./utils/common')

@@ -12,3 +11,3 @@

module.exports = React.createClass(copy(common, {
module.exports = React.createClass(assign({

@@ -49,2 +48,3 @@ displayName: 'HueSpectrum',

this.hsv = this.toColorValue(this.state.value || this.props.value || this.props.defaultValue || this.props.defaultColor)
// console.log('hue:', this.hsv)

@@ -56,3 +56,3 @@ if (this.state.h == 360 && !this.hsv.h){

var style = this.props.style || {}
var style = assign({}, this.props.style)

@@ -114,2 +114,2 @@ if (this.props.height){

toStringValue: require('./utils/toStringValue')
}))
}, common))
'use strict';
var React = require('react')
var copy = require('copy-utils').copy
var assign = require('object-assign')
var colorUtils = require('./utils/color')

@@ -50,3 +50,3 @@

var props = this.prepareProps(copy(this.props))
var props = this.prepareProps(assign({}, this.props))

@@ -89,7 +89,7 @@ var hueStyle = this.props.hueStyle || {}

if (value){
saturationConfig.value = copy(value)
hueConfig.value = copy(value)
saturationConfig.value = assign({}, value)
hueConfig.value = assign({}, value)
} else {
saturationConfig.defaultValue = copy(defaultValue)
hueConfig.defaultValue = copy(defaultValue)
saturationConfig.defaultValue = assign({}, defaultValue)
hueConfig.defaultValue = assign({}, defaultValue)
}

@@ -116,3 +116,3 @@

color = copy(color)
color = assign({}, color)

@@ -119,0 +119,0 @@ var value = this.toStringValue(color)

'use strict'
var React = require('react')
var Region = require('region')
var copy = require('copy-utils').copy
var React = require('react')
var Region = require('region')
var assign = require('object-assign')
var fromRatio = require('./utils/color').fromRatio
var common = require('./utils/common')
var fromRatio = require('./utils/color').fromRatio
var common = require('./utils/common')
var VALIDATE = require('./utils/validate')
module.exports = React.createClass(copy(common, {
module.exports = React.createClass(assign({

@@ -83,7 +82,9 @@ displayName: 'SaturationSpectrum',

return fromRatio({
h: hsv.h,
var col = fromRatio({
h: (hsv.h % 360) / 360,
s: 1,
v: 1
}).toRgbString()
})
return col.toRgbString()
},

@@ -149,2 +150,2 @@

toStringValue: require('./utils/toStringValue')
}))
}, common))
'use strict';
var Region = require('region')
var copy = require('copy-utils').copy
var assign = require('object-assign')
var DragHelper = require('drag-helper')

@@ -121,3 +121,3 @@ var toHsv = require('./color').toHsv

if (!this.props.inPicker){
args.push(copy(this.hsv))
args.push(assign({}, this.hsv))
}

@@ -124,0 +124,0 @@

'use strict'
var copy = require('copy-utils').copy
var assign = require('object-assign')
var toColor = require('./color').toColor
module.exports = function toStringValue(color){
color = toColor(copy(color))
color = toColor(assign({}, color))

@@ -9,0 +9,0 @@ return color.toRgb().a == 1?

{
"name": "react-color-picker",
"version": "2.1.4",
"version": "2.1.5",
"description": "React Color Picker",

@@ -27,21 +27,20 @@ "main": "lib/index.js",

"dependencies": {
"copy-utils": "^1.0.0",
"drag-helper": "^1.2.0",
"functionally": "^0.6.2",
"drag-helper": "^1.2.3",
"normalize.css": "^3.0.2",
"object-assign": "^2.0.0",
"react": "^0.12.0",
"region": "^2.0.0",
"tinycolor2": "^1.0.0"
"tinycolor2": "^1.1.1"
},
"devDependencies": {
"style-loader": "~0.8.1",
"css-loader": "~0.9.0",
"extract-text-webpack-plugin": "~0.3.1",
"gulp": "^3.8.11",
"gulp-react": "^2.0.0",
"http-server": "^0.7.2",
"jsx-loader": "~0.11.2",
"style-loader": "~0.8.1",
"stylus-loader": "~0.4.0",
"webpack-dev-server": "~1.6.5",
"webpack": "~1.4.7",
"gulp": "~3.8.8",
"gulp-react": "^2.0.0",
"http-server": "^0.7.2",
"extract-text-webpack-plugin": "~0.3.1"
"webpack-dev-server": "~1.6.5"
},

@@ -48,0 +47,0 @@ "directories": {

@@ -5,4 +5,3 @@ 'use strict'

var Region = require('region')
var copy = require('copy-utils').copy
var assign = require('object-assign')
var common = require('./utils/common')

@@ -12,3 +11,3 @@

module.exports = React.createClass(copy(common, {
module.exports = React.createClass(assign({

@@ -49,2 +48,3 @@ displayName: 'HueSpectrum',

this.hsv = this.toColorValue(this.state.value || this.props.value || this.props.defaultValue || this.props.defaultColor)
// console.log('hue:', this.hsv)

@@ -56,3 +56,3 @@ if (this.state.h == 360 && !this.hsv.h){

var style = this.props.style || {}
var style = assign({}, this.props.style)

@@ -114,2 +114,2 @@ if (this.props.height){

toStringValue: require('./utils/toStringValue')
}))
}, common))
'use strict';
var React = require('react')
var copy = require('copy-utils').copy
var assign = require('object-assign')
var colorUtils = require('./utils/color')

@@ -50,3 +50,3 @@

var props = this.prepareProps(copy(this.props))
var props = this.prepareProps(assign({}, this.props))

@@ -89,7 +89,7 @@ var hueStyle = this.props.hueStyle || {}

if (value){
saturationConfig.value = copy(value)
hueConfig.value = copy(value)
saturationConfig.value = assign({}, value)
hueConfig.value = assign({}, value)
} else {
saturationConfig.defaultValue = copy(defaultValue)
hueConfig.defaultValue = copy(defaultValue)
saturationConfig.defaultValue = assign({}, defaultValue)
hueConfig.defaultValue = assign({}, defaultValue)
}

@@ -116,3 +116,3 @@

color = copy(color)
color = assign({}, color)

@@ -119,0 +119,0 @@ var value = this.toStringValue(color)

'use strict'
var React = require('react')
var Region = require('region')
var copy = require('copy-utils').copy
var React = require('react')
var Region = require('region')
var assign = require('object-assign')
var fromRatio = require('./utils/color').fromRatio
var common = require('./utils/common')
var fromRatio = require('./utils/color').fromRatio
var common = require('./utils/common')
var VALIDATE = require('./utils/validate')
module.exports = React.createClass(copy(common, {
module.exports = React.createClass(assign({

@@ -83,7 +82,9 @@ displayName: 'SaturationSpectrum',

return fromRatio({
h: hsv.h,
var col = fromRatio({
h: (hsv.h % 360) / 360,
s: 1,
v: 1
}).toRgbString()
})
return col.toRgbString()
},

@@ -149,2 +150,2 @@

toStringValue: require('./utils/toStringValue')
}))
}, common))
'use strict';
var Region = require('region')
var copy = require('copy-utils').copy
var assign = require('object-assign')
var DragHelper = require('drag-helper')

@@ -121,3 +121,3 @@ var toHsv = require('./color').toHsv

if (!this.props.inPicker){
args.push(copy(this.hsv))
args.push(assign({}, this.hsv))
}

@@ -124,0 +124,0 @@

'use strict'
var copy = require('copy-utils').copy
var assign = require('object-assign')
var toColor = require('./color').toColor
module.exports = function toStringValue(color){
color = toColor(copy(color))
color = toColor(assign({}, color))

@@ -9,0 +9,0 @@ return color.toRgb().a == 1?

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc