Socket
Socket
Sign inDemoInstall

react-color-picker

Package Overview
Dependencies
44
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.3 to 2.1.4

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(16),o=n(1).copy,s=n(9),a=r.createFactory(n(81)),u=r.createFactory(n(82)),h=s.toHsv,f=r.createClass({displayName:"ColorPicker",getDefaultProps:function(){return{defaultColor:n(14),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},h={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),h.value=o(n)):(s.defaultValue=o(i),h.defaultValue=o(i)),r.DOM.div(t,u(s),a(h))},toColorValue:function(t){return"string"==typeof t?h(t):t},toStringValue:n(15),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=u,t.exports=f},function(t,e,n){t.exports=function(){"use strict";var t=Object.prototype.hasOwnProperty,e="object",i="undefined";return{copy:n(28),copyIf:n(29),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(17),copyListIf:n(18),copyKeys:n(30),copyKeysIf:n(31),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,u,h;for(var f in o)t.call(o,f)&&(a=o[f],s=typeof a,h=n[f],u=typeof h,u!==i&&(r["string"==s?a:f]="function"==u?h.bind(n):h))}return r}}}()},function(t,e,n){t.exports=function(){"use strict";function t(t){return t=t||{},t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=s(this,arguments)),this.INSTANCE},t.getInstanceIf=function(){return this.INSTANCE?this.INSTANCE:void 0},t}function e(e,n,r){function o(){if(!(this instanceof o)&&o.prototype.forceInstance)return s(o,arguments);if(!this)throw"Cannot call class constructor with undefined context.";if(this.singleton){if(this.$ownClass.INSTANCE)throw"Cannot re-instantiate singleton for class "+o;this.$ownClass.INSTANCE=this}return this.init.apply(this,arguments)}1==arguments.length?(n=e,e=g):e=e||g,a(e,o),p(e.prototype,o.prototype),p(e,o);var h=n.statics||{},f=h.$own;return h.$own=null,n.statics=null,o.$initialConfig=i(o,n),n.singleton&&t(h),i(o,e,{proto:!1,skipOwn:!0,skipProps:u(e.$own,{$own:1,$ownClass:1,$superClass:1,$initialConfig:1})}),i(o,h,{proto:!1}),f&&i(o,f,{proto:!1,own:!0}),"function"!=typeof r?o.init&&o.init():r(o),o}function i(t,e,n,i){n=n||{proto:!0};var r,o,s,a=i||{},u=!f&&n.own,p=e.$own,g=!f&&n.skipOwn&&p,v=n.skipProps;for(r in e)if(h.call(e,r)){if(g&&p[r])continue;if(v&&v[r])continue;o=c?l(e,r):e[r],s=d(t,r,o,n),u?a[r]=1:c?Object.defineProperty(a,r,o):a[r]=s}return u&&(t.$own=a),a}function r(e,n){"function"==typeof e.beforeOverride&&(n=e.beforeOverride(n));var r=n.statics||{},o=r.$own;r.$own=null,n.statics=null,n.singleton&&t(r),i(e,n,null,e.$initialConfig),i(e,r,{proto:!1}),o&&i(e,o,{proto:!1,own:!0})}function o(t,e){i(t,e,{proto:!1})}var s=n(21),a=n(48),u=n(4).copy,h=Object.prototype.hasOwnProperty,f=n(22),c=n(11),l=c?Object.getOwnPropertyDescriptor:null,p=n(47),g=function(){};g.prototype.init=function(){return this},g.prototype.self=function(){return this};var d=n(45);return{canDefineProperty:f,extend:a,createClass:e,overrideClass:r,overrideObject:o,copyClassConfig:i,BaseClass:g}}()},function(t,e,n){var i=n(7),r=n(2).BaseClass;t.exports=function(t){return t?("string"!=typeof t&&(t=t.alias||(t.prototype?t.prototype.alias:t)),i[t]):r}},function(t,e,n){t.exports=n(1)},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";var i=n(62),r=n(1),o=r.copyList,s=n(10),a=n(63).object,u=n(12),h=n(76).mixin,f=Math.max,c=Math.min,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"},p=u.define({forceInstance:!0,mixins:[h],statics:{init:function(){var t,e,n={getIntersection:!0,getIntersectionArea:!0,getIntersectionHeight:!0,getIntersectionWidth:!0,getUnion:!0},r=this.prototype,o=i(n);for(e in n)o(e)&&(t=n[e],"string"!=typeof t&&(t=e),function(t,e,n){t[e]=function(t){return this.$ownClass[n]||console.warn("cannot find method ",n," on ",this.$ownClass),this.$ownClass[n](this,t)}}(r,t,e))},validate: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},getDocRegion:function(){return p.fromDOM(document.documentElement)},from:function(t){return t.__IS_REGION?t:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?p.fromDOM(t):t.type&&void 0!=t.pageX&&void 0!=t.pageY?p.fromEvent(t):p(t)},fromEvent:function(t){return p.fromPoint({x:t.pageX,y:t.pageY})},fromDOM:function(t){{var e=t.getBoundingClientRect(),n=document.documentElement,i=window;e.top+i.pageYOffset-n.clientTop,e.left+i.pageXOffset-n.clientLeft}return new p({top:e.top,left:e.left,bottom:e.bottom,right:e.right})},getIntersection:function(t,e){var n=this.getIntersectionArea(t,e);return n?new p(n):!1},getIntersectionWidth:function(t,e){var n=c(t.right,e.right),i=f(t.left,e.left);return n>i?n-i:0},getIntersectionHeight:function(t,e){var n=f(t.top,e.top),i=c(t.bottom,e.bottom);return i>n?i-n:0},getIntersectionArea:function(t,e){var n=f(t.top,e.top),i=c(t.right,e.right),r=c(t.bottom,e.bottom),o=f(t.left,e.left);return r>n&&i>o?{top:n,right:i,bottom:r,left:o,width:i-o,height:r-n}:!1},getUnion:function(t,e){var n=c(t.top,e.top),i=f(t.right,e.right),r=f(t.bottom,e.bottom),o=c(t.left,e.left);return new p(n,i,r,o)},getRegion:function(t){return p.from(t)},fromPoint:function(t){return new p({top:t.y,bottom:t.y,left:t.x,right:t.x})}},emitChangeEvents:!1,changeEventsBuffer:0,getRegion:function(t){return t?this.clone():this},setRegion:function(t){return this.set(t instanceof p?t.get():t),this},validate:function(){return p.validate(this)},_before:function(){return this.emitChangeEvents?o(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.changeEventsBuffer&&(this.emitPositionChangeBuffered||(this.emitPositionChangeBuffered=s.buffer(this.notifyPositionChange,changeEventsBuffer)),this.emitPositionChangeBuffered()),this.notifyPositionChange()},notifySizeChange:function(){this.emit("changesize",this)},emitSizeChange:function(){this.changeEventsBuffer&&(this.emitSizeChangeBuffered||(this.emitSizeChangeBuffered=s.buffer(this.notifySizeChange,changeEventsBuffer)),this.emitSizeChangeBuffered()),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)},get width(){return this.getWidth()},set width(t){return this.setWidth(t)},setWidth:function(t){return this.set({right:this.left+t})},get height(){return this.getHeight()},set height(t){return this.setHeight(t)},setHeight:function(t){return this.set({bottom:this.top+t})},set:function(t){var e=this._before();return o(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]:o(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 p,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||p.getDocRegion(),s=[],a=this._before();for(n in t)i(t,n)&&s.push(n);return o(r,this,s),this[0]=this.left,this[1]=this.top,this._after(a),this},clone:function(){return new p({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(),e={};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},init:function(t,e,n,i){a(t)?(o(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,p.validate(this)},__IS_REGION:!0});t.exports=p},function(t){t.exports={}},function(t,e,n){function i(t){h.preprocess(t)}function r(){return c+f++}var o=n(3),s=n(59),a=n(7),u=n(2),h=n(23),f=0,c="ZClass-";t.exports=function(t,e){"use strict";1==arguments.length&&(e=t,t=null);var n=t||e.extend,h=e.alias||(e.alias=r());return n=o(n)||n,n||console.warn("Could not find class to extend ("+e.extend+"). Extending base class."),i(e,n),u.createClass(n,e,function(t){a[h]&&console.warn("A class with alias "+h+" is already registered. It will be overwritten!"),a[h]=t,s(t)})}},function(t,e,n){"use strict";function i(t){return u(t)}function r(t){var e=i(t).toHsl().h;return i({h:e,s:100,l:50,a:1})}function o(t){return u.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 u=n(79);"undefined"!=typeof window&&(window.tinycolor=u);var h={toColor:i,toPure:r,fromRatio:o,toAlpha:s,toHsv:a};"undefined"!=typeof window&&(window.color=h),t.exports=h},function(t,e,n){var i=function(t){setTimeout(t,0)},r=clearTimeout,o=Array.prototype.slice,s=n(5),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)},u=s(a,2),h=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(36),l=n(35),p=n(42),g=n(19),d=n(34),v=n(20),y=n(38),m=function(t,e){return function(){var n=o.call(arguments,e||0);return t.apply(this,n)}},b=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)}},x=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)}))}},w=function(t,e){return x(t,0,e)},C=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 u=e||!i,h=u?clearTimeout:r,f=u?setTimeout:i;-1!==o&&h(o),o=f(function(){t.apply(s,a),s=null},e)}},_=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))}},S=function(t,e,n){var i,r,o=-1,s=0,a=0,u={},h=!0;return r=i=function(){var f=arguments,c=n||this;h&&(u[s++]={args:f,scope:c}),-1!==o||(o=setTimeout(function(){t.apply(c,f),o=-1,a++,s!==a?(r=g(i,u[a].args).bind(u[a].scope),delete u[a],h=!1,r.apply(c),h=!0):u={}},e))}};t.exports={map:n(39),dot:n(37),maxArgs:n(40),compose:c,self:function(t){return t},buffer:C,delay:x,defer:w,skipArgs:m,intercept:function(t,e,n){return b(e,t,n)},throttle:_,spread:S,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:p,bindArgs:d,bindArgsArray:g,lockArgs:y,lockArgsArray:v,bindFunctionsOf:f,find:u,findIndex:h,newify:n(41)}},function(t){"use strict";t.exports=function(){return"getOwnPropertyDescriptor"in Object&&"function"==typeof Object.getOwnPropertyDescriptor}()},function(t,e,n){t.exports=function(){"use strict";function t(t,e){return i(t,e,{allowSame:!0})}var e=n(2),i=n(56);n(44);var r=n(4);return{_:r.copy(r),BaseClass:e.BaseClass,extend:e.extend,createClass:e.createClass,overrideClass:e.overrideClass,core:e,define:n(8),override:n(57),getClass:n(3),classRegistry:n(7),defineMixin:n(51),mixin:n(24).mixin,create:n(50),getInstance:n(54),destroyClass:n(52),getParentClass:n(55),isSubclassOf:i,isSameOrSubclassOf:t,isClassLike:t}}()},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(1).copy,r=n(9).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)}}},[83,43],function(t){"use strict";t.exports=function(){var t={};try{return Object.defineProperty(t,"name",{value:"x"}),!0}catch(e){}return!1}()},function(t,e,n){t.exports=function(){"use strict";var t=[],e={attach:function(e){t.push(e)},preprocess:function(e,n){t.forEach(function(t){t.preprocess&&t.preprocess(e,n)})},process:function(e){return t.forEach(function(t){t.process(e)}),e}};return e.attach(n(24)),e}()},function(t,e,n){t.exports=function(){"use strict";function t(t){var e=t.mixins||[];e.forEach(function(e){o(t,e)})}function e(t){if(!t.addMixin){var e=function(t){o(this,t)};l.canDefineProperty?Object.defineProperties(t,{addMixin:{value:e}}):t.addMixin=e}}function i(t,n){return t.$mixins&&~t.$mixins.indexOf(n)?!0:(e(t),t.$mixins=t.$mixins?[].concat(t.$mixins):[],t.$mixins.push(n),!1)}function r(t,e){return x.forEach(function(n){var i=t[n],r=i;if(null!=i){e&&(r=e[n]=e[n]||{});for(var o in i)m(i,o)&&(r[o]=t[o])}}),e}function o(t,e,n){if(1==arguments.length&&(e=t,t={}),!e)return t;n=n||{};var i=v(e),a=n.mixinIdentifier||e;if(i&&("string"==typeof e&&(e={alias:e}),e==i?e=i.prototype:d(i.prototype,e),r(e),a=e.alias),t.$ownClass&&!n.skipStatics){var u=i?r(i,{}):e.statics;if(u&&x.some(function(t){return!!u[t]})){n.skipWarning=!0;var h="statics."+a;o(t.$ownClass,u,{skipStatics:!0,mixinIdentifier:h})}}return s(t,e,a,n),t}function s(t,e,n,r){n=n||e.alias,i(t,n)||c(t,e,r)}function a(t,e,n){var i=t[e],r="function"==typeof i?i:b;return function(){var t=arguments,e=this.callTarget,i=this.callTargetWith;this.callTarget=function(){return r.apply(this,t)},this.callTargetWith=function(){return r.apply(this,arguments)};var o=n.apply(this,t);return this.callTarget=e,this.callTargetWith=i,o}}function u(t,e,n,i){e[n]=t?p[t](i,e[n]):a(e,n,i)}function h(t,e,n,i,r){var o,s,a,h=r?r.skipProperties:null;for(o in i)if(m(i,o)){if("init"==o){a={when:t,props:i};continue}if(h&&h[o])continue;if(s=i[o],"$copyIf"==e){"undefined"==typeof n[o]&&(n[o]=s);continue}"function"==typeof s?"function"==typeof n[o]?u(t,n,o,s):n[o]=s:t&&"undefined"!=typeof n[o]||(n[o]=s)}return a}function f(t,e,n){if(n){var i=n.props.init,r=n.when,o=e.initOn||"init";u(r,t,o,i)}}function c(t,e,n){t.callTarget=t.callTarget||b,n=n||{},n.skipWarning||e.$before||e.$after||e.$override||e.$copyIf||console.warn("No $before, $after or $override properties on the mixin ",e,". This will result in nothing being mixed in.");var i=w(t,e.$before,n),r=C(t,e.$after,n);_(t,e.$copyIf,n);var o=S(t,e.$override,n);f(t,e,i||r||o)}var l=n(2),p=n(61),g=p.bindArgs,d=n(4).copyIf,v=n(3),y=Object.prototype.hasOwnProperty,m=function(t,e){return y.call(t,e)},b=function(){},x=["$copyIf","$override","$after","$before"],w=g(h,"before","$before"),C=g(h,"after","$after"),_=g(h,"copyIf","$copyIf"),S=g(h,"","$override");return{mixin:o,preprocess:function(){},process:function(e){t(e.prototype),t(e)}}}()},function(t,e,n){"use strict";var i=n(12),r=n(1),o=n(10),s=function(t,e){return e-t},a=Array.prototype.slice,u=i.define({allowFunctionsAsString:!1,keepFunctionReferences:!1,forceInstance:!0,statics:{fly:function(){var t;return function(e){return t=t||new u(e),e&&e.state&&t.from(e.state),t}}()},maxLength:null,init:function(t){r.copy(t,this),this.clear()},from:function(t){return t=t||{},this._fns=t._fns=t._fns||[],this.fns=t.fns=t.fns||[],this.scopes=t.scopes=t.scopes||[],this.options=t.options=t.options||[],this.length=this.fns.length,this},toStateObject:function(t){return this.getLength()?(t=t||{},t._fns=this._fns,t.fns=this.fns,t.scopes=this.scopes,t.options=this.options,t):void 0},clear:function(){return this.from()},destroy:function(){return this.clear(),delete this.fns,delete this._fns,delete this.scopes,delete this.options,this},clone:function(){var t=new u;return t._fns=this._fns.slice(),t.fns=this.fns.slice(),t.scopes=this.scopes.slice(),t.options=this.options.slice(),t.length=t.fns.length,t.maxLength=this.maxLength,t},getLength:function(){return this.length},isEmpty:function(){return!this.getLength()},add:function(t,e,n){return this.insert(this.length,t,e,n)},insert:function(t,e,n,i){var r;t>=this.length&&(t=this.length,r=!0);var o,s="function"==typeof e,a=e,u=e;if(s)o=this.getModifiedFunction(e,i),a=o.fn,o.modified||(u=void 0);else if(!this.allowFunctionsAsString||"string"!=typeof e)return this;return this._dirty=!0,r?(this._fns.push(u),this.fns.push(a),this.scopes.push(n||void 0),this.options.push(i)):(this._fns.splice(t,0,u),this.fns.splice(t,0,a),this.scopes.splice(t,0,n||void 0),this.options.splice(t,0,i)),this.length=this.fns.length,null!=this.maxLength&&this.adjustLength(),this},adjustLength:function(){this.maxLength<this.length&&(this._fns.shift(),this.fns.shift(),this.scopes.shift(),this.options.shift(),this.length=this.fns.length)},getModifiedFunction:function(t,e){var n=!1;return e&&(null!=e.buffer&&(t=o.buffer(t,e.buffer),n=!0),null!=e.delay&&(t=o.delay(t,e.delay),n=!0),null!=e.defer&&(t=o.defer(t),n=!0),null!=e.throttle&&(t=o.throttle(t,e.throttle),n=!0)),{modified:n,fn:t}},addStart:function(t,e,n){return this.insert(0,t,e,n)},call:function(t){return this.apply(t,a.call(arguments,1))},execute:function(){return this.apply(void 0,arguments)},collect:function(){return this.applyWith(void 0,arguments,{allResults:!0})},apply:function(t,e){return this.applyWith(t,e)},applyWith:function(t,e,n){this._dirty=!1;for(var i,r,o,s,a,u,h=this.fns.slice(),f=this._fns.slice(),c=this.scopes.slice(),l=this.options.slice(),p=this.allowFunctionsAsString,g=this.keepFunctionReferences,d=n&&n.forceScope,v=n&&n.quickStop,y=n&&n.allResults,m=n&&n.filter,b=0,x=h.length,w=[],C=!0,_=y?[]:null;x>b&&(a=!0,i=h[b],o=c[b],r=l[b],null!=o&&!d||null==t||(o=t),p&&"string"==typeof i&&("function"==typeof o[i]?(u=this.getModifiedFunction(o[i],r),g&&!this._dirty&&(f[b]=this._fns[b]=h[b],h[b]=this.fns[b]=u.fn),i=u.fn):a=!1),a&&m&&!m(i,o,r)||(r&&r.once===!0&&w.push(b),!(a&&(s=i.apply(o,e),y&&_.push(s),s===!1&&(C=!1,v||r&&r.quickStop)))));b++);return w.length&&this.removeAt(w),y?_:C},forEach:function(t,e){e=e||this;for(var n,i,r,o=this.fns,s=this.scopes,a=this.options,u=0,h=o.length;h>u&&(n=o[u],i=s[u],r=a[u],t.call(e,n,i,r,u)!==!1);u++);},remove:function(t,e){var n=this.fns,i=this._fns,r=this.scopes,o=null!=e,s=[];return n.forEach(function(n,a){var u=i[a],h=t==n||t==u;!h||o&&r[a]!==e||s.push(a)}),s.length&&this.removeAt(s),this},removeAt:function(t){this._dirty=!0;var e,n=Array.isArray(t)?t:[t],i=0,r=n.length;for(n.sort(s);r>i;i++)e=n[i],this._fns.splice(e,1),this.fns.splice(e,1),this.options.splice(e,1),this.scopes.splice(e,1);return this.length=this.fns.length,this}});u.displayName="FunctionQueue",u.constructor.displayName="FunctionQueue",t.exports=u},function(t,e,n){"use strict";function i(){}var r=n(6),o=n(1).copy,s=n(80),a=n(9).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(17);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,u;for(var h in n)o.call(n,h)&&(u=n[h],a=typeof u,typeof t[h]!==i&&(e["string"==a?u:h]=t[h]))}return e}},function(t,e,n){"use strict";var i="undefined",r="object",o=Object.prototype.hasOwnProperty,s=n(18);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,u,h;for(var f in n)o.call(n,f)&&(u=n[f],a=typeof u,h="string"==a?u:f,typeof t[f]!==i&&typeof e[h]===i&&(e[h]=t[f]))}return 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]}}()},[83,32],function(t,e,n){"use strict";var i=Array.prototype.slice,r=n(19);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(5);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(20);t.exports=function(t){return r(t,i.call(arguments,1))}},function(t,e,n){"use strict";var i=n(5);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(5)}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(33),r=n(5);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},32,function(t,e,n){"use strict";var i=n(2),r=n(4).copy,o=["$before","$after","$override","$copyIf"];t.exports=n(8)({alias:"z.mixin",callTarget:function(){},statics:{init:function(){var t=this.$initialConfig||{};o.forEach(function(e){t[e]&&i.copyClassConfig(this,t[e],{proto:!0}),this[e]&&i.copyClassConfig(this,this[e],{proto:!1})},this)},beforeOverride:function(t){var e={},n=this.prototype;return o.forEach(function(i){var o=t[i];null!=o&&(r(o,e),r(o,n[i]))}),e}}})},function(t,e,n){"use strict";var i=n(4).copy,r=n(49),o=n(22),s=n(11),a=function(t,e,n,a){var u,h=a.proto?t.prototype:t,f=t.$superClass,c=f?a.proto?f.prototype:f:void 0,l=a.own;!s||void 0!==n.get&&void 0!=n.set||(u=Object.getOwnPropertyDescriptor(h,e),u&&void 0===n.get&&void 0!==u.get&&(n.get=u.get),u&&void 0===n.set&&void 0!==u.set&&(n.set=u.set));var p,g,d=n.get||n.set;return d?(p=i(n),void 0!==n.get&&(p.get=r(e,n.get,c,f,h,{getter:!0})),void 0!==n.set&&(p.set=r(e,n.set,c,f,h,{setter:!0})),n=p):(g=n.value,"function"==typeof g&&(g=r(e,g,c,f,h))),l?o?Object.defineProperty(h,e,{value:g,enumerable:!1}):h[e]=g:d?Object.defineProperty(h,e,n):h[e]=g,g};t.exports=a},function(t){t.exports=function(){"use strict";function t(t,e,n,r,o){function s(e){var s=o.getter?"get":o.setter?"set":null,a=s?i(n,t):null,u=s?a?a[s]:null:n[t],h="function"==typeof u;return h||"init"!=t||r.$superClass||(u=r,h=!0),h?u.apply(this,e):void 0}return function(){var t=this.callSuper,n=this.callSuperWith,i=arguments;this.callSuperWith=function(){return s.call(this,arguments)},this.callSuper=function(){return s.call(this,i)};var r=e.apply(this,i);return this.callSuper=t,this.callSuperWith=n,r}}function e(t,e,r,o){var s=o.getter?"get":o.setter?"set":null,a=s?i(r,t):null,u=s?a?a[s]:null:r[t];return"undefined"==typeof u&&(u=n),function(){var t=this.callOverriden,n=this.callOverridenWith,i=arguments;this.callOverridenWith=function(){return u.apply(this,arguments)
},this.callOverriden=function(){return u.apply(this,i)};var r=e.apply(this,i);return this.callOverriden=t,this.callOverridenWith=n,r}}var n=function(){},i=Object.getOwnPropertyDescriptor;return{buildSuperFn:t,buildOverridenFn:e}}()},function(t,e,n){"use strict";function i(t,e){Object.getOwnPropertyNames(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);(i.get||i.set)&&Object.defineProperty(e,n,i)})}var r=n(11);t.exports=r?i:function(){}},function(t){t.exports=function(){"use strict";var t=function(){};return function(e,n){return t.prototype=e.prototype,n.prototype=new t,n.prototype.constructor=n,n.prototype.$ownClass=n,n.prototype.$superClass=e,n.$ownClass=n,n.$superClass=e,n}}()},function(t,e,n){function i(t,e,n,i,s,h){var f=r.test(e),c=o.test(e);return h=h||{},f&&(e=a(t,e,n,i,h)),c&&(e=u(t,e,s,h)),e}var r=/\bcallSuper|callSuperWith\b/,o=/\bcallOverriden|callOverridenWith\b/,s=n(46),a=s.buildSuperFn,u=s.buildOverridenFn;t.exports=i},function(t,e,n){var i=Array.prototype.slice,r=n(3),o=n(21);t.exports=function(t){"use strict";var e=r(t),n=i.call(arguments,1);return o(e,n)}},function(t,e,n){var i=n(8),r=n(4).copyIf;t.exports=function(t){"use strict";return i(r({extend:"z.mixin"},t))}},function(t,e,n){var i=n(3),r=n(2),o=r.BaseClass;t.exports=function(t){"use strict";t=i(t),t&&t!=o&&t.destroy()}},function(t,e,n){t.exports=function(t){"use strict";var e=n(8);return t=t||{},t.extend=t.extend||this.prototype.alias,e(t)}},function(t,e,n){var i=n(2).BaseClass,r=n(3);t.exports=function(t){"use strict";if(t instanceof i)return t;t="string"==typeof t?{alias:t}:t||{};var e=r(t);return e||console.warn("Cannot find class for ",t),e&&e.prototype.singleton?e.getInstance():new e(t)}},function(t,e,n){var i=n(2).BaseClass,r=n(3);t.exports=function(t){"use strict";var e=r(t);if(e&&e!=i&&e.$superClass!=i){for(;e.$superClass&&e.$superClass!=i;)e=e.$superClass;return e}}},function(t,e,n){var i=n(3);t.exports=function(t,e,n){"use strict";if(t=i(t),e=i(e),!t||!e)return!1;if(n&&n.allowSame&&t===e)return!0;for(;t&&t.$superClass!=e;)t=t.$superClass;return!!t}},function(t,e,n){var i=n(3);t.exports=function(t,e){"use strict";var n=i(t);return n&&n.override(e),n}},function(t,e,n){t.exports=function(t){"use strict";return n(2).overrideClass(this,t)}},function(t,e,n){function i(t){return r(this.prototype,this.prototype,t),this}var r=n(4).copyKeys,o=n(53),s=n(58),a=n(60),u=n(23);t.exports=function(t){"use strict";if(t.extend=o,t.override=s,t.aliasMethods=i,"function"==typeof t.destroy){var e=t.destroy;t.destroy=function(){e.call(this),a.call(this)}}else t.destroy=a;u.process(t),t.init&&t.init()}},function(t,e,n){var i=n(7);t.exports=function(){"use strict";var t=this.prototype.alias;i[t]=null,delete i[t]}},function(t){t.exports=function(){function t(t,e){return function(){var n=o.call(e||[]);return arguments.length&&n.push.apply(n,arguments),t.apply(this,n)}}function e(e){return t(e,o.call(arguments,1))}function n(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}}function i(t,e){return n("before",e,t)}function r(t,e){return n("after",e,t)}var o=Array.prototype.slice;return{before:i,after:r,bindArgs:e,bindArgsArray:t}}()},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,e,n){t.exports=n(70)},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(13);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(72),number:n(13),"int":n(71),"float":n(68),string:n(75),"function":n(69),object:n(73),arguments:n(64),"boolean":n(66),date:n(67),regexp:n(74),array:n(65)}},function(t,e,n){"use strict";var i=n(13);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=Object.prototype.hasOwnProperty,r=n(12),o=n(25),s=n(77),a=n(1),u=function(){return!1},h=function(t,e){return i.call(t,e)},f=function(t){return!!(t&&t.$superClass&&t.prototype&&t.extend&&t.override)},c=Array.prototype.slice,l=function(t){return"function"==typeof t},p=function(t){return t?l(t)||l(t.fn)||"string"==typeof t.fn:!1},g=function(t){t.clear()},d=new o({allowFunctionsAsString:!0,keepFunctionReferences:!0}),v=r.defineMixin({$copyIf:{hasListenersFor:function(){return!!this.getListenerCountFor.apply(this,arguments)},getListenerCountFor:function(t){var e=0;return this.withQueue(t,function(t){e=t.getLength()},{skipEmpty:!0}),e}},$override:{addNormalizedListener:function(t){this.callTarget();var e=t.name,n=t.fn,i=t.scope,r=t.options;return this.withQueue(e,function(t){t.add(n,i,r)}),this}},$before:{eventEmitter:!0,availableEmitterOptions:{once:1,buffer:1,delay:1,defer:1,throttle:1,quickStop:1,selector:1,capture:1},destroy:function(){this.off()},init:function(t){return this.eventQueueState=this.eventQueueState||{},(f(this)||!this.initEventEmitter)&&(this.listeners&&this.on(this.listeners),t&&t.listeners&&t.listeners!=this.listeners&&this.on(t.listeners),this.initEventEmitter=!0),this},withQueue:function(t,e,n){var i="eventQueueState",r=n&&n.checkEmpty;r&&(n.skipEmpty=!0);var o=s.call(this,t,function(r){e.call(this,r),n&&n.checkEmpty&&!r.getLength()&&delete this[i][t]},i,d,n);return r&&!o&&delete this[i][t],this},removeOneEventListener:function(t,e,n,i,r){r.remove(e,n)},removeNormalizedListener:function(t){var e=t.name,n=t.fn,i=t.scope;return t.defaultScope&&(i=null),n?this.withQueue(e,function(r){this.removeOneEventListener(e,n,i,t,r)},{checkEmpty:!0}):this.removeAllListenersFor(e),this},removeAllListenersFor:function(t){return this.withQueue(t,g,{checkEmpty:!0}),this},removeAllListeners:function(){var t,e=this.eventQueueState;for(t in e)h(e,t)&&this.removeAllListenersFor(t);return this.eventQueueState={},this},getNormalizedArray:function(t,e,n,i){var r,o=this.availableEmitterOptions,s=arguments,u=[];if(s.length>1||1==s.length&&"string"==typeof t||Array.isArray(t)){if(Array.isArray(t))return t.forEach(function(t){u.push.apply(u,this.getNormalizedArray(t,e,n,i))},this),u;if(Array.isArray(e))return e.forEach(function(e){u.push.apply(u,this.getNormalizedArray(t,e,n,i))},this),u;var f;return r=i,l(e)?f=e:"string"==typeof e?f=e:p(e)&&(f=e.fn,r=a.copy(i),a.copyKeys(e,r,o),e.options&&a.copy(e.options,r),e.scope&&(n=e.scope)),~t.indexOf(" ")?t.split(" ").forEach(function(t){t&&u.push({defaultScope:null==n,name:t,fn:f,options:r,scope:n||this})},this):u.push({defaultScope:null==n,name:t,fn:f,options:r,scope:n||this}),u}var c,g,d=t;r=a.copyKeys(d,{},o),d.options&&a.copy(d.options,r);for(c in d)h(d,c)&&(g=d[c],(p(g)||Array.isArray(g)||"string"==typeof g&&!(c in o)&&"scope"!=c)&&u.push.apply(u,this.getNormalizedArray(c,g,d.scope,r)));return u},addListener:function(t,e){var n=arguments,i=this;if(1==n.length&&"string"==typeof t){throw new Error("Promise not supported yet for events.")}return this.getNormalizedArray.apply(this,n).forEach(function(t){this.ensureEventOptions(t),this.addNormalizedListener(t)},this),i},on:function(){return this.addListener.apply(this,arguments)},removeListener:function(){var t=arguments;return t.length?this.getNormalizedArray.apply(this,t).forEach(function(t){this.ensureEventOptions(t),this.removeNormalizedListener(t)},this):this.removeAllListeners(),this},off:function(){return this.removeListener.apply(this,arguments)},once:function(){return this.getNormalizedArray.apply(this,arguments).forEach(function(t){this.ensureEventOptions(t),t.options.once=!0,this.addNormalizedListener(t)},this),this},ensureEventOptions:function(t){t.options=t.options||{}},one:function(){return this.once.apply(this,arguments)},emit:function(t){return this.emitEvent(t,c.call(arguments,1))},emitAppEvent:function(t){var e=c.call(arguments,1),n=this.createAppEventObject(t,e);return this.emitEvent(t,e.concat(n))===!1&&(n.stop=!0),n},createAppEventObject:function(t,e){var n={stop:!1};return n.appEvent=!0,n.type=t,n.source=this,n.current=this,n.targets=[this],n.args=e,n},emitEvent:function(t,e,n){if("*"==t)return console.log("You cannot emit the generic event"),!1;var i;return this.lastEventName=t,this.withQueue(t,function(r){this.mutedEvents&&this.mutedEvents[t]&&(n=n||{},n.filter=u),i=r.applyWith(this,e,n)}),this.withQueue("*",function(i){this.mutedEvents&&this.mutedEvents[t]&&(n=n||{},n.filter=u),i.applyWith(this,[t].concat(e),n)},{skipEmpty:!0}),i},trigger:function(){return this.emit.apply(this,arguments)},getLastEventName:function(){return this.lastEventName},quickEmit:function(t){var e,n=c.call(arguments,1);return this.lastEventName=t,this.withQueue(t,function(t){e=t.applyWith(this,n,{quickStop:!0})}),e},muteEvents:function(t){return this.mutedEvents=this.mutedEvents||{},(t||[]).forEach(function(t){this.mutedEvents[t]=1},this),this},unmuteEvents:function(t){return this.mutedEvents&&(t?t.forEach(function(t){delete this.mutedEvents[t]},this):delete this.mutedEvents),this}}}),y=function(t){return t?r.mixin(t,v):new v};y.mixin=v,t.exports=y},function(t,e,n){"use strict";var i=n(78);t.exports=function(t,e,n,r,o){var s=!(!o||!o.skipEmpty),a=!1;return i.call(this,function(n,i){if(!s||n[t]){a=this;var r=n[t]||{};i.from(r),e.call(this,i),r=i.toStateObject(),void 0!==r?n[t]=r:delete n[t]}},n,r),a}},function(t,e,n){"use strict";var i=n(25),r=new i({allowFunctionsAsString:!0,keepFunctionReferences:!0});t.exports=function(t,e,n){n=n||r,this[e]=this[e]||{};var i=n.toStateObject();return t&&t.call(this,this[e],n),n.from(i),this}},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=I(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=R(t.s),t.v=R(t.v),e=h(t.h,t.s,t.v),i=!0,r="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=R(t.s),t.l=R(t.l),e=a(t.h,t.s,t.l),i=!0,r="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=A(n),{ok:i,format:t.format||r,r:B(255,z(e.r,0)),g:B(255,z(e.g,0)),b:B(255,z(e.b,0)),a:n}}function o(t,e,n){return{r:255*P(t,255),g:255*P(e,255),b:255*P(n,255)}}function s(t,e,n){t=P(t,255),e=P(e,255),n=P(n,255);var i,r,o=z(t,e,n),s=B(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var u=o-s;switch(r=a>.5?u/(2-o-s):u/(o+s),o){case t:i=(e-n)/u+(n>e?6:0);break;case e:i=(n-t)/u+2;break;case n:i=(t-e)/u+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=P(t,360),e=P(e,100),n=P(n,100),0===e)r=o=s=n;else{var a=.5>n?n*(1+e):n+e-n*e,u=2*n-a;r=i(u,a,t+1/3),o=i(u,a,t),s=i(u,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function u(t,e,n){t=P(t,255),e=P(e,255),n=P(n,255);var i,r,o=z(t,e,n),s=B(t,e,n),a=o,u=o-s;if(r=0===o?0:u/o,o==s)i=0;else{switch(o){case t:i=(e-n)/u+(n>e?6:0);break;case e:i=(n-t)/u+2;break;case n:i=(t-e)/u+4}i/=6}return{h:i,s:r,v:a}}function h(t,e,n){t=6*P(t,360),e=P(e,100),n=P(n,100);var i=F.floor(t),r=t-i,o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),u=i%6,h=[n,s,o,o,a,n][u],f=[a,n,n,s,o,o][u],c=[o,o,a,n,n,s][u];return{r:255*h,g:255*f,b:255*c}}function f(t,e,n,i){var r=[j(W(t).toString(16)),j(W(e).toString(16)),j(W(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=[j(M(i)),j(W(t).toString(16)),j(W(e).toString(16)),j(W(n).toString(16))];return r.join("")}function l(t,e){e=0===e?0:e||10;var n=V(t).toHsl();return n.s-=e/100,n.s=E(n.s),V(n)}function p(t,e){e=0===e?0:e||10;var n=V(t).toHsl();return n.s+=e/100,n.s=E(n.s),V(n)}function g(t){return V(t).desaturate(100)}function d(t,e){e=0===e?0:e||10;var n=V(t).toHsl();return n.l+=e/100,n.l=E(n.l),V(n)}function v(t,e){e=0===e?0:e||10;var n=V(t).toRgb();return n.r=z(0,B(255,n.r-W(255*-(e/100)))),n.g=z(0,B(255,n.g-W(255*-(e/100)))),n.b=z(0,B(255,n.b-W(255*-(e/100)))),V(n)}function y(t,e){e=0===e?0:e||10;var n=V(t).toHsl();return n.l-=e/100,n.l=E(n.l),V(n)}function m(t,e){var n=V(t).toHsl(),i=(W(n.h)+e)%360;return n.h=0>i?360+i:i,V(n)}function b(t){var e=V(t).toHsl();return e.h=(e.h+180)%360,V(e)}function x(t){var e=V(t).toHsl(),n=e.h;return[V(t),V({h:(n+120)%360,s:e.s,l:e.l}),V({h:(n+240)%360,s:e.s,l:e.l})]}function w(t){var e=V(t).toHsl(),n=e.h;return[V(t),V({h:(n+90)%360,s:e.s,l:e.l}),V({h:(n+180)%360,s:e.s,l:e.l}),V({h:(n+270)%360,s:e.s,l:e.l})]}function C(t){var e=V(t).toHsl(),n=e.h;return[V(t),V({h:(n+72)%360,s:e.s,l:e.l}),V({h:(n+216)%360,s:e.s,l:e.l})]}function _(t,e,n){e=e||6,n=n||30;var i=V(t).toHsl(),r=360/n,o=[V(t)];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(V(i));return o}function S(t,e){e=e||6;for(var n=V(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(V({h:i,s:r,v:o})),o=(o+a)%1;return s}function O(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function A(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function P(t,e){k(t)&&(t="100%");var n=H(t);return t=B(e,z(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),F.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function E(t){return B(1,z(0,t))}function D(t){return parseInt(t,16)}function k(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function j(t){return 1==t.length?"0"+t:""+t}function R(t){return 1>=t&&(t=100*t+"%"),t}function M(t){return Math.round(255*parseFloat(t)).toString(16)}function $(t){return D(t)/255}function I(t){t=t.replace(N,"").replace(L,"").toLowerCase();var e=!1;if(Q[t])t=Q[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Y.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Y.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Y.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Y.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Y.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Y.hex8.exec(t))?{a:$(n[1]),r:D(n[2]),g:D(n[3]),b:D(n[4]),format:e?"name":"hex8"}:(n=Y.hex6.exec(t))?{r:D(n[1]),g:D(n[2]),b:D(n[3]),format:e?"name":"hex"}:(n=Y.hex3.exec(t))?{r:D(n[1]+""+n[1]),g:D(n[2]+""+n[2]),b:D(n[3]+""+n[3]),format:e?"name":"hex"}:!1}var N=/^[\s,#]+/,L=/\s+$/,T=0,F=Math,W=F.round,B=F.min,z=F.max,q=F.random,V=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 n=r(t);this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=W(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=W(this._r)),this._g<1&&(this._g=W(this._g)),this._b<1&&(this._b=W(this._b)),this._ok=n.ok,this._tc_id=T++};V.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=A(t),this._roundA=W(100*this._a)/100,this},toHsv:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=u(this._r,this._g,this._b),e=W(360*t.h),n=W(100*t.s),i=W(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=W(360*t.h),n=W(100*t.s),i=W(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:W(this._r),g:W(this._g),b:W(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+W(this._r)+", "+W(this._g)+", "+W(this._b)+")":"rgba("+W(this._r)+", "+W(this._g)+", "+W(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:W(100*P(this._r,255))+"%",g:W(100*P(this._g,255))+"%",b:W(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+W(100*P(this._r,255))+"%, "+W(100*P(this._g,255))+"%, "+W(100*P(this._b,255))+"%)":"rgba("+W(100*P(this._r,255))+"%, "+W(100*P(this._g,255))+"%, "+W(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:X[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=V(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(y,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},V.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:R(t[i]));t=n}return V(t,e)},V.equals=function(t,e){return t&&e?V(t).toRgbString()==V(e).toRgbString():!1},V.random=function(){return V.fromRatio({r:q(),g:q(),b:q()})},V.mix=function(t,e,n){n=0===n?0:n||50;var i,r=V(t).toRgb(),o=V(e).toRgb(),s=n/100,a=2*s-1,u=o.a-r.a;i=a*u==-1?a:(a+u)/(1+a*u),i=(i+1)/2;var h=1-i,f={r:o.r*i+r.r*h,g:o.g*i+r.g*h,b:o.b*i+r.b*h,a:o.a*s+r.a*(1-s)};return V(f)},V.readability=function(t,e){var n=V(t),i=V(e),r=n.toRgb(),o=i.toRgb(),s=n.getBrightness(),a=i.getBrightness(),u=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:u}},V.isReadable=function(t,e){var n=V.readability(t,e);return n.brightness>125&&n.color>500},V.mostReadable=function(t,e){for(var n=null,i=0,r=!1,o=0;o<e.length;o++){var s=V.readability(t,e[o]),a=s.brightness>125&&s.color>500,u=3*(s.brightness/125)+s.color/500;(a&&!r||a&&r&&u>i||!a&&!r&&u>i)&&(r=a,i=u,n=V(e[o]))}return n};var Q=V.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"},X=V.hexNames=O(Q),Y=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=V:(i=function(){return V}.call(e,n,e,t),!(void 0!==i&&(t.exports=i)))}()},function(t,e,n){"use strict";function i(t){return s.from(t)}var r=n(10),o=n(1).copy,s=n(6),a=function(t){this.config=t};o({initDrag:function(t){this.onDragInit(t);var e=r.once(this.onDragStart,this),n=function(t){e(t),this.onDrag(t)}.bind(this),i=function(t){this.onDrop(t),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",i)}.bind(this);window.addEventListener("mousemove",n,!1),window.addEventListener("mouseup",i)},onDragInit:function(t){var e={};this.state={config:e};this.state.initPageCoords={pageX:t.pageX,pageY:t.pageY};this.config.region&&(this.state.initialRegion=i(this.config.region),this.state.dragRegion=e.dragRegion=this.state.initialRegion.clone()),this.config.constrainTo&&(this.state.constrainTo=i(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)}},a.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 a(e);return i.initDrag(t),i}},function(t,e,n){"use strict";var i=n(16),r=n(6),o=n(1).copy,s=n(26),a=n(27);t.exports=i.createClass(o(s,{displayName:"HueSpectrum",getDefaultProps:function(){return{height:300,width:30,pointerSize:3,defaultColor:n(14)}},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(15)}))},function(t,e,n){"use strict";var i=n(16),r=n(6),o=n(1).copy,s=n(9).fromRatio,a=n(26),u=n(27);t.exports=i.createClass(o(a,{displayName:"SaturationSpectrum",getDefaultProps:function(){return{height:300,width:300,pointerSize:7,defaultColor:n(14)}},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,u=this.props.pointerSize,h=Math.floor(u/2);return this.props.value&&this.state.mouseDown&&(s=this.state.mouseDown.x),{left:s-h,top:a-h}},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=u(t),this.hsv.s=this.getSaturationForPoint(t),this.hsv.v=this.getColorValueForPoint(t)},toStringValue:n(15)}))},function(t,e,n,i){var r=n(i);t.exports=function(t,e){return r(e.length)(t,e)}}]))});
!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)}]))});

@@ -1,4 +0,4 @@

'use strict'
'use strict';
require('./resources/style/index.styl')
require('./style/index.styl')

@@ -5,0 +5,0 @@ var React = require('react')

@@ -1,6 +0,6 @@

'use strict'
'use strict';
var Region = require('region')
var copy = require('copy-utils').copy
var DragHelper = require('./DragHelper')
var DragHelper = require('drag-helper')
var toHsv = require('./color').toHsv

@@ -7,0 +7,0 @@

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

@@ -28,8 +28,7 @@ "main": "lib/index.js",

"copy-utils": "^1.0.0",
"drag-helper": "^1.2.0",
"functionally": "^0.6.2",
"gulp-react": "^2.0.0",
"jsx-loader": "^0.12.1",
"normalize.css": "^3.0.2",
"react": "^0.12.0",
"region": "^1.2.1",
"region": "^2.0.0",
"tinycolor2": "^1.0.0"

@@ -36,0 +35,0 @@ },

@@ -1,6 +0,6 @@

'use strict'
'use strict';
var Region = require('region')
var copy = require('copy-utils').copy
var DragHelper = require('./DragHelper')
var DragHelper = require('drag-helper')
var toHsv = require('./color').toHsv

@@ -7,0 +7,0 @@

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