From 43c92187ab120f5ad07f3f740278bc9283746b1b Mon Sep 17 00:00:00 2001 From: Chris Hutchinson Date: Mon, 3 May 2021 17:35:59 +0100 Subject: [PATCH] Bring RVG.js into CardKit, update build and docs for React 17 --- LICENSE | 2 +- README.md | 8 +- dist/README.md | 5 +- dist/dom.js | 8 +- docs/bundle.js | 29739 ++++++++++++++++ docs/code/Card.html | 14 +- docs/code/CardKit.html | 2 +- docs/code/CardKitDOM.html | 2 +- docs/code/CardKitServer.html | 2 +- docs/code/SVGToImage.html | 2 +- docs/code/cardkit.js.html | 2 +- docs/code/index.html | 9 +- docs/code/renderers_dom_SVGToImage.js.html | 2 +- docs/code/renderers_dom_dom.js.html | 2 +- docs/code/renderers_server_server.js.html | 2 +- docs/code/renderers_shared_Card.js.html | 15 +- docs/index.html | 111 +- dom.js | 1581 +- examples/browser-script/index.html | 5 +- examples/configurations/sample.js | 3 +- index.html | 467 +- package-lock.json | 18 +- package.json | 32 +- server.js | 1283 +- .../dom/ui/elements/Canvas/component.js | 14 +- .../dom/ui/elements/Header/component.js | 4 +- src/renderers/dom/ui/ui.js | 10 +- src/renderers/shared/Card.js | 13 +- src/rvg/elements.js | 11 + src/rvg/elements/base/draggable.js | 30 + src/rvg/elements/circle.js | 31 + src/rvg/elements/ellipse.js | 40 + src/rvg/elements/image.js | 39 + src/rvg/elements/line.js | 36 + src/rvg/elements/linear-gradient.js | 41 + src/rvg/elements/path.js | 23 + src/rvg/elements/rectangle.js | 44 + src/rvg/elements/svg.js | 119 + src/rvg/elements/text.js | 103 + webpack/base.config.js | 5 +- webpack/dev.config.js | 8 +- webpack/dist-core-script.config.js | 26 +- webpack/dist-core.config.js | 27 +- webpack/dist-docs.config.js | 23 +- webpack/dist-dom-script.config.js | 24 +- webpack/dist-dom.config.js | 25 +- webpack/dist-server.config.js | 21 +- 47 files changed, 33059 insertions(+), 974 deletions(-) create mode 100644 docs/bundle.js create mode 100644 src/rvg/elements.js create mode 100644 src/rvg/elements/base/draggable.js create mode 100644 src/rvg/elements/circle.js create mode 100644 src/rvg/elements/ellipse.js create mode 100644 src/rvg/elements/image.js create mode 100644 src/rvg/elements/line.js create mode 100644 src/rvg/elements/linear-gradient.js create mode 100644 src/rvg/elements/path.js create mode 100644 src/rvg/elements/rectangle.js create mode 100644 src/rvg/elements/svg.js create mode 100644 src/rvg/elements/text.js diff --git a/LICENSE b/LICENSE index 8151162..7434a6f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright (c) 2016 Times Newspapers Limited +Copyright (c) 2016 Chris Hutchinson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index a057580..f0fce15 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # CardKit -[![Join the chat at https://gitter.im/times/cardkit](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/times/cardkit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - > A simple, powerful and fully configurable image editor for web browers and servers. Optional UI included. CardKit has three main parts: @@ -12,7 +10,7 @@ CardKit has three main parts: Additionally, a base class allows you to create your own renderers. See more in the [Custom Renderers](#custom-renderers) section. -**For version 1, see the [`v1-master`](https://github.com/times/cardkit/tree/v1-master) branch** +**For version 1, see the [`v1-master`](https://github.com/chrishutchinson/cardkit/tree/v1-master) branch** ## Installation @@ -74,11 +72,11 @@ renderer.renderUI("card"); diff --git a/dist/README.md b/dist/README.md index 26e51c2..76b2375 100644 --- a/dist/README.md +++ b/dist/README.md @@ -4,8 +4,9 @@ The files in here can be used in ` - + + + diff --git a/dist/dom.js b/dist/dom.js index 89b1da4..ee33249 100644 --- a/dist/dom.js +++ b/dist/dom.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("CardKitDOM",["react","react-dom"],t):"object"==typeof exports?exports.CardKitDOM=t(require("react"),require("react-dom")):e.CardKitDOM=t(e.React,e.ReactDOM)}(window,(function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=86)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(88)()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var n=s(r(127)),o=s(r(203)),a=s(r(229)),i=s(r(230)),u=s(r(231)),l=s(r(232));function s(e){return e&&e.__esModule?e:{default:e}}t.hover=i.default,t.handleHover=i.default,t.handleActive=u.default,t.loop=l.default;var c=t.ReactCSS=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=B(e,360),t=B(t,100),r=B(r,100),0===t)n=o=a=r;else{var u=r<.5?r*(1+t):r+t-r*t,l=2*r-u;n=i(l,u,e+1/3),o=i(l,u,e),a=i(l,u,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,n,l),f=!0,p="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,d,b;return r=T(r),{ok:f,format:e.format||p,r:s(255,c(t.r,0)),g:s(255,c(t.g,0)),b:s(255,c(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=r.ok,this._tc_id=u++}function h(e,t,r){e=B(e,255),t=B(t,255),r=B(r,255);var n,o,a=c(e,t,r),i=s(e,t,r),u=(a+i)/2;if(a==i)n=o=0;else{var l=a-i;switch(o=u>.5?l/(2-a-i):l/(a+i),a){case e:n=(t-r)/l+(t>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(p(n));return a}function S(e,t){t=t||6;for(var r=p(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],u=1/t;t--;)i.push(p({h:n,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:o.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=l(360*e.h),r=l(100*e.s),n=l(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),r=l(100*e.s),n=l(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return b(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var a=[D(l(e).toString(16)),D(l(t).toString(16)),D(l(r).toString(16)),D(M(n))];if(o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*B(this._r,255))+"%",g:l(100*B(this._g,255))+"%",b:l(100*B(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*B(this._r,255))+"%, "+l(100*B(this._g,255))+"%, "+l(100*B(this._b,255))+"%)":"rgba("+l(100*B(this._r,255))+"%, "+l(100*B(this._g,255))+"%, "+l(100*B(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[b(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+y(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);r="#"+y(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(j,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:z(e[n]));e=r}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,r){r=0===r?0:r||50;var n=p(e).toRgb(),o=p(t).toRgb(),a=r/100;return p({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},p.readability=function(e,t){var r=p(e),n=p(t);return(o.max(r.getLuminance(),n.getLuminance())+.05)/(o.min(r.getLuminance(),n.getLuminance())+.05)},p.isReadable=function(e,t,r){var n,o,a=p.readability(e,t);switch(o=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,r){var n,o,a,i,u=null,l=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var s=0;sl&&(l=n,u=p(t[s]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(r.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],r))};var R=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=p.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(R);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function B(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,c(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function F(e){return s(1,c(0,e))}function L(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function z(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function I(e){return L(e)/255}var V,N,U,H=(N="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Y(e){return!!H.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(n=function(){return p}.call(t,r,t,e))||(e.exports=n)}(Math)},function(e,t){e.exports={slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},svgToBase64:function(e,t){return t(unescape(encodeURIComponent(e)))},capitaliseFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}}},function(e,t,r){var n=r(64),o=r(31);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(145),o=r(146),a=r(147),i=r(148),u=r(149);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(57),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,u=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,r(30)(e))},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(63)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(19),o=r(150),a=r(151),i=r(152),u=r(153),l=r(154);function s(e){var t=this.__data__=new n(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=a,s.prototype.get=i,s.prototype.has=u,s.prototype.set=l,e.exports=s},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(11)(r(7),"Map");e.exports=n},function(e,t,r){var n=r(159),o=r(166),a=r(168),i=r(169),u=r(170);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).map((function(t,r){var o=e[t],a="svg";return"object"===n(e[t])&&(o=e[t].src,a=e[t].format||"svg"),s.createElement("style",{key:r},"@font-face {\n font-family: '".concat(t,"';\n src: url(\"").concat(o,'") format("').concat(a,'");\n font-weight: normal;\n font-style: normal;\n }'))}))}},{key:"render",value:function(){var e=this.props.configuration,t=e.card,r=e.fonts,n=e.layers,o=this.computeLayers(n),a=this.computeGradients(n),i=this.computeFonts(r);return s.createElement("div",{className:"card",ref:this.svgRef,style:{maxWidth:t.width,maxHeight:t.height}},s.createElement(p,{height:t.height,width:t.width,fill:t.fill},s.createElement("defs",null,i,a),o))}}])&&o(t.prototype,r),u&&o(t,u),c}(s.Component);w.propTypes={configuration:c.shape({card:c.object,fonts:c.object,layers:c.object}),onMount:c.func},e.exports=w},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(27))},function(e,t,r){var n=r(131),o=r(15);e.exports=function(e,t){return e&&n(e,t,o)}},function(e,t,r){var n=r(133),o=r(60),a=r(6),i=r(29),u=r(61),l=r(62),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=a(e),c=!r&&o(e),f=!r&&!c&&i(e),p=!r&&!c&&!f&&l(e),h=r||c||f||p,d=h?n(e.length,String):[],b=d.length;for(var y in e)!t&&!s.call(e,y)||h&&("length"==y||f&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,b))||d.push(y);return d}},function(e,t,r){var n=r(134),o=r(8),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=l},function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&ec))return!1;var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var d=-1,b=!0,y=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++d=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:a,height:l},c)},f),i.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:a,height:l},c)},f),i.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:2,t=arguments.length>1?arguments[1]:void 0;t=t.childNodes[0]||document.getElementById(this.renderedCardID).childNodes[0];var r=new d(t),n="cardkit-default.jpg",o=this.computeConfiguration(),a=Object.keys(o.layers).find((function(e){var t=o.layers[e];return!0===t.useAsFilename&&!0!==t.hidden&&"text"===t.type})),i=o.layers[a];i&&(n=b(i.text)+".jpg"),r.download(n,{format:"image/jpeg",scale:e})}}])&&o(t.prototype,r),n&&o(t,n),l}(p);e.exports=y},function(e,r){e.exports=t},function(e,t,r){"use strict";var n=r(89);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";e.exports={SVG:r(91),Text:r(92),Rectangle:r(98),Circle:r(99),Ellipse:r(100),Line:r(101),Image:r(102),Path:r(103),LinearGradient:r(104)}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),l=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),c(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function s(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return g(o)||(o=c(e,o,n)),o}var a=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,r);if(a)return a;var i=Object.keys(r),u=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),E(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(r);if(0===i.length){if(O(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return f(r)}var s,x="",j=!1,C=["{","}"];(h(r)&&(j=!0,C=["[","]"]),O(r))&&(x=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(x=" "+RegExp.prototype.toString.call(r)),w(r)&&(x=" "+Date.prototype.toUTCString.call(r)),E(r)&&(x=" "+f(r)),0!==i.length||j&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),s=j?function(e,t,r,n,o){for(var a=[],i=0,u=t.length;i=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(s,x,C)):C[0]+x+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,o,a){var i,u,l;if((l=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(u=e.stylize("[Setter]","special")),A(n,o)||(i="["+o+"]"),u||(e.seen.indexOf(l.value)<0?(u=b(r)?c(e,l.value,null):c(e,l.value,r-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+u.split("\n").map((function(e){return" "+e})).join("\n")):u=e.stylize("[Circular]","special")),v(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function b(e){return null===e}function y(e){return"number"==typeof e}function g(e){return"string"==typeof e}function v(e){return void 0===e}function m(e){return x(e)&&"[object RegExp]"===j(e)}function x(e){return"object"==typeof e&&null!==e}function w(e){return x(e)&&"[object Date]"===j(e)}function E(e){return x(e)&&("[object Error]"===j(e)||e instanceof Error)}function O(e){return"function"==typeof e}function j(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(v(a)&&(a=Object({NODE_ENV:"production"}).NODE_DEBUG||""),r=r.toUpperCase(),!i[r])if(new RegExp("\\b"+r+"\\b","i").test(a)){var n=e.pid;i[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else i[r]=function(){};return i[r]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=m,t.isObject=x,t.isDate=w,t.isError=E,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(95);var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),_[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",k(),t.format.apply(t,arguments))},t.inherits=r(96),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var S="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(S&&e[S]){var t;if("function"!=typeof(t=e[S]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,S,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],a=0;a1)for(var r=1;r0&&void 0!==arguments[0]&&arguments[0];return this.cardkit.computeConfiguration(e)}}])&&n(t.prototype,r),a&&n(t,a),e}();e.exports=a},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];if(o(this,e),!t)throw new Error("A configuration object was not provided");if(!this._isValidConfiguration(t))throw new Error("Invalid configuration object provided");this.configuration=t,this._configureOptions(r),this.renderers=[]}var t,r,u;return t=e,(r=[{key:"_configureOptions",value:function(e){if(e){if(e.templates){if(!this._isValidTemplatesConfiguration(e.templates))throw new Error("Invalid templates configuration object provided");this.templates=e.templates}else this.templates=null;if(e.themes){if(!this._isValidThemesConfiguration(e.themes))throw new Error("Invalid themes configuration object provided");this.themes=e.themes}else this.themes=null;if(e.layouts){if(!this._isValidLayoutsConfiguration(e.layouts))throw new Error("Invalid layouts configuration object provided");this.layouts=e.layouts}else this.layouts=null}}},{key:"_isValidConfiguration",value:function(e){return"object"===n(e)&&void 0!==e.card&&"object"===n(e.card)&&void 0!==e.card.height&&void 0!==e.card.width}},{key:"_isValidTemplatesConfiguration",value:function(e){return"object"===n(e)}},{key:"_isValidThemesConfiguration",value:function(e){return"object"===n(e)}},{key:"_isValidLayoutsConfiguration",value:function(e){return"object"===n(e)}},{key:"_isValidRenderer",value:function(e){return e.cardkit===this}},{key:"computeConfiguration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=Object.assign({},this.configuration);return e&&(e.template&&void 0!==this.templates[e.template]&&(t=i(t,this.templates[e.template])),e.theme&&void 0!==this.themes[e.theme]&&(t=i(t,this.themes[e.theme])),e.layout&&void 0!==this.layouts[e.layout]&&(t=i(t,this.layouts[e.layout]))),t}},{key:"updateConfiguration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{layouts:null,templates:null,themes:null},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.configuration=e,this._configureOptions(t),r){var n=this.getRenderers();n.forEach((function(e){switch(e.constructor.name){case"CardKitDOM":e.rerender()}}))}}},{key:"getRenderers",value:function(){return this.renderers}},{key:"addRenderer",value:function(e){if(!this._isValidRenderer(e))throw new Error("Invalid renderer object provided");this.renderers.push(e)}}])&&a(t.prototype,r),u&&a(t,u),e}();e.exports=u,"undefined"!=typeof window&&(window.CardKit=u)},function(e,t,r){"use strict";(function(t){ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("CardKitDOM",["react","react-dom"],t):"object"==typeof exports?exports.CardKitDOM=t(require("react"),require("react-dom")):e.CardKitDOM=t(e.React,e.ReactDOM)}(window,(function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=86)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(88)()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var n=l(r(126)),o=l(r(202)),i=l(r(228)),a=l(r(229)),u=l(r(230)),c=l(r(231));function l(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=u.default,t.loop=c.default;var s=t.ReactCSS=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=B(e,360),t=B(t,100),r=B(r,100),0===t)n=o=i=r;else{var u=r<.5?r*(1+t):r+t-r*t,c=2*r-u;n=a(c,u,e+1/3),o=a(c,u,e),i=a(c,u,e-1/3)}return{r:255*n,g:255*o,b:255*i}}(e.h,n,c),f=!0,p="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,d,y;return r=T(r),{ok:f,format:e.format||p,r:l(255,s(t.r,0)),g:l(255,s(t.g,0)),b:l(255,s(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=u++}function h(e,t,r){e=B(e,255),t=B(t,255),r=B(r,255);var n,o,i=s(e,t,r),a=l(e,t,r),u=(i+a)/2;if(i==a)n=o=0;else{var c=i-a;switch(o=u>.5?c/(2-i-a):c/(i+a),i){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+o)%360,i.push(p(n));return i}function k(e,t){t=t||6;for(var r=p(e).toHsv(),n=r.h,o=r.s,i=r.v,a=[],u=1/t;t--;)a.push(p({h:n,s:o,v:i})),i=(i+u)%1;return a}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:o.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return y(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var i=[z(c(e).toString(16)),z(c(t).toString(16)),z(c(r).toString(16)),z(I(n))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*B(this._r,255))+"%",g:c(100*B(this._g,255))+"%",b:c(100*B(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*B(this._r,255))+"%, "+c(100*B(this._g,255))+"%, "+c(100*B(this._b,255))+"%)":"rgba("+c(100*B(this._r,255))+"%, "+c(100*B(this._g,255))+"%, "+c(100*B(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[y(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+b(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);r="#"+b(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(j,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:D(e[n]));e=r}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,r){r=0===r?0:r||50;var n=p(e).toRgb(),o=p(t).toRgb(),i=r/100;return p({r:(o.r-n.r)*i+n.r,g:(o.g-n.g)*i+n.g,b:(o.b-n.b)*i+n.b,a:(o.a-n.a)*i+n.a})},p.readability=function(e,t){var r=p(e),n=p(t);return(o.max(r.getLuminance(),n.getLuminance())+.05)/(o.min(r.getLuminance(),n.getLuminance())+.05)},p.isReadable=function(e,t,r){var n,o,i=p.readability(e,t);switch(o=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},p.mostReadable=function(e,t,r){var n,o,i,a,u=null,c=0;o=(r=r||{}).includeFallbackColors,i=r.level,a=r.size;for(var l=0;lc&&(c=n,u=p(t[l]));return p.isReadable(e,u,{level:i,size:a})||!o?u:(r.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],r))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=p.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function B(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,s(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function F(e){return l(1,s(0,e))}function L(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function D(e){return e<=1&&(e=100*e+"%"),e}function I(e){return o.round(255*parseFloat(e)).toString(16)}function M(e){return L(e)/255}var V,N,U,H=(N="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Y(e){return!!H.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(n=function(){return p}.call(t,r,t,e))||(e.exports=n)}(Math)},function(e,t){e.exports={slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},svgToBase64:function(e,t){return t(unescape(encodeURIComponent(e)))},capitaliseFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}}},function(e,t,r){var n=r(64),o=r(31);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(144),o=r(145),i=r(146),a=r(147),u=r(148);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(57),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(this,r(30)(e))},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(63)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(19),o=r(149),i=r(150),a=r(151),u=r(152),c=r(153);function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=c,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(11)(r(7),"Map");e.exports=n},function(e,t,r){var n=r(158),o=r(165),i=r(167),a=r(168),u=r(169);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).map((function(t,r){var o=e[t],i="svg";return"object"===n(e[t])&&(o=e[t].src,i=e[t].format||"svg"),l.createElement("style",{key:r},"@font-face {\n font-family: '".concat(t,"';\n src: url(\"").concat(o,'") format("').concat(i,'");\n font-weight: normal;\n font-style: normal;\n }'))}))}},{key:"render",value:function(){var e=this.props.configuration,t=e.card,r=e.fonts,n=e.layers,o=this.computeLayers(n),i=this.computeGradients(n),a=this.computeFonts(r);return l.createElement("div",{className:"card",ref:this.props.svgRef,style:{maxWidth:t.width,maxHeight:t.height}},l.createElement(p,{height:t.height,width:t.width,fill:t.fill},l.createElement("defs",null,a,i),o))}}])&&o(t.prototype,r),u&&o(t,u),s}(l.Component);w.propTypes={configuration:s.shape({card:s.object,fonts:s.object,layers:s.object}),svgRef:s.any.isRequired},e.exports=w},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(27))},function(e,t,r){var n=r(130),o=r(15);e.exports=function(e,t){return e&&n(e,t,o)}},function(e,t,r){var n=r(132),o=r(60),i=r(6),a=r(29),u=r(61),c=r(62),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),s=!r&&o(e),f=!r&&!s&&a(e),p=!r&&!s&&!f&&c(e),h=r||s||f||p,d=h?n(e.length,String):[],y=d.length;for(var b in e)!t&&!l.call(e,b)||h&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||u(b,y))||d.push(b);return d}},function(e,t,r){var n=r(133),o=r(8),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=c},function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&es))return!1;var p=c.get(e),h=c.get(t);if(p&&h)return p==t&&h==e;var d=-1,y=!0,b=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++d=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:i,height:c},s)},f),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:i,height:c},s)},f),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:2,t=arguments.length>1?arguments[1]:void 0;t=t.childNodes[0]||document.getElementById(this.renderedCardID).childNodes[0];var r=new d(t),n="cardkit-default.jpg",o=this.computeConfiguration(),i=Object.keys(o.layers).find((function(e){var t=o.layers[e];return!0===t.useAsFilename&&!0!==t.hidden&&"text"===t.type})),a=o.layers[i];a&&(n=y(a.text)+".jpg"),r.download(n,{format:"image/jpeg",scale:e})}}])&&o(t.prototype,r),n&&o(t,n),c}(p);e.exports=b},function(e,r){e.exports=t},function(e,t,r){"use strict";var n=r(89);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){e.exports={SVG:r(91),Text:r(92),Rectangle:r(97),Circle:r(98),Ellipse:r(99),Line:r(100),Image:r(101),Path:r(102),LinearGradient:r(103)}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),c=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),s(n,e,n.depth)}function c(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function l(e,t){return e}function s(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=s(e,o,n)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),u=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(O(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return f(r)}var l,x="",j=!1,C=["{","}"];(h(r)&&(j=!0,C=["[","]"]),O(r))&&(x=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(x=" "+RegExp.prototype.toString.call(r)),w(r)&&(x=" "+Date.prototype.toUTCString.call(r)),E(r)&&(x=" "+f(r)),0!==a.length||j&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),l=j?function(e,t,r,n,o){for(var i=[],a=0,u=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(l,x,C)):C[0]+x+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,o,i){var a,u,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),S(n,o)||(a="["+o+"]"),u||(e.seen.indexOf(c.value)<0?(u=y(r)?s(e,c.value,null):s(e,c.value,r-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+u.split("\n").map((function(e){return" "+e})).join("\n")):u=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function y(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function g(e){return void 0===e}function m(e){return x(e)&&"[object RegExp]"===j(e)}function x(e){return"object"==typeof e&&null!==e}function w(e){return x(e)&&"[object Date]"===j(e)}function E(e){return x(e)&&("[object Error]"===j(e)||e instanceof Error)}function O(e){return"function"==typeof e}function j(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(g(i)&&(i=Object({NODE_ENV:"production"}).NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;a[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else a[r]=function(){};return a[r]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=m,t.isObject=x,t.isDate=w,t.isError=E,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(95);var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),_[e.getMonth()],t].join(" ")}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",R(),t.format.apply(t,arguments))},t.inherits=r(96),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(k&&e[k]){var t;if("function"!=typeof(t=e[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i1)for(var r=1;r0&&void 0!==arguments[0]&&arguments[0];return this.cardkit.computeConfiguration(e)}}])&&n(t.prototype,r),i&&n(t,i),e}();e.exports=i},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];if(o(this,e),!t)throw new Error("A configuration object was not provided");if(!this._isValidConfiguration(t))throw new Error("Invalid configuration object provided");this.configuration=t,this._configureOptions(r),this.renderers=[]}var t,r,u;return t=e,(r=[{key:"_configureOptions",value:function(e){if(e){if(e.templates){if(!this._isValidTemplatesConfiguration(e.templates))throw new Error("Invalid templates configuration object provided");this.templates=e.templates}else this.templates=null;if(e.themes){if(!this._isValidThemesConfiguration(e.themes))throw new Error("Invalid themes configuration object provided");this.themes=e.themes}else this.themes=null;if(e.layouts){if(!this._isValidLayoutsConfiguration(e.layouts))throw new Error("Invalid layouts configuration object provided");this.layouts=e.layouts}else this.layouts=null}}},{key:"_isValidConfiguration",value:function(e){return"object"===n(e)&&void 0!==e.card&&"object"===n(e.card)&&void 0!==e.card.height&&void 0!==e.card.width}},{key:"_isValidTemplatesConfiguration",value:function(e){return"object"===n(e)}},{key:"_isValidThemesConfiguration",value:function(e){return"object"===n(e)}},{key:"_isValidLayoutsConfiguration",value:function(e){return"object"===n(e)}},{key:"_isValidRenderer",value:function(e){return e.cardkit===this}},{key:"computeConfiguration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=Object.assign({},this.configuration);return e&&(e.template&&void 0!==this.templates[e.template]&&(t=a(t,this.templates[e.template])),e.theme&&void 0!==this.themes[e.theme]&&(t=a(t,this.themes[e.theme])),e.layout&&void 0!==this.layouts[e.layout]&&(t=a(t,this.layouts[e.layout]))),t}},{key:"updateConfiguration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{layouts:null,templates:null,themes:null},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.configuration=e,this._configureOptions(t),r){var n=this.getRenderers();n.forEach((function(e){switch(e.constructor.name){case"CardKitDOM":e.rerender()}}))}}},{key:"getRenderers",value:function(){return this.renderers}},{key:"addRenderer",value:function(e){if(!this._isValidRenderer(e))throw new Error("Invalid renderer object provided");this.renderers.push(e)}}])&&i(t.prototype,r),u&&i(t,u),e}();e.exports=u,"undefined"!=typeof window&&(window.CardKit=u)},function(e,t,r){"use strict";(function(t){ /*! * @description Recursive object extending * @author Viacheslav Lotsmanov @@ -25,13 +25,13 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -function r(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function n(e){if(e instanceof t){var r=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(r),r}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach((function(e,a){"object"==typeof e&&null!==e?Array.isArray(e)?t[a]=o(e):r(e)?t[a]=n(e):t[a]=i({},e):t[a]=e})),t}function a(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,u=arguments[0],l=Array.prototype.slice.call(arguments,1);return l.forEach((function(l){"object"!=typeof l||null===l||Array.isArray(l)||Object.keys(l).forEach((function(s){return t=a(u,s),(e=a(l,s))===u?void 0:"object"!=typeof e||null===e?void(u[s]=e):Array.isArray(e)?void(u[s]=o(e)):r(e)?void(u[s]=n(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(u[s]=i({},e)):void(u[s]=i(t,e))}))})),u}}).call(this,r(108).Buffer)},function(e,t,r){"use strict";(function(e){ +function r(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function n(e){if(e instanceof t){var r=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(r),r}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach((function(e,i){"object"==typeof e&&null!==e?Array.isArray(e)?t[i]=o(e):r(e)?t[i]=n(e):t[i]=a({},e):t[i]=e})),t}function i(e,t){return"__proto__"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,u=arguments[0],c=Array.prototype.slice.call(arguments,1);return c.forEach((function(c){"object"!=typeof c||null===c||Array.isArray(c)||Object.keys(c).forEach((function(l){return t=i(u,l),(e=i(c,l))===u?void 0:"object"!=typeof e||null===e?void(u[l]=e):Array.isArray(e)?void(u[l]=o(e)):r(e)?void(u[l]=n(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(u[l]=a({},e)):void(u[l]=a(t,e))}))})),u}}).call(this,r(107).Buffer)},function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var n=r(109),o=r(110),a=r(111);function i(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function d(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){var a,i=1,u=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,u/=2,l/=2,r/=2}function s(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var c=-1;for(a=r;au&&(r=u-l),a=r;a>=0;a--){for(var f=!0,p=0;po&&(n=o):n=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var i=0;i>8,o=r%256,a.push(o),a.push(n);return a}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:s>223?3:s>191?2:1;if(o+f<=r)switch(f){case 1:s<128&&(c=s);break;case 2:128==(192&(a=e[o+1]))&&(l=(31&s)<<6|63&a)>127&&(c=l);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(l=(15&s)<<12|(63&a)<<6|63&i)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[o+1],i=e[o+2],u=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&u)&&(l=(15&s)<<18|(63&a)<<12|(63&i)<<6|63&u)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},l.prototype.compare=function(e,t,r,n,o){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),u=Math.min(a,i),s=this.slice(n,o),c=e.slice(t,r),f=0;fo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return O(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,o,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function F(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function L(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,a){return a||L(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,a){return a||L(e,0,r,8),o.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e],o=1,a=0;++a=(o*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=t,o=1,a=this[e+--n];n>0&&(o*=256);)a+=this[e+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||T(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var a=0,i=1,u=0;for(this[t]=255&e;++a>0)-u&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var a=r-1,i=1,u=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===u&&0!==this[t+a+1]&&(u=1),this[t+a]=(e/i>>0)-u&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function N(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(27))},function(e,t,r){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=s(e),i=n[0],u=n[1],l=new a(function(e,t,r){return 3*(t+r)/4-r}(0,i,u)),c=0,f=u>0?i-4:i;for(r=0;r>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===u&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===u&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,a=[],i=0,u=r-o;iu?u:i+16383));1===o?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,l=i.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var o,a,i=[],u=t;u>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){ +var n=r(108),o=r(109),i=r(110);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,a=1,u=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,u/=2,c/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var s=-1;for(i=r;iu&&(r=u-c),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:l>223?3:l>191?2:1;if(o+f<=r)switch(f){case 1:l<128&&(s=l);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&l)<<6|63&i)>127&&(s=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&l)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(s=c);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(c=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&c<1114112&&(s=c)}null===s?(s=65533,f=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(i,a),l=this.slice(n,o),s=e.slice(t,r),f=0;fo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return O(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function R(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function F(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function L(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,n,i){return i||L(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,i){return i||L(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||T(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var i=0,a=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var i=r-1,a=1,u=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function N(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(27))},function(e,t,r){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=l(e),a=n[0],u=n[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),s=0,f=u>0?a-4:a;for(r=0;r>16&255,c[s++]=t>>8&255,c[s++]=255&t;2===u&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,c[s++]=255&t);1===u&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,c[s++]=t>>8&255,c[s++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,u=r-o;au?u:a+16383));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function s(e,t,r){for(var o,i,a=[],u=t;u>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -t.read=function(e,t,r,n,o){var a,i,u=8*o-n-1,l=(1<>1,c=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,a=h&(1<<-c)-1,h>>=-c,c+=u;c>0;a=256*a+e[t+f],f+=p,c-=8);for(i=a&(1<<-c)-1,a>>=-c,c+=n;c>0;i=256*i+e[t+f],f+=p,c-=8);if(0===a)a=1-s;else{if(a===l)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,n),a-=s}return(h?-1:1)*i*Math.pow(2,a-n)},t.write=function(e,t,r,n,o,a){var i,u,l,s=8*a-o-1,c=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,d=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,i=c):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),(t+=i+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(i++,l/=2),i+f>=c?(u=0,i=c):i+f>=1?(u=(t*l-1)*Math.pow(2,o),i+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,o),i=0));o>=8;e[r+h]=255&u,h+=d,u/=256,o-=8);for(i=i<0;e[r+h]=255&i,h+=d,i/=256,s-=8);e[r+h-d]|=128*b}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return r.push(e)})):(0,a.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&r.push(t),r.push(t+"-"+e)})):(0,n.default)(t)&&r.push(t)})),r};t.default=l},function(e,t,r){var n=r(10),o=r(6),a=r(8);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==n(e)}},function(e,t,r){var n=r(14),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[u]=r:delete e[u]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){var n=r(132)();e.exports=n},function(e,t){e.exports=function(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),u=i.length;u--;){var l=i[e?u:++o];if(!1===r(a[l],l,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r-1}},function(e,t,r){var n=r(20);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(19);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(19),o=r(38),a=r(39);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(64),o=r(156),a=r(13),i=r(67),u=/^\[object .+?Constructor\]$/,l=Function.prototype,s=Object.prototype,c=l.toString,f=s.hasOwnProperty,p=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?p:u).test(i(e))}},function(e,t,r){var n,o=r(157),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},function(e,t,r){var n=r(7)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(160),o=r(19),a=r(38);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},function(e,t,r){var n=r(161),o=r(162),a=r(163),i=r(164),u=r(165);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],r=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,n.default)(o,(function(e,t){r[t]||(r[t]={}),r[t]=a({},r[t],o[t])})),t})),r};t.default=u},function(e,t,r){var n=r(205);e.exports=function(e){return n(e,5)}},function(e,t,r){var n=r(36),o=r(206),a=r(79),i=r(208),u=r(209),l=r(212),s=r(213),c=r(214),f=r(215),p=r(71),h=r(216),d=r(23),b=r(217),y=r(218),g=r(223),v=r(6),m=r(29),x=r(225),w=r(13),E=r(227),O=r(15),j=r(43),C={};C["[object Arguments]"]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C["[object Object]"]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C["[object Function]"]=C["[object WeakMap]"]=!1,e.exports=function e(t,r,_,k,A,S){var R,P=1&r,T=2&r,B=4&r;if(_&&(R=A?_(t,k,A,S):_(t)),void 0!==R)return R;if(!w(t))return t;var F=v(t);if(F){if(R=b(t),!P)return s(t,R)}else{var L=d(t),D="[object Function]"==L||"[object GeneratorFunction]"==L;if(m(t))return l(t,P);if("[object Object]"==L||"[object Arguments]"==L||D&&!A){if(R=T||D?{}:g(t),!P)return T?f(t,u(R,t)):c(t,i(R,t))}else{if(!C[L])return A?t:{};R=y(t,L,P)}}S||(S=new n);var z=S.get(t);if(z)return z;S.set(t,R),E(t)?t.forEach((function(n){R.add(e(n,r,_,n,t,S))})):x(t)&&t.forEach((function(n,o){R.set(o,e(n,r,_,o,t,S))}));var M=F?void 0:(B?T?h:p:T?j:O)(t);return o(M||t,(function(n,o){M&&(n=t[o=n]),a(R,o,e(n,r,_,o,t,S))})),R}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,a,s;u(this,n);for(var c=arguments.length,f=Array(c),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,a,s;u(this,n);for(var c=arguments.length,f=Array(c),p=0;p1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&n("first-child"),e===t-1&&n("last-child"),(0===e||e%2==0)&&n("even"),1===Math.abs(e%2)&&n("odd"),n("nth-child",e),r}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};t.format=t.format||"image/jpeg",this._toDataURI(t,(function(r){var n=new window.Image;n.src=r,n.onload=function(){var r=document.createElement("canvas");r.width=n.width,r.height=n.height,r.getContext("2d").drawImage(n,0,0,n.width,n.height,0,0,r.width,r.height);var o=document.createElement("a");o.download=e,o.href=r.toDataURL(t.format||"image/jpeg"),document.body.appendChild(o),o.click()}}))}},{key:"_isExternal",value:function(e){return e&&0===e.lastIndexOf("http",0)&&-1===e.lastIndexOf(window.location.host)}},{key:"_inlineImages",value:function(e){var t=this,r=this.element.querySelectorAll("image");if(0!==r.length){var n=[];r.forEach((function(e){var r=e.getAttribute("xlink:href")||e.getAttribute("href");if(null!==r){if(r&&t._isExternal(r))throw new Error("Cannot render embedded images linking to external hosts: "+r);var o=document.createElement("canvas"),a=o.getContext("2d"),i=new window.Image;n.push(new Promise((function(t,n){i.src=r,i.onload=function(){o.width=i.width,o.height=i.height,a.drawImage(i,0,0),e.setAttribute("xlink:href",o.toDataURL("image/png")),e.setAttribute("href",o.toDataURL("image/png")),t()},i.onerror=function(){n("Could not load image: "+r)}})))}})),Promise.all(n).then(e).catch((function(e){throw new Error(e)}))}else e()}},{key:"_toDataURI",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;t.scale=t.scale||1;var n="http://www.w3.org/2000/xmlns/";this._inlineImages((function(){var o,i,u,l=document.createElement("div"),s=e.element.cloneNode(!0);if("svg"!==e.element.tagName)throw new Error("Invalid element provided, must be SVG");o=parseInt(e.element.viewBox.baseVal.width||s.getAttribute("data-width")||s.style.width),i=parseInt(e.element.viewBox.baseVal.height||s.getAttribute("data-height")||s.style.height),s.setAttribute("version","1.1"),s.setAttributeNS(n,"xmlns","http://www.w3.org/2000/svg"),s.setAttributeNS(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),s.setAttribute("width",o*t.scale),s.setAttribute("height",i*t.scale),s.setAttribute("viewBox","0 0 "+o+" "+i),l.appendChild(s),u=''+l.innerHTML;var c="data:image/svg+xml;base64,"+a.svgToBase64(u,window.btoa);r(c)}))}}])&&o(t.prototype,r),i&&o(t,i),e}();e.exports=i},function(e,t,r){"use strict";r.r(t),r.d(t,"AlphaPicker",(function(){return qr})),r.d(t,"BlockPicker",(function(){return so})),r.d(t,"CirclePicker",(function(){return To})),r.d(t,"default",(function(){return Uo})),r.d(t,"ChromePicker",(function(){return Uo})),r.d(t,"CompactPicker",(function(){return Xo})),r.d(t,"GithubPicker",(function(){return Wo})),r.d(t,"HuePicker",(function(){return $o})),r.d(t,"MaterialPicker",(function(){return ea})),r.d(t,"PhotoshopPicker",(function(){return la})),r.d(t,"SketchPicker",(function(){return ba})),r.d(t,"SliderPicker",(function(){return xa})),r.d(t,"SwatchesPicker",(function(){return _a})),r.d(t,"TwitterPicker",(function(){return Aa})),r.d(t,"GooglePicker",(function(){return La})),r.d(t,"CustomPicker",(function(){return Fr}));var n=r(0),o=r.n(n),a=r(2),i=r.n(a),u=function(e,t,r,n,o){var a=o.clientWidth,i=o.clientHeight,u="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=u-(o.getBoundingClientRect().left+window.pageXOffset),c=l-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===r){var f=void 0;if(f=c<0?0:c>i?1:Math.round(100*c/i)/100,t.a!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}else{var p=void 0;if(n!==(p=s<0?0:s>a?1:Math.round(100*s/a)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null},l={},s=function(e,t,r,n){var o=e+"-"+t+"-"+r+(n?"-server":"");if(l[o])return l[o];var a=function(e,t,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null}(e,t,r,n);return l[o]=a,a},c=Object.assign||function(e){for(var t=1;t-1)){var o=r.getArrowOffset(),a=38===e.keyCode?n+o:n-o;r.setUpdatedValue(a,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+x++,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),v(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=i()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return o.a.createElement("div",{style:t.wrap},o.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?o.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(n.PureComponent||n.Component),E=function(e,t,r,n){var o=n.clientWidth,a=n.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=i-(n.getBoundingClientRect().left+window.pageXOffset),s=u-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(s<0)c=359;else if(s>a)c=0;else{c=360*(-100*s/a+100)/100}if(r.h!==c)return{h:c,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var f=void 0;if(l<0)f=0;else if(l>o)f=359;else{f=360*(100*l/o)/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},O=function(){function e(e,t){for(var r=0;r-1};var D=function(e,t){var r=this.__data__,n=P(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var ct=function(e){return null!=e&&st(e.length)&&!re(e)};var ft=function(e){return rt(e)&&ct(e)},pt=r(12),ht=Function.prototype,dt=Object.prototype,bt=ht.toString,yt=dt.hasOwnProperty,gt=bt.call(Object);var vt=function(e){if(!rt(e)||"[object Object]"!=$(e))return!1;var t=Qe(e);if(null===t)return!0;var r=yt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&bt.call(r)==gt},mt={};mt["[object Float32Array]"]=mt["[object Float64Array]"]=mt["[object Int8Array]"]=mt["[object Int16Array]"]=mt["[object Int32Array]"]=mt["[object Uint8Array]"]=mt["[object Uint8ClampedArray]"]=mt["[object Uint16Array]"]=mt["[object Uint32Array]"]=!0,mt["[object Arguments]"]=mt["[object Array]"]=mt["[object ArrayBuffer]"]=mt["[object Boolean]"]=mt["[object DataView]"]=mt["[object Date]"]=mt["[object Error]"]=mt["[object Function]"]=mt["[object Map]"]=mt["[object Number]"]=mt["[object Object]"]=mt["[object RegExp]"]=mt["[object Set]"]=mt["[object String]"]=mt["[object WeakMap]"]=!1;var xt=function(e){return rt(e)&&st(e.length)&&!!mt[$(e)]};var wt=function(e){return function(t){return e(t)}},Et=r(50),Ot=Et.a&&Et.a.isTypedArray,jt=Ot?wt(Ot):xt;var Ct=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},_t=Object.prototype.hasOwnProperty;var kt=function(e,t,r){var n=e[t];_t.call(e,t)&&R(n,r)&&(void 0!==r||t in e)||Ne(e,t,r)};var At=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Xt);var Wt=function(e,t){return Kt(Yt(e,t,Nt),e+"")};var Jt=function(e,t,r){if(!ee(r))return!1;var n=typeof t;return!!("number"==n?ct(r)&&Pt(t,r.length):"string"==n&&t in r)&&R(r[t],e)};var Zt=function(e){return Wt((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&Jt(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n=t||r<0||f&&e-s>=a}function y(){var e=er();if(b(e))return g(e);u=setTimeout(y,function(e){var r=t-(e-l);return f?pr(r,a-(e-s)):r}(e))}function g(e){return u=void 0,p&&n?h(e):(n=o=void 0,i)}function v(){var e=er(),r=b(e);if(n=arguments,o=this,l=e,r){if(void 0===u)return d(l);if(f)return clearTimeout(u),u=setTimeout(y,t),h(l)}return void 0===u&&(u=setTimeout(y,t)),i}return t=cr(t)||0,ee(r)&&(c=!!r.leading,a=(f="maxWait"in r)?fr(cr(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),v.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=l=o=u=void 0},v.flush=function(){return void 0===u?i:g(er())},v};var dr=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),hr(e,t,{leading:n,maxWait:t,trailing:o})},br=function(){function e(e,t){for(var r=0;ro&&(l=o),s<0?s=0:s>a&&(s=a);var c=l/o,f=1-s/a;return{h:t.h,s:c,v:f,a:t.a,source:"hsv"}}(e,r.props.hsl,r.container),e)},r.handleMouseDown=function(e){r.handleChange(e);var t=r.getContainerRenderWindow();t.addEventListener("mousemove",r.handleChange),t.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=dr((function(e,t,r){e(t,r)}),50),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),br(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},r=t.color,n=t.white,a=t.black,u=t.pointer,l=t.circle,s=i()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:n,black:a,pointer:u,circle:l}},{custom:!!this.props.style});return o.a.createElement("div",{style:s.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),o.a.createElement("div",{style:s.white,className:"saturation-white"},o.a.createElement("div",{style:s.black,className:"saturation-black"}),o.a.createElement("div",{style:s.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:s.circle}))))}}]),t}(n.PureComponent||n.Component);var gr=function(e,t){for(var r=-1,n=null==e?0:e.length;++r=128?"#000":"#fff"},Pr=function(e,t){var r=e.replace("°","");return _r()(t+" ("+r+")")._ok},Tr=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var e,t,r;zr(this,n);for(var o=arguments.length,a=Array(o),i=0;iu))return!1;var s=a.get(e),c=a.get(t);if(s&&c)return s==t&&c==e;var f=-1,p=!0,h=2&r?new Jr:void 0;for(a.set(e,t),a.set(t,e);++f1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),r.props.onChange({h:e.h||r.props.hsl.h,s:Number(Bo(e.s)?r.props.hsl.s:e.s),l:Number(Bo(e.l)?r.props.hsl.l:e.l),source:"hsl"},t))},r.showHighlight=function(e){e.currentTarget.style.background="#eee"},r.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?r.state={view:"rgb"}:r.state={view:e.view},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Do(t,[{key:"render",value:function(){var e=this,t=i()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),o.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,o.a.createElement("div",{style:t.toggle},o.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},o.a.createElement(Lo.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(o.a.Component);zo.defaultProps={view:"hex"};var Mo=zo,Io=function(){var e=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.a.createElement("div",{style:e.picker})},Vo=function(){var e=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return o.a.createElement("div",{style:e.picker})},No=function(e){var t=e.width,r=e.onChange,n=e.disableAlpha,a=e.rgb,u=e.hsl,l=e.hsv,s=e.hex,c=e.renderers,f=e.styles,h=void 0===f?{}:f,d=e.className,b=void 0===d?"":d,y=e.defaultView,v=i()(Zt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+a.r+", "+a.g+", "+a.b+", "+a.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},h),{disableAlpha:n});return o.a.createElement("div",{style:v.picker,className:"chrome-picker "+b},o.a.createElement("div",{style:v.saturation},o.a.createElement(yr,{style:v.Saturation,hsl:u,hsv:l,pointer:Vo,onChange:r})),o.a.createElement("div",{style:v.body},o.a.createElement("div",{style:v.controls,className:"flexbox-fix"},o.a.createElement("div",{style:v.color},o.a.createElement("div",{style:v.swatch},o.a.createElement("div",{style:v.active}),o.a.createElement(p,{renderers:c}))),o.a.createElement("div",{style:v.toggles},o.a.createElement("div",{style:v.hue},o.a.createElement(_,{style:v.Hue,hsl:u,pointer:Io,onChange:r})),o.a.createElement("div",{style:v.alpha},o.a.createElement(g,{style:v.Alpha,rgb:a,hsl:u,pointer:Io,renderers:c,onChange:r})))),o.a.createElement(Mo,{rgb:a,hsl:u,hex:s,view:y,onChange:r,disableAlpha:n})))};No.propTypes={width:A.a.oneOfType([A.a.string,A.a.number]),disableAlpha:A.a.bool,styles:A.a.object,defaultView:A.a.oneOf(["hex","rgb","hsl"])},No.defaultProps={width:225,disableAlpha:!1,styles:{}};var Uo=Fr(No),Ho=function(e){var t=e.color,r=e.onClick,n=void 0===r?function(){}:r,a=e.onSwatchHover,u=e.active,l=i()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Rr(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:u,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.a.createElement(Nr,{style:l.color,color:t,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}},o.a.createElement("div",{style:l.dot}))},Yo=function(e){var t=e.hex,r=e.rgb,n=e.onChange,a=i()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),u=function(e,t){e.r||e.g||e.b?n({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):n({hex:e.hex,source:"hex"},t)};return o.a.createElement("div",{style:a.fields,className:"flexbox-fix"},o.a.createElement("div",{style:a.active}),o.a.createElement(w,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:t,onChange:u}),o.a.createElement(w,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:u}),o.a.createElement(w,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:u}),o.a.createElement(w,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:u}))},qo=function(e){var t=e.onChange,r=e.onSwatchHover,n=e.colors,a=e.hex,u=e.rgb,l=e.styles,s=void 0===l?{}:l,c=e.className,f=void 0===c?"":c,p=i()(Zt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),h=function(e,r){e.hex?Sr(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return o.a.createElement($t,{style:p.Compact,styles:s},o.a.createElement("div",{style:p.compact,className:"compact-picker "+f},o.a.createElement("div",null,io(n,(function(e){return o.a.createElement(Ho,{key:e,color:e,active:e.toLowerCase()===a,onClick:h,onSwatchHover:r})})),o.a.createElement("div",{style:p.clear})),o.a.createElement(Yo,{hex:a,rgb:u,onChange:h})))};qo.propTypes={colors:A.a.arrayOf(A.a.string),styles:A.a.object},qo.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var Xo=Fr(qo),Go=Object(a.handleHover)((function(e){var t=e.hover,r=e.color,n=e.onClick,a=e.onSwatchHover,u={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=i()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:u}},{hover:t});return o.a.createElement("div",{style:l.swatch},o.a.createElement(Nr,{color:r,onClick:n,onHover:a,focusStyle:u}))})),Ko=function(e){var t=e.width,r=e.colors,n=e.onChange,a=e.onSwatchHover,u=e.triangle,l=e.styles,s=void 0===l?{}:l,c=e.className,f=void 0===c?"":c,p=i()(Zt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":"hide"===u,"top-left-triangle":"top-left"===u,"top-right-triangle":"top-right"===u,"bottom-left-triangle":"bottom-left"===u,"bottom-right-triangle":"bottom-right"===u}),h=function(e,t){return n({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:p.card,className:"github-picker "+f},o.a.createElement("div",{style:p.triangleShadow}),o.a.createElement("div",{style:p.triangle}),io(r,(function(e){return o.a.createElement(Go,{color:e,key:e,onClick:h,onSwatchHover:a})})))};Ko.propTypes={width:A.a.oneOfType([A.a.string,A.a.number]),colors:A.a.arrayOf(A.a.string),triangle:A.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:A.a.object},Ko.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var Wo=Fr(Ko),Jo=function(e){var t=e.direction,r=i()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.a.createElement("div",{style:r.picker})},Zo=Object.assign||function(e){for(var t=1;t.5});return o.a.createElement("div",{style:r.picker})},na=function(){var e=i()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return o.a.createElement("div",{style:e.pointer},o.a.createElement("div",{style:e.left},o.a.createElement("div",{style:e.leftInside})),o.a.createElement("div",{style:e.right},o.a.createElement("div",{style:e.rightInside})))},oa=function(e){var t=e.onClick,r=e.label,n=e.children,a=e.active,u=i()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:a});return o.a.createElement("div",{style:u.button,onClick:t},r||n)},aa=function(e){var t=e.rgb,r=e.currentColor,n=i()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return o.a.createElement("div",null,o.a.createElement("div",{style:n.label},"new"),o.a.createElement("div",{style:n.swatches},o.a.createElement("div",{style:n.new}),o.a.createElement("div",{style:n.current})),o.a.createElement("div",{style:n.label},"current"))},ia=function(){function e(e,t){for(var r=0;r100&&(e.a=100),e.a/=100,t({h:n.h,s:n.s,l:n.l,a:e.a,source:"rgb"},o))};return o.a.createElement("div",{style:l.fields,className:"flexbox-fix"},o.a.createElement("div",{style:l.double},o.a.createElement(w,{style:{input:l.input,label:l.label},label:"hex",value:a.replace("#",""),onChange:s})),o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:l.alpha},o.a.createElement(w,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*r.a),onChange:s,dragLabel:"true",dragMax:"100"})))},ca=Object.assign||function(e){for(var t=1;t>1,s=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-s)-1,h>>=-s,s+=u;s>0;i=256*i+e[t+f],f+=p,s-=8);for(a=i&(1<<-s)-1,i>>=-s,s+=n;s>0;a=256*a+e[t+f],f+=p,s-=8);if(0===i)i=1-l;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=l}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,u,c,l=8*i-o-1,s=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=s):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=s?(u=0,a=s):a+f>=1?(u=(t*c-1)*Math.pow(2,o),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&u,h+=d,u/=256,o-=8);for(a=a<0;e[r+h]=255&a,h+=d,a/=256,l-=8);e[r+h-d]|=128*y}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return r.push(e)})):(0,i.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&r.push(t),r.push(t+"-"+e)})):(0,n.default)(t)&&r.push(t)})),r};t.default=c},function(e,t,r){var n=r(10),o=r(6),i=r(8);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},function(e,t,r){var n=r(14),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[u]=r:delete e[u]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){var n=r(131)();e.exports=n},function(e,t){e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===r(i[c],c,i))break}return t}}},function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r-1}},function(e,t,r){var n=r(20);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(19);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(19),o=r(38),i=r(39);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(64),o=r(155),i=r(13),a=r(67),u=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,s=c.toString,f=l.hasOwnProperty,p=RegExp("^"+s.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?p:u).test(a(e))}},function(e,t,r){var n,o=r(156),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},function(e,t,r){var n=r(7)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(159),o=r(19),i=r(38);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(e,t,r){var n=r(160),o=r(161),i=r(162),a=r(163),u=r(164);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],r=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,n.default)(o,(function(e,t){r[t]||(r[t]={}),r[t]=i({},r[t],o[t])})),t})),r};t.default=u},function(e,t,r){var n=r(204);e.exports=function(e){return n(e,5)}},function(e,t,r){var n=r(36),o=r(205),i=r(79),a=r(207),u=r(208),c=r(211),l=r(212),s=r(213),f=r(214),p=r(71),h=r(215),d=r(23),y=r(216),b=r(217),v=r(222),g=r(6),m=r(29),x=r(224),w=r(13),E=r(226),O=r(15),j=r(43),C={};C["[object Arguments]"]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C["[object Object]"]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C["[object Function]"]=C["[object WeakMap]"]=!1,e.exports=function e(t,r,_,R,S,k){var A,P=1&r,T=2&r,B=4&r;if(_&&(A=S?_(t,R,S,k):_(t)),void 0!==A)return A;if(!w(t))return t;var F=g(t);if(F){if(A=y(t),!P)return l(t,A)}else{var L=d(t),z="[object Function]"==L||"[object GeneratorFunction]"==L;if(m(t))return c(t,P);if("[object Object]"==L||"[object Arguments]"==L||z&&!S){if(A=T||z?{}:v(t),!P)return T?f(t,u(A,t)):s(t,a(A,t))}else{if(!C[L])return S?t:{};A=b(t,L,P)}}k||(k=new n);var D=k.get(t);if(D)return D;k.set(t,A),E(t)?t.forEach((function(n){A.add(e(n,r,_,n,t,k))})):x(t)&&t.forEach((function(n,o){A.set(o,e(n,r,_,o,t,k))}));var I=F?void 0:(B?T?h:p:T?j:O)(t);return o(I||t,(function(n,o){I&&(n=t[o=n]),i(A,o,e(n,r,_,o,t,k))})),A}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,i,l;u(this,n);for(var s=arguments.length,f=Array(s),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,i,l;u(this,n);for(var s=arguments.length,f=Array(s),p=0;p1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&n("first-child"),e===t-1&&n("last-child"),(0===e||e%2==0)&&n("even"),1===Math.abs(e%2)&&n("odd"),n("nth-child",e),r}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};t.format=t.format||"image/jpeg",this._toDataURI(t,(function(r){var n=new window.Image;n.src=r,n.onload=function(){var r=document.createElement("canvas");r.width=n.width,r.height=n.height,r.getContext("2d").drawImage(n,0,0,n.width,n.height,0,0,r.width,r.height);var o=document.createElement("a");o.download=e,o.href=r.toDataURL(t.format||"image/jpeg"),document.body.appendChild(o),o.click()}}))}},{key:"_isExternal",value:function(e){return e&&0===e.lastIndexOf("http",0)&&-1===e.lastIndexOf(window.location.host)}},{key:"_inlineImages",value:function(e){var t=this,r=this.element.querySelectorAll("image");if(0!==r.length){var n=[];r.forEach((function(e){var r=e.getAttribute("xlink:href")||e.getAttribute("href");if(null!==r){if(r&&t._isExternal(r))throw new Error("Cannot render embedded images linking to external hosts: "+r);var o=document.createElement("canvas"),i=o.getContext("2d"),a=new window.Image;n.push(new Promise((function(t,n){a.src=r,a.onload=function(){o.width=a.width,o.height=a.height,i.drawImage(a,0,0),e.setAttribute("xlink:href",o.toDataURL("image/png")),e.setAttribute("href",o.toDataURL("image/png")),t()},a.onerror=function(){n("Could not load image: "+r)}})))}})),Promise.all(n).then(e).catch((function(e){throw new Error(e)}))}else e()}},{key:"_toDataURI",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;t.scale=t.scale||1;var n="http://www.w3.org/2000/xmlns/";this._inlineImages((function(){var o,a,u,c=document.createElement("div"),l=e.element.cloneNode(!0);if("svg"!==e.element.tagName)throw new Error("Invalid element provided, must be SVG");o=parseInt(e.element.viewBox.baseVal.width||l.getAttribute("data-width")||l.style.width),a=parseInt(e.element.viewBox.baseVal.height||l.getAttribute("data-height")||l.style.height),l.setAttribute("version","1.1"),l.setAttributeNS(n,"xmlns","http://www.w3.org/2000/svg"),l.setAttributeNS(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),l.setAttribute("width",o*t.scale),l.setAttribute("height",a*t.scale),l.setAttribute("viewBox","0 0 "+o+" "+a),c.appendChild(l),u=''+c.innerHTML;var s="data:image/svg+xml;base64,"+i.svgToBase64(u,window.btoa);r(s)}))}}])&&o(t.prototype,r),a&&o(t,a),e}();e.exports=a},function(e,t,r){"use strict";r.r(t),r.d(t,"AlphaPicker",(function(){return qr})),r.d(t,"BlockPicker",(function(){return lo})),r.d(t,"CirclePicker",(function(){return To})),r.d(t,"default",(function(){return Uo})),r.d(t,"ChromePicker",(function(){return Uo})),r.d(t,"CompactPicker",(function(){return Xo})),r.d(t,"GithubPicker",(function(){return Wo})),r.d(t,"HuePicker",(function(){return $o})),r.d(t,"MaterialPicker",(function(){return ei})),r.d(t,"PhotoshopPicker",(function(){return ci})),r.d(t,"SketchPicker",(function(){return yi})),r.d(t,"SliderPicker",(function(){return xi})),r.d(t,"SwatchesPicker",(function(){return _i})),r.d(t,"TwitterPicker",(function(){return Si})),r.d(t,"GooglePicker",(function(){return Li})),r.d(t,"CustomPicker",(function(){return Fr}));var n=r(0),o=r.n(n),i=r(2),a=r.n(i),u=function(e,t,r,n,o){var i=o.clientWidth,a=o.clientHeight,u="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,c="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=u-(o.getBoundingClientRect().left+window.pageXOffset),s=c-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===r){var f=void 0;if(f=s<0?0:s>a?1:Math.round(100*s/a)/100,t.a!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}else{var p=void 0;if(n!==(p=l<0?0:l>i?1:Math.round(100*l/i)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null},c={},l=function(e,t,r,n){var o=e+"-"+t+"-"+r+(n?"-server":"");if(c[o])return c[o];var i=function(e,t,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,r,r),i.translate(r,r),i.fillRect(0,0,r,r),o.toDataURL()):null}(e,t,r,n);return c[o]=i,i},s=Object.assign||function(e){for(var t=1;t-1)){var o=r.getArrowOffset(),i=38===e.keyCode?n+o:n-o;r.setUpdatedValue(i,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+x++,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),g(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=a()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return o.a.createElement("div",{style:t.wrap},o.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?o.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(n.PureComponent||n.Component),E=function(e,t,r,n){var o=n.clientWidth,i=n.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(n.getBoundingClientRect().left+window.pageXOffset),l=u-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var s=void 0;if(l<0)s=359;else if(l>i)s=0;else{s=360*(-100*l/i+100)/100}if(r.h!==s)return{h:s,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var f=void 0;if(c<0)f=0;else if(c>o)f=359;else{f=360*(100*c/o)/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},O=function(){function e(e,t){for(var r=0;r-1};var z=function(e,t){var r=this.__data__,n=P(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function D(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var st=function(e){return null!=e&<(e.length)&&!re(e)};var ft=function(e){return rt(e)&&st(e)},pt=r(12),ht=Function.prototype,dt=Object.prototype,yt=ht.toString,bt=dt.hasOwnProperty,vt=yt.call(Object);var gt=function(e){if(!rt(e)||"[object Object]"!=$(e))return!1;var t=Qe(e);if(null===t)return!0;var r=bt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&yt.call(r)==vt},mt={};mt["[object Float32Array]"]=mt["[object Float64Array]"]=mt["[object Int8Array]"]=mt["[object Int16Array]"]=mt["[object Int32Array]"]=mt["[object Uint8Array]"]=mt["[object Uint8ClampedArray]"]=mt["[object Uint16Array]"]=mt["[object Uint32Array]"]=!0,mt["[object Arguments]"]=mt["[object Array]"]=mt["[object ArrayBuffer]"]=mt["[object Boolean]"]=mt["[object DataView]"]=mt["[object Date]"]=mt["[object Error]"]=mt["[object Function]"]=mt["[object Map]"]=mt["[object Number]"]=mt["[object Object]"]=mt["[object RegExp]"]=mt["[object Set]"]=mt["[object String]"]=mt["[object WeakMap]"]=!1;var xt=function(e){return rt(e)&<(e.length)&&!!mt[$(e)]};var wt=function(e){return function(t){return e(t)}},Et=r(50),Ot=Et.a&&Et.a.isTypedArray,jt=Ot?wt(Ot):xt;var Ct=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},_t=Object.prototype.hasOwnProperty;var Rt=function(e,t,r){var n=e[t];_t.call(e,t)&&A(n,r)&&(void 0!==r||t in e)||Ne(e,t,r)};var St=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Xt);var Wt=function(e,t){return Kt(Yt(e,t,Nt),e+"")};var Jt=function(e,t,r){if(!ee(r))return!1;var n=typeof t;return!!("number"==n?st(r)&&Pt(t,r.length):"string"==n&&t in r)&&A(r[t],e)};var Zt=function(e){return Wt((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Jt(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n=t||r<0||f&&e-l>=i}function b(){var e=er();if(y(e))return v(e);u=setTimeout(b,function(e){var r=t-(e-c);return f?pr(r,i-(e-l)):r}(e))}function v(e){return u=void 0,p&&n?h(e):(n=o=void 0,a)}function g(){var e=er(),r=y(e);if(n=arguments,o=this,c=e,r){if(void 0===u)return d(c);if(f)return clearTimeout(u),u=setTimeout(b,t),h(c)}return void 0===u&&(u=setTimeout(b,t)),a}return t=sr(t)||0,ee(r)&&(s=!!r.leading,i=(f="maxWait"in r)?fr(sr(r.maxWait)||0,t):i,p="trailing"in r?!!r.trailing:p),g.cancel=function(){void 0!==u&&clearTimeout(u),l=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:v(er())},g};var dr=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),hr(e,t,{leading:n,maxWait:t,trailing:o})},yr=function(){function e(e,t){for(var r=0;ro&&(c=o),l<0?l=0:l>i&&(l=i);var s=c/o,f=1-l/i;return{h:t.h,s:s,v:f,a:t.a,source:"hsv"}}(e,r.props.hsl,r.container),e)},r.handleMouseDown=function(e){r.handleChange(e);var t=r.getContainerRenderWindow();t.addEventListener("mousemove",r.handleChange),t.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=dr((function(e,t,r){e(t,r)}),50),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),yr(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},r=t.color,n=t.white,i=t.black,u=t.pointer,c=t.circle,l=a()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:n,black:i,pointer:u,circle:c}},{custom:!!this.props.style});return o.a.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),o.a.createElement("div",{style:l.white,className:"saturation-white"},o.a.createElement("div",{style:l.black,className:"saturation-black"}),o.a.createElement("div",{style:l.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:l.circle}))))}}]),t}(n.PureComponent||n.Component);var vr=function(e,t){for(var r=-1,n=null==e?0:e.length;++r=128?"#000":"#fff"},Pr=function(e,t){var r=e.replace("°","");return _r()(t+" ("+r+")")._ok},Tr=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var e,t,r;Dr(this,n);for(var o=arguments.length,i=Array(o),a=0;au))return!1;var l=i.get(e),s=i.get(t);if(l&&s)return l==t&&s==e;var f=-1,p=!0,h=2&r?new Jr:void 0;for(i.set(e,t),i.set(t,e);++f1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),r.props.onChange({h:e.h||r.props.hsl.h,s:Number(Bo(e.s)?r.props.hsl.s:e.s),l:Number(Bo(e.l)?r.props.hsl.l:e.l),source:"hsl"},t))},r.showHighlight=function(e){e.currentTarget.style.background="#eee"},r.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?r.state={view:"rgb"}:r.state={view:e.view},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),zo(t,[{key:"render",value:function(){var e=this,t=a()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),o.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,o.a.createElement("div",{style:t.toggle},o.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},o.a.createElement(Lo.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(o.a.Component);Do.defaultProps={view:"hex"};var Io=Do,Mo=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.a.createElement("div",{style:e.picker})},Vo=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return o.a.createElement("div",{style:e.picker})},No=function(e){var t=e.width,r=e.onChange,n=e.disableAlpha,i=e.rgb,u=e.hsl,c=e.hsv,l=e.hex,s=e.renderers,f=e.styles,h=void 0===f?{}:f,d=e.className,y=void 0===d?"":d,b=e.defaultView,g=a()(Zt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},h),{disableAlpha:n});return o.a.createElement("div",{style:g.picker,className:"chrome-picker "+y},o.a.createElement("div",{style:g.saturation},o.a.createElement(br,{style:g.Saturation,hsl:u,hsv:c,pointer:Vo,onChange:r})),o.a.createElement("div",{style:g.body},o.a.createElement("div",{style:g.controls,className:"flexbox-fix"},o.a.createElement("div",{style:g.color},o.a.createElement("div",{style:g.swatch},o.a.createElement("div",{style:g.active}),o.a.createElement(p,{renderers:s}))),o.a.createElement("div",{style:g.toggles},o.a.createElement("div",{style:g.hue},o.a.createElement(_,{style:g.Hue,hsl:u,pointer:Mo,onChange:r})),o.a.createElement("div",{style:g.alpha},o.a.createElement(v,{style:g.Alpha,rgb:i,hsl:u,pointer:Mo,renderers:s,onChange:r})))),o.a.createElement(Io,{rgb:i,hsl:u,hex:l,view:b,onChange:r,disableAlpha:n})))};No.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),disableAlpha:S.a.bool,styles:S.a.object,defaultView:S.a.oneOf(["hex","rgb","hsl"])},No.defaultProps={width:225,disableAlpha:!1,styles:{}};var Uo=Fr(No),Ho=function(e){var t=e.color,r=e.onClick,n=void 0===r?function(){}:r,i=e.onSwatchHover,u=e.active,c=a()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Ar(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:u,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.a.createElement(Nr,{style:c.color,color:t,onClick:n,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},o.a.createElement("div",{style:c.dot}))},Yo=function(e){var t=e.hex,r=e.rgb,n=e.onChange,i=a()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),u=function(e,t){e.r||e.g||e.b?n({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):n({hex:e.hex,source:"hex"},t)};return o.a.createElement("div",{style:i.fields,className:"flexbox-fix"},o.a.createElement("div",{style:i.active}),o.a.createElement(w,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:u}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:u}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:u}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:u}))},qo=function(e){var t=e.onChange,r=e.onSwatchHover,n=e.colors,i=e.hex,u=e.rgb,c=e.styles,l=void 0===c?{}:c,s=e.className,f=void 0===s?"":s,p=a()(Zt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),h=function(e,r){e.hex?kr(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return o.a.createElement($t,{style:p.Compact,styles:l},o.a.createElement("div",{style:p.compact,className:"compact-picker "+f},o.a.createElement("div",null,ao(n,(function(e){return o.a.createElement(Ho,{key:e,color:e,active:e.toLowerCase()===i,onClick:h,onSwatchHover:r})})),o.a.createElement("div",{style:p.clear})),o.a.createElement(Yo,{hex:i,rgb:u,onChange:h})))};qo.propTypes={colors:S.a.arrayOf(S.a.string),styles:S.a.object},qo.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var Xo=Fr(qo),Go=Object(i.handleHover)((function(e){var t=e.hover,r=e.color,n=e.onClick,i=e.onSwatchHover,u={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=a()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:u}},{hover:t});return o.a.createElement("div",{style:c.swatch},o.a.createElement(Nr,{color:r,onClick:n,onHover:i,focusStyle:u}))})),Ko=function(e){var t=e.width,r=e.colors,n=e.onChange,i=e.onSwatchHover,u=e.triangle,c=e.styles,l=void 0===c?{}:c,s=e.className,f=void 0===s?"":s,p=a()(Zt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===u,"top-left-triangle":"top-left"===u,"top-right-triangle":"top-right"===u,"bottom-left-triangle":"bottom-left"===u,"bottom-right-triangle":"bottom-right"===u}),h=function(e,t){return n({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:p.card,className:"github-picker "+f},o.a.createElement("div",{style:p.triangleShadow}),o.a.createElement("div",{style:p.triangle}),ao(r,(function(e){return o.a.createElement(Go,{color:e,key:e,onClick:h,onSwatchHover:i})})))};Ko.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.a.object},Ko.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var Wo=Fr(Ko),Jo=function(e){var t=e.direction,r=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.a.createElement("div",{style:r.picker})},Zo=Object.assign||function(e){for(var t=1;t.5});return o.a.createElement("div",{style:r.picker})},ni=function(){var e=a()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return o.a.createElement("div",{style:e.pointer},o.a.createElement("div",{style:e.left},o.a.createElement("div",{style:e.leftInside})),o.a.createElement("div",{style:e.right},o.a.createElement("div",{style:e.rightInside})))},oi=function(e){var t=e.onClick,r=e.label,n=e.children,i=e.active,u=a()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return o.a.createElement("div",{style:u.button,onClick:t},r||n)},ii=function(e){var t=e.rgb,r=e.currentColor,n=a()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return o.a.createElement("div",null,o.a.createElement("div",{style:n.label},"new"),o.a.createElement("div",{style:n.swatches},o.a.createElement("div",{style:n.new}),o.a.createElement("div",{style:n.current})),o.a.createElement("div",{style:n.label},"current"))},ai=function(){function e(e,t){for(var r=0;r100&&(e.a=100),e.a/=100,t({h:n.h,s:n.s,l:n.l,a:e.a,source:"rgb"},o))};return o.a.createElement("div",{style:c.fields,className:"flexbox-fix"},o.a.createElement("div",{style:c.double},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"hex",value:i.replace("#",""),onChange:l})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.alpha},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*r.a),onChange:l,dragLabel:"true",dragMax:"100"})))},si=Object.assign||function(e){for(var t=1;t 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + activations[_key - 1] = arguments[_key]; + } + + var activeNames = (0, _flattenNames2.default)(activations); + var merged = (0, _mergeClasses2.default)(classes, activeNames); + return (0, _autoprefix2.default)(merged); +}; + +exports.default = ReactCSS; + +/***/ }), +/* 3 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); + + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"] || freeSelf || Function('return this')(); + +/* harmony default export */ __webpack_exports__["a"] = (root); + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(47); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(12), + getRawTag = __webpack_require__(95), + objectToString = __webpack_require__(96); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsNative = __webpack_require__(121), + getValue = __webpack_require__(124); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; + + +/***/ }), +/* 9 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/* harmony import */ var _stubFalse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73); + + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? _root_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || _stubFalse_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; + +/* harmony default export */ __webpack_exports__["a"] = (isBuffer); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(42)(module))) + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(5); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(49), + baseKeys = __webpack_require__(103), + isArrayLike = __webpack_require__(16); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.2 +// https://github.com/bgrins/TinyColor +// Brian Grinstead, MIT License + +(function(Math) { + +var trimLeft = /^\s+/, + trimRight = /\s+$/, + tinyCounter = 0, + mathRound = Math.round, + mathMin = Math.min, + mathMax = Math.max, + mathRandom = Math.random; + +function tinycolor (color, opts) { + + color = (color) ? color : ''; + opts = opts || { }; + + // If input is already a tinycolor, return itself + if (color instanceof tinycolor) { + return color; + } + // If we are called as a function, call using new instead + if (!(this instanceof tinycolor)) { + return new tinycolor(color, opts); + } + + var rgb = inputToRGB(color); + this._originalInput = color, + this._r = rgb.r, + this._g = rgb.g, + this._b = rgb.b, + this._a = rgb.a, + this._roundA = mathRound(100*this._a) / 100, + this._format = opts.format || rgb.format; + this._gradientType = opts.gradientType; + + // Don't let the range of [0,255] come back in [0,1]. + // Potentially lose a little bit of precision here, but will fix issues where + // .5 gets interpreted as half of the total, instead of half of 1 + // If it was supposed to be 128, this was already taken care of by `inputToRgb` + if (this._r < 1) { this._r = mathRound(this._r); } + if (this._g < 1) { this._g = mathRound(this._g); } + if (this._b < 1) { this._b = mathRound(this._b); } + + this._ok = rgb.ok; + this._tc_id = tinyCounter++; +} + +tinycolor.prototype = { + isDark: function() { + return this.getBrightness() < 128; + }, + isLight: function() { + return !this.isDark(); + }, + isValid: function() { + return this._ok; + }, + getOriginalInput: function() { + return this._originalInput; + }, + getFormat: function() { + return this._format; + }, + getAlpha: function() { + return this._a; + }, + getBrightness: function() { + //http://www.w3.org/TR/AERT#color-contrast + var rgb = this.toRgb(); + return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; + }, + getLuminance: function() { + //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef + var rgb = this.toRgb(); + var RsRGB, GsRGB, BsRGB, R, G, B; + RsRGB = rgb.r/255; + GsRGB = rgb.g/255; + BsRGB = rgb.b/255; + + if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);} + if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);} + if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);} + return (0.2126 * R) + (0.7152 * G) + (0.0722 * B); + }, + setAlpha: function(value) { + this._a = boundAlpha(value); + this._roundA = mathRound(100*this._a) / 100; + return this; + }, + toHsv: function() { + var hsv = rgbToHsv(this._r, this._g, this._b); + return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; + }, + toHsvString: function() { + var hsv = rgbToHsv(this._r, this._g, this._b); + var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); + return (this._a == 1) ? + "hsv(" + h + ", " + s + "%, " + v + "%)" : + "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")"; + }, + toHsl: function() { + var hsl = rgbToHsl(this._r, this._g, this._b); + return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; + }, + toHslString: function() { + var hsl = rgbToHsl(this._r, this._g, this._b); + var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); + return (this._a == 1) ? + "hsl(" + h + ", " + s + "%, " + l + "%)" : + "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")"; + }, + toHex: function(allow3Char) { + return rgbToHex(this._r, this._g, this._b, allow3Char); + }, + toHexString: function(allow3Char) { + return '#' + this.toHex(allow3Char); + }, + toHex8: function(allow4Char) { + return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); + }, + toHex8String: function(allow4Char) { + return '#' + this.toHex8(allow4Char); + }, + toRgb: function() { + return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a }; + }, + toRgbString: function() { + return (this._a == 1) ? + "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : + "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")"; + }, + toPercentageRgb: function() { + return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a }; + }, + toPercentageRgbString: function() { + return (this._a == 1) ? + "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" : + "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; + }, + toName: function() { + if (this._a === 0) { + return "transparent"; + } + + if (this._a < 1) { + return false; + } + + return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; + }, + toFilter: function(secondColor) { + var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a); + var secondHex8String = hex8String; + var gradientType = this._gradientType ? "GradientType = 1, " : ""; + + if (secondColor) { + var s = tinycolor(secondColor); + secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a); + } + + return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"; + }, + toString: function(format) { + var formatSet = !!format; + format = format || this._format; + + var formattedString = false; + var hasAlpha = this._a < 1 && this._a >= 0; + var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); + + if (needsAlphaFormat) { + // Special case for "transparent", all other non-alpha formats + // will return rgba when there is transparency. + if (format === "name" && this._a === 0) { + return this.toName(); + } + return this.toRgbString(); + } + if (format === "rgb") { + formattedString = this.toRgbString(); + } + if (format === "prgb") { + formattedString = this.toPercentageRgbString(); + } + if (format === "hex" || format === "hex6") { + formattedString = this.toHexString(); + } + if (format === "hex3") { + formattedString = this.toHexString(true); + } + if (format === "hex4") { + formattedString = this.toHex8String(true); + } + if (format === "hex8") { + formattedString = this.toHex8String(); + } + if (format === "name") { + formattedString = this.toName(); + } + if (format === "hsl") { + formattedString = this.toHslString(); + } + if (format === "hsv") { + formattedString = this.toHsvString(); + } + + return formattedString || this.toHexString(); + }, + clone: function() { + return tinycolor(this.toString()); + }, + + _applyModification: function(fn, args) { + var color = fn.apply(null, [this].concat([].slice.call(args))); + this._r = color._r; + this._g = color._g; + this._b = color._b; + this.setAlpha(color._a); + return this; + }, + lighten: function() { + return this._applyModification(lighten, arguments); + }, + brighten: function() { + return this._applyModification(brighten, arguments); + }, + darken: function() { + return this._applyModification(darken, arguments); + }, + desaturate: function() { + return this._applyModification(desaturate, arguments); + }, + saturate: function() { + return this._applyModification(saturate, arguments); + }, + greyscale: function() { + return this._applyModification(greyscale, arguments); + }, + spin: function() { + return this._applyModification(spin, arguments); + }, + + _applyCombination: function(fn, args) { + return fn.apply(null, [this].concat([].slice.call(args))); + }, + analogous: function() { + return this._applyCombination(analogous, arguments); + }, + complement: function() { + return this._applyCombination(complement, arguments); + }, + monochromatic: function() { + return this._applyCombination(monochromatic, arguments); + }, + splitcomplement: function() { + return this._applyCombination(splitcomplement, arguments); + }, + triad: function() { + return this._applyCombination(triad, arguments); + }, + tetrad: function() { + return this._applyCombination(tetrad, arguments); + } +}; + +// If input is an object, force 1 into "1.0" to handle ratios properly +// String input requires "1.0" as input, so 1 will be treated as 1 +tinycolor.fromRatio = function(color, opts) { + if (typeof color == "object") { + var newColor = {}; + for (var i in color) { + if (color.hasOwnProperty(i)) { + if (i === "a") { + newColor[i] = color[i]; + } + else { + newColor[i] = convertToPercentage(color[i]); + } + } + } + color = newColor; + } + + return tinycolor(color, opts); +}; + +// Given a string or object, convert that input to RGB +// Possible string inputs: +// +// "red" +// "#f00" or "f00" +// "#ff0000" or "ff0000" +// "#ff000000" or "ff000000" +// "rgb 255 0 0" or "rgb (255, 0, 0)" +// "rgb 1.0 0 0" or "rgb (1, 0, 0)" +// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" +// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" +// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" +// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" +// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" +// +function inputToRGB(color) { + + var rgb = { r: 0, g: 0, b: 0 }; + var a = 1; + var s = null; + var v = null; + var l = null; + var ok = false; + var format = false; + + if (typeof color == "string") { + color = stringInputToObject(color); + } + + if (typeof color == "object") { + if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { + rgb = rgbToRgb(color.r, color.g, color.b); + ok = true; + format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; + } + else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { + s = convertToPercentage(color.s); + v = convertToPercentage(color.v); + rgb = hsvToRgb(color.h, s, v); + ok = true; + format = "hsv"; + } + else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { + s = convertToPercentage(color.s); + l = convertToPercentage(color.l); + rgb = hslToRgb(color.h, s, l); + ok = true; + format = "hsl"; + } + + if (color.hasOwnProperty("a")) { + a = color.a; + } + } + + a = boundAlpha(a); + + return { + ok: ok, + format: color.format || format, + r: mathMin(255, mathMax(rgb.r, 0)), + g: mathMin(255, mathMax(rgb.g, 0)), + b: mathMin(255, mathMax(rgb.b, 0)), + a: a + }; +} + + +// Conversion Functions +// -------------------- + +// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: +// + +// `rgbToRgb` +// Handle bounds / percentage checking to conform to CSS color spec +// +// *Assumes:* r, g, b in [0, 255] or [0, 1] +// *Returns:* { r, g, b } in [0, 255] +function rgbToRgb(r, g, b){ + return { + r: bound01(r, 255) * 255, + g: bound01(g, 255) * 255, + b: bound01(b, 255) * 255 + }; +} + +// `rgbToHsl` +// Converts an RGB color value to HSL. +// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] +// *Returns:* { h, s, l } in [0,1] +function rgbToHsl(r, g, b) { + + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + + var max = mathMax(r, g, b), min = mathMin(r, g, b); + var h, s, l = (max + min) / 2; + + if(max == min) { + h = s = 0; // achromatic + } + else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch(max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + + h /= 6; + } + + return { h: h, s: s, l: l }; +} + +// `hslToRgb` +// Converts an HSL color value to RGB. +// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] +// *Returns:* { r, g, b } in the set [0, 255] +function hslToRgb(h, s, l) { + var r, g, b; + + h = bound01(h, 360); + s = bound01(s, 100); + l = bound01(l, 100); + + function hue2rgb(p, q, t) { + if(t < 0) t += 1; + if(t > 1) t -= 1; + if(t < 1/6) return p + (q - p) * 6 * t; + if(t < 1/2) return q; + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + } + + if(s === 0) { + r = g = b = l; // achromatic + } + else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + return { r: r * 255, g: g * 255, b: b * 255 }; +} + +// `rgbToHsv` +// Converts an RGB color value to HSV +// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] +// *Returns:* { h, s, v } in [0,1] +function rgbToHsv(r, g, b) { + + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + + var max = mathMax(r, g, b), min = mathMin(r, g, b); + var h, s, v = max; + + var d = max - min; + s = max === 0 ? 0 : d / max; + + if(max == min) { + h = 0; // achromatic + } + else { + switch(max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + h /= 6; + } + return { h: h, s: s, v: v }; +} + +// `hsvToRgb` +// Converts an HSV color value to RGB. +// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] +// *Returns:* { r, g, b } in the set [0, 255] + function hsvToRgb(h, s, v) { + + h = bound01(h, 360) * 6; + s = bound01(s, 100); + v = bound01(v, 100); + + var i = Math.floor(h), + f = h - i, + p = v * (1 - s), + q = v * (1 - f * s), + t = v * (1 - (1 - f) * s), + mod = i % 6, + r = [v, q, p, p, t, v][mod], + g = [t, v, v, q, p, p][mod], + b = [p, p, t, v, v, q][mod]; + + return { r: r * 255, g: g * 255, b: b * 255 }; +} + +// `rgbToHex` +// Converts an RGB color to hex +// Assumes r, g, and b are contained in the set [0, 255] +// Returns a 3 or 6 character hex +function rgbToHex(r, g, b, allow3Char) { + + var hex = [ + pad2(mathRound(r).toString(16)), + pad2(mathRound(g).toString(16)), + pad2(mathRound(b).toString(16)) + ]; + + // Return a 3 character hex if possible + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); + } + + return hex.join(""); +} + +// `rgbaToHex` +// Converts an RGBA color plus alpha transparency to hex +// Assumes r, g, b are contained in the set [0, 255] and +// a in [0, 1]. Returns a 4 or 8 character rgba hex +function rgbaToHex(r, g, b, a, allow4Char) { + + var hex = [ + pad2(mathRound(r).toString(16)), + pad2(mathRound(g).toString(16)), + pad2(mathRound(b).toString(16)), + pad2(convertDecimalToHex(a)) + ]; + + // Return a 4 character hex if possible + if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); + } + + return hex.join(""); +} + +// `rgbaToArgbHex` +// Converts an RGBA color to an ARGB Hex8 string +// Rarely used, but required for "toFilter()" +function rgbaToArgbHex(r, g, b, a) { + + var hex = [ + pad2(convertDecimalToHex(a)), + pad2(mathRound(r).toString(16)), + pad2(mathRound(g).toString(16)), + pad2(mathRound(b).toString(16)) + ]; + + return hex.join(""); +} + +// `equals` +// Can be called with any tinycolor input +tinycolor.equals = function (color1, color2) { + if (!color1 || !color2) { return false; } + return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); +}; + +tinycolor.random = function() { + return tinycolor.fromRatio({ + r: mathRandom(), + g: mathRandom(), + b: mathRandom() + }); +}; + + +// Modification Functions +// ---------------------- +// Thanks to less.js for some of the basics here +// + +function desaturate(color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.s -= amount / 100; + hsl.s = clamp01(hsl.s); + return tinycolor(hsl); +} + +function saturate(color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.s += amount / 100; + hsl.s = clamp01(hsl.s); + return tinycolor(hsl); +} + +function greyscale(color) { + return tinycolor(color).desaturate(100); +} + +function lighten (color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.l += amount / 100; + hsl.l = clamp01(hsl.l); + return tinycolor(hsl); +} + +function brighten(color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var rgb = tinycolor(color).toRgb(); + rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100)))); + rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100)))); + rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100)))); + return tinycolor(rgb); +} + +function darken (color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.l -= amount / 100; + hsl.l = clamp01(hsl.l); + return tinycolor(hsl); +} + +// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. +// Values outside of this range will be wrapped into this range. +function spin(color, amount) { + var hsl = tinycolor(color).toHsl(); + var hue = (hsl.h + amount) % 360; + hsl.h = hue < 0 ? 360 + hue : hue; + return tinycolor(hsl); +} + +// Combination Functions +// --------------------- +// Thanks to jQuery xColor for some of the ideas behind these +// + +function complement(color) { + var hsl = tinycolor(color).toHsl(); + hsl.h = (hsl.h + 180) % 360; + return tinycolor(hsl); +} + +function triad(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) + ]; +} + +function tetrad(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) + ]; +} + +function splitcomplement(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), + tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) + ]; +} + +function analogous(color, results, slices) { + results = results || 6; + slices = slices || 30; + + var hsl = tinycolor(color).toHsl(); + var part = 360 / slices; + var ret = [tinycolor(color)]; + + for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { + hsl.h = (hsl.h + part) % 360; + ret.push(tinycolor(hsl)); + } + return ret; +} + +function monochromatic(color, results) { + results = results || 6; + var hsv = tinycolor(color).toHsv(); + var h = hsv.h, s = hsv.s, v = hsv.v; + var ret = []; + var modification = 1 / results; + + while (results--) { + ret.push(tinycolor({ h: h, s: s, v: v})); + v = (v + modification) % 1; + } + + return ret; +} + +// Utility Functions +// --------------------- + +tinycolor.mix = function(color1, color2, amount) { + amount = (amount === 0) ? 0 : (amount || 50); + + var rgb1 = tinycolor(color1).toRgb(); + var rgb2 = tinycolor(color2).toRgb(); + + var p = amount / 100; + + var rgba = { + r: ((rgb2.r - rgb1.r) * p) + rgb1.r, + g: ((rgb2.g - rgb1.g) * p) + rgb1.g, + b: ((rgb2.b - rgb1.b) * p) + rgb1.b, + a: ((rgb2.a - rgb1.a) * p) + rgb1.a + }; + + return tinycolor(rgba); +}; + + +// Readability Functions +// --------------------- +// false +// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false +tinycolor.isReadable = function(color1, color2, wcag2) { + var readability = tinycolor.readability(color1, color2); + var wcag2Parms, out; + + out = false; + + wcag2Parms = validateWCAG2Parms(wcag2); + switch (wcag2Parms.level + wcag2Parms.size) { + case "AAsmall": + case "AAAlarge": + out = readability >= 4.5; + break; + case "AAlarge": + out = readability >= 3; + break; + case "AAAsmall": + out = readability >= 7; + break; + } + return out; + +}; + +// `mostReadable` +// Given a base color and a list of possible foreground or background +// colors for that base, returns the most readable color. +// Optionally returns Black or White if the most readable color is unreadable. +// *Example* +// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" +// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" +// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" +// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" +tinycolor.mostReadable = function(baseColor, colorList, args) { + var bestColor = null; + var bestScore = 0; + var readability; + var includeFallbackColors, level, size ; + args = args || {}; + includeFallbackColors = args.includeFallbackColors ; + level = args.level; + size = args.size; + + for (var i= 0; i < colorList.length ; i++) { + readability = tinycolor.readability(baseColor, colorList[i]); + if (readability > bestScore) { + bestScore = readability; + bestColor = tinycolor(colorList[i]); + } + } + + if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) { + return bestColor; + } + else { + args.includeFallbackColors=false; + return tinycolor.mostReadable(baseColor,["#fff", "#000"],args); + } +}; + + +// Big List of Colors +// ------------------ +// +var names = tinycolor.names = { + aliceblue: "f0f8ff", + antiquewhite: "faebd7", + aqua: "0ff", + aquamarine: "7fffd4", + azure: "f0ffff", + beige: "f5f5dc", + bisque: "ffe4c4", + black: "000", + blanchedalmond: "ffebcd", + blue: "00f", + blueviolet: "8a2be2", + brown: "a52a2a", + burlywood: "deb887", + burntsienna: "ea7e5d", + cadetblue: "5f9ea0", + chartreuse: "7fff00", + chocolate: "d2691e", + coral: "ff7f50", + cornflowerblue: "6495ed", + cornsilk: "fff8dc", + crimson: "dc143c", + cyan: "0ff", + darkblue: "00008b", + darkcyan: "008b8b", + darkgoldenrod: "b8860b", + darkgray: "a9a9a9", + darkgreen: "006400", + darkgrey: "a9a9a9", + darkkhaki: "bdb76b", + darkmagenta: "8b008b", + darkolivegreen: "556b2f", + darkorange: "ff8c00", + darkorchid: "9932cc", + darkred: "8b0000", + darksalmon: "e9967a", + darkseagreen: "8fbc8f", + darkslateblue: "483d8b", + darkslategray: "2f4f4f", + darkslategrey: "2f4f4f", + darkturquoise: "00ced1", + darkviolet: "9400d3", + deeppink: "ff1493", + deepskyblue: "00bfff", + dimgray: "696969", + dimgrey: "696969", + dodgerblue: "1e90ff", + firebrick: "b22222", + floralwhite: "fffaf0", + forestgreen: "228b22", + fuchsia: "f0f", + gainsboro: "dcdcdc", + ghostwhite: "f8f8ff", + gold: "ffd700", + goldenrod: "daa520", + gray: "808080", + green: "008000", + greenyellow: "adff2f", + grey: "808080", + honeydew: "f0fff0", + hotpink: "ff69b4", + indianred: "cd5c5c", + indigo: "4b0082", + ivory: "fffff0", + khaki: "f0e68c", + lavender: "e6e6fa", + lavenderblush: "fff0f5", + lawngreen: "7cfc00", + lemonchiffon: "fffacd", + lightblue: "add8e6", + lightcoral: "f08080", + lightcyan: "e0ffff", + lightgoldenrodyellow: "fafad2", + lightgray: "d3d3d3", + lightgreen: "90ee90", + lightgrey: "d3d3d3", + lightpink: "ffb6c1", + lightsalmon: "ffa07a", + lightseagreen: "20b2aa", + lightskyblue: "87cefa", + lightslategray: "789", + lightslategrey: "789", + lightsteelblue: "b0c4de", + lightyellow: "ffffe0", + lime: "0f0", + limegreen: "32cd32", + linen: "faf0e6", + magenta: "f0f", + maroon: "800000", + mediumaquamarine: "66cdaa", + mediumblue: "0000cd", + mediumorchid: "ba55d3", + mediumpurple: "9370db", + mediumseagreen: "3cb371", + mediumslateblue: "7b68ee", + mediumspringgreen: "00fa9a", + mediumturquoise: "48d1cc", + mediumvioletred: "c71585", + midnightblue: "191970", + mintcream: "f5fffa", + mistyrose: "ffe4e1", + moccasin: "ffe4b5", + navajowhite: "ffdead", + navy: "000080", + oldlace: "fdf5e6", + olive: "808000", + olivedrab: "6b8e23", + orange: "ffa500", + orangered: "ff4500", + orchid: "da70d6", + palegoldenrod: "eee8aa", + palegreen: "98fb98", + paleturquoise: "afeeee", + palevioletred: "db7093", + papayawhip: "ffefd5", + peachpuff: "ffdab9", + peru: "cd853f", + pink: "ffc0cb", + plum: "dda0dd", + powderblue: "b0e0e6", + purple: "800080", + rebeccapurple: "663399", + red: "f00", + rosybrown: "bc8f8f", + royalblue: "4169e1", + saddlebrown: "8b4513", + salmon: "fa8072", + sandybrown: "f4a460", + seagreen: "2e8b57", + seashell: "fff5ee", + sienna: "a0522d", + silver: "c0c0c0", + skyblue: "87ceeb", + slateblue: "6a5acd", + slategray: "708090", + slategrey: "708090", + snow: "fffafa", + springgreen: "00ff7f", + steelblue: "4682b4", + tan: "d2b48c", + teal: "008080", + thistle: "d8bfd8", + tomato: "ff6347", + turquoise: "40e0d0", + violet: "ee82ee", + wheat: "f5deb3", + white: "fff", + whitesmoke: "f5f5f5", + yellow: "ff0", + yellowgreen: "9acd32" +}; + +// Make it easy to access colors via `hexNames[hex]` +var hexNames = tinycolor.hexNames = flip(names); + + +// Utilities +// --------- + +// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` +function flip(o) { + var flipped = { }; + for (var i in o) { + if (o.hasOwnProperty(i)) { + flipped[o[i]] = i; + } + } + return flipped; +} + +// Return a valid alpha value [0,1] with all invalid values being set to 1 +function boundAlpha(a) { + a = parseFloat(a); + + if (isNaN(a) || a < 0 || a > 1) { + a = 1; + } + + return a; +} + +// Take input from [0, n] and return it as [0, 1] +function bound01(n, max) { + if (isOnePointZero(n)) { n = "100%"; } + + var processPercent = isPercentage(n); + n = mathMin(max, mathMax(0, parseFloat(n))); + + // Automatically convert percentage into number + if (processPercent) { + n = parseInt(n * max, 10) / 100; + } + + // Handle floating point rounding errors + if ((Math.abs(n - max) < 0.000001)) { + return 1; + } + + // Convert into [0, 1] range if it isn't already + return (n % max) / parseFloat(max); +} + +// Force a number between 0 and 1 +function clamp01(val) { + return mathMin(1, mathMax(0, val)); +} + +// Parse a base-16 hex value into a base-10 integer +function parseIntFromHex(val) { + return parseInt(val, 16); +} + +// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 +// +function isOnePointZero(n) { + return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; +} + +// Check to see if string passed in is a percentage +function isPercentage(n) { + return typeof n === "string" && n.indexOf('%') != -1; +} + +// Force a hex value to have 2 characters +function pad2(c) { + return c.length == 1 ? '0' + c : '' + c; +} + +// Replace a decimal with it's percentage value +function convertToPercentage(n) { + if (n <= 1) { + n = (n * 100) + "%"; + } + + return n; +} + +// Converts a decimal to a hex value +function convertDecimalToHex(d) { + return Math.round(parseFloat(d) * 255).toString(16); +} +// Converts a hex value to a decimal +function convertHexToDecimal(h) { + return (parseIntFromHex(h) / 255); +} + +var matchers = (function() { + + // + var CSS_INTEGER = "[-\\+]?\\d+%?"; + + // + var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; + + // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. + var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; + + // Actual matching. + // Parentheses and commas are optional, but not required. + // Whitespace can take the place of commas or opening paren + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + + return { + CSS_UNIT: new RegExp(CSS_UNIT), + rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), + rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), + hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), + hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), + hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), + hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), + hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ + }; +})(); + +// `isValidCSSUnit` +// Take in a single string / number and check to see if it looks like a CSS unit +// (see `matchers` above for definition). +function isValidCSSUnit(color) { + return !!matchers.CSS_UNIT.exec(color); +} + +// `stringInputToObject` +// Permissive string parsing. Take in a number of formats, and output an object +// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` +function stringInputToObject(color) { + + color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); + var named = false; + if (names[color]) { + color = names[color]; + named = true; + } + else if (color == 'transparent') { + return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + } + + // Try to match string input using regular expressions. + // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] + // Just return an object and let the conversion functions handle that. + // This way the result will be the same whether the tinycolor is initialized with string or object. + var match; + if ((match = matchers.rgb.exec(color))) { + return { r: match[1], g: match[2], b: match[3] }; + } + if ((match = matchers.rgba.exec(color))) { + return { r: match[1], g: match[2], b: match[3], a: match[4] }; + } + if ((match = matchers.hsl.exec(color))) { + return { h: match[1], s: match[2], l: match[3] }; + } + if ((match = matchers.hsla.exec(color))) { + return { h: match[1], s: match[2], l: match[3], a: match[4] }; + } + if ((match = matchers.hsv.exec(color))) { + return { h: match[1], s: match[2], v: match[3] }; + } + if ((match = matchers.hsva.exec(color))) { + return { h: match[1], s: match[2], v: match[3], a: match[4] }; + } + if ((match = matchers.hex8.exec(color))) { + return { + r: parseIntFromHex(match[1]), + g: parseIntFromHex(match[2]), + b: parseIntFromHex(match[3]), + a: convertHexToDecimal(match[4]), + format: named ? "name" : "hex8" + }; + } + if ((match = matchers.hex6.exec(color))) { + return { + r: parseIntFromHex(match[1]), + g: parseIntFromHex(match[2]), + b: parseIntFromHex(match[3]), + format: named ? "name" : "hex" + }; + } + if ((match = matchers.hex4.exec(color))) { + return { + r: parseIntFromHex(match[1] + '' + match[1]), + g: parseIntFromHex(match[2] + '' + match[2]), + b: parseIntFromHex(match[3] + '' + match[3]), + a: convertHexToDecimal(match[4] + '' + match[4]), + format: named ? "name" : "hex8" + }; + } + if ((match = matchers.hex3.exec(color))) { + return { + r: parseIntFromHex(match[1] + '' + match[1]), + g: parseIntFromHex(match[2] + '' + match[2]), + b: parseIntFromHex(match[3] + '' + match[3]), + format: named ? "name" : "hex" + }; + } + + return false; +} + +function validateWCAG2Parms(parms) { + // return valid WCAG2 parms for isReadable. + // If input parms are invalid, return {"level":"AA", "size":"small"} + var level, size; + parms = parms || {"level":"AA", "size":"small"}; + level = (parms.level || "AA").toUpperCase(); + size = (parms.size || "small").toLowerCase(); + if (level !== "AA" && level !== "AAA") { + level = "AA"; + } + if (size !== "small" && size !== "large") { + size = "small"; + } + return {"level":level, "size":size}; +} + +// Node: Export function +if ( true && module.exports) { + module.exports = tinycolor; +} +// AMD/requirejs: Define the module +else if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} +// Browser: Expose to window +else {} + +})(Math); + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) {/*! + * @description Recursive object extending + * @author Viacheslav Lotsmanov + * @license MIT + * + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Viacheslav Lotsmanov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + + +function isSpecificValue(val) { + return ( + val instanceof Buffer + || val instanceof Date + || val instanceof RegExp + ) ? true : false; +} + +function cloneSpecificValue(val) { + if (val instanceof Buffer) { + var x = Buffer.alloc + ? Buffer.alloc(val.length) + : new Buffer(val.length); + val.copy(x); + return x; + } else if (val instanceof Date) { + return new Date(val.getTime()); + } else if (val instanceof RegExp) { + return new RegExp(val); + } else { + throw new Error('Unexpected situation'); + } +} + +/** + * Recursive cloning array. + */ +function deepCloneArray(arr) { + var clone = []; + arr.forEach(function (item, index) { + if (typeof item === 'object' && item !== null) { + if (Array.isArray(item)) { + clone[index] = deepCloneArray(item); + } else if (isSpecificValue(item)) { + clone[index] = cloneSpecificValue(item); + } else { + clone[index] = deepExtend({}, item); + } + } else { + clone[index] = item; + } + }); + return clone; +} + +function safeGetProperty(object, property) { + return property === '__proto__' ? undefined : object[property]; +} + +/** + * Extening object that entered in first argument. + * + * Returns extended object or false if have no target object or incorrect type. + * + * If you wish to clone source object (without modify it), just use empty new + * object as first argument, like this: + * deepExtend({}, yourObj_1, [yourObj_N]); + */ +var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) { + if (arguments.length < 1 || typeof arguments[0] !== 'object') { + return false; + } + + if (arguments.length < 2) { + return arguments[0]; + } + + var target = arguments[0]; + + // convert arguments to array and cut off target object + var args = Array.prototype.slice.call(arguments, 1); + + var val, src, clone; + + args.forEach(function (obj) { + // skip argument if isn't an object, is null, or is an array + if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) { + return; + } + + Object.keys(obj).forEach(function (key) { + src = safeGetProperty(target, key); // source value + val = safeGetProperty(obj, key); // new value + + // recursion prevention + if (val === target) { + return; + + /** + * if new value isn't object then just overwrite by new value + * instead of extending. + */ + } else if (typeof val !== 'object' || val === null) { + target[key] = val; + return; + + // just clone arrays (and recursive clone objects inside) + } else if (Array.isArray(val)) { + target[key] = deepCloneArray(val); + return; + + // custom cloning and overwrite for specific objects + } else if (isSpecificValue(val)) { + target[key] = cloneSpecificValue(val); + return; + + // overwrite by new value if source isn't object or array + } else if (typeof src !== 'object' || src === null || Array.isArray(src)) { + target[key] = deepExtend({}, val); + return; + + // source value and new value is objects both, extending... + } else { + target[key] = deepExtend(src, val); + return; + } + }); + }); + + return target; +}; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(79).Buffer)) + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +var isFunction = __webpack_require__(54), + isLength = __webpack_require__(28); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +var listCacheClear = __webpack_require__(111), + listCacheDelete = __webpack_require__(112), + listCacheGet = __webpack_require__(113), + listCacheHas = __webpack_require__(114), + listCacheSet = __webpack_require__(115); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__(34); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(8); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var isKeyable = __webpack_require__(133); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +var DataView = __webpack_require__(148), + Map = __webpack_require__(35), + Promise = __webpack_require__(149), + Set = __webpack_require__(150), + WeakMap = __webpack_require__(151), + baseGetTag = __webpack_require__(7), + toSource = __webpack_require__(57); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +var isSymbol = __webpack_require__(39); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__(69), + baseAssignValue = __webpack_require__(70); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; + + +/***/ }), +/* 24 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/* harmony default export */ __webpack_exports__["a"] = (freeGlobal); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(25))) + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseForOwn = __webpack_require__(48), + castFunction = __webpack_require__(105); + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} + +module.exports = forOwn; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(5), + stubFalse = __webpack_require__(101); + +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(11)(module))) + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(47); + +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(11)(module))) + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(53); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__(17), + stackClear = __webpack_require__(116), + stackDelete = __webpack_require__(117), + stackGet = __webpack_require__(118), + stackHas = __webpack_require__(119), + stackSet = __webpack_require__(120); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports) { + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(8), + root = __webpack_require__(5); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var mapCacheClear = __webpack_require__(125), + mapCacheDelete = __webpack_require__(132), + mapCacheGet = __webpack_require__(134), + mapCacheHas = __webpack_require__(135), + mapCacheSet = __webpack_require__(136); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayFilter = __webpack_require__(147), + stubArray = __webpack_require__(64); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +var isArray = __webpack_require__(4), + isSymbol = __webpack_require__(39); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(7), + isObjectLike = __webpack_require__(6); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(49), + baseKeysIn = __webpack_require__(176), + isArrayLike = __webpack_require__(16); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +var Uint8Array = __webpack_require__(60); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +module.exports = function(originalModule) { + if (!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(42)(module))) + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function checkDCE() { + /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' + ) { + return; + } + if (false) {} + try { + // Verify that the code above has been dead code eliminated (DCE'd). + __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); + } catch (err) { + // DevTools shouldn't crash React, no matter what. + // We should still report in case we break this code. + console.error(err); + } +} + +if (true) { + // DCE check should happen before ReactDOM bundle executes so that + // DevTools can report bad minification during injection. + checkDCE(); + module.exports = __webpack_require__(87); +} else {} + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || + function getOwnPropertyDescriptors(obj) { + var keys = Object.keys(obj); + var descriptors = {}; + for (var i = 0; i < keys.length; i++) { + descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); + } + return descriptors; + }; + +var formatRegExp = /%[sdj%]/g; +exports.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + if (typeof process !== 'undefined' && process.noDeprecation === true) { + return fn; + } + + // Allow for deprecating things in the process of starting up. + if (typeof process === 'undefined') { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = Object({"NODE_ENV":"production"}).NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = __webpack_require__(91); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = __webpack_require__(92); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined; + +exports.promisify = function promisify(original) { + if (typeof original !== 'function') + throw new TypeError('The "original" argument must be of type Function'); + + if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { + var fn = original[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The "util.promisify.custom" argument must be of type Function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return fn; + } + + function fn() { + var promiseResolve, promiseReject; + var promise = new Promise(function (resolve, reject) { + promiseResolve = resolve; + promiseReject = reject; + }); + + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + args.push(function (err, value) { + if (err) { + promiseReject(err); + } else { + promiseResolve(value); + } + }); + + try { + original.apply(this, args); + } catch (err) { + promiseReject(err); + } + + return promise; + } + + Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); + + if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return Object.defineProperties( + fn, + getOwnPropertyDescriptors(original) + ); +} + +exports.promisify.custom = kCustomPromisifiedSymbol + +function callbackifyOnRejected(reason, cb) { + // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). + // Because `null` is a special error value in callbacks which means "no error + // occurred", we error-wrap so the callback consumer can distinguish between + // "the promise rejected with null" or "the promise fulfilled with undefined". + if (!reason) { + var newReason = new Error('Promise was rejected with a falsy value'); + newReason.reason = reason; + reason = newReason; + } + return cb(reason); +} + +function callbackify(original) { + if (typeof original !== 'function') { + throw new TypeError('The "original" argument must be of type Function'); + } + + // We DO NOT return the promise as it gives the user a false sense that + // the promise is actually somehow related to the callback's execution + // and that the callback throwing will reject the promise. + function callbackified() { + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + var maybeCb = args.pop(); + if (typeof maybeCb !== 'function') { + throw new TypeError('The last argument must be of type Function'); + } + var self = this; + var cb = function() { + return maybeCb.apply(self, arguments); + }; + // In true node style we process the callback on `nextTick` with all the + // implications (stack, `uncaughtException`, `async_hooks`) + original.apply(this, args) + .then(function(ret) { process.nextTick(cb, null, ret) }, + function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) }); + } + + Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)); + Object.defineProperties(callbackified, + getOwnPropertyDescriptors(original)); + return callbackified; +} +exports.callbackify = callbackify; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(90))) + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(25))) + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseFor = __webpack_require__(97), + keys = __webpack_require__(13); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseTimes = __webpack_require__(99), + isArguments = __webpack_require__(50), + isArray = __webpack_require__(4), + isBuffer = __webpack_require__(27), + isIndex = __webpack_require__(51), + isTypedArray = __webpack_require__(52); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsArguments = __webpack_require__(100), + isObjectLike = __webpack_require__(6); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsTypedArray = __webpack_require__(102), + baseUnary = __webpack_require__(29), + nodeUtil = __webpack_require__(30); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(7), + isObject = __webpack_require__(10); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports) { + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsEqualDeep = __webpack_require__(137), + isObjectLike = __webpack_require__(6); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__(138), + arraySome = __webpack_require__(141), + cacheHas = __webpack_require__(142); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(5); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetAllKeys = __webpack_require__(62), + getSymbols = __webpack_require__(37), + keys = __webpack_require__(13); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__(63), + isArray = __webpack_require__(4); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports) { + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +module.exports = stubArray; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(10); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(68), + toKey = __webpack_require__(22); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +var isArray = __webpack_require__(4), + isKey = __webpack_require__(38), + stringToPath = __webpack_require__(155), + toString = __webpack_require__(158); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__(70), + eq = __webpack_require__(34); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var defineProperty = __webpack_require__(173); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__(63), + getPrototype = __webpack_require__(32), + getSymbols = __webpack_require__(37), + stubArray = __webpack_require__(64); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; + + +/***/ }), +/* 72 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "AlphaPicker", function() { return /* reexport */ alpha_Alpha; }); +__webpack_require__.d(__webpack_exports__, "BlockPicker", function() { return /* reexport */ block_Block; }); +__webpack_require__.d(__webpack_exports__, "CirclePicker", function() { return /* reexport */ circle_Circle; }); +__webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ chrome_Chrome; }); +__webpack_require__.d(__webpack_exports__, "ChromePicker", function() { return /* reexport */ chrome_Chrome; }); +__webpack_require__.d(__webpack_exports__, "CompactPicker", function() { return /* reexport */ compact_Compact; }); +__webpack_require__.d(__webpack_exports__, "GithubPicker", function() { return /* reexport */ github_Github; }); +__webpack_require__.d(__webpack_exports__, "HuePicker", function() { return /* reexport */ hue_Hue; }); +__webpack_require__.d(__webpack_exports__, "MaterialPicker", function() { return /* reexport */ material_Material; }); +__webpack_require__.d(__webpack_exports__, "PhotoshopPicker", function() { return /* reexport */ photoshop_Photoshop; }); +__webpack_require__.d(__webpack_exports__, "SketchPicker", function() { return /* reexport */ sketch_Sketch; }); +__webpack_require__.d(__webpack_exports__, "SliderPicker", function() { return /* reexport */ slider_Slider; }); +__webpack_require__.d(__webpack_exports__, "SwatchesPicker", function() { return /* reexport */ swatches_Swatches; }); +__webpack_require__.d(__webpack_exports__, "TwitterPicker", function() { return /* reexport */ twitter_Twitter; }); +__webpack_require__.d(__webpack_exports__, "GooglePicker", function() { return /* reexport */ google_Google; }); +__webpack_require__.d(__webpack_exports__, "CustomPicker", function() { return /* reexport */ common_ColorWrap; }); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(0); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./node_modules/reactcss/lib/index.js +var lib = __webpack_require__(2); +var lib_default = /*#__PURE__*/__webpack_require__.n(lib); + +// CONCATENATED MODULE: ./node_modules/react-color/es/helpers/alpha.js +var calculateChange = function calculateChange(e, hsl, direction, initialA, container) { + var containerWidth = container.clientWidth; + var containerHeight = container.clientHeight; + var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX; + var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY; + var left = x - (container.getBoundingClientRect().left + window.pageXOffset); + var top = y - (container.getBoundingClientRect().top + window.pageYOffset); + + if (direction === 'vertical') { + var a = void 0; + if (top < 0) { + a = 0; + } else if (top > containerHeight) { + a = 1; + } else { + a = Math.round(top * 100 / containerHeight) / 100; + } + + if (hsl.a !== a) { + return { + h: hsl.h, + s: hsl.s, + l: hsl.l, + a: a, + source: 'rgb' + }; + } + } else { + var _a = void 0; + if (left < 0) { + _a = 0; + } else if (left > containerWidth) { + _a = 1; + } else { + _a = Math.round(left * 100 / containerWidth) / 100; + } + + if (initialA !== _a) { + return { + h: hsl.h, + s: hsl.s, + l: hsl.l, + a: _a, + source: 'rgb' + }; + } + } + return null; +}; +// CONCATENATED MODULE: ./node_modules/react-color/es/helpers/checkboard.js +var checkboardCache = {}; + +var checkboard_render = function render(c1, c2, size, serverCanvas) { + if (typeof document === 'undefined' && !serverCanvas) { + return null; + } + var canvas = serverCanvas ? new serverCanvas() : document.createElement('canvas'); + canvas.width = size * 2; + canvas.height = size * 2; + var ctx = canvas.getContext('2d'); + if (!ctx) { + return null; + } // If no context can be found, return early. + ctx.fillStyle = c1; + ctx.fillRect(0, 0, canvas.width, canvas.height); + ctx.fillStyle = c2; + ctx.fillRect(0, 0, size, size); + ctx.translate(size, size); + ctx.fillRect(0, 0, size, size); + return canvas.toDataURL(); +}; + +var get = function get(c1, c2, size, serverCanvas) { + var key = c1 + '-' + c2 + '-' + size + (serverCanvas ? '-server' : ''); + + if (checkboardCache[key]) { + return checkboardCache[key]; + } + + var checkboard = checkboard_render(c1, c2, size, serverCanvas); + checkboardCache[key] = checkboard; + return checkboard; +}; +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/Checkboard.js +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + +var Checkboard_Checkboard = function Checkboard(_ref) { + var white = _ref.white, + grey = _ref.grey, + size = _ref.size, + renderers = _ref.renderers, + borderRadius = _ref.borderRadius, + boxShadow = _ref.boxShadow, + children = _ref.children; + + var styles = lib_default()({ + 'default': { + grid: { + borderRadius: borderRadius, + boxShadow: boxShadow, + absolute: '0px 0px 0px 0px', + background: 'url(' + get(white, grey, size, renderers.canvas) + ') center left' + } + } + }); + return Object(react["isValidElement"])(children) ? react_default.a.cloneElement(children, _extends({}, children.props, { style: _extends({}, children.props.style, styles.grid) })) : react_default.a.createElement('div', { style: styles.grid }); +}; + +Checkboard_Checkboard.defaultProps = { + size: 8, + white: 'transparent', + grey: 'rgba(0,0,0,.08)', + renderers: {} +}; + +/* harmony default export */ var common_Checkboard = (Checkboard_Checkboard); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/Alpha.js +var Alpha_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + +var Alpha_Alpha = function (_ref) { + _inherits(Alpha, _ref); + + function Alpha() { + var _ref2; + + var _temp, _this, _ret; + + _classCallCheck(this, Alpha); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = Alpha.__proto__ || Object.getPrototypeOf(Alpha)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e) { + var change = calculateChange(e, _this.props.hsl, _this.props.direction, _this.props.a, _this.container); + change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e); + }, _this.handleMouseDown = function (e) { + _this.handleChange(e); + window.addEventListener('mousemove', _this.handleChange); + window.addEventListener('mouseup', _this.handleMouseUp); + }, _this.handleMouseUp = function () { + _this.unbindEventListeners(); + }, _this.unbindEventListeners = function () { + window.removeEventListener('mousemove', _this.handleChange); + window.removeEventListener('mouseup', _this.handleMouseUp); + }, _temp), _possibleConstructorReturn(_this, _ret); + } + + _createClass(Alpha, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.unbindEventListeners(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var rgb = this.props.rgb; + var styles = lib_default()({ + 'default': { + alpha: { + absolute: '0px 0px 0px 0px', + borderRadius: this.props.radius + }, + checkboard: { + absolute: '0px 0px 0px 0px', + overflow: 'hidden', + borderRadius: this.props.radius + }, + gradient: { + absolute: '0px 0px 0px 0px', + background: 'linear-gradient(to right, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)', + boxShadow: this.props.shadow, + borderRadius: this.props.radius + }, + container: { + position: 'relative', + height: '100%', + margin: '0 3px' + }, + pointer: { + position: 'absolute', + left: rgb.a * 100 + '%' + }, + slider: { + width: '4px', + borderRadius: '1px', + height: '8px', + boxShadow: '0 0 2px rgba(0, 0, 0, .6)', + background: '#fff', + marginTop: '1px', + transform: 'translateX(-2px)' + } + }, + 'vertical': { + gradient: { + background: 'linear-gradient(to bottom, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)' + }, + pointer: { + left: 0, + top: rgb.a * 100 + '%' + } + }, + 'overwrite': Alpha_extends({}, this.props.style) + }, { + vertical: this.props.direction === 'vertical', + overwrite: true + }); + + return react_default.a.createElement( + 'div', + { style: styles.alpha }, + react_default.a.createElement( + 'div', + { style: styles.checkboard }, + react_default.a.createElement(common_Checkboard, { renderers: this.props.renderers }) + ), + react_default.a.createElement('div', { style: styles.gradient }), + react_default.a.createElement( + 'div', + { + style: styles.container, + ref: function ref(container) { + return _this2.container = container; + }, + onMouseDown: this.handleMouseDown, + onTouchMove: this.handleChange, + onTouchStart: this.handleChange + }, + react_default.a.createElement( + 'div', + { style: styles.pointer }, + this.props.pointer ? react_default.a.createElement(this.props.pointer, this.props) : react_default.a.createElement('div', { style: styles.slider }) + ) + ) + ); + } + }]); + + return Alpha; +}(react["PureComponent"] || react["Component"]); + +/* harmony default export */ var common_Alpha = (Alpha_Alpha); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/EditableInput.js +var EditableInput_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function EditableInput_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function EditableInput_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function EditableInput_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + +var DEFAULT_ARROW_OFFSET = 1; + +var UP_KEY_CODE = 38; +var DOWN_KEY_CODE = 40; +var VALID_KEY_CODES = [UP_KEY_CODE, DOWN_KEY_CODE]; +var isValidKeyCode = function isValidKeyCode(keyCode) { + return VALID_KEY_CODES.indexOf(keyCode) > -1; +}; +var getNumberValue = function getNumberValue(value) { + return Number(String(value).replace(/%/g, '')); +}; + +var idCounter = 1; + +var EditableInput_EditableInput = function (_ref) { + EditableInput_inherits(EditableInput, _ref); + + function EditableInput(props) { + EditableInput_classCallCheck(this, EditableInput); + + var _this = EditableInput_possibleConstructorReturn(this, (EditableInput.__proto__ || Object.getPrototypeOf(EditableInput)).call(this)); + + _this.handleBlur = function () { + if (_this.state.blurValue) { + _this.setState({ value: _this.state.blurValue, blurValue: null }); + } + }; + + _this.handleChange = function (e) { + _this.setUpdatedValue(e.target.value, e); + }; + + _this.handleKeyDown = function (e) { + // In case `e.target.value` is a percentage remove the `%` character + // and update accordingly with a percentage + // https://github.com/casesandberg/react-color/issues/383 + var value = getNumberValue(e.target.value); + if (!isNaN(value) && isValidKeyCode(e.keyCode)) { + var offset = _this.getArrowOffset(); + var updatedValue = e.keyCode === UP_KEY_CODE ? value + offset : value - offset; + + _this.setUpdatedValue(updatedValue, e); + } + }; + + _this.handleDrag = function (e) { + if (_this.props.dragLabel) { + var newValue = Math.round(_this.props.value + e.movementX); + if (newValue >= 0 && newValue <= _this.props.dragMax) { + _this.props.onChange && _this.props.onChange(_this.getValueObjectWithLabel(newValue), e); + } + } + }; + + _this.handleMouseDown = function (e) { + if (_this.props.dragLabel) { + e.preventDefault(); + _this.handleDrag(e); + window.addEventListener('mousemove', _this.handleDrag); + window.addEventListener('mouseup', _this.handleMouseUp); + } + }; + + _this.handleMouseUp = function () { + _this.unbindEventListeners(); + }; + + _this.unbindEventListeners = function () { + window.removeEventListener('mousemove', _this.handleDrag); + window.removeEventListener('mouseup', _this.handleMouseUp); + }; + + _this.state = { + value: String(props.value).toUpperCase(), + blurValue: String(props.value).toUpperCase() + }; + + _this.inputId = 'rc-editable-input-' + idCounter++; + return _this; + } + + EditableInput_createClass(EditableInput, [{ + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + if (this.props.value !== this.state.value && (prevProps.value !== this.props.value || prevState.value !== this.state.value)) { + if (this.input === document.activeElement) { + this.setState({ blurValue: String(this.props.value).toUpperCase() }); + } else { + this.setState({ value: String(this.props.value).toUpperCase(), blurValue: !this.state.blurValue && String(this.props.value).toUpperCase() }); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.unbindEventListeners(); + } + }, { + key: 'getValueObjectWithLabel', + value: function getValueObjectWithLabel(value) { + return _defineProperty({}, this.props.label, value); + } + }, { + key: 'getArrowOffset', + value: function getArrowOffset() { + return this.props.arrowOffset || DEFAULT_ARROW_OFFSET; + } + }, { + key: 'setUpdatedValue', + value: function setUpdatedValue(value, e) { + var onChangeValue = this.props.label ? this.getValueObjectWithLabel(value) : value; + this.props.onChange && this.props.onChange(onChangeValue, e); + + this.setState({ value: value }); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var styles = lib_default()({ + 'default': { + wrap: { + position: 'relative' + } + }, + 'user-override': { + wrap: this.props.style && this.props.style.wrap ? this.props.style.wrap : {}, + input: this.props.style && this.props.style.input ? this.props.style.input : {}, + label: this.props.style && this.props.style.label ? this.props.style.label : {} + }, + 'dragLabel-true': { + label: { + cursor: 'ew-resize' + } + } + }, { + 'user-override': true + }, this.props); + + return react_default.a.createElement( + 'div', + { style: styles.wrap }, + react_default.a.createElement('input', { + id: this.inputId, + style: styles.input, + ref: function ref(input) { + return _this2.input = input; + }, + value: this.state.value, + onKeyDown: this.handleKeyDown, + onChange: this.handleChange, + onBlur: this.handleBlur, + placeholder: this.props.placeholder, + spellCheck: 'false' + }), + this.props.label && !this.props.hideLabel ? react_default.a.createElement( + 'label', + { + htmlFor: this.inputId, + style: styles.label, + onMouseDown: this.handleMouseDown + }, + this.props.label + ) : null + ); + } + }]); + + return EditableInput; +}(react["PureComponent"] || react["Component"]); + +/* harmony default export */ var common_EditableInput = (EditableInput_EditableInput); +// CONCATENATED MODULE: ./node_modules/react-color/es/helpers/hue.js +var hue_calculateChange = function calculateChange(e, direction, hsl, container) { + var containerWidth = container.clientWidth; + var containerHeight = container.clientHeight; + var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX; + var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY; + var left = x - (container.getBoundingClientRect().left + window.pageXOffset); + var top = y - (container.getBoundingClientRect().top + window.pageYOffset); + + if (direction === 'vertical') { + var h = void 0; + if (top < 0) { + h = 359; + } else if (top > containerHeight) { + h = 0; + } else { + var percent = -(top * 100 / containerHeight) + 100; + h = 360 * percent / 100; + } + + if (hsl.h !== h) { + return { + h: h, + s: hsl.s, + l: hsl.l, + a: hsl.a, + source: 'hsl' + }; + } + } else { + var _h = void 0; + if (left < 0) { + _h = 0; + } else if (left > containerWidth) { + _h = 359; + } else { + var _percent = left * 100 / containerWidth; + _h = 360 * _percent / 100; + } + + if (hsl.h !== _h) { + return { + h: _h, + s: hsl.s, + l: hsl.l, + a: hsl.a, + source: 'hsl' + }; + } + } + return null; +}; +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/Hue.js +var Hue_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function Hue_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function Hue_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function Hue_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + +var Hue_Hue = function (_ref) { + Hue_inherits(Hue, _ref); + + function Hue() { + var _ref2; + + var _temp, _this, _ret; + + Hue_classCallCheck(this, Hue); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = Hue_possibleConstructorReturn(this, (_ref2 = Hue.__proto__ || Object.getPrototypeOf(Hue)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e) { + var change = hue_calculateChange(e, _this.props.direction, _this.props.hsl, _this.container); + change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e); + }, _this.handleMouseDown = function (e) { + _this.handleChange(e); + window.addEventListener('mousemove', _this.handleChange); + window.addEventListener('mouseup', _this.handleMouseUp); + }, _this.handleMouseUp = function () { + _this.unbindEventListeners(); + }, _temp), Hue_possibleConstructorReturn(_this, _ret); + } + + Hue_createClass(Hue, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.unbindEventListeners(); + } + }, { + key: 'unbindEventListeners', + value: function unbindEventListeners() { + window.removeEventListener('mousemove', this.handleChange); + window.removeEventListener('mouseup', this.handleMouseUp); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props$direction = this.props.direction, + direction = _props$direction === undefined ? 'horizontal' : _props$direction; + + + var styles = lib_default()({ + 'default': { + hue: { + absolute: '0px 0px 0px 0px', + borderRadius: this.props.radius, + boxShadow: this.props.shadow + }, + container: { + padding: '0 2px', + position: 'relative', + height: '100%', + borderRadius: this.props.radius + }, + pointer: { + position: 'absolute', + left: this.props.hsl.h * 100 / 360 + '%' + }, + slider: { + marginTop: '1px', + width: '4px', + borderRadius: '1px', + height: '8px', + boxShadow: '0 0 2px rgba(0, 0, 0, .6)', + background: '#fff', + transform: 'translateX(-2px)' + } + }, + 'vertical': { + pointer: { + left: '0px', + top: -(this.props.hsl.h * 100 / 360) + 100 + '%' + } + } + }, { vertical: direction === 'vertical' }); + + return react_default.a.createElement( + 'div', + { style: styles.hue }, + react_default.a.createElement( + 'div', + { + className: 'hue-' + direction, + style: styles.container, + ref: function ref(container) { + return _this2.container = container; + }, + onMouseDown: this.handleMouseDown, + onTouchMove: this.handleChange, + onTouchStart: this.handleChange + }, + react_default.a.createElement( + 'style', + null, + '\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n ' + ), + react_default.a.createElement( + 'div', + { style: styles.pointer }, + this.props.pointer ? react_default.a.createElement(this.props.pointer, this.props) : react_default.a.createElement('div', { style: styles.slider }) + ) + ) + ); + } + }]); + + return Hue; +}(react["PureComponent"] || react["Component"]); + +/* harmony default export */ var common_Hue = (Hue_Hue); +// EXTERNAL MODULE: ./node_modules/prop-types/index.js +var prop_types = __webpack_require__(1); +var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheClear.js +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +/* harmony default export */ var _listCacheClear = (listCacheClear); + +// CONCATENATED MODULE: ./node_modules/lodash-es/eq.js +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/* harmony default export */ var lodash_es_eq = (eq); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_assocIndexOf.js + + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (lodash_es_eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/* harmony default export */ var _assocIndexOf = (assocIndexOf); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheDelete.js + + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +/* harmony default export */ var _listCacheDelete = (listCacheDelete); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheGet.js + + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/* harmony default export */ var _listCacheGet = (listCacheGet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheHas.js + + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return _assocIndexOf(this.__data__, key) > -1; +} + +/* harmony default export */ var _listCacheHas = (listCacheHas); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheSet.js + + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +/* harmony default export */ var _listCacheSet = (listCacheSet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_ListCache.js + + + + + + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = _listCacheClear; +ListCache.prototype['delete'] = _listCacheDelete; +ListCache.prototype.get = _listCacheGet; +ListCache.prototype.has = _listCacheHas; +ListCache.prototype.set = _listCacheSet; + +/* harmony default export */ var _ListCache = (ListCache); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_stackClear.js + + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new _ListCache; + this.size = 0; +} + +/* harmony default export */ var _stackClear = (stackClear); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_stackDelete.js +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +/* harmony default export */ var _stackDelete = (stackDelete); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_stackGet.js +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/* harmony default export */ var _stackGet = (stackGet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_stackHas.js +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/* harmony default export */ var _stackHas = (stackHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(3); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_Symbol.js + + +/** Built-in value references. */ +var Symbol = _root["a" /* default */].Symbol; + +/* harmony default export */ var _Symbol = (Symbol); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getRawTag.js + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _getRawTag_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = _getRawTag_hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +/* harmony default export */ var _getRawTag = (getRawTag); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_objectToString.js +/** Used for built-in method references. */ +var _objectToString_objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var _objectToString_nativeObjectToString = _objectToString_objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return _objectToString_nativeObjectToString.call(value); +} + +/* harmony default export */ var _objectToString = (objectToString); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGetTag.js + + + + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var _baseGetTag_symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (_baseGetTag_symToStringTag && _baseGetTag_symToStringTag in Object(value)) + ? _getRawTag(value) + : _objectToString(value); +} + +/* harmony default export */ var _baseGetTag = (baseGetTag); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isObject.js +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +/* harmony default export */ var lodash_es_isObject = (isObject); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isFunction.js + + + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!lodash_es_isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = _baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/* harmony default export */ var lodash_es_isFunction = (isFunction); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_coreJsData.js + + +/** Used to detect overreaching core-js shims. */ +var coreJsData = _root["a" /* default */]['__core-js_shared__']; + +/* harmony default export */ var _coreJsData = (coreJsData); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_isMasked.js + + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/* harmony default export */ var _isMasked = (isMasked); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_toSource.js +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/* harmony default export */ var _toSource = (toSource); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNative.js + + + + + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var _baseIsNative_funcProto = Function.prototype, + _baseIsNative_objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var _baseIsNative_funcToString = _baseIsNative_funcProto.toString; + +/** Used to check objects for own properties. */ +var _baseIsNative_hasOwnProperty = _baseIsNative_objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + _baseIsNative_funcToString.call(_baseIsNative_hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!lodash_es_isObject(value) || _isMasked(value)) { + return false; + } + var pattern = lodash_es_isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(_toSource(value)); +} + +/* harmony default export */ var _baseIsNative = (baseIsNative); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getValue.js +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/* harmony default export */ var _getValue = (getValue); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getNative.js + + + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = _getValue(object, key); + return _baseIsNative(value) ? value : undefined; +} + +/* harmony default export */ var _getNative = (getNative); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_Map.js + + + +/* Built-in method references that are verified to be native. */ +var Map = _getNative(_root["a" /* default */], 'Map'); + +/* harmony default export */ var _Map = (Map); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_nativeCreate.js + + +/* Built-in method references that are verified to be native. */ +var nativeCreate = _getNative(Object, 'create'); + +/* harmony default export */ var _nativeCreate = (nativeCreate); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_hashClear.js + + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; + this.size = 0; +} + +/* harmony default export */ var _hashClear = (hashClear); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_hashDelete.js +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ var _hashDelete = (hashDelete); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_hashGet.js + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var _hashGet_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _hashGet_hasOwnProperty = _hashGet_objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (_nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return _hashGet_hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/* harmony default export */ var _hashGet = (hashGet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_hashHas.js + + +/** Used for built-in method references. */ +var _hashHas_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _hashHas_hasOwnProperty = _hashHas_objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return _nativeCreate ? (data[key] !== undefined) : _hashHas_hasOwnProperty.call(data, key); +} + +/* harmony default export */ var _hashHas = (hashHas); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_hashSet.js + + +/** Used to stand-in for `undefined` hash values. */ +var _hashSet_HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (_nativeCreate && value === undefined) ? _hashSet_HASH_UNDEFINED : value; + return this; +} + +/* harmony default export */ var _hashSet = (hashSet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_Hash.js + + + + + + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = _hashClear; +Hash.prototype['delete'] = _hashDelete; +Hash.prototype.get = _hashGet; +Hash.prototype.has = _hashHas; +Hash.prototype.set = _hashSet; + +/* harmony default export */ var _Hash = (Hash); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheClear.js + + + + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new _Hash, + 'map': new (_Map || _ListCache), + 'string': new _Hash + }; +} + +/* harmony default export */ var _mapCacheClear = (mapCacheClear); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_isKeyable.js +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/* harmony default export */ var _isKeyable = (isKeyable); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getMapData.js + + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return _isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/* harmony default export */ var _getMapData = (getMapData); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheDelete.js + + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = _getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ var _mapCacheDelete = (mapCacheDelete); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheGet.js + + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return _getMapData(this, key).get(key); +} + +/* harmony default export */ var _mapCacheGet = (mapCacheGet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheHas.js + + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return _getMapData(this, key).has(key); +} + +/* harmony default export */ var _mapCacheHas = (mapCacheHas); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheSet.js + + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = _getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +/* harmony default export */ var _mapCacheSet = (mapCacheSet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_MapCache.js + + + + + + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = _mapCacheClear; +MapCache.prototype['delete'] = _mapCacheDelete; +MapCache.prototype.get = _mapCacheGet; +MapCache.prototype.has = _mapCacheHas; +MapCache.prototype.set = _mapCacheSet; + +/* harmony default export */ var _MapCache = (MapCache); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_stackSet.js + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof _ListCache) { + var pairs = data.__data__; + if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new _MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +/* harmony default export */ var _stackSet = (stackSet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_Stack.js + + + + + + + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new _ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = _stackClear; +Stack.prototype['delete'] = _stackDelete; +Stack.prototype.get = _stackGet; +Stack.prototype.has = _stackHas; +Stack.prototype.set = _stackSet; + +/* harmony default export */ var _Stack = (Stack); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_defineProperty.js + + +var defineProperty = (function() { + try { + var func = _getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +/* harmony default export */ var lodash_es_defineProperty = (defineProperty); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignValue.js + + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && lodash_es_defineProperty) { + lodash_es_defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/* harmony default export */ var _baseAssignValue = (baseAssignValue); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_assignMergeValue.js + + + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !lodash_es_eq(object[key], value)) || + (value === undefined && !(key in object))) { + _baseAssignValue(object, key, value); + } +} + +/* harmony default export */ var _assignMergeValue = (assignMergeValue); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseFor.js +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/* harmony default export */ var _createBaseFor = (createBaseFor); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFor.js + + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = _createBaseFor(); + +/* harmony default export */ var _baseFor = (baseFor); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(74); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_Uint8Array.js + + +/** Built-in value references. */ +var Uint8Array = _root["a" /* default */].Uint8Array; + +/* harmony default export */ var _Uint8Array = (Uint8Array); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js + + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new _Uint8Array(result).set(new _Uint8Array(arrayBuffer)); + return result; +} + +/* harmony default export */ var _cloneArrayBuffer = (cloneArrayBuffer); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneTypedArray.js + + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/* harmony default export */ var _cloneTypedArray = (cloneTypedArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_copyArray.js +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/* harmony default export */ var _copyArray = (copyArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseCreate.js + + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!lodash_es_isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/* harmony default export */ var _baseCreate = (baseCreate); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_overArg.js +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/* harmony default export */ var _overArg = (overArg); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getPrototype.js + + +/** Built-in value references. */ +var getPrototype = _overArg(Object.getPrototypeOf, Object); + +/* harmony default export */ var _getPrototype = (getPrototype); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_isPrototype.js +/** Used for built-in method references. */ +var _isPrototype_objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || _isPrototype_objectProto; + + return value === proto; +} + +/* harmony default export */ var _isPrototype = (isPrototype); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneObject.js + + + + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !_isPrototype(object)) + ? _baseCreate(_getPrototype(object)) + : {}; +} + +/* harmony default export */ var _initCloneObject = (initCloneObject); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isObjectLike.js +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/* harmony default export */ var lodash_es_isObjectLike = (isObjectLike); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsArguments.js + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return lodash_es_isObjectLike(value) && _baseGetTag(value) == argsTag; +} + +/* harmony default export */ var _baseIsArguments = (baseIsArguments); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isArguments.js + + + +/** Used for built-in method references. */ +var isArguments_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var isArguments_hasOwnProperty = isArguments_objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = isArguments_objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) { + return lodash_es_isObjectLike(value) && isArguments_hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/* harmony default export */ var lodash_es_isArguments = (isArguments); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isArray.js +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/* harmony default export */ var lodash_es_isArray = (isArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isLength.js +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ var lodash_es_isLength = (isLength); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isArrayLike.js + + + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && lodash_es_isLength(value.length) && !lodash_es_isFunction(value); +} + +/* harmony default export */ var lodash_es_isArrayLike = (isArrayLike); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isArrayLikeObject.js + + + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return lodash_es_isObjectLike(value) && lodash_es_isArrayLike(value); +} + +/* harmony default export */ var lodash_es_isArrayLikeObject = (isArrayLikeObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js +var isBuffer = __webpack_require__(9); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isPlainObject.js + + + + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var isPlainObject_funcProto = Function.prototype, + isPlainObject_objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var isPlainObject_funcToString = isPlainObject_funcProto.toString; + +/** Used to check objects for own properties. */ +var isPlainObject_hasOwnProperty = isPlainObject_objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = isPlainObject_funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!lodash_es_isObjectLike(value) || _baseGetTag(value) != objectTag) { + return false; + } + var proto = _getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = isPlainObject_hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + isPlainObject_funcToString.call(Ctor) == objectCtorString; +} + +/* harmony default export */ var lodash_es_isPlainObject = (isPlainObject); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsTypedArray.js + + + + +/** `Object#toString` result references. */ +var _baseIsTypedArray_argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + _baseIsTypedArray_funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + _baseIsTypedArray_objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[_baseIsTypedArray_argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[_baseIsTypedArray_funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[_baseIsTypedArray_objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return lodash_es_isObjectLike(value) && + lodash_es_isLength(value.length) && !!typedArrayTags[_baseGetTag(value)]; +} + +/* harmony default export */ var _baseIsTypedArray = (baseIsTypedArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUnary.js +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/* harmony default export */ var _baseUnary = (baseUnary); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(43); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isTypedArray.js + + + + +/* Node.js helper references. */ +var nodeIsTypedArray = _nodeUtil["a" /* default */] && _nodeUtil["a" /* default */].isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray; + +/* harmony default export */ var lodash_es_isTypedArray = (isTypedArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_safeGet.js +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +/* harmony default export */ var _safeGet = (safeGet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_assignValue.js + + + +/** Used for built-in method references. */ +var _assignValue_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _assignValue_hasOwnProperty = _assignValue_objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(_assignValue_hasOwnProperty.call(object, key) && lodash_es_eq(objValue, value)) || + (value === undefined && !(key in object))) { + _baseAssignValue(object, key, value); + } +} + +/* harmony default export */ var _assignValue = (assignValue); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_copyObject.js + + + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + _baseAssignValue(object, key, newValue); + } else { + _assignValue(object, key, newValue); + } + } + return object; +} + +/* harmony default export */ var _copyObject = (copyObject); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTimes.js +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/* harmony default export */ var _baseTimes = (baseTimes); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_isIndex.js +/** Used as references for various `Number` constants. */ +var _isIndex_MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? _isIndex_MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +/* harmony default export */ var _isIndex = (isIndex); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayLikeKeys.js + + + + + + + +/** Used for built-in method references. */ +var _arrayLikeKeys_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _arrayLikeKeys_hasOwnProperty = _arrayLikeKeys_objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = lodash_es_isArray(value), + isArg = !isArr && lodash_es_isArguments(value), + isBuff = !isArr && !isArg && Object(isBuffer["a" /* default */])(value), + isType = !isArr && !isArg && !isBuff && lodash_es_isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? _baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || _arrayLikeKeys_hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + _isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ var _arrayLikeKeys = (arrayLikeKeys); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_nativeKeysIn.js +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ var _nativeKeysIn = (nativeKeysIn); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseKeysIn.js + + + + +/** Used for built-in method references. */ +var _baseKeysIn_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseKeysIn_hasOwnProperty = _baseKeysIn_objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!lodash_es_isObject(object)) { + return _nativeKeysIn(object); + } + var isProto = _isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !_baseKeysIn_hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ var _baseKeysIn = (baseKeysIn); + +// CONCATENATED MODULE: ./node_modules/lodash-es/keysIn.js + + + + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return lodash_es_isArrayLike(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object); +} + +/* harmony default export */ var lodash_es_keysIn = (keysIn); + +// CONCATENATED MODULE: ./node_modules/lodash-es/toPlainObject.js + + + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return _copyObject(value, lodash_es_keysIn(value)); +} + +/* harmony default export */ var lodash_es_toPlainObject = (toPlainObject); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMergeDeep.js + + + + + + + + + + + + + + + + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = _safeGet(object, key), + srcValue = _safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + _assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = lodash_es_isArray(srcValue), + isBuff = !isArr && Object(isBuffer["a" /* default */])(srcValue), + isTyped = !isArr && !isBuff && lodash_es_isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (lodash_es_isArray(objValue)) { + newValue = objValue; + } + else if (lodash_es_isArrayLikeObject(objValue)) { + newValue = _copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = Object(_cloneBuffer["a" /* default */])(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = _cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (lodash_es_isPlainObject(srcValue) || lodash_es_isArguments(srcValue)) { + newValue = objValue; + if (lodash_es_isArguments(objValue)) { + newValue = lodash_es_toPlainObject(objValue); + } + else if (!lodash_es_isObject(objValue) || lodash_es_isFunction(objValue)) { + newValue = _initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + _assignMergeValue(object, key, newValue); +} + +/* harmony default export */ var _baseMergeDeep = (baseMergeDeep); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMerge.js + + + + + + + + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + _baseFor(source, function(srcValue, key) { + stack || (stack = new _Stack); + if (lodash_es_isObject(srcValue)) { + _baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(_safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + _assignMergeValue(object, key, newValue); + } + }, lodash_es_keysIn); +} + +/* harmony default export */ var _baseMerge = (baseMerge); + +// CONCATENATED MODULE: ./node_modules/lodash-es/identity.js +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/* harmony default export */ var lodash_es_identity = (identity); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_apply.js +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/* harmony default export */ var _apply = (apply); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_overRest.js + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return _apply(func, this, otherArgs); + }; +} + +/* harmony default export */ var _overRest = (overRest); + +// CONCATENATED MODULE: ./node_modules/lodash-es/constant.js +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/* harmony default export */ var lodash_es_constant = (constant); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSetToString.js + + + + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !lodash_es_defineProperty ? lodash_es_identity : function(func, string) { + return lodash_es_defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': lodash_es_constant(string), + 'writable': true + }); +}; + +/* harmony default export */ var _baseSetToString = (baseSetToString); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_shortOut.js +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +/* harmony default export */ var _shortOut = (shortOut); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_setToString.js + + + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = _shortOut(_baseSetToString); + +/* harmony default export */ var _setToString = (setToString); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRest.js + + + + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return _setToString(_overRest(func, start, lodash_es_identity), func + ''); +} + +/* harmony default export */ var _baseRest = (baseRest); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_isIterateeCall.js + + + + + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!lodash_es_isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (lodash_es_isArrayLike(object) && _isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return lodash_es_eq(object[index], value); + } + return false; +} + +/* harmony default export */ var _isIterateeCall = (isIterateeCall); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_createAssigner.js + + + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return _baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && _isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/* harmony default export */ var _createAssigner = (createAssigner); + +// CONCATENATED MODULE: ./node_modules/lodash-es/merge.js + + + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = _createAssigner(function(object, source, srcIndex) { + _baseMerge(object, source, srcIndex); +}); + +/* harmony default export */ var lodash_es_merge = (merge); + +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/Raised.js + + + + + +var Raised_Raised = function Raised(_ref) { + var zDepth = _ref.zDepth, + radius = _ref.radius, + background = _ref.background, + children = _ref.children, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + wrap: { + position: 'relative', + display: 'inline-block' + }, + content: { + position: 'relative' + }, + bg: { + absolute: '0px 0px 0px 0px', + boxShadow: '0 ' + zDepth + 'px ' + zDepth * 4 + 'px rgba(0,0,0,.24)', + borderRadius: radius, + background: background + } + }, + 'zDepth-0': { + bg: { + boxShadow: 'none' + } + }, + + 'zDepth-1': { + bg: { + boxShadow: '0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)' + } + }, + 'zDepth-2': { + bg: { + boxShadow: '0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)' + } + }, + 'zDepth-3': { + bg: { + boxShadow: '0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)' + } + }, + 'zDepth-4': { + bg: { + boxShadow: '0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)' + } + }, + 'zDepth-5': { + bg: { + boxShadow: '0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)' + } + }, + 'square': { + bg: { + borderRadius: '0' + } + }, + 'circle': { + bg: { + borderRadius: '50%' + } + } + }, passedStyles), { 'zDepth-1': zDepth === 1 }); + + return react_default.a.createElement( + 'div', + { style: styles.wrap }, + react_default.a.createElement('div', { style: styles.bg }), + react_default.a.createElement( + 'div', + { style: styles.content }, + children + ) + ); +}; + +Raised_Raised.propTypes = { + background: prop_types_default.a.string, + zDepth: prop_types_default.a.oneOf([0, 1, 2, 3, 4, 5]), + radius: prop_types_default.a.number, + styles: prop_types_default.a.object +}; + +Raised_Raised.defaultProps = { + background: '#fff', + zDepth: 1, + radius: 2, + styles: {} +}; + +/* harmony default export */ var common_Raised = (Raised_Raised); +// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root["a" /* default */].Date.now(); +}; + +/* harmony default export */ var lodash_es_now = (now); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ var _trimmedEndIndex = (trimmedEndIndex); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ var _baseTrim = (baseTrim); + +// CONCATENATED MODULE: ./node_modules/lodash-es/isSymbol.js + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (lodash_es_isObjectLike(value) && _baseGetTag(value) == symbolTag); +} + +/* harmony default export */ var lodash_es_isSymbol = (isSymbol); + +// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (lodash_es_isSymbol(value)) { + return NAN; + } + if (lodash_es_isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = lodash_es_isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ var lodash_es_toNumber = (toNumber); + +// CONCATENATED MODULE: ./node_modules/lodash-es/debounce.js + + + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var debounce_nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = lodash_es_toNumber(wait) || 0; + if (lodash_es_isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? debounce_nativeMax(lodash_es_toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = lodash_es_now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(lodash_es_now()); + } + + function debounced() { + var time = lodash_es_now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/* harmony default export */ var lodash_es_debounce = (debounce); + +// CONCATENATED MODULE: ./node_modules/lodash-es/throttle.js + + + +/** Error message constants. */ +var throttle_FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(throttle_FUNC_ERROR_TEXT); + } + if (lodash_es_isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return lodash_es_debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} + +/* harmony default export */ var lodash_es_throttle = (throttle); + +// CONCATENATED MODULE: ./node_modules/react-color/es/helpers/saturation.js +var saturation_calculateChange = function calculateChange(e, hsl, container) { + var _container$getBoundin = container.getBoundingClientRect(), + containerWidth = _container$getBoundin.width, + containerHeight = _container$getBoundin.height; + + var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX; + var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY; + var left = x - (container.getBoundingClientRect().left + window.pageXOffset); + var top = y - (container.getBoundingClientRect().top + window.pageYOffset); + + if (left < 0) { + left = 0; + } else if (left > containerWidth) { + left = containerWidth; + } + + if (top < 0) { + top = 0; + } else if (top > containerHeight) { + top = containerHeight; + } + + var saturation = left / containerWidth; + var bright = 1 - top / containerHeight; + + return { + h: hsl.h, + s: saturation, + v: bright, + a: hsl.a, + source: 'hsv' + }; +}; +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/Saturation.js +var Saturation_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function Saturation_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function Saturation_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function Saturation_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + +var Saturation_Saturation = function (_ref) { + Saturation_inherits(Saturation, _ref); + + function Saturation(props) { + Saturation_classCallCheck(this, Saturation); + + var _this = Saturation_possibleConstructorReturn(this, (Saturation.__proto__ || Object.getPrototypeOf(Saturation)).call(this, props)); + + _this.handleChange = function (e) { + typeof _this.props.onChange === 'function' && _this.throttle(_this.props.onChange, saturation_calculateChange(e, _this.props.hsl, _this.container), e); + }; + + _this.handleMouseDown = function (e) { + _this.handleChange(e); + var renderWindow = _this.getContainerRenderWindow(); + renderWindow.addEventListener('mousemove', _this.handleChange); + renderWindow.addEventListener('mouseup', _this.handleMouseUp); + }; + + _this.handleMouseUp = function () { + _this.unbindEventListeners(); + }; + + _this.throttle = lodash_es_throttle(function (fn, data, e) { + fn(data, e); + }, 50); + return _this; + } + + Saturation_createClass(Saturation, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.throttle.cancel(); + this.unbindEventListeners(); + } + }, { + key: 'getContainerRenderWindow', + value: function getContainerRenderWindow() { + var container = this.container; + + var renderWindow = window; + while (!renderWindow.document.contains(container) && renderWindow.parent !== renderWindow) { + renderWindow = renderWindow.parent; + } + return renderWindow; + } + }, { + key: 'unbindEventListeners', + value: function unbindEventListeners() { + var renderWindow = this.getContainerRenderWindow(); + renderWindow.removeEventListener('mousemove', this.handleChange); + renderWindow.removeEventListener('mouseup', this.handleMouseUp); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _ref2 = this.props.style || {}, + color = _ref2.color, + white = _ref2.white, + black = _ref2.black, + pointer = _ref2.pointer, + circle = _ref2.circle; + + var styles = lib_default()({ + 'default': { + color: { + absolute: '0px 0px 0px 0px', + background: 'hsl(' + this.props.hsl.h + ',100%, 50%)', + borderRadius: this.props.radius + }, + white: { + absolute: '0px 0px 0px 0px', + borderRadius: this.props.radius + }, + black: { + absolute: '0px 0px 0px 0px', + boxShadow: this.props.shadow, + borderRadius: this.props.radius + }, + pointer: { + position: 'absolute', + top: -(this.props.hsv.v * 100) + 100 + '%', + left: this.props.hsv.s * 100 + '%', + cursor: 'default' + }, + circle: { + width: '4px', + height: '4px', + boxShadow: '0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)', + borderRadius: '50%', + cursor: 'hand', + transform: 'translate(-2px, -2px)' + } + }, + 'custom': { + color: color, + white: white, + black: black, + pointer: pointer, + circle: circle + } + }, { 'custom': !!this.props.style }); + + return react_default.a.createElement( + 'div', + { + style: styles.color, + ref: function ref(container) { + return _this2.container = container; + }, + onMouseDown: this.handleMouseDown, + onTouchMove: this.handleChange, + onTouchStart: this.handleChange + }, + react_default.a.createElement( + 'style', + null, + '\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n ' + ), + react_default.a.createElement( + 'div', + { style: styles.white, className: 'saturation-white' }, + react_default.a.createElement('div', { style: styles.black, className: 'saturation-black' }), + react_default.a.createElement( + 'div', + { style: styles.pointer }, + this.props.pointer ? react_default.a.createElement(this.props.pointer, this.props) : react_default.a.createElement('div', { style: styles.circle }) + ) + ) + ); + } + }]); + + return Saturation; +}(react["PureComponent"] || react["Component"]); + +/* harmony default export */ var common_Saturation = (Saturation_Saturation); +// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayEach.js +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ var _arrayEach = (arrayEach); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_nativeKeys.js + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = _overArg(Object.keys, Object); + +/* harmony default export */ var _nativeKeys = (nativeKeys); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseKeys.js + + + +/** Used for built-in method references. */ +var _baseKeys_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseKeys_hasOwnProperty = _baseKeys_objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!_isPrototype(object)) { + return _nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (_baseKeys_hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/* harmony default export */ var _baseKeys = (baseKeys); + +// CONCATENATED MODULE: ./node_modules/lodash-es/keys.js + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return lodash_es_isArrayLike(object) ? _arrayLikeKeys(object) : _baseKeys(object); +} + +/* harmony default export */ var lodash_es_keys = (keys); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseForOwn.js + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && _baseFor(object, iteratee, lodash_es_keys); +} + +/* harmony default export */ var _baseForOwn = (baseForOwn); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!lodash_es_isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ var _createBaseEach = (createBaseEach); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn); + +/* harmony default export */ var _baseEach = (baseEach); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_castFunction.js + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : lodash_es_identity; +} + +/* harmony default export */ var _castFunction = (castFunction); + +// CONCATENATED MODULE: ./node_modules/lodash-es/forEach.js + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = lodash_es_isArray(collection) ? _arrayEach : _baseEach; + return func(collection, _castFunction(iteratee)); +} + +/* harmony default export */ var lodash_es_forEach = (forEach); + +// EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js +var tinycolor = __webpack_require__(14); +var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor); + +// CONCATENATED MODULE: ./node_modules/react-color/es/helpers/color.js + + + +var color_simpleCheckForValidColor = function simpleCheckForValidColor(data) { + var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v']; + var checked = 0; + var passed = 0; + lodash_es_forEach(keysToCheck, function (letter) { + if (data[letter]) { + checked += 1; + if (!isNaN(data[letter])) { + passed += 1; + } + if (letter === 's' || letter === 'l') { + var percentPatt = /^\d+%$/; + if (percentPatt.test(data[letter])) { + passed += 1; + } + } + } + }); + return checked === passed ? data : false; +}; + +var color_toState = function toState(data, oldHue) { + var color = data.hex ? tinycolor_default()(data.hex) : tinycolor_default()(data); + var hsl = color.toHsl(); + var hsv = color.toHsv(); + var rgb = color.toRgb(); + var hex = color.toHex(); + if (hsl.s === 0) { + hsl.h = oldHue || 0; + hsv.h = oldHue || 0; + } + var transparent = hex === '000000' && rgb.a === 0; + + return { + hsl: hsl, + hex: transparent ? 'transparent' : '#' + hex, + rgb: rgb, + hsv: hsv, + oldHue: data.h || oldHue || hsl.h, + source: data.source + }; +}; + +var color_isValidHex = function isValidHex(hex) { + if (hex === 'transparent') { + return true; + } + // disable hex4 and hex8 + var lh = String(hex).charAt(0) === '#' ? 1 : 0; + return hex.length !== 4 + lh && hex.length < 7 + lh && tinycolor_default()(hex).isValid(); +}; + +var getContrastingColor = function getContrastingColor(data) { + if (!data) { + return '#fff'; + } + var col = color_toState(data); + if (col.hex === 'transparent') { + return 'rgba(0,0,0,0.4)'; + } + var yiq = (col.rgb.r * 299 + col.rgb.g * 587 + col.rgb.b * 114) / 1000; + return yiq >= 128 ? '#000' : '#fff'; +}; + +var red = { + hsl: { a: 1, h: 0, l: 0.5, s: 1 }, + hex: '#ff0000', + rgb: { r: 255, g: 0, b: 0, a: 1 }, + hsv: { h: 0, s: 1, v: 1, a: 1 } +}; + +var color_isvalidColorString = function isvalidColorString(string, type) { + var stringWithoutDegree = string.replace('°', ''); + return tinycolor_default()(type + ' (' + stringWithoutDegree + ')')._ok; +}; +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/ColorWrap.js +var ColorWrap_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var ColorWrap_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function ColorWrap_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function ColorWrap_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function ColorWrap_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + +var ColorWrap_ColorWrap = function ColorWrap(Picker) { + var ColorPicker = function (_ref) { + ColorWrap_inherits(ColorPicker, _ref); + + function ColorPicker(props) { + ColorWrap_classCallCheck(this, ColorPicker); + + var _this = ColorWrap_possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this)); + + _this.handleChange = function (data, event) { + var isValidColor = color_simpleCheckForValidColor(data); + if (isValidColor) { + var colors = color_toState(data, data.h || _this.state.oldHue); + _this.setState(colors); + _this.props.onChangeComplete && _this.debounce(_this.props.onChangeComplete, colors, event); + _this.props.onChange && _this.props.onChange(colors, event); + } + }; + + _this.handleSwatchHover = function (data, event) { + var isValidColor = color_simpleCheckForValidColor(data); + if (isValidColor) { + var colors = color_toState(data, data.h || _this.state.oldHue); + _this.props.onSwatchHover && _this.props.onSwatchHover(colors, event); + } + }; + + _this.state = ColorWrap_extends({}, color_toState(props.color, 0)); + + _this.debounce = lodash_es_debounce(function (fn, data, event) { + fn(data, event); + }, 100); + return _this; + } + + ColorWrap_createClass(ColorPicker, [{ + key: 'render', + value: function render() { + var optionalEvents = {}; + if (this.props.onSwatchHover) { + optionalEvents.onSwatchHover = this.handleSwatchHover; + } + + return react_default.a.createElement(Picker, ColorWrap_extends({}, this.props, this.state, { + onChange: this.handleChange + }, optionalEvents)); + } + }], [{ + key: 'getDerivedStateFromProps', + value: function getDerivedStateFromProps(nextProps, state) { + return ColorWrap_extends({}, color_toState(nextProps.color, state.oldHue)); + } + }]); + + return ColorPicker; + }(react["PureComponent"] || react["Component"]); + + ColorPicker.propTypes = ColorWrap_extends({}, Picker.propTypes); + + ColorPicker.defaultProps = ColorWrap_extends({}, Picker.defaultProps, { + color: { + h: 250, + s: 0.50, + l: 0.20, + a: 1 + } + }); + + return ColorPicker; +}; + +/* harmony default export */ var common_ColorWrap = (ColorWrap_ColorWrap); +// CONCATENATED MODULE: ./node_modules/react-color/es/helpers/interaction.js +var interaction_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var interaction_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function interaction_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function interaction_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function interaction_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/* eslint-disable no-invalid-this */ + + +var interaction_handleFocus = function handleFocus(Component) { + var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span'; + return function (_React$Component) { + interaction_inherits(Focus, _React$Component); + + function Focus() { + var _ref; + + var _temp, _this, _ret; + + interaction_classCallCheck(this, Focus); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = interaction_possibleConstructorReturn(this, (_ref = Focus.__proto__ || Object.getPrototypeOf(Focus)).call.apply(_ref, [this].concat(args))), _this), _this.state = { focus: false }, _this.handleFocus = function () { + return _this.setState({ focus: true }); + }, _this.handleBlur = function () { + return _this.setState({ focus: false }); + }, _temp), interaction_possibleConstructorReturn(_this, _ret); + } + + interaction_createClass(Focus, [{ + key: 'render', + value: function render() { + return react_default.a.createElement( + Span, + { onFocus: this.handleFocus, onBlur: this.handleBlur }, + react_default.a.createElement(Component, interaction_extends({}, this.props, this.state)) + ); + } + }]); + + return Focus; + }(react_default.a.Component); +}; +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/Swatch.js +var Swatch_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + +var ENTER = 13; + +var Swatch_Swatch = function Swatch(_ref) { + var color = _ref.color, + style = _ref.style, + _ref$onClick = _ref.onClick, + onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, + onHover = _ref.onHover, + _ref$title = _ref.title, + title = _ref$title === undefined ? color : _ref$title, + children = _ref.children, + focus = _ref.focus, + _ref$focusStyle = _ref.focusStyle, + focusStyle = _ref$focusStyle === undefined ? {} : _ref$focusStyle; + + var transparent = color === 'transparent'; + var styles = lib_default()({ + default: { + swatch: Swatch_extends({ + background: color, + height: '100%', + width: '100%', + cursor: 'pointer', + position: 'relative', + outline: 'none' + }, style, focus ? focusStyle : {}) + } + }); + + var handleClick = function handleClick(e) { + return onClick(color, e); + }; + var handleKeyDown = function handleKeyDown(e) { + return e.keyCode === ENTER && onClick(color, e); + }; + var handleHover = function handleHover(e) { + return onHover(color, e); + }; + + var optionalEvents = {}; + if (onHover) { + optionalEvents.onMouseOver = handleHover; + } + + return react_default.a.createElement( + 'div', + Swatch_extends({ + style: styles.swatch, + onClick: handleClick, + title: title, + tabIndex: 0, + onKeyDown: handleKeyDown + }, optionalEvents), + children, + transparent && react_default.a.createElement(common_Checkboard, { + borderRadius: styles.swatch.borderRadius, + boxShadow: 'inset 0 0 0 1px rgba(0,0,0,0.1)' + }) + ); +}; + +/* harmony default export */ var common_Swatch = (interaction_handleFocus(Swatch_Swatch)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/common/index.js + + + + + + + + +// CONCATENATED MODULE: ./node_modules/react-color/es/components/alpha/AlphaPointer.js + + + +var AlphaPointer_AlphaPointer = function AlphaPointer(_ref) { + var direction = _ref.direction; + + var styles = lib_default()({ + 'default': { + picker: { + width: '18px', + height: '18px', + borderRadius: '50%', + transform: 'translate(-9px, -1px)', + backgroundColor: 'rgb(248, 248, 248)', + boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' + } + }, + 'vertical': { + picker: { + transform: 'translate(-3px, -9px)' + } + } + }, { vertical: direction === 'vertical' }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +/* harmony default export */ var alpha_AlphaPointer = (AlphaPointer_AlphaPointer); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/alpha/Alpha.js +var alpha_Alpha_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + +var Alpha_AlphaPicker = function AlphaPicker(_ref) { + var rgb = _ref.rgb, + hsl = _ref.hsl, + width = _ref.width, + height = _ref.height, + onChange = _ref.onChange, + direction = _ref.direction, + style = _ref.style, + renderers = _ref.renderers, + pointer = _ref.pointer, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()({ + 'default': { + picker: { + position: 'relative', + width: width, + height: height + }, + alpha: { + radius: '2px', + style: style + } + } + }); + + return react_default.a.createElement( + 'div', + { style: styles.picker, className: 'alpha-picker ' + className }, + react_default.a.createElement(common_Alpha, alpha_Alpha_extends({}, styles.alpha, { + rgb: rgb, + hsl: hsl, + pointer: pointer, + renderers: renderers, + onChange: onChange, + direction: direction + })) + ); +}; + +Alpha_AlphaPicker.defaultProps = { + width: '316px', + height: '16px', + direction: 'horizontal', + pointer: alpha_AlphaPointer +}; + +/* harmony default export */ var alpha_Alpha = (common_ColorWrap(Alpha_AlphaPicker)); +// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayMap.js +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ var _arrayMap = (arrayMap); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var _setCacheAdd_HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, _setCacheAdd_HASH_UNDEFINED); + return this; +} + +/* harmony default export */ var _setCacheAdd = (setCacheAdd); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ var _setCacheHas = (setCacheHas); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ var _SetCache = (SetCache); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ var _arraySome = (arraySome); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_cacheHas.js +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ var _cacheHas = (cacheHas); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!_cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ var _equalArrays = (equalArrays); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ var _mapToArray = (mapToArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_setToArray.js +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ var _setToArray = (setToArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var _equalByTag_boolTag = '[object Boolean]', + _equalByTag_dateTag = '[object Date]', + _equalByTag_errorTag = '[object Error]', + _equalByTag_mapTag = '[object Map]', + _equalByTag_numberTag = '[object Number]', + _equalByTag_regexpTag = '[object RegExp]', + _equalByTag_setTag = '[object Set]', + _equalByTag_stringTag = '[object String]', + _equalByTag_symbolTag = '[object Symbol]'; + +var _equalByTag_arrayBufferTag = '[object ArrayBuffer]', + _equalByTag_dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol ? _Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case _equalByTag_dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case _equalByTag_arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) { + return false; + } + return true; + + case _equalByTag_boolTag: + case _equalByTag_dateTag: + case _equalByTag_numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return lodash_es_eq(+object, +other); + + case _equalByTag_errorTag: + return object.name == other.name && object.message == other.message; + + case _equalByTag_regexpTag: + case _equalByTag_stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case _equalByTag_mapTag: + var convert = _mapToArray; + + case _equalByTag_setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case _equalByTag_symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ var _equalByTag = (equalByTag); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayPush.js +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ var _arrayPush = (arrayPush); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return lodash_es_isArray(object) ? result : _arrayPush(result, symbolsFunc(object)); +} + +/* harmony default export */ var _baseGetAllKeys = (baseGetAllKeys); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayFilter.js +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ var _arrayFilter = (arrayFilter); + +// CONCATENATED MODULE: ./node_modules/lodash-es/stubArray.js +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ var lodash_es_stubArray = (stubArray); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbols.js + + + +/** Used for built-in method references. */ +var _getSymbols_objectProto = Object.prototype; + +/** Built-in value references. */ +var _getSymbols_propertyIsEnumerable = _getSymbols_objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? lodash_es_stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return _arrayFilter(nativeGetSymbols(object), function(symbol) { + return _getSymbols_propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ var _getSymbols = (getSymbols); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeys.js + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return _baseGetAllKeys(object, lodash_es_keys, _getSymbols); +} + +/* harmony default export */ var _getAllKeys = (getAllKeys); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var _equalObjects_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = _equalObjects_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = _getAllKeys(object), + objLength = objProps.length, + othProps = _getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ var _equalObjects = (equalObjects); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_DataView.js + + + +/* Built-in method references that are verified to be native. */ +var DataView = _getNative(_root["a" /* default */], 'DataView'); + +/* harmony default export */ var _DataView = (DataView); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_Promise.js + + + +/* Built-in method references that are verified to be native. */ +var Promise = _getNative(_root["a" /* default */], 'Promise'); + +/* harmony default export */ var _Promise = (Promise); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_Set.js + + + +/* Built-in method references that are verified to be native. */ +var Set = _getNative(_root["a" /* default */], 'Set'); + +/* harmony default export */ var _Set = (Set); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_WeakMap.js + + + +/* Built-in method references that are verified to be native. */ +var WeakMap = _getNative(_root["a" /* default */], 'WeakMap'); + +/* harmony default export */ var _WeakMap = (WeakMap); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getTag.js + + + + + + + + +/** `Object#toString` result references. */ +var _getTag_mapTag = '[object Map]', + _getTag_objectTag = '[object Object]', + promiseTag = '[object Promise]', + _getTag_setTag = '[object Set]', + _getTag_weakMapTag = '[object WeakMap]'; + +var _getTag_dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = _toSource(_DataView), + mapCtorString = _toSource(_Map), + promiseCtorString = _toSource(_Promise), + setCtorString = _toSource(_Set), + weakMapCtorString = _toSource(_WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = _baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != _getTag_dataViewTag) || + (_Map && getTag(new _Map) != _getTag_mapTag) || + (_Promise && getTag(_Promise.resolve()) != promiseTag) || + (_Set && getTag(new _Set) != _getTag_setTag) || + (_WeakMap && getTag(new _WeakMap) != _getTag_weakMapTag)) { + getTag = function(value) { + var result = _baseGetTag(value), + Ctor = result == _getTag_objectTag ? value.constructor : undefined, + ctorString = Ctor ? _toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return _getTag_dataViewTag; + case mapCtorString: return _getTag_mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return _getTag_setTag; + case weakMapCtorString: return _getTag_weakMapTag; + } + } + return result; + }; +} + +/* harmony default export */ var _getTag = (getTag); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var _baseIsEqualDeep_argsTag = '[object Arguments]', + _baseIsEqualDeep_arrayTag = '[object Array]', + _baseIsEqualDeep_objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = lodash_es_isArray(object), + othIsArr = lodash_es_isArray(other), + objTag = objIsArr ? _baseIsEqualDeep_arrayTag : _getTag(object), + othTag = othIsArr ? _baseIsEqualDeep_arrayTag : _getTag(other); + + objTag = objTag == _baseIsEqualDeep_argsTag ? _baseIsEqualDeep_objectTag : objTag; + othTag = othTag == _baseIsEqualDeep_argsTag ? _baseIsEqualDeep_objectTag : othTag; + + var objIsObj = objTag == _baseIsEqualDeep_objectTag, + othIsObj = othTag == _baseIsEqualDeep_objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && Object(isBuffer["a" /* default */])(object)) { + if (!Object(isBuffer["a" /* default */])(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack); + return (objIsArr || lodash_es_isTypedArray(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ var _baseIsEqualDeep = (baseIsEqualDeep); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!lodash_es_isObjectLike(value) && !lodash_es_isObjectLike(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ var _baseIsEqual = (baseIsEqual); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ var _baseIsMatch = (baseIsMatch); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !lodash_es_isObject(value); +} + +/* harmony default export */ var _isStrictComparable = (isStrictComparable); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = lodash_es_keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ var _getMatchData = (getMatchData); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ var _matchesStrictComparable = (matchesStrictComparable); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ var _baseMatches = (baseMatches); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_isKey.js + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (lodash_es_isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || lodash_es_isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ var _isKey = (isKey); + +// CONCATENATED MODULE: ./node_modules/lodash-es/memoize.js + + +/** Error message constants. */ +var memoize_FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(memoize_FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || _MapCache); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = _MapCache; + +/* harmony default export */ var lodash_es_memoize = (memoize); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = lodash_es_memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ var _memoizeCapped = (memoizeCapped); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ var _stringToPath = (stringToPath); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var _baseToString_symbolProto = _Symbol ? _Symbol.prototype : undefined, + symbolToString = _baseToString_symbolProto ? _baseToString_symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (lodash_es_isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return _arrayMap(value, baseToString) + ''; + } + if (lodash_es_isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ var _baseToString = (baseToString); + +// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ var lodash_es_toString = (toString_toString); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (lodash_es_isArray(value)) { + return value; + } + return _isKey(value, object) ? [value] : _stringToPath(lodash_es_toString(value)); +} + +/* harmony default export */ var _castPath = (castPath); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_toKey.js + + +/** Used as references for various `Number` constants. */ +var _toKey_INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || lodash_es_isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -_toKey_INFINITY) ? '-0' : result; +} + +/* harmony default export */ var _toKey = (toKey); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGet.js + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = _castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[_toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ var _baseGet = (baseGet); + +// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get_get(object, path, defaultValue) { + var result = object == null ? undefined : _baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ var lodash_es_get = (get_get); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ var _baseHasIn = (baseHasIn); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_hasPath.js + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = _castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = _toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && lodash_es_isLength(length) && _isIndex(key, length) && + (lodash_es_isArray(object) || lodash_es_isArguments(object)); +} + +/* harmony default export */ var _hasPath = (hasPath); + +// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && _hasPath(object, path, _baseHasIn); +} + +/* harmony default export */ var lodash_es_hasIn = (hasIn); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (_isKey(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable(_toKey(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? lodash_es_hasIn(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ var _baseMatchesProperty = (baseMatchesProperty); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseProperty.js +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ var _baseProperty = (baseProperty); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return _baseGet(object, path); + }; +} + +/* harmony default export */ var _basePropertyDeep = (basePropertyDeep); + +// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ var lodash_es_property = (property); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return lodash_es_identity; + } + if (typeof value == 'object') { + return lodash_es_isArray(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ var _baseIteratee = (baseIteratee); + +// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMap.js + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = lodash_es_isArrayLike(collection) ? Array(collection.length) : []; + + _baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ var _baseMap = (baseMap); + +// CONCATENATED MODULE: ./node_modules/lodash-es/map.js + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map_map(collection, iteratee) { + var func = lodash_es_isArray(collection) ? _arrayMap : _baseMap; + return func(collection, _baseIteratee(iteratee, 3)); +} + +/* harmony default export */ var lodash_es_map = (map_map); + +// CONCATENATED MODULE: ./node_modules/react-color/es/components/block/BlockSwatches.js + + + + + + +var BlockSwatches_BlockSwatches = function BlockSwatches(_ref) { + var colors = _ref.colors, + onClick = _ref.onClick, + onSwatchHover = _ref.onSwatchHover; + + var styles = lib_default()({ + 'default': { + swatches: { + marginRight: '-10px' + }, + swatch: { + width: '22px', + height: '22px', + float: 'left', + marginRight: '10px', + marginBottom: '10px', + borderRadius: '4px' + }, + clear: { + clear: 'both' + } + } + }); + + return react_default.a.createElement( + 'div', + { style: styles.swatches }, + lodash_es_map(colors, function (c) { + return react_default.a.createElement(common_Swatch, { + key: c, + color: c, + style: styles.swatch, + onClick: onClick, + onHover: onSwatchHover, + focusStyle: { + boxShadow: '0 0 4px ' + c + } + }); + }), + react_default.a.createElement('div', { style: styles.clear }) + ); +}; + +/* harmony default export */ var block_BlockSwatches = (BlockSwatches_BlockSwatches); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/block/Block.js + + + + + + + + + +var Block_Block = function Block(_ref) { + var onChange = _ref.onChange, + onSwatchHover = _ref.onSwatchHover, + hex = _ref.hex, + colors = _ref.colors, + width = _ref.width, + triangle = _ref.triangle, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var transparent = hex === 'transparent'; + var handleChange = function handleChange(hexCode, e) { + color_isValidHex(hexCode) && onChange({ + hex: hexCode, + source: 'hex' + }, e); + }; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + card: { + width: width, + background: '#fff', + boxShadow: '0 1px rgba(0,0,0,.1)', + borderRadius: '6px', + position: 'relative' + }, + head: { + height: '110px', + background: hex, + borderRadius: '6px 6px 0 0', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + position: 'relative' + }, + body: { + padding: '10px' + }, + label: { + fontSize: '18px', + color: getContrastingColor(hex), + position: 'relative' + }, + triangle: { + width: '0px', + height: '0px', + borderStyle: 'solid', + borderWidth: '0 10px 10px 10px', + borderColor: 'transparent transparent ' + hex + ' transparent', + position: 'absolute', + top: '-10px', + left: '50%', + marginLeft: '-10px' + }, + input: { + width: '100%', + fontSize: '12px', + color: '#666', + border: '0px', + outline: 'none', + height: '22px', + boxShadow: 'inset 0 0 0 1px #ddd', + borderRadius: '4px', + padding: '0 7px', + boxSizing: 'border-box' + } + }, + 'hide-triangle': { + triangle: { + display: 'none' + } + } + }, passedStyles), { 'hide-triangle': triangle === 'hide' }); + + return react_default.a.createElement( + 'div', + { style: styles.card, className: 'block-picker ' + className }, + react_default.a.createElement('div', { style: styles.triangle }), + react_default.a.createElement( + 'div', + { style: styles.head }, + transparent && react_default.a.createElement(common_Checkboard, { borderRadius: '6px 6px 0 0' }), + react_default.a.createElement( + 'div', + { style: styles.label }, + hex + ) + ), + react_default.a.createElement( + 'div', + { style: styles.body }, + react_default.a.createElement(block_BlockSwatches, { colors: colors, onClick: handleChange, onSwatchHover: onSwatchHover }), + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input }, + value: hex, + onChange: handleChange + }) + ) + ); +}; + +Block_Block.propTypes = { + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + colors: prop_types_default.a.arrayOf(prop_types_default.a.string), + triangle: prop_types_default.a.oneOf(['top', 'hide']), + styles: prop_types_default.a.object +}; + +Block_Block.defaultProps = { + width: 170, + colors: ['#D9E3F0', '#F47373', '#697689', '#37D67A', '#2CCCE4', '#555555', '#dce775', '#ff8a65', '#ba68c8'], + triangle: 'top', + styles: {} +}; + +/* harmony default export */ var block_Block = (common_ColorWrap(Block_Block)); +// CONCATENATED MODULE: ./node_modules/material-colors/dist/colors.es2015.js +var colors_es2015_red = {"50":"#ffebee","100":"#ffcdd2","200":"#ef9a9a","300":"#e57373","400":"#ef5350","500":"#f44336","600":"#e53935","700":"#d32f2f","800":"#c62828","900":"#b71c1c","a100":"#ff8a80","a200":"#ff5252","a400":"#ff1744","a700":"#d50000"}; +var pink = {"50":"#fce4ec","100":"#f8bbd0","200":"#f48fb1","300":"#f06292","400":"#ec407a","500":"#e91e63","600":"#d81b60","700":"#c2185b","800":"#ad1457","900":"#880e4f","a100":"#ff80ab","a200":"#ff4081","a400":"#f50057","a700":"#c51162"}; +var purple = {"50":"#f3e5f5","100":"#e1bee7","200":"#ce93d8","300":"#ba68c8","400":"#ab47bc","500":"#9c27b0","600":"#8e24aa","700":"#7b1fa2","800":"#6a1b9a","900":"#4a148c","a100":"#ea80fc","a200":"#e040fb","a400":"#d500f9","a700":"#aa00ff"}; +var deepPurple = {"50":"#ede7f6","100":"#d1c4e9","200":"#b39ddb","300":"#9575cd","400":"#7e57c2","500":"#673ab7","600":"#5e35b1","700":"#512da8","800":"#4527a0","900":"#311b92","a100":"#b388ff","a200":"#7c4dff","a400":"#651fff","a700":"#6200ea"}; +var indigo = {"50":"#e8eaf6","100":"#c5cae9","200":"#9fa8da","300":"#7986cb","400":"#5c6bc0","500":"#3f51b5","600":"#3949ab","700":"#303f9f","800":"#283593","900":"#1a237e","a100":"#8c9eff","a200":"#536dfe","a400":"#3d5afe","a700":"#304ffe"}; +var blue = {"50":"#e3f2fd","100":"#bbdefb","200":"#90caf9","300":"#64b5f6","400":"#42a5f5","500":"#2196f3","600":"#1e88e5","700":"#1976d2","800":"#1565c0","900":"#0d47a1","a100":"#82b1ff","a200":"#448aff","a400":"#2979ff","a700":"#2962ff"}; +var lightBlue = {"50":"#e1f5fe","100":"#b3e5fc","200":"#81d4fa","300":"#4fc3f7","400":"#29b6f6","500":"#03a9f4","600":"#039be5","700":"#0288d1","800":"#0277bd","900":"#01579b","a100":"#80d8ff","a200":"#40c4ff","a400":"#00b0ff","a700":"#0091ea"}; +var cyan = {"50":"#e0f7fa","100":"#b2ebf2","200":"#80deea","300":"#4dd0e1","400":"#26c6da","500":"#00bcd4","600":"#00acc1","700":"#0097a7","800":"#00838f","900":"#006064","a100":"#84ffff","a200":"#18ffff","a400":"#00e5ff","a700":"#00b8d4"}; +var teal = {"50":"#e0f2f1","100":"#b2dfdb","200":"#80cbc4","300":"#4db6ac","400":"#26a69a","500":"#009688","600":"#00897b","700":"#00796b","800":"#00695c","900":"#004d40","a100":"#a7ffeb","a200":"#64ffda","a400":"#1de9b6","a700":"#00bfa5"}; +var green = {"50":"#e8f5e9","100":"#c8e6c9","200":"#a5d6a7","300":"#81c784","400":"#66bb6a","500":"#4caf50","600":"#43a047","700":"#388e3c","800":"#2e7d32","900":"#1b5e20","a100":"#b9f6ca","a200":"#69f0ae","a400":"#00e676","a700":"#00c853"}; +var lightGreen = {"50":"#f1f8e9","100":"#dcedc8","200":"#c5e1a5","300":"#aed581","400":"#9ccc65","500":"#8bc34a","600":"#7cb342","700":"#689f38","800":"#558b2f","900":"#33691e","a100":"#ccff90","a200":"#b2ff59","a400":"#76ff03","a700":"#64dd17"}; +var lime = {"50":"#f9fbe7","100":"#f0f4c3","200":"#e6ee9c","300":"#dce775","400":"#d4e157","500":"#cddc39","600":"#c0ca33","700":"#afb42b","800":"#9e9d24","900":"#827717","a100":"#f4ff81","a200":"#eeff41","a400":"#c6ff00","a700":"#aeea00"}; +var yellow = {"50":"#fffde7","100":"#fff9c4","200":"#fff59d","300":"#fff176","400":"#ffee58","500":"#ffeb3b","600":"#fdd835","700":"#fbc02d","800":"#f9a825","900":"#f57f17","a100":"#ffff8d","a200":"#ffff00","a400":"#ffea00","a700":"#ffd600"}; +var amber = {"50":"#fff8e1","100":"#ffecb3","200":"#ffe082","300":"#ffd54f","400":"#ffca28","500":"#ffc107","600":"#ffb300","700":"#ffa000","800":"#ff8f00","900":"#ff6f00","a100":"#ffe57f","a200":"#ffd740","a400":"#ffc400","a700":"#ffab00"}; +var orange = {"50":"#fff3e0","100":"#ffe0b2","200":"#ffcc80","300":"#ffb74d","400":"#ffa726","500":"#ff9800","600":"#fb8c00","700":"#f57c00","800":"#ef6c00","900":"#e65100","a100":"#ffd180","a200":"#ffab40","a400":"#ff9100","a700":"#ff6d00"}; +var deepOrange = {"50":"#fbe9e7","100":"#ffccbc","200":"#ffab91","300":"#ff8a65","400":"#ff7043","500":"#ff5722","600":"#f4511e","700":"#e64a19","800":"#d84315","900":"#bf360c","a100":"#ff9e80","a200":"#ff6e40","a400":"#ff3d00","a700":"#dd2c00"}; +var brown = {"50":"#efebe9","100":"#d7ccc8","200":"#bcaaa4","300":"#a1887f","400":"#8d6e63","500":"#795548","600":"#6d4c41","700":"#5d4037","800":"#4e342e","900":"#3e2723"}; +var colors_es2015_grey = {"50":"#fafafa","100":"#f5f5f5","200":"#eeeeee","300":"#e0e0e0","400":"#bdbdbd","500":"#9e9e9e","600":"#757575","700":"#616161","800":"#424242","900":"#212121"}; +var blueGrey = {"50":"#eceff1","100":"#cfd8dc","200":"#b0bec5","300":"#90a4ae","400":"#78909c","500":"#607d8b","600":"#546e7a","700":"#455a64","800":"#37474f","900":"#263238"}; +var darkText = {"primary":"rgba(0, 0, 0, 0.87)","secondary":"rgba(0, 0, 0, 0.54)","disabled":"rgba(0, 0, 0, 0.38)","dividers":"rgba(0, 0, 0, 0.12)"}; +var lightText = {"primary":"rgba(255, 255, 255, 1)","secondary":"rgba(255, 255, 255, 0.7)","disabled":"rgba(255, 255, 255, 0.5)","dividers":"rgba(255, 255, 255, 0.12)"}; +var darkIcons = {"active":"rgba(0, 0, 0, 0.54)","inactive":"rgba(0, 0, 0, 0.38)"}; +var lightIcons = {"active":"rgba(255, 255, 255, 1)","inactive":"rgba(255, 255, 255, 0.5)"}; +var colors_es2015_white = "#ffffff"; +var colors_es2015_black = "#000000"; + +/* harmony default export */ var colors_es2015 = ({ + red: colors_es2015_red, + pink: pink, + purple: purple, + deepPurple: deepPurple, + indigo: indigo, + blue: blue, + lightBlue: lightBlue, + cyan: cyan, + teal: teal, + green: green, + lightGreen: lightGreen, + lime: lime, + yellow: yellow, + amber: amber, + orange: orange, + deepOrange: deepOrange, + brown: brown, + grey: colors_es2015_grey, + blueGrey: blueGrey, + darkText: darkText, + lightText: lightText, + darkIcons: darkIcons, + lightIcons: lightIcons, + white: colors_es2015_white, + black: colors_es2015_black +}); + +// CONCATENATED MODULE: ./node_modules/react-color/es/components/circle/CircleSwatch.js + + + + + +var CircleSwatch_CircleSwatch = function CircleSwatch(_ref) { + var color = _ref.color, + onClick = _ref.onClick, + onSwatchHover = _ref.onSwatchHover, + hover = _ref.hover, + active = _ref.active, + circleSize = _ref.circleSize, + circleSpacing = _ref.circleSpacing; + + var styles = lib_default()({ + 'default': { + swatch: { + width: circleSize, + height: circleSize, + marginRight: circleSpacing, + marginBottom: circleSpacing, + transform: 'scale(1)', + transition: '100ms transform ease' + }, + Swatch: { + borderRadius: '50%', + background: 'transparent', + boxShadow: 'inset 0 0 0 ' + (circleSize / 2 + 1) + 'px ' + color, + transition: '100ms box-shadow ease' + } + }, + 'hover': { + swatch: { + transform: 'scale(1.2)' + } + }, + 'active': { + Swatch: { + boxShadow: 'inset 0 0 0 3px ' + color + } + } + }, { hover: hover, active: active }); + + return react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement(common_Swatch, { + style: styles.Swatch, + color: color, + onClick: onClick, + onHover: onSwatchHover, + focusStyle: { boxShadow: styles.Swatch.boxShadow + ', 0 0 5px ' + color } + }) + ); +}; + +CircleSwatch_CircleSwatch.defaultProps = { + circleSize: 28, + circleSpacing: 14 +}; + +/* harmony default export */ var circle_CircleSwatch = (Object(lib["handleHover"])(CircleSwatch_CircleSwatch)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/circle/Circle.js + + + + + + + + + + +var Circle_Circle = function Circle(_ref) { + var width = _ref.width, + onChange = _ref.onChange, + onSwatchHover = _ref.onSwatchHover, + colors = _ref.colors, + hex = _ref.hex, + circleSize = _ref.circleSize, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + circleSpacing = _ref.circleSpacing, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + card: { + width: width, + display: 'flex', + flexWrap: 'wrap', + marginRight: -circleSpacing, + marginBottom: -circleSpacing + } + } + }, passedStyles)); + + var handleChange = function handleChange(hexCode, e) { + return onChange({ hex: hexCode, source: 'hex' }, e); + }; + + return react_default.a.createElement( + 'div', + { style: styles.card, className: 'circle-picker ' + className }, + lodash_es_map(colors, function (c) { + return react_default.a.createElement(circle_CircleSwatch, { + key: c, + color: c, + onClick: handleChange, + onSwatchHover: onSwatchHover, + active: hex === c.toLowerCase(), + circleSize: circleSize, + circleSpacing: circleSpacing + }); + }) + ); +}; + +Circle_Circle.propTypes = { + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + circleSize: prop_types_default.a.number, + circleSpacing: prop_types_default.a.number, + styles: prop_types_default.a.object +}; + +Circle_Circle.defaultProps = { + width: 252, + circleSize: 28, + circleSpacing: 14, + colors: [colors_es2015_red['500'], pink['500'], purple['500'], deepPurple['500'], indigo['500'], blue['500'], lightBlue['500'], cyan['500'], teal['500'], green['500'], lightGreen['500'], lime['500'], yellow['500'], amber['500'], orange['500'], deepOrange['500'], brown['500'], blueGrey['500']], + styles: {} +}; + +/* harmony default export */ var circle_Circle = (common_ColorWrap(Circle_Circle)); +// CONCATENATED MODULE: ./node_modules/lodash-es/isUndefined.js +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ var lodash_es_isUndefined = (isUndefined); + +// EXTERNAL MODULE: ./node_modules/@icons/material/UnfoldMoreHorizontalIcon.js +var UnfoldMoreHorizontalIcon = __webpack_require__(75); +var UnfoldMoreHorizontalIcon_default = /*#__PURE__*/__webpack_require__.n(UnfoldMoreHorizontalIcon); + +// CONCATENATED MODULE: ./node_modules/react-color/es/components/chrome/ChromeFields.js +var ChromeFields_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function ChromeFields_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function ChromeFields_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function ChromeFields_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/* eslint-disable react/no-did-mount-set-state, no-param-reassign */ + + + + + + + + + +var ChromeFields_ChromeFields = function (_React$Component) { + ChromeFields_inherits(ChromeFields, _React$Component); + + function ChromeFields(props) { + ChromeFields_classCallCheck(this, ChromeFields); + + var _this = ChromeFields_possibleConstructorReturn(this, (ChromeFields.__proto__ || Object.getPrototypeOf(ChromeFields)).call(this)); + + _this.toggleViews = function () { + if (_this.state.view === 'hex') { + _this.setState({ view: 'rgb' }); + } else if (_this.state.view === 'rgb') { + _this.setState({ view: 'hsl' }); + } else if (_this.state.view === 'hsl') { + if (_this.props.hsl.a === 1) { + _this.setState({ view: 'hex' }); + } else { + _this.setState({ view: 'rgb' }); + } + } + }; + + _this.handleChange = function (data, e) { + if (data.hex) { + color_isValidHex(data.hex) && _this.props.onChange({ + hex: data.hex, + source: 'hex' + }, e); + } else if (data.r || data.g || data.b) { + _this.props.onChange({ + r: data.r || _this.props.rgb.r, + g: data.g || _this.props.rgb.g, + b: data.b || _this.props.rgb.b, + source: 'rgb' + }, e); + } else if (data.a) { + if (data.a < 0) { + data.a = 0; + } else if (data.a > 1) { + data.a = 1; + } + + _this.props.onChange({ + h: _this.props.hsl.h, + s: _this.props.hsl.s, + l: _this.props.hsl.l, + a: Math.round(data.a * 100) / 100, + source: 'rgb' + }, e); + } else if (data.h || data.s || data.l) { + // Remove any occurances of '%'. + if (typeof data.s === 'string' && data.s.includes('%')) { + data.s = data.s.replace('%', ''); + } + if (typeof data.l === 'string' && data.l.includes('%')) { + data.l = data.l.replace('%', ''); + } + + // We store HSL as a unit interval so we need to override the 1 input to 0.01 + if (data.s == 1) { + data.s = 0.01; + } else if (data.l == 1) { + data.l = 0.01; + } + + _this.props.onChange({ + h: data.h || _this.props.hsl.h, + s: Number(!lodash_es_isUndefined(data.s) ? data.s : _this.props.hsl.s), + l: Number(!lodash_es_isUndefined(data.l) ? data.l : _this.props.hsl.l), + source: 'hsl' + }, e); + } + }; + + _this.showHighlight = function (e) { + e.currentTarget.style.background = '#eee'; + }; + + _this.hideHighlight = function (e) { + e.currentTarget.style.background = 'transparent'; + }; + + if (props.hsl.a !== 1 && props.view === "hex") { + _this.state = { + view: "rgb" + }; + } else { + _this.state = { + view: props.view + }; + } + return _this; + } + + ChromeFields_createClass(ChromeFields, [{ + key: 'render', + value: function render() { + var _this2 = this; + + var styles = lib_default()({ + 'default': { + wrap: { + paddingTop: '16px', + display: 'flex' + }, + fields: { + flex: '1', + display: 'flex', + marginLeft: '-6px' + }, + field: { + paddingLeft: '6px', + width: '100%' + }, + alpha: { + paddingLeft: '6px', + width: '100%' + }, + toggle: { + width: '32px', + textAlign: 'right', + position: 'relative' + }, + icon: { + marginRight: '-4px', + marginTop: '12px', + cursor: 'pointer', + position: 'relative' + }, + iconHighlight: { + position: 'absolute', + width: '24px', + height: '28px', + background: '#eee', + borderRadius: '4px', + top: '10px', + left: '12px', + display: 'none' + }, + input: { + fontSize: '11px', + color: '#333', + width: '100%', + borderRadius: '2px', + border: 'none', + boxShadow: 'inset 0 0 0 1px #dadada', + height: '21px', + textAlign: 'center' + }, + label: { + textTransform: 'uppercase', + fontSize: '11px', + lineHeight: '11px', + color: '#969696', + textAlign: 'center', + display: 'block', + marginTop: '12px' + }, + svg: { + fill: '#333', + width: '24px', + height: '24px', + border: '1px transparent solid', + borderRadius: '5px' + } + }, + 'disableAlpha': { + alpha: { + display: 'none' + } + } + }, this.props, this.state); + + var fields = void 0; + if (this.state.view === 'hex') { + fields = react_default.a.createElement( + 'div', + { style: styles.fields, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.field }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'hex', value: this.props.hex, + onChange: this.handleChange + }) + ) + ); + } else if (this.state.view === 'rgb') { + fields = react_default.a.createElement( + 'div', + { style: styles.fields, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.field }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'r', + value: this.props.rgb.r, + onChange: this.handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.field }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'g', + value: this.props.rgb.g, + onChange: this.handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.field }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'b', + value: this.props.rgb.b, + onChange: this.handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.alpha }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'a', + value: this.props.rgb.a, + arrowOffset: 0.01, + onChange: this.handleChange + }) + ) + ); + } else if (this.state.view === 'hsl') { + fields = react_default.a.createElement( + 'div', + { style: styles.fields, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.field }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'h', + value: Math.round(this.props.hsl.h), + onChange: this.handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.field }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 's', + value: Math.round(this.props.hsl.s * 100) + '%', + onChange: this.handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.field }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'l', + value: Math.round(this.props.hsl.l * 100) + '%', + onChange: this.handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.alpha }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'a', + value: this.props.hsl.a, + arrowOffset: 0.01, + onChange: this.handleChange + }) + ) + ); + } + + return react_default.a.createElement( + 'div', + { style: styles.wrap, className: 'flexbox-fix' }, + fields, + react_default.a.createElement( + 'div', + { style: styles.toggle }, + react_default.a.createElement( + 'div', + { style: styles.icon, onClick: this.toggleViews, ref: function ref(icon) { + return _this2.icon = icon; + } }, + react_default.a.createElement(UnfoldMoreHorizontalIcon_default.a, { + style: styles.svg, + onMouseOver: this.showHighlight, + onMouseEnter: this.showHighlight, + onMouseOut: this.hideHighlight + }) + ) + ) + ); + } + }], [{ + key: 'getDerivedStateFromProps', + value: function getDerivedStateFromProps(nextProps, state) { + if (nextProps.hsl.a !== 1 && state.view === 'hex') { + return { view: 'rgb' }; + } + return null; + } + }]); + + return ChromeFields; +}(react_default.a.Component); + +ChromeFields_ChromeFields.defaultProps = { + view: "hex" +}; + +/* harmony default export */ var chrome_ChromeFields = (ChromeFields_ChromeFields); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/chrome/ChromePointer.js + + + +var ChromePointer_ChromePointer = function ChromePointer() { + var styles = lib_default()({ + 'default': { + picker: { + width: '12px', + height: '12px', + borderRadius: '6px', + transform: 'translate(-6px, -1px)', + backgroundColor: 'rgb(248, 248, 248)', + boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' + } + } + }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +/* harmony default export */ var chrome_ChromePointer = (ChromePointer_ChromePointer); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/chrome/ChromePointerCircle.js + + + +var ChromePointerCircle_ChromePointerCircle = function ChromePointerCircle() { + var styles = lib_default()({ + 'default': { + picker: { + width: '12px', + height: '12px', + borderRadius: '6px', + boxShadow: 'inset 0 0 0 1px #fff', + transform: 'translate(-6px, -6px)' + } + } + }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +/* harmony default export */ var chrome_ChromePointerCircle = (ChromePointerCircle_ChromePointerCircle); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/chrome/Chrome.js + + + + + + + + + + +var Chrome_Chrome = function Chrome(_ref) { + var width = _ref.width, + onChange = _ref.onChange, + disableAlpha = _ref.disableAlpha, + rgb = _ref.rgb, + hsl = _ref.hsl, + hsv = _ref.hsv, + hex = _ref.hex, + renderers = _ref.renderers, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className, + defaultView = _ref.defaultView; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + picker: { + width: width, + background: '#fff', + borderRadius: '2px', + boxShadow: '0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)', + boxSizing: 'initial', + fontFamily: 'Menlo' + }, + saturation: { + width: '100%', + paddingBottom: '55%', + position: 'relative', + borderRadius: '2px 2px 0 0', + overflow: 'hidden' + }, + Saturation: { + radius: '2px 2px 0 0' + }, + body: { + padding: '16px 16px 12px' + }, + controls: { + display: 'flex' + }, + color: { + width: '32px' + }, + swatch: { + marginTop: '6px', + width: '16px', + height: '16px', + borderRadius: '8px', + position: 'relative', + overflow: 'hidden' + }, + active: { + absolute: '0px 0px 0px 0px', + borderRadius: '8px', + boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.1)', + background: 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + rgb.a + ')', + zIndex: '2' + }, + toggles: { + flex: '1' + }, + hue: { + height: '10px', + position: 'relative', + marginBottom: '8px' + }, + Hue: { + radius: '2px' + }, + alpha: { + height: '10px', + position: 'relative' + }, + Alpha: { + radius: '2px' + } + }, + 'disableAlpha': { + color: { + width: '22px' + }, + alpha: { + display: 'none' + }, + hue: { + marginBottom: '0px' + }, + swatch: { + width: '10px', + height: '10px', + marginTop: '0px' + } + } + }, passedStyles), { disableAlpha: disableAlpha }); + + return react_default.a.createElement( + 'div', + { style: styles.picker, className: 'chrome-picker ' + className }, + react_default.a.createElement( + 'div', + { style: styles.saturation }, + react_default.a.createElement(common_Saturation, { + style: styles.Saturation, + hsl: hsl, + hsv: hsv, + pointer: chrome_ChromePointerCircle, + onChange: onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.body }, + react_default.a.createElement( + 'div', + { style: styles.controls, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.color }, + react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement('div', { style: styles.active }), + react_default.a.createElement(common_Checkboard, { renderers: renderers }) + ) + ), + react_default.a.createElement( + 'div', + { style: styles.toggles }, + react_default.a.createElement( + 'div', + { style: styles.hue }, + react_default.a.createElement(common_Hue, { + style: styles.Hue, + hsl: hsl, + pointer: chrome_ChromePointer, + onChange: onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.alpha }, + react_default.a.createElement(common_Alpha, { + style: styles.Alpha, + rgb: rgb, + hsl: hsl, + pointer: chrome_ChromePointer, + renderers: renderers, + onChange: onChange + }) + ) + ) + ), + react_default.a.createElement(chrome_ChromeFields, { + rgb: rgb, + hsl: hsl, + hex: hex, + view: defaultView, + onChange: onChange, + disableAlpha: disableAlpha + }) + ) + ); +}; + +Chrome_Chrome.propTypes = { + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + disableAlpha: prop_types_default.a.bool, + styles: prop_types_default.a.object, + defaultView: prop_types_default.a.oneOf(["hex", "rgb", "hsl"]) +}; + +Chrome_Chrome.defaultProps = { + width: 225, + disableAlpha: false, + styles: {} +}; + +/* harmony default export */ var chrome_Chrome = (common_ColorWrap(Chrome_Chrome)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/compact/CompactColor.js + + + + + + +var CompactColor_CompactColor = function CompactColor(_ref) { + var color = _ref.color, + _ref$onClick = _ref.onClick, + onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, + onSwatchHover = _ref.onSwatchHover, + active = _ref.active; + + var styles = lib_default()({ + 'default': { + color: { + background: color, + width: '15px', + height: '15px', + float: 'left', + marginRight: '5px', + marginBottom: '5px', + position: 'relative', + cursor: 'pointer' + }, + dot: { + absolute: '5px 5px 5px 5px', + background: getContrastingColor(color), + borderRadius: '50%', + opacity: '0' + } + }, + 'active': { + dot: { + opacity: '1' + } + }, + 'color-#FFFFFF': { + color: { + boxShadow: 'inset 0 0 0 1px #ddd' + }, + dot: { + background: '#000' + } + }, + 'transparent': { + dot: { + background: '#000' + } + } + }, { active: active, 'color-#FFFFFF': color === '#FFFFFF', 'transparent': color === 'transparent' }); + + return react_default.a.createElement( + common_Swatch, + { + style: styles.color, + color: color, + onClick: onClick, + onHover: onSwatchHover, + focusStyle: { boxShadow: '0 0 4px ' + color } + }, + react_default.a.createElement('div', { style: styles.dot }) + ); +}; + +/* harmony default export */ var compact_CompactColor = (CompactColor_CompactColor); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/compact/CompactFields.js + + + + + +var CompactFields_CompactFields = function CompactFields(_ref) { + var hex = _ref.hex, + rgb = _ref.rgb, + onChange = _ref.onChange; + + var styles = lib_default()({ + 'default': { + fields: { + display: 'flex', + paddingBottom: '6px', + paddingRight: '5px', + position: 'relative' + }, + active: { + position: 'absolute', + top: '6px', + left: '5px', + height: '9px', + width: '9px', + background: hex + }, + HEXwrap: { + flex: '6', + position: 'relative' + }, + HEXinput: { + width: '80%', + padding: '0px', + paddingLeft: '20%', + border: 'none', + outline: 'none', + background: 'none', + fontSize: '12px', + color: '#333', + height: '16px' + }, + HEXlabel: { + display: 'none' + }, + RGBwrap: { + flex: '3', + position: 'relative' + }, + RGBinput: { + width: '70%', + padding: '0px', + paddingLeft: '30%', + border: 'none', + outline: 'none', + background: 'none', + fontSize: '12px', + color: '#333', + height: '16px' + }, + RGBlabel: { + position: 'absolute', + top: '3px', + left: '0px', + lineHeight: '16px', + textTransform: 'uppercase', + fontSize: '12px', + color: '#999' + } + } + }); + + var handleChange = function handleChange(data, e) { + if (data.r || data.g || data.b) { + onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + source: 'rgb' + }, e); + } else { + onChange({ + hex: data.hex, + source: 'hex' + }, e); + } + }; + + return react_default.a.createElement( + 'div', + { style: styles.fields, className: 'flexbox-fix' }, + react_default.a.createElement('div', { style: styles.active }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel }, + label: 'hex', + value: hex, + onChange: handleChange + }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'r', + value: rgb.r, + onChange: handleChange + }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'g', + value: rgb.g, + onChange: handleChange + }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'b', + value: rgb.b, + onChange: handleChange + }) + ); +}; + +/* harmony default export */ var compact_CompactFields = (CompactFields_CompactFields); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/compact/Compact.js + + + + + + + + + + + +var Compact_Compact = function Compact(_ref) { + var onChange = _ref.onChange, + onSwatchHover = _ref.onSwatchHover, + colors = _ref.colors, + hex = _ref.hex, + rgb = _ref.rgb, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + Compact: { + background: '#f6f6f6', + radius: '4px' + }, + compact: { + paddingTop: '5px', + paddingLeft: '5px', + boxSizing: 'initial', + width: '240px' + }, + clear: { + clear: 'both' + } + } + }, passedStyles)); + + var handleChange = function handleChange(data, e) { + if (data.hex) { + color_isValidHex(data.hex) && onChange({ + hex: data.hex, + source: 'hex' + }, e); + } else { + onChange(data, e); + } + }; + + return react_default.a.createElement( + common_Raised, + { style: styles.Compact, styles: passedStyles }, + react_default.a.createElement( + 'div', + { style: styles.compact, className: 'compact-picker ' + className }, + react_default.a.createElement( + 'div', + null, + lodash_es_map(colors, function (c) { + return react_default.a.createElement(compact_CompactColor, { + key: c, + color: c, + active: c.toLowerCase() === hex, + onClick: handleChange, + onSwatchHover: onSwatchHover + }); + }), + react_default.a.createElement('div', { style: styles.clear }) + ), + react_default.a.createElement(compact_CompactFields, { hex: hex, rgb: rgb, onChange: handleChange }) + ) + ); +}; + +Compact_Compact.propTypes = { + colors: prop_types_default.a.arrayOf(prop_types_default.a.string), + styles: prop_types_default.a.object +}; + +Compact_Compact.defaultProps = { + colors: ['#4D4D4D', '#999999', '#FFFFFF', '#F44E3B', '#FE9200', '#FCDC00', '#DBDF00', '#A4DD00', '#68CCCA', '#73D8FF', '#AEA1FF', '#FDA1FF', '#333333', '#808080', '#cccccc', '#D33115', '#E27300', '#FCC400', '#B0BC00', '#68BC00', '#16A5A5', '#009CE0', '#7B64FF', '#FA28FF', '#000000', '#666666', '#B3B3B3', '#9F0500', '#C45100', '#FB9E00', '#808900', '#194D33', '#0C797D', '#0062B1', '#653294', '#AB149E'], + styles: {} +}; + +/* harmony default export */ var compact_Compact = (common_ColorWrap(Compact_Compact)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/github/GithubSwatch.js + + + + + +var GithubSwatch_GithubSwatch = function GithubSwatch(_ref) { + var hover = _ref.hover, + color = _ref.color, + onClick = _ref.onClick, + onSwatchHover = _ref.onSwatchHover; + + var hoverSwatch = { + position: 'relative', + zIndex: '2', + outline: '2px solid #fff', + boxShadow: '0 0 5px 2px rgba(0,0,0,0.25)' + }; + + var styles = lib_default()({ + 'default': { + swatch: { + width: '25px', + height: '25px', + fontSize: '0' + } + }, + 'hover': { + swatch: hoverSwatch + } + }, { hover: hover }); + + return react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement(common_Swatch, { + color: color, + onClick: onClick, + onHover: onSwatchHover, + focusStyle: hoverSwatch + }) + ); +}; + +/* harmony default export */ var github_GithubSwatch = (Object(lib["handleHover"])(GithubSwatch_GithubSwatch)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/github/Github.js + + + + + + + + + +var Github_Github = function Github(_ref) { + var width = _ref.width, + colors = _ref.colors, + onChange = _ref.onChange, + onSwatchHover = _ref.onSwatchHover, + triangle = _ref.triangle, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + card: { + width: width, + background: '#fff', + border: '1px solid rgba(0,0,0,0.2)', + boxShadow: '0 3px 12px rgba(0,0,0,0.15)', + borderRadius: '4px', + position: 'relative', + padding: '5px', + display: 'flex', + flexWrap: 'wrap' + }, + triangle: { + position: 'absolute', + border: '7px solid transparent', + borderBottomColor: '#fff' + }, + triangleShadow: { + position: 'absolute', + border: '8px solid transparent', + borderBottomColor: 'rgba(0,0,0,0.15)' + } + }, + 'hide-triangle': { + triangle: { + display: 'none' + }, + triangleShadow: { + display: 'none' + } + }, + 'top-left-triangle': { + triangle: { + top: '-14px', + left: '10px' + }, + triangleShadow: { + top: '-16px', + left: '9px' + } + }, + 'top-right-triangle': { + triangle: { + top: '-14px', + right: '10px' + }, + triangleShadow: { + top: '-16px', + right: '9px' + } + }, + 'bottom-left-triangle': { + triangle: { + top: '35px', + left: '10px', + transform: 'rotate(180deg)' + }, + triangleShadow: { + top: '37px', + left: '9px', + transform: 'rotate(180deg)' + } + }, + 'bottom-right-triangle': { + triangle: { + top: '35px', + right: '10px', + transform: 'rotate(180deg)' + }, + triangleShadow: { + top: '37px', + right: '9px', + transform: 'rotate(180deg)' + } + } + }, passedStyles), { + 'hide-triangle': triangle === 'hide', + 'top-left-triangle': triangle === 'top-left', + 'top-right-triangle': triangle === 'top-right', + 'bottom-left-triangle': triangle === 'bottom-left', + 'bottom-right-triangle': triangle === 'bottom-right' + }); + + var handleChange = function handleChange(hex, e) { + return onChange({ hex: hex, source: 'hex' }, e); + }; + + return react_default.a.createElement( + 'div', + { style: styles.card, className: 'github-picker ' + className }, + react_default.a.createElement('div', { style: styles.triangleShadow }), + react_default.a.createElement('div', { style: styles.triangle }), + lodash_es_map(colors, function (c) { + return react_default.a.createElement(github_GithubSwatch, { + color: c, + key: c, + onClick: handleChange, + onSwatchHover: onSwatchHover + }); + }) + ); +}; + +Github_Github.propTypes = { + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + colors: prop_types_default.a.arrayOf(prop_types_default.a.string), + triangle: prop_types_default.a.oneOf(['hide', 'top-left', 'top-right', 'bottom-left', 'bottom-right']), + styles: prop_types_default.a.object +}; + +Github_Github.defaultProps = { + width: 200, + colors: ['#B80000', '#DB3E00', '#FCCB00', '#008B02', '#006B76', '#1273DE', '#004DCF', '#5300EB', '#EB9694', '#FAD0C3', '#FEF3BD', '#C1E1C5', '#BEDADC', '#C4DEF6', '#BED3F3', '#D4C4FB'], + triangle: 'top-left', + styles: {} +}; + +/* harmony default export */ var github_Github = (common_ColorWrap(Github_Github)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/hue/HuePointer.js + + + +var HuePointer_SliderPointer = function SliderPointer(_ref) { + var direction = _ref.direction; + + var styles = lib_default()({ + 'default': { + picker: { + width: '18px', + height: '18px', + borderRadius: '50%', + transform: 'translate(-9px, -1px)', + backgroundColor: 'rgb(248, 248, 248)', + boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' + } + }, + 'vertical': { + picker: { + transform: 'translate(-3px, -9px)' + } + } + }, { vertical: direction === 'vertical' }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +/* harmony default export */ var HuePointer = (HuePointer_SliderPointer); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/hue/Hue.js +var Hue_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + + + +var Hue_HuePicker = function HuePicker(_ref) { + var width = _ref.width, + height = _ref.height, + onChange = _ref.onChange, + hsl = _ref.hsl, + direction = _ref.direction, + pointer = _ref.pointer, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + picker: { + position: 'relative', + width: width, + height: height + }, + hue: { + radius: '2px' + } + } + }, passedStyles)); + + // Overwrite to provide pure hue color + var handleChange = function handleChange(data) { + return onChange({ a: 1, h: data.h, l: 0.5, s: 1 }); + }; + + return react_default.a.createElement( + 'div', + { style: styles.picker, className: 'hue-picker ' + className }, + react_default.a.createElement(common_Hue, Hue_extends({}, styles.hue, { + hsl: hsl, + pointer: pointer, + onChange: handleChange, + direction: direction + })) + ); +}; + +Hue_HuePicker.propTypes = { + styles: prop_types_default.a.object +}; +Hue_HuePicker.defaultProps = { + width: '316px', + height: '16px', + direction: 'horizontal', + pointer: HuePointer, + styles: {} +}; + +/* harmony default export */ var hue_Hue = (common_ColorWrap(Hue_HuePicker)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/material/Material.js + + + + + + + +var Material_Material = function Material(_ref) { + var onChange = _ref.onChange, + hex = _ref.hex, + rgb = _ref.rgb, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + material: { + width: '98px', + height: '98px', + padding: '16px', + fontFamily: 'Roboto' + }, + HEXwrap: { + position: 'relative' + }, + HEXinput: { + width: '100%', + marginTop: '12px', + fontSize: '15px', + color: '#333', + padding: '0px', + border: '0px', + borderBottom: '2px solid ' + hex, + outline: 'none', + height: '30px' + }, + HEXlabel: { + position: 'absolute', + top: '0px', + left: '0px', + fontSize: '11px', + color: '#999999', + textTransform: 'capitalize' + }, + Hex: { + style: {} + }, + RGBwrap: { + position: 'relative' + }, + RGBinput: { + width: '100%', + marginTop: '12px', + fontSize: '15px', + color: '#333', + padding: '0px', + border: '0px', + borderBottom: '1px solid #eee', + outline: 'none', + height: '30px' + }, + RGBlabel: { + position: 'absolute', + top: '0px', + left: '0px', + fontSize: '11px', + color: '#999999', + textTransform: 'capitalize' + }, + split: { + display: 'flex', + marginRight: '-10px', + paddingTop: '11px' + }, + third: { + flex: '1', + paddingRight: '10px' + } + } + }, passedStyles)); + + var handleChange = function handleChange(data, e) { + if (data.hex) { + color_isValidHex(data.hex) && onChange({ + hex: data.hex, + source: 'hex' + }, e); + } else if (data.r || data.g || data.b) { + onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + source: 'rgb' + }, e); + } + }; + + return react_default.a.createElement( + common_Raised, + { styles: passedStyles }, + react_default.a.createElement( + 'div', + { style: styles.material, className: 'material-picker ' + className }, + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel }, + label: 'hex', + value: hex, + onChange: handleChange + }), + react_default.a.createElement( + 'div', + { style: styles.split, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.third }, + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'r', value: rgb.r, + onChange: handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.third }, + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'g', + value: rgb.g, + onChange: handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.third }, + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'b', + value: rgb.b, + onChange: handleChange + }) + ) + ) + ) + ); +}; + +/* harmony default export */ var material_Material = (common_ColorWrap(Material_Material)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/photoshop/PhotoshopFields.js + + + + + + +var PhotoshopFields_PhotoshopPicker = function PhotoshopPicker(_ref) { + var onChange = _ref.onChange, + rgb = _ref.rgb, + hsv = _ref.hsv, + hex = _ref.hex; + + var styles = lib_default()({ + 'default': { + fields: { + paddingTop: '5px', + paddingBottom: '9px', + width: '80px', + position: 'relative' + }, + divider: { + height: '5px' + }, + RGBwrap: { + position: 'relative' + }, + RGBinput: { + marginLeft: '40%', + width: '40%', + height: '18px', + border: '1px solid #888888', + boxShadow: 'inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC', + marginBottom: '5px', + fontSize: '13px', + paddingLeft: '3px', + marginRight: '10px' + }, + RGBlabel: { + left: '0px', + top: '0px', + width: '34px', + textTransform: 'uppercase', + fontSize: '13px', + height: '18px', + lineHeight: '22px', + position: 'absolute' + }, + HEXwrap: { + position: 'relative' + }, + HEXinput: { + marginLeft: '20%', + width: '80%', + height: '18px', + border: '1px solid #888888', + boxShadow: 'inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC', + marginBottom: '6px', + fontSize: '13px', + paddingLeft: '3px' + }, + HEXlabel: { + position: 'absolute', + top: '0px', + left: '0px', + width: '14px', + textTransform: 'uppercase', + fontSize: '13px', + height: '18px', + lineHeight: '22px' + }, + fieldSymbols: { + position: 'absolute', + top: '5px', + right: '-7px', + fontSize: '13px' + }, + symbol: { + height: '20px', + lineHeight: '22px', + paddingBottom: '7px' + } + } + }); + + var handleChange = function handleChange(data, e) { + if (data['#']) { + color_isValidHex(data['#']) && onChange({ + hex: data['#'], + source: 'hex' + }, e); + } else if (data.r || data.g || data.b) { + onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + source: 'rgb' + }, e); + } else if (data.h || data.s || data.v) { + onChange({ + h: data.h || hsv.h, + s: data.s || hsv.s, + v: data.v || hsv.v, + source: 'hsv' + }, e); + } + }; + + return react_default.a.createElement( + 'div', + { style: styles.fields }, + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'h', + value: Math.round(hsv.h), + onChange: handleChange + }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 's', + value: Math.round(hsv.s * 100), + onChange: handleChange + }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'v', + value: Math.round(hsv.v * 100), + onChange: handleChange + }), + react_default.a.createElement('div', { style: styles.divider }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'r', + value: rgb.r, + onChange: handleChange + }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'g', + value: rgb.g, + onChange: handleChange + }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel }, + label: 'b', + value: rgb.b, + onChange: handleChange + }), + react_default.a.createElement('div', { style: styles.divider }), + react_default.a.createElement(common_EditableInput, { + style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel }, + label: '#', + value: hex.replace('#', ''), + onChange: handleChange + }), + react_default.a.createElement( + 'div', + { style: styles.fieldSymbols }, + react_default.a.createElement( + 'div', + { style: styles.symbol }, + '\xB0' + ), + react_default.a.createElement( + 'div', + { style: styles.symbol }, + '%' + ), + react_default.a.createElement( + 'div', + { style: styles.symbol }, + '%' + ) + ) + ); +}; + +/* harmony default export */ var PhotoshopFields = (PhotoshopFields_PhotoshopPicker); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/photoshop/PhotoshopPointerCircle.js + + + +var PhotoshopPointerCircle_PhotoshopPointerCircle = function PhotoshopPointerCircle(_ref) { + var hsl = _ref.hsl; + + var styles = lib_default()({ + 'default': { + picker: { + width: '12px', + height: '12px', + borderRadius: '6px', + boxShadow: 'inset 0 0 0 1px #fff', + transform: 'translate(-6px, -6px)' + } + }, + 'black-outline': { + picker: { + boxShadow: 'inset 0 0 0 1px #000' + } + } + }, { 'black-outline': hsl.l > 0.5 }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +/* harmony default export */ var photoshop_PhotoshopPointerCircle = (PhotoshopPointerCircle_PhotoshopPointerCircle); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/photoshop/PhotoshopPointer.js + + + +var PhotoshopPointer_PhotoshopPointerCircle = function PhotoshopPointerCircle() { + var styles = lib_default()({ + 'default': { + triangle: { + width: 0, + height: 0, + borderStyle: 'solid', + borderWidth: '4px 0 4px 6px', + borderColor: 'transparent transparent transparent #fff', + position: 'absolute', + top: '1px', + left: '1px' + }, + triangleBorder: { + width: 0, + height: 0, + borderStyle: 'solid', + borderWidth: '5px 0 5px 8px', + borderColor: 'transparent transparent transparent #555' + }, + + left: { + Extend: 'triangleBorder', + transform: 'translate(-13px, -4px)' + }, + leftInside: { + Extend: 'triangle', + transform: 'translate(-8px, -5px)' + }, + + right: { + Extend: 'triangleBorder', + transform: 'translate(20px, -14px) rotate(180deg)' + }, + rightInside: { + Extend: 'triangle', + transform: 'translate(-8px, -5px)' + } + } + }); + + return react_default.a.createElement( + 'div', + { style: styles.pointer }, + react_default.a.createElement( + 'div', + { style: styles.left }, + react_default.a.createElement('div', { style: styles.leftInside }) + ), + react_default.a.createElement( + 'div', + { style: styles.right }, + react_default.a.createElement('div', { style: styles.rightInside }) + ) + ); +}; + +/* harmony default export */ var PhotoshopPointer = (PhotoshopPointer_PhotoshopPointerCircle); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/photoshop/PhotoshopButton.js + + + +var PhotoshopButton_PhotoshopButton = function PhotoshopButton(_ref) { + var onClick = _ref.onClick, + label = _ref.label, + children = _ref.children, + active = _ref.active; + + var styles = lib_default()({ + 'default': { + button: { + backgroundImage: 'linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)', + border: '1px solid #878787', + borderRadius: '2px', + height: '20px', + boxShadow: '0 1px 0 0 #EAEAEA', + fontSize: '14px', + color: '#000', + lineHeight: '20px', + textAlign: 'center', + marginBottom: '10px', + cursor: 'pointer' + } + }, + 'active': { + button: { + boxShadow: '0 0 0 1px #878787' + } + } + }, { active: active }); + + return react_default.a.createElement( + 'div', + { style: styles.button, onClick: onClick }, + label || children + ); +}; + +/* harmony default export */ var photoshop_PhotoshopButton = (PhotoshopButton_PhotoshopButton); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/photoshop/PhotoshopPreviews.js + + + +var PhotoshopPreviews_PhotoshopPreviews = function PhotoshopPreviews(_ref) { + var rgb = _ref.rgb, + currentColor = _ref.currentColor; + + var styles = lib_default()({ + 'default': { + swatches: { + border: '1px solid #B3B3B3', + borderBottom: '1px solid #F0F0F0', + marginBottom: '2px', + marginTop: '1px' + }, + new: { + height: '34px', + background: 'rgb(' + rgb.r + ',' + rgb.g + ', ' + rgb.b + ')', + boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000' + }, + current: { + height: '34px', + background: currentColor, + boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000' + }, + label: { + fontSize: '14px', + color: '#000', + textAlign: 'center' + } + } + }); + + return react_default.a.createElement( + 'div', + null, + react_default.a.createElement( + 'div', + { style: styles.label }, + 'new' + ), + react_default.a.createElement( + 'div', + { style: styles.swatches }, + react_default.a.createElement('div', { style: styles.new }), + react_default.a.createElement('div', { style: styles.current }) + ), + react_default.a.createElement( + 'div', + { style: styles.label }, + 'current' + ) + ); +}; + +/* harmony default export */ var photoshop_PhotoshopPreviews = (PhotoshopPreviews_PhotoshopPreviews); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/photoshop/Photoshop.js +var Photoshop_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function Photoshop_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function Photoshop_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function Photoshop_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + + + + + + +var Photoshop_Photoshop = function (_React$Component) { + Photoshop_inherits(Photoshop, _React$Component); + + function Photoshop(props) { + Photoshop_classCallCheck(this, Photoshop); + + var _this = Photoshop_possibleConstructorReturn(this, (Photoshop.__proto__ || Object.getPrototypeOf(Photoshop)).call(this)); + + _this.state = { + currentColor: props.hex + }; + return _this; + } + + Photoshop_createClass(Photoshop, [{ + key: 'render', + value: function render() { + var _props = this.props, + _props$styles = _props.styles, + passedStyles = _props$styles === undefined ? {} : _props$styles, + _props$className = _props.className, + className = _props$className === undefined ? '' : _props$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + picker: { + background: '#DCDCDC', + borderRadius: '4px', + boxShadow: '0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)', + boxSizing: 'initial', + width: '513px' + }, + head: { + backgroundImage: 'linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)', + borderBottom: '1px solid #B1B1B1', + boxShadow: 'inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)', + height: '23px', + lineHeight: '24px', + borderRadius: '4px 4px 0 0', + fontSize: '13px', + color: '#4D4D4D', + textAlign: 'center' + }, + body: { + padding: '15px 15px 0', + display: 'flex' + }, + saturation: { + width: '256px', + height: '256px', + position: 'relative', + border: '2px solid #B3B3B3', + borderBottom: '2px solid #F0F0F0', + overflow: 'hidden' + }, + hue: { + position: 'relative', + height: '256px', + width: '19px', + marginLeft: '10px', + border: '2px solid #B3B3B3', + borderBottom: '2px solid #F0F0F0' + }, + controls: { + width: '180px', + marginLeft: '10px' + }, + top: { + display: 'flex' + }, + previews: { + width: '60px' + }, + actions: { + flex: '1', + marginLeft: '20px' + } + } + }, passedStyles)); + + return react_default.a.createElement( + 'div', + { style: styles.picker, className: 'photoshop-picker ' + className }, + react_default.a.createElement( + 'div', + { style: styles.head }, + this.props.header + ), + react_default.a.createElement( + 'div', + { style: styles.body, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.saturation }, + react_default.a.createElement(common_Saturation, { + hsl: this.props.hsl, + hsv: this.props.hsv, + pointer: photoshop_PhotoshopPointerCircle, + onChange: this.props.onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.hue }, + react_default.a.createElement(common_Hue, { + direction: 'vertical', + hsl: this.props.hsl, + pointer: PhotoshopPointer, + onChange: this.props.onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.controls }, + react_default.a.createElement( + 'div', + { style: styles.top, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.previews }, + react_default.a.createElement(photoshop_PhotoshopPreviews, { + rgb: this.props.rgb, + currentColor: this.state.currentColor + }) + ), + react_default.a.createElement( + 'div', + { style: styles.actions }, + react_default.a.createElement(photoshop_PhotoshopButton, { label: 'OK', onClick: this.props.onAccept, active: true }), + react_default.a.createElement(photoshop_PhotoshopButton, { label: 'Cancel', onClick: this.props.onCancel }), + react_default.a.createElement(PhotoshopFields, { + onChange: this.props.onChange, + rgb: this.props.rgb, + hsv: this.props.hsv, + hex: this.props.hex + }) + ) + ) + ) + ) + ); + } + }]); + + return Photoshop; +}(react_default.a.Component); + +Photoshop_Photoshop.propTypes = { + header: prop_types_default.a.string, + styles: prop_types_default.a.object +}; + +Photoshop_Photoshop.defaultProps = { + header: 'Color Picker', + styles: {} +}; + +/* harmony default export */ var photoshop_Photoshop = (common_ColorWrap(Photoshop_Photoshop)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/sketch/SketchFields.js +/* eslint-disable no-param-reassign */ + + + + + + + +var SketchFields_SketchFields = function SketchFields(_ref) { + var onChange = _ref.onChange, + rgb = _ref.rgb, + hsl = _ref.hsl, + hex = _ref.hex, + disableAlpha = _ref.disableAlpha; + + var styles = lib_default()({ + 'default': { + fields: { + display: 'flex', + paddingTop: '4px' + }, + single: { + flex: '1', + paddingLeft: '6px' + }, + alpha: { + flex: '1', + paddingLeft: '6px' + }, + double: { + flex: '2' + }, + input: { + width: '80%', + padding: '4px 10% 3px', + border: 'none', + boxShadow: 'inset 0 0 0 1px #ccc', + fontSize: '11px' + }, + label: { + display: 'block', + textAlign: 'center', + fontSize: '11px', + color: '#222', + paddingTop: '3px', + paddingBottom: '4px', + textTransform: 'capitalize' + } + }, + 'disableAlpha': { + alpha: { + display: 'none' + } + } + }, { disableAlpha: disableAlpha }); + + var handleChange = function handleChange(data, e) { + if (data.hex) { + color_isValidHex(data.hex) && onChange({ + hex: data.hex, + source: 'hex' + }, e); + } else if (data.r || data.g || data.b) { + onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + a: rgb.a, + source: 'rgb' + }, e); + } else if (data.a) { + if (data.a < 0) { + data.a = 0; + } else if (data.a > 100) { + data.a = 100; + } + + data.a /= 100; + onChange({ + h: hsl.h, + s: hsl.s, + l: hsl.l, + a: data.a, + source: 'rgb' + }, e); + } + }; + + return react_default.a.createElement( + 'div', + { style: styles.fields, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.double }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'hex', + value: hex.replace('#', ''), + onChange: handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.single }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'r', + value: rgb.r, + onChange: handleChange, + dragLabel: 'true', + dragMax: '255' + }) + ), + react_default.a.createElement( + 'div', + { style: styles.single }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'g', + value: rgb.g, + onChange: handleChange, + dragLabel: 'true', + dragMax: '255' + }) + ), + react_default.a.createElement( + 'div', + { style: styles.single }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'b', + value: rgb.b, + onChange: handleChange, + dragLabel: 'true', + dragMax: '255' + }) + ), + react_default.a.createElement( + 'div', + { style: styles.alpha }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'a', + value: Math.round(rgb.a * 100), + onChange: handleChange, + dragLabel: 'true', + dragMax: '100' + }) + ) + ); +}; + +/* harmony default export */ var sketch_SketchFields = (SketchFields_SketchFields); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/sketch/SketchPresetColors.js +var SketchPresetColors_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + +var SketchPresetColors_SketchPresetColors = function SketchPresetColors(_ref) { + var colors = _ref.colors, + _ref$onClick = _ref.onClick, + onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, + onSwatchHover = _ref.onSwatchHover; + + var styles = lib_default()({ + 'default': { + colors: { + margin: '0 -10px', + padding: '10px 0 0 10px', + borderTop: '1px solid #eee', + display: 'flex', + flexWrap: 'wrap', + position: 'relative' + }, + swatchWrap: { + width: '16px', + height: '16px', + margin: '0 10px 10px 0' + }, + swatch: { + borderRadius: '3px', + boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15)' + } + }, + 'no-presets': { + colors: { + display: 'none' + } + } + }, { + 'no-presets': !colors || !colors.length + }); + + var handleClick = function handleClick(hex, e) { + onClick({ + hex: hex, + source: 'hex' + }, e); + }; + + return react_default.a.createElement( + 'div', + { style: styles.colors, className: 'flexbox-fix' }, + colors.map(function (colorObjOrString) { + var c = typeof colorObjOrString === 'string' ? { color: colorObjOrString } : colorObjOrString; + var key = '' + c.color + (c.title || ''); + return react_default.a.createElement( + 'div', + { key: key, style: styles.swatchWrap }, + react_default.a.createElement(common_Swatch, SketchPresetColors_extends({}, c, { + style: styles.swatch, + onClick: handleClick, + onHover: onSwatchHover, + focusStyle: { + boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px ' + c.color + } + })) + ); + }) + ); +}; + +SketchPresetColors_SketchPresetColors.propTypes = { + colors: prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.shape({ + color: prop_types_default.a.string, + title: prop_types_default.a.string + })])).isRequired +}; + +/* harmony default export */ var sketch_SketchPresetColors = (SketchPresetColors_SketchPresetColors); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/sketch/Sketch.js +var Sketch_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + + + + +var Sketch_Sketch = function Sketch(_ref) { + var width = _ref.width, + rgb = _ref.rgb, + hex = _ref.hex, + hsv = _ref.hsv, + hsl = _ref.hsl, + onChange = _ref.onChange, + onSwatchHover = _ref.onSwatchHover, + disableAlpha = _ref.disableAlpha, + presetColors = _ref.presetColors, + renderers = _ref.renderers, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': Sketch_extends({ + picker: { + width: width, + padding: '10px 10px 0', + boxSizing: 'initial', + background: '#fff', + borderRadius: '4px', + boxShadow: '0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)' + }, + saturation: { + width: '100%', + paddingBottom: '75%', + position: 'relative', + overflow: 'hidden' + }, + Saturation: { + radius: '3px', + shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' + }, + controls: { + display: 'flex' + }, + sliders: { + padding: '4px 0', + flex: '1' + }, + color: { + width: '24px', + height: '24px', + position: 'relative', + marginTop: '4px', + marginLeft: '4px', + borderRadius: '3px' + }, + activeColor: { + absolute: '0px 0px 0px 0px', + borderRadius: '2px', + background: 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + rgb.a + ')', + boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' + }, + hue: { + position: 'relative', + height: '10px', + overflow: 'hidden' + }, + Hue: { + radius: '2px', + shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' + }, + + alpha: { + position: 'relative', + height: '10px', + marginTop: '4px', + overflow: 'hidden' + }, + Alpha: { + radius: '2px', + shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)' + } + }, passedStyles), + 'disableAlpha': { + color: { + height: '10px' + }, + hue: { + height: '10px' + }, + alpha: { + display: 'none' + } + } + }, passedStyles), { disableAlpha: disableAlpha }); + + return react_default.a.createElement( + 'div', + { style: styles.picker, className: 'sketch-picker ' + className }, + react_default.a.createElement( + 'div', + { style: styles.saturation }, + react_default.a.createElement(common_Saturation, { + style: styles.Saturation, + hsl: hsl, + hsv: hsv, + onChange: onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.controls, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.sliders }, + react_default.a.createElement( + 'div', + { style: styles.hue }, + react_default.a.createElement(common_Hue, { + style: styles.Hue, + hsl: hsl, + onChange: onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.alpha }, + react_default.a.createElement(common_Alpha, { + style: styles.Alpha, + rgb: rgb, + hsl: hsl, + renderers: renderers, + onChange: onChange + }) + ) + ), + react_default.a.createElement( + 'div', + { style: styles.color }, + react_default.a.createElement(common_Checkboard, null), + react_default.a.createElement('div', { style: styles.activeColor }) + ) + ), + react_default.a.createElement(sketch_SketchFields, { + rgb: rgb, + hsl: hsl, + hex: hex, + onChange: onChange, + disableAlpha: disableAlpha + }), + react_default.a.createElement(sketch_SketchPresetColors, { + colors: presetColors, + onClick: onChange, + onSwatchHover: onSwatchHover + }) + ); +}; + +Sketch_Sketch.propTypes = { + disableAlpha: prop_types_default.a.bool, + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + styles: prop_types_default.a.object +}; + +Sketch_Sketch.defaultProps = { + disableAlpha: false, + width: 200, + styles: {}, + presetColors: ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF'] +}; + +/* harmony default export */ var sketch_Sketch = (common_ColorWrap(Sketch_Sketch)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/slider/SliderSwatch.js + + + +var SliderSwatch_SliderSwatch = function SliderSwatch(_ref) { + var hsl = _ref.hsl, + offset = _ref.offset, + _ref$onClick = _ref.onClick, + onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, + active = _ref.active, + first = _ref.first, + last = _ref.last; + + var styles = lib_default()({ + 'default': { + swatch: { + height: '12px', + background: 'hsl(' + hsl.h + ', 50%, ' + offset * 100 + '%)', + cursor: 'pointer' + } + }, + 'first': { + swatch: { + borderRadius: '2px 0 0 2px' + } + }, + 'last': { + swatch: { + borderRadius: '0 2px 2px 0' + } + }, + 'active': { + swatch: { + transform: 'scaleY(1.8)', + borderRadius: '3.6px/2px' + } + } + }, { active: active, first: first, last: last }); + + var handleClick = function handleClick(e) { + return onClick({ + h: hsl.h, + s: 0.5, + l: offset, + source: 'hsl' + }, e); + }; + + return react_default.a.createElement('div', { style: styles.swatch, onClick: handleClick }); +}; + +/* harmony default export */ var slider_SliderSwatch = (SliderSwatch_SliderSwatch); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/slider/SliderSwatches.js + + + + + +var SliderSwatches_SliderSwatches = function SliderSwatches(_ref) { + var onClick = _ref.onClick, + hsl = _ref.hsl; + + var styles = lib_default()({ + 'default': { + swatches: { + marginTop: '20px' + }, + swatch: { + boxSizing: 'border-box', + width: '20%', + paddingRight: '1px', + float: 'left' + }, + clear: { + clear: 'both' + } + } + }); + + // Acceptible difference in floating point equality + var epsilon = 0.1; + + return react_default.a.createElement( + 'div', + { style: styles.swatches }, + react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement(slider_SliderSwatch, { + hsl: hsl, + offset: '.80', + active: Math.abs(hsl.l - 0.80) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, + onClick: onClick, + first: true + }) + ), + react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement(slider_SliderSwatch, { + hsl: hsl, + offset: '.65', + active: Math.abs(hsl.l - 0.65) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, + onClick: onClick + }) + ), + react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement(slider_SliderSwatch, { + hsl: hsl, + offset: '.50', + active: Math.abs(hsl.l - 0.50) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, + onClick: onClick + }) + ), + react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement(slider_SliderSwatch, { + hsl: hsl, + offset: '.35', + active: Math.abs(hsl.l - 0.35) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, + onClick: onClick + }) + ), + react_default.a.createElement( + 'div', + { style: styles.swatch }, + react_default.a.createElement(slider_SliderSwatch, { + hsl: hsl, + offset: '.20', + active: Math.abs(hsl.l - 0.20) < epsilon && Math.abs(hsl.s - 0.50) < epsilon, + onClick: onClick, + last: true + }) + ), + react_default.a.createElement('div', { style: styles.clear }) + ); +}; + +/* harmony default export */ var slider_SliderSwatches = (SliderSwatches_SliderSwatches); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/slider/SliderPointer.js + + + +var SliderPointer_SliderPointer = function SliderPointer() { + var styles = lib_default()({ + 'default': { + picker: { + width: '14px', + height: '14px', + borderRadius: '6px', + transform: 'translate(-7px, -1px)', + backgroundColor: 'rgb(248, 248, 248)', + boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)' + } + } + }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +/* harmony default export */ var slider_SliderPointer = (SliderPointer_SliderPointer); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/slider/Slider.js + + + + + + + + + +var Slider_Slider = function Slider(_ref) { + var hsl = _ref.hsl, + onChange = _ref.onChange, + pointer = _ref.pointer, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + hue: { + height: '12px', + position: 'relative' + }, + Hue: { + radius: '2px' + } + } + }, passedStyles)); + + return react_default.a.createElement( + 'div', + { style: styles.wrap || {}, className: 'slider-picker ' + className }, + react_default.a.createElement( + 'div', + { style: styles.hue }, + react_default.a.createElement(common_Hue, { + style: styles.Hue, + hsl: hsl, + pointer: pointer, + onChange: onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.swatches }, + react_default.a.createElement(slider_SliderSwatches, { hsl: hsl, onClick: onChange }) + ) + ); +}; + +Slider_Slider.propTypes = { + styles: prop_types_default.a.object +}; +Slider_Slider.defaultProps = { + pointer: slider_SliderPointer, + styles: {} +}; + +/* harmony default export */ var slider_Slider = (common_ColorWrap(Slider_Slider)); +// EXTERNAL MODULE: ./node_modules/@icons/material/CheckIcon.js +var CheckIcon = __webpack_require__(76); +var CheckIcon_default = /*#__PURE__*/__webpack_require__.n(CheckIcon); + +// CONCATENATED MODULE: ./node_modules/react-color/es/components/swatches/SwatchesColor.js + + + + + + + +var SwatchesColor_SwatchesColor = function SwatchesColor(_ref) { + var color = _ref.color, + _ref$onClick = _ref.onClick, + onClick = _ref$onClick === undefined ? function () {} : _ref$onClick, + onSwatchHover = _ref.onSwatchHover, + first = _ref.first, + last = _ref.last, + active = _ref.active; + + var styles = lib_default()({ + 'default': { + color: { + width: '40px', + height: '24px', + cursor: 'pointer', + background: color, + marginBottom: '1px' + }, + check: { + color: getContrastingColor(color), + marginLeft: '8px', + display: 'none' + } + }, + 'first': { + color: { + overflow: 'hidden', + borderRadius: '2px 2px 0 0' + } + }, + 'last': { + color: { + overflow: 'hidden', + borderRadius: '0 0 2px 2px' + } + }, + 'active': { + check: { + display: 'block' + } + }, + 'color-#FFFFFF': { + color: { + boxShadow: 'inset 0 0 0 1px #ddd' + }, + check: { + color: '#333' + } + }, + 'transparent': { + check: { + color: '#333' + } + } + }, { + first: first, + last: last, + active: active, + 'color-#FFFFFF': color === '#FFFFFF', + 'transparent': color === 'transparent' + }); + + return react_default.a.createElement( + common_Swatch, + { + color: color, + style: styles.color, + onClick: onClick, + onHover: onSwatchHover, + focusStyle: { boxShadow: '0 0 4px ' + color } + }, + react_default.a.createElement( + 'div', + { style: styles.check }, + react_default.a.createElement(CheckIcon_default.a, null) + ) + ); +}; + +/* harmony default export */ var swatches_SwatchesColor = (SwatchesColor_SwatchesColor); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/swatches/SwatchesGroup.js + + + + + + +var SwatchesGroup_SwatchesGroup = function SwatchesGroup(_ref) { + var onClick = _ref.onClick, + onSwatchHover = _ref.onSwatchHover, + group = _ref.group, + active = _ref.active; + + var styles = lib_default()({ + 'default': { + group: { + paddingBottom: '10px', + width: '40px', + float: 'left', + marginRight: '10px' + } + } + }); + + return react_default.a.createElement( + 'div', + { style: styles.group }, + lodash_es_map(group, function (color, i) { + return react_default.a.createElement(swatches_SwatchesColor, { + key: color, + color: color, + active: color.toLowerCase() === active, + first: i === 0, + last: i === group.length - 1, + onClick: onClick, + onSwatchHover: onSwatchHover + }); + }) + ); +}; + +/* harmony default export */ var swatches_SwatchesGroup = (SwatchesGroup_SwatchesGroup); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/swatches/Swatches.js + + + + + + + + + + +var Swatches_Swatches = function Swatches(_ref) { + var width = _ref.width, + height = _ref.height, + onChange = _ref.onChange, + onSwatchHover = _ref.onSwatchHover, + colors = _ref.colors, + hex = _ref.hex, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + picker: { + width: width, + height: height + }, + overflow: { + height: height, + overflowY: 'scroll' + }, + body: { + padding: '16px 0 6px 16px' + }, + clear: { + clear: 'both' + } + } + }, passedStyles)); + + var handleChange = function handleChange(data, e) { + return onChange({ hex: data, source: 'hex' }, e); + }; + + return react_default.a.createElement( + 'div', + { style: styles.picker, className: 'swatches-picker ' + className }, + react_default.a.createElement( + common_Raised, + null, + react_default.a.createElement( + 'div', + { style: styles.overflow }, + react_default.a.createElement( + 'div', + { style: styles.body }, + lodash_es_map(colors, function (group) { + return react_default.a.createElement(swatches_SwatchesGroup, { + key: group.toString(), + group: group, + active: hex, + onClick: handleChange, + onSwatchHover: onSwatchHover + }); + }), + react_default.a.createElement('div', { style: styles.clear }) + ) + ) + ) + ); +}; + +Swatches_Swatches.propTypes = { + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + height: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + colors: prop_types_default.a.arrayOf(prop_types_default.a.arrayOf(prop_types_default.a.string)), + styles: prop_types_default.a.object + + /* eslint-disable max-len */ +};Swatches_Swatches.defaultProps = { + width: 320, + height: 240, + colors: [[colors_es2015_red['900'], colors_es2015_red['700'], colors_es2015_red['500'], colors_es2015_red['300'], colors_es2015_red['100']], [pink['900'], pink['700'], pink['500'], pink['300'], pink['100']], [purple['900'], purple['700'], purple['500'], purple['300'], purple['100']], [deepPurple['900'], deepPurple['700'], deepPurple['500'], deepPurple['300'], deepPurple['100']], [indigo['900'], indigo['700'], indigo['500'], indigo['300'], indigo['100']], [blue['900'], blue['700'], blue['500'], blue['300'], blue['100']], [lightBlue['900'], lightBlue['700'], lightBlue['500'], lightBlue['300'], lightBlue['100']], [cyan['900'], cyan['700'], cyan['500'], cyan['300'], cyan['100']], [teal['900'], teal['700'], teal['500'], teal['300'], teal['100']], ['#194D33', green['700'], green['500'], green['300'], green['100']], [lightGreen['900'], lightGreen['700'], lightGreen['500'], lightGreen['300'], lightGreen['100']], [lime['900'], lime['700'], lime['500'], lime['300'], lime['100']], [yellow['900'], yellow['700'], yellow['500'], yellow['300'], yellow['100']], [amber['900'], amber['700'], amber['500'], amber['300'], amber['100']], [orange['900'], orange['700'], orange['500'], orange['300'], orange['100']], [deepOrange['900'], deepOrange['700'], deepOrange['500'], deepOrange['300'], deepOrange['100']], [brown['900'], brown['700'], brown['500'], brown['300'], brown['100']], [blueGrey['900'], blueGrey['700'], blueGrey['500'], blueGrey['300'], blueGrey['100']], ['#000000', '#525252', '#969696', '#D9D9D9', '#FFFFFF']], + styles: {} +}; + +/* harmony default export */ var swatches_Swatches = (common_ColorWrap(Swatches_Swatches)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/twitter/Twitter.js + + + + + + + + + +var Twitter_Twitter = function Twitter(_ref) { + var onChange = _ref.onChange, + onSwatchHover = _ref.onSwatchHover, + hex = _ref.hex, + colors = _ref.colors, + width = _ref.width, + triangle = _ref.triangle, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + card: { + width: width, + background: '#fff', + border: '0 solid rgba(0,0,0,0.25)', + boxShadow: '0 1px 4px rgba(0,0,0,0.25)', + borderRadius: '4px', + position: 'relative' + }, + body: { + padding: '15px 9px 9px 15px' + }, + label: { + fontSize: '18px', + color: '#fff' + }, + triangle: { + width: '0px', + height: '0px', + borderStyle: 'solid', + borderWidth: '0 9px 10px 9px', + borderColor: 'transparent transparent #fff transparent', + position: 'absolute' + }, + triangleShadow: { + width: '0px', + height: '0px', + borderStyle: 'solid', + borderWidth: '0 9px 10px 9px', + borderColor: 'transparent transparent rgba(0,0,0,.1) transparent', + position: 'absolute' + }, + hash: { + background: '#F0F0F0', + height: '30px', + width: '30px', + borderRadius: '4px 0 0 4px', + float: 'left', + color: '#98A1A4', + display: 'flex', + alignItems: 'center', + justifyContent: 'center' + }, + input: { + width: '100px', + fontSize: '14px', + color: '#666', + border: '0px', + outline: 'none', + height: '28px', + boxShadow: 'inset 0 0 0 1px #F0F0F0', + boxSizing: 'content-box', + borderRadius: '0 4px 4px 0', + float: 'left', + paddingLeft: '8px' + }, + swatch: { + width: '30px', + height: '30px', + float: 'left', + borderRadius: '4px', + margin: '0 6px 6px 0' + }, + clear: { + clear: 'both' + } + }, + 'hide-triangle': { + triangle: { + display: 'none' + }, + triangleShadow: { + display: 'none' + } + }, + 'top-left-triangle': { + triangle: { + top: '-10px', + left: '12px' + }, + triangleShadow: { + top: '-11px', + left: '12px' + } + }, + 'top-right-triangle': { + triangle: { + top: '-10px', + right: '12px' + }, + triangleShadow: { + top: '-11px', + right: '12px' + } + } + }, passedStyles), { + 'hide-triangle': triangle === 'hide', + 'top-left-triangle': triangle === 'top-left', + 'top-right-triangle': triangle === 'top-right' + }); + + var handleChange = function handleChange(hexcode, e) { + color_isValidHex(hexcode) && onChange({ + hex: hexcode, + source: 'hex' + }, e); + }; + + return react_default.a.createElement( + 'div', + { style: styles.card, className: 'twitter-picker ' + className }, + react_default.a.createElement('div', { style: styles.triangleShadow }), + react_default.a.createElement('div', { style: styles.triangle }), + react_default.a.createElement( + 'div', + { style: styles.body }, + lodash_es_map(colors, function (c, i) { + return react_default.a.createElement(common_Swatch, { + key: i, + color: c, + hex: c, + style: styles.swatch, + onClick: handleChange, + onHover: onSwatchHover, + focusStyle: { + boxShadow: '0 0 4px ' + c + } + }); + }), + react_default.a.createElement( + 'div', + { style: styles.hash }, + '#' + ), + react_default.a.createElement(common_EditableInput, { + label: null, + style: { input: styles.input }, + value: hex.replace('#', ''), + onChange: handleChange + }), + react_default.a.createElement('div', { style: styles.clear }) + ) + ); +}; + +Twitter_Twitter.propTypes = { + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + triangle: prop_types_default.a.oneOf(['hide', 'top-left', 'top-right']), + colors: prop_types_default.a.arrayOf(prop_types_default.a.string), + styles: prop_types_default.a.object +}; + +Twitter_Twitter.defaultProps = { + width: 276, + colors: ['#FF6900', '#FCB900', '#7BDCB5', '#00D084', '#8ED1FC', '#0693E3', '#ABB8C3', '#EB144C', '#F78DA7', '#9900EF'], + triangle: 'top-left', + styles: {} +}; + +/* harmony default export */ var twitter_Twitter = (common_ColorWrap(Twitter_Twitter)); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/google/GooglePointerCircle.js + + + + +var GooglePointerCircle_GooglePointerCircle = function GooglePointerCircle(props) { + var styles = lib_default()({ + 'default': { + picker: { + width: '20px', + height: '20px', + borderRadius: '22px', + border: '2px #fff solid', + transform: 'translate(-12px, -13px)', + background: 'hsl(' + Math.round(props.hsl.h) + ', ' + Math.round(props.hsl.s * 100) + '%, ' + Math.round(props.hsl.l * 100) + '%)' + } + } + }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +GooglePointerCircle_GooglePointerCircle.propTypes = { + hsl: prop_types_default.a.shape({ + h: prop_types_default.a.number, + s: prop_types_default.a.number, + l: prop_types_default.a.number, + a: prop_types_default.a.number + }) +}; + +GooglePointerCircle_GooglePointerCircle.defaultProps = { + hsl: { a: 1, h: 249.94, l: 0.2, s: 0.50 } +}; + +/* harmony default export */ var google_GooglePointerCircle = (GooglePointerCircle_GooglePointerCircle); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/google/GooglePointer.js + + + + +var GooglePointer_GooglePointer = function GooglePointer(props) { + var styles = lib_default()({ + 'default': { + picker: { + width: '20px', + height: '20px', + borderRadius: '22px', + transform: 'translate(-10px, -7px)', + background: 'hsl(' + Math.round(props.hsl.h) + ', 100%, 50%)', + border: '2px white solid' + } + } + }); + + return react_default.a.createElement('div', { style: styles.picker }); +}; + +GooglePointer_GooglePointer.propTypes = { + hsl: prop_types_default.a.shape({ + h: prop_types_default.a.number, + s: prop_types_default.a.number, + l: prop_types_default.a.number, + a: prop_types_default.a.number + }) +}; + +GooglePointer_GooglePointer.defaultProps = { + hsl: { a: 1, h: 249.94, l: 0.2, s: 0.50 } +}; + +/* harmony default export */ var google_GooglePointer = (GooglePointer_GooglePointer); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/google/GoogleFields.js + + + + + +var GoogleFields_GoogleFields = function GoogleFields(_ref) { + var onChange = _ref.onChange, + rgb = _ref.rgb, + hsl = _ref.hsl, + hex = _ref.hex, + hsv = _ref.hsv; + + + var handleChange = function handleChange(data, e) { + if (data.hex) { + color_isValidHex(data.hex) && onChange({ + hex: data.hex, + source: 'hex' + }, e); + } else if (data.rgb) { + var values = data.rgb.split(','); + color_isvalidColorString(data.rgb, 'rgb') && onChange({ + r: values[0], + g: values[1], + b: values[2], + a: 1, + source: 'rgb' + }, e); + } else if (data.hsv) { + var _values = data.hsv.split(','); + if (color_isvalidColorString(data.hsv, 'hsv')) { + _values[2] = _values[2].replace('%', ''); + _values[1] = _values[1].replace('%', ''); + _values[0] = _values[0].replace('°', ''); + if (_values[1] == 1) { + _values[1] = 0.01; + } else if (_values[2] == 1) { + _values[2] = 0.01; + } + onChange({ + h: Number(_values[0]), + s: Number(_values[1]), + v: Number(_values[2]), + source: 'hsv' + }, e); + } + } else if (data.hsl) { + var _values2 = data.hsl.split(','); + if (color_isvalidColorString(data.hsl, 'hsl')) { + _values2[2] = _values2[2].replace('%', ''); + _values2[1] = _values2[1].replace('%', ''); + _values2[0] = _values2[0].replace('°', ''); + if (hsvValue[1] == 1) { + hsvValue[1] = 0.01; + } else if (hsvValue[2] == 1) { + hsvValue[2] = 0.01; + } + onChange({ + h: Number(_values2[0]), + s: Number(_values2[1]), + v: Number(_values2[2]), + source: 'hsl' + }, e); + } + } + }; + + var styles = lib_default()({ + 'default': { + wrap: { + display: 'flex', + height: '100px', + marginTop: '4px' + }, + fields: { + width: '100%' + }, + column: { + paddingTop: '10px', + display: 'flex', + justifyContent: 'space-between' + }, + double: { + padding: '0px 4.4px', + boxSizing: 'border-box' + }, + input: { + width: '100%', + height: '38px', + boxSizing: 'border-box', + padding: '4px 10% 3px', + textAlign: 'center', + border: '1px solid #dadce0', + fontSize: '11px', + textTransform: 'lowercase', + borderRadius: '5px', + outline: 'none', + fontFamily: 'Roboto,Arial,sans-serif' + }, + input2: { + height: '38px', + width: '100%', + border: '1px solid #dadce0', + boxSizing: 'border-box', + fontSize: '11px', + textTransform: 'lowercase', + borderRadius: '5px', + outline: 'none', + paddingLeft: '10px', + fontFamily: 'Roboto,Arial,sans-serif' + }, + label: { + textAlign: 'center', + fontSize: '12px', + background: '#fff', + position: 'absolute', + textTransform: 'uppercase', + color: '#3c4043', + width: '35px', + top: '-6px', + left: '0', + right: '0', + marginLeft: 'auto', + marginRight: 'auto', + fontFamily: 'Roboto,Arial,sans-serif' + }, + label2: { + left: '10px', + textAlign: 'center', + fontSize: '12px', + background: '#fff', + position: 'absolute', + textTransform: 'uppercase', + color: '#3c4043', + width: '32px', + top: '-6px', + fontFamily: 'Roboto,Arial,sans-serif' + }, + single: { + flexGrow: '1', + margin: '0px 4.4px' + } + } + }); + + var rgbValue = rgb.r + ', ' + rgb.g + ', ' + rgb.b; + var hslValue = Math.round(hsl.h) + '\xB0, ' + Math.round(hsl.s * 100) + '%, ' + Math.round(hsl.l * 100) + '%'; + var hsvValue = Math.round(hsv.h) + '\xB0, ' + Math.round(hsv.s * 100) + '%, ' + Math.round(hsv.v * 100) + '%'; + + return react_default.a.createElement( + 'div', + { style: styles.wrap, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.fields }, + react_default.a.createElement( + 'div', + { style: styles.double }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input, label: styles.label }, + label: 'hex', + value: hex, + onChange: handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.column }, + react_default.a.createElement( + 'div', + { style: styles.single }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input2, label: styles.label2 }, + label: 'rgb', + value: rgbValue, + onChange: handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.single }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input2, label: styles.label2 }, + label: 'hsv', + value: hsvValue, + onChange: handleChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.single }, + react_default.a.createElement(common_EditableInput, { + style: { input: styles.input2, label: styles.label2 }, + label: 'hsl', + value: hslValue, + onChange: handleChange + }) + ) + ) + ) + ); +}; + +/* harmony default export */ var google_GoogleFields = (GoogleFields_GoogleFields); +// CONCATENATED MODULE: ./node_modules/react-color/es/components/google/Google.js + + + + + + + + + + +var Google_Google = function Google(_ref) { + var width = _ref.width, + onChange = _ref.onChange, + rgb = _ref.rgb, + hsl = _ref.hsl, + hsv = _ref.hsv, + hex = _ref.hex, + header = _ref.header, + _ref$styles = _ref.styles, + passedStyles = _ref$styles === undefined ? {} : _ref$styles, + _ref$className = _ref.className, + className = _ref$className === undefined ? '' : _ref$className; + + var styles = lib_default()(lodash_es_merge({ + 'default': { + picker: { + width: width, + background: '#fff', + border: '1px solid #dfe1e5', + boxSizing: 'initial', + display: 'flex', + flexWrap: 'wrap', + borderRadius: '8px 8px 0px 0px' + }, + head: { + height: '57px', + width: '100%', + paddingTop: '16px', + paddingBottom: '16px', + paddingLeft: '16px', + fontSize: '20px', + boxSizing: 'border-box', + fontFamily: 'Roboto-Regular,HelveticaNeue,Arial,sans-serif' + }, + saturation: { + width: '70%', + padding: '0px', + position: 'relative', + overflow: 'hidden' + }, + swatch: { + width: '30%', + height: '228px', + padding: '0px', + background: 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', 1)', + position: 'relative', + overflow: 'hidden' + }, + body: { + margin: 'auto', + width: '95%' + }, + controls: { + display: 'flex', + boxSizing: 'border-box', + height: '52px', + paddingTop: '22px' + }, + color: { + width: '32px' + }, + hue: { + height: '8px', + position: 'relative', + margin: '0px 16px 0px 16px', + width: '100%' + }, + Hue: { + radius: '2px' + } + } + }, passedStyles)); + return react_default.a.createElement( + 'div', + { style: styles.picker, className: 'google-picker ' + className }, + react_default.a.createElement( + 'div', + { style: styles.head }, + header + ), + react_default.a.createElement('div', { style: styles.swatch }), + react_default.a.createElement( + 'div', + { style: styles.saturation }, + react_default.a.createElement(common_Saturation, { + hsl: hsl, + hsv: hsv, + pointer: google_GooglePointerCircle, + onChange: onChange + }) + ), + react_default.a.createElement( + 'div', + { style: styles.body }, + react_default.a.createElement( + 'div', + { style: styles.controls, className: 'flexbox-fix' }, + react_default.a.createElement( + 'div', + { style: styles.hue }, + react_default.a.createElement(common_Hue, { + style: styles.Hue, + hsl: hsl, + radius: '4px', + pointer: google_GooglePointer, + onChange: onChange + }) + ) + ), + react_default.a.createElement(google_GoogleFields, { + rgb: rgb, + hsl: hsl, + hex: hex, + hsv: hsv, + onChange: onChange + }) + ) + ); +}; + +Google_Google.propTypes = { + width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]), + styles: prop_types_default.a.object, + header: prop_types_default.a.string + +}; + +Google_Google.defaultProps = { + width: 652, + styles: {}, + header: 'Color picker' +}; + +/* harmony default export */ var google_Google = (common_ColorWrap(Google_Google)); +// CONCATENATED MODULE: ./node_modules/react-color/es/index.js + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 73 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubFalse); + + +/***/ }), +/* 74 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? _root_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(42)(module))) + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var DEFAULT_SIZE = 24; + +exports.default = function (_ref) { + var _ref$fill = _ref.fill, + fill = _ref$fill === undefined ? 'currentColor' : _ref$fill, + _ref$width = _ref.width, + width = _ref$width === undefined ? DEFAULT_SIZE : _ref$width, + _ref$height = _ref.height, + height = _ref$height === undefined ? DEFAULT_SIZE : _ref$height, + _ref$style = _ref.style, + style = _ref$style === undefined ? {} : _ref$style, + props = _objectWithoutProperties(_ref, ['fill', 'width', 'height', 'style']); + + return _react2.default.createElement( + 'svg', + _extends({ + viewBox: '0 0 ' + DEFAULT_SIZE + ' ' + DEFAULT_SIZE, + style: _extends({ fill: fill, width: width, height: height }, style) + }, props), + _react2.default.createElement('path', { d: 'M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z' }) + ); +}; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var DEFAULT_SIZE = 24; + +exports.default = function (_ref) { + var _ref$fill = _ref.fill, + fill = _ref$fill === undefined ? 'currentColor' : _ref$fill, + _ref$width = _ref.width, + width = _ref$width === undefined ? DEFAULT_SIZE : _ref$width, + _ref$height = _ref.height, + height = _ref$height === undefined ? DEFAULT_SIZE : _ref$height, + _ref$style = _ref.style, + style = _ref$style === undefined ? {} : _ref$style, + props = _objectWithoutProperties(_ref, ['fill', 'width', 'height', 'style']); + + return _react2.default.createElement( + 'svg', + _extends({ + viewBox: '0 0 ' + DEFAULT_SIZE + ' ' + DEFAULT_SIZE, + style: _extends({ fill: fill, width: width, height: height }, style) + }, props), + _react2.default.createElement('path', { d: 'M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z' }) + ); +}; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * CardKit example: Browser bundle using Webpack + * + * This bundle shows how to use CardKit as part of a bundle built by Webpack. + * This `cardkit.js` file will be run through Webpack and create a bundle file, that can be included into `index.html` + */ +// Load dependencies +var CardKit = __webpack_require__(78); + +var CardKitDOM = __webpack_require__(83); // Import configuration + + +var data = __webpack_require__(199); // Initialise + + +var cardkit = new CardKit(data.configuration, { + templates: data.templates, + themes: data.themes, + layouts: data.layouts +}); // Start the renderer + +var renderer = new CardKitDOM(cardkit); // Render the UI + +renderer.renderUI("ui"); + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +(function webpackUniversalModuleDefinition(root, factory) { + if (( false ? undefined : _typeof2(exports)) === 'object' && ( false ? undefined : _typeof2(module)) === 'object') module.exports = factory(__webpack_require__(15));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(15)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {} +})(window, function (__WEBPACK_EXTERNAL_MODULE__1__) { + return ( + /******/ + function (modules) { + // webpackBootstrap + + /******/ + // The module cache + + /******/ + var installedModules = {}; + /******/ + + /******/ + // The require function + + /******/ + + function __webpack_require__(moduleId) { + /******/ + + /******/ + // Check if module is in cache + + /******/ + if (installedModules[moduleId]) { + /******/ + return installedModules[moduleId].exports; + /******/ + } + /******/ + // Create a new module (and put it into the cache) + + /******/ + + + var module = installedModules[moduleId] = { + /******/ + i: moduleId, + + /******/ + l: false, + + /******/ + exports: {} + /******/ + + }; + /******/ + + /******/ + // Execute the module function + + /******/ + + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + /******/ + + /******/ + // Flag the module as loaded + + /******/ + + module.l = true; + /******/ + + /******/ + // Return the exports of the module + + /******/ + + return module.exports; + /******/ + } + /******/ + + /******/ + + /******/ + // expose the modules object (__webpack_modules__) + + /******/ + + + __webpack_require__.m = modules; + /******/ + + /******/ + // expose the module cache + + /******/ + + __webpack_require__.c = installedModules; + /******/ + + /******/ + // define getter function for harmony exports + + /******/ + + __webpack_require__.d = function (exports, name, getter) { + /******/ + if (!__webpack_require__.o(exports, name)) { + /******/ + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + /******/ + } + /******/ + + }; + /******/ + + /******/ + // define __esModule on exports + + /******/ + + + __webpack_require__.r = function (exports) { + /******/ + if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ + Object.defineProperty(exports, Symbol.toStringTag, { + value: 'Module' + }); + /******/ + } + /******/ + + + Object.defineProperty(exports, '__esModule', { + value: true + }); + /******/ + }; + /******/ + + /******/ + // create a fake namespace object + + /******/ + // mode & 1: value is a module id, require it + + /******/ + // mode & 2: merge all properties of value into the ns + + /******/ + // mode & 4: return value when already ns object + + /******/ + // mode & 8|1: behave like require + + /******/ + + + __webpack_require__.t = function (value, mode) { + /******/ + if (mode & 1) value = __webpack_require__(value); + /******/ + + if (mode & 8) return value; + /******/ + + if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value; + /******/ + + var ns = Object.create(null); + /******/ + + __webpack_require__.r(ns); + /******/ + + + Object.defineProperty(ns, 'default', { + enumerable: true, + value: value + }); + /******/ + + if (mode & 2 && typeof value != 'string') for (var key in value) { + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + } + /******/ + + return ns; + /******/ + }; + /******/ + + /******/ + // getDefaultExport function for compatibility with non-harmony modules + + /******/ + + + __webpack_require__.n = function (module) { + /******/ + var getter = module && module.__esModule ? + /******/ + function getDefault() { + return module['default']; + } : + /******/ + function getModuleExports() { + return module; + }; + /******/ + + __webpack_require__.d(getter, 'a', getter); + /******/ + + + return getter; + /******/ + }; + /******/ + + /******/ + // Object.prototype.hasOwnProperty.call + + /******/ + + + __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + /******/ + + /******/ + // __webpack_public_path__ + + /******/ + + + __webpack_require__.p = ""; + /******/ + + /******/ + + /******/ + // Load entry module and return exports + + /******/ + + return __webpack_require__(__webpack_require__.s = 0); + /******/ + }( + /************************************************************************/ + + /******/ + [ + /* 0 */ + + /***/ + function (module, exports, __webpack_require__) { + function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + var deepExtend = __webpack_require__(1); + /** + * @name CardKit + * @class Core CardKit class used for managing a single card instance + */ + + + var CardKit = /*#__PURE__*/function () { + /** + * Constructor takes in the configuration and stores it for later user + * + * @param {object} configuration - The configuration object to initialise the CardKit image with. + * @param {object} options - The additional options for use + */ + function CardKit(configuration) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + _classCallCheck(this, CardKit); + + if (!configuration) { + throw new Error("A configuration object was not provided"); + } + + if (!this._isValidConfiguration(configuration)) { + throw new Error("Invalid configuration object provided"); + } // Store the configuration + + + this.configuration = configuration; // Configure the options + + this._configureOptions(options); // Setup an empty array of renderers + + + this.renderers = []; + } + /** + * Configures the supplied options on this instance of CardKit + * + * @param {object} options - The options to configure + */ + + + _createClass(CardKit, [{ + key: "_configureOptions", + value: function _configureOptions(options) { + if (options) { + if (options.templates) { + if (!this._isValidTemplatesConfiguration(options.templates)) { + throw new Error("Invalid templates configuration object provided"); + } + + this.templates = options.templates; + } else { + this.templates = null; + } + + if (options.themes) { + if (!this._isValidThemesConfiguration(options.themes)) { + throw new Error("Invalid themes configuration object provided"); + } + + this.themes = options.themes; + } else { + this.themes = null; + } + + if (options.layouts) { + if (!this._isValidLayoutsConfiguration(options.layouts)) { + throw new Error("Invalid layouts configuration object provided"); + } + + this.layouts = options.layouts; + } else { + this.layouts = null; + } + } + } + /** + * Validates the provided configuration object + * + * @param {object} configuration - The configuration object to validate + * + * @return {boolean} Is the configuration object valid + */ + + }, { + key: "_isValidConfiguration", + value: function _isValidConfiguration(configuration) { + return _typeof(configuration) === "object" && // Should be an object + typeof configuration.card !== "undefined" && // Should have a card property + _typeof(configuration.card) === "object" && // Card property should be an object + typeof configuration.card.height !== "undefined" && // Should have a height + typeof configuration.card.width !== "undefined"; // Should have a width + } + /** + * Validates the provided templates configuration object + * + * @param {object} configuration - The templates configuration object to validate + * + * @return {boolean} Is the templates configuration object valid + */ + + }, { + key: "_isValidTemplatesConfiguration", + value: function _isValidTemplatesConfiguration(templates) { + return _typeof(templates) === "object"; // Should be an object + } + /** + * Validates the provided themes configuration object + * + * @param {object} configuration - The themes configuration object to validate + * + * @return {boolean} Is the themes configuration object valid + */ + + }, { + key: "_isValidThemesConfiguration", + value: function _isValidThemesConfiguration(themes) { + return _typeof(themes) === "object"; // Should be an object + } + /** + * Validates the provided layouts configuration object + * + * @param {object} configuration - The layouts configuration object to validate + * + * @return {boolean} Is the layouts configuration object valid + */ + + }, { + key: "_isValidLayoutsConfiguration", + value: function _isValidLayoutsConfiguration(layouts) { + return _typeof(layouts) === "object"; // Should be an object + } + /** + * Validates the supplied renderer + * + * @param {object} renderer - The renderer to validate + * + * @return {boolean} If the renderer is valid + */ + + }, { + key: "_isValidRenderer", + value: function _isValidRenderer(renderer) { + return renderer.cardkit === this; + } + /** + * Compute the configuration + * + * @param {object} options - Any options (e.g. a specific theme and / or layout) to use when computing the configuration + * + * @return {object} The computed configuration + */ + + }, { + key: "computeConfiguration", + value: function computeConfiguration() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; // Get the base configuration + + var configuration = Object.assign({}, this.configuration); // If we got options supplied + + if (options) { + if (options.template && typeof this.templates[options.template] !== "undefined") { + // Get the template based on the name and merge it onto the base configuration + configuration = deepExtend(configuration, this.templates[options.template]); + } + + if (options.theme && typeof this.themes[options.theme] !== "undefined") { + // Get the theme based on the name and merge it onto the base configuration + configuration = deepExtend(configuration, this.themes[options.theme]); + } + + if (options.layout && typeof this.layouts[options.layout] !== "undefined") { + // Get the layout based on the name and merge it onto the base configuration + configuration = deepExtend(configuration, this.layouts[options.layout]); + } + } // Return the computed configuration + + + return configuration; + } + /** + * Updates the configuration, and optionally rerenders the image (if previously rendered) + * + * @param {object} configuration - The configuration object to update to + * @param {object} options - Any options to supply (templates, themes, layouts) + * @param {boolean} rerender - Whether or not to attempt to rerender the image + */ + + }, { + key: "updateConfiguration", + value: function updateConfiguration(configuration) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { + layouts: null, + templates: null, + themes: null + }; + var rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + this.configuration = configuration; + + this._configureOptions(options); + + if (rerender) { + var renderers = this.getRenderers(); + renderers.forEach(function (renderer) { + switch (renderer.constructor.name) { + case "CardKitDOM": + renderer.rerender(); + break; + } + }); + } + } + /** + * Get the renderers + * + * @return {array} The configured renderers + */ + + }, { + key: "getRenderers", + value: function getRenderers() { + return this.renderers; + } + /** + * Add a renderer + * + * @param {object} renderer - A renderer to add + */ + + }, { + key: "addRenderer", + value: function addRenderer(renderer) { + if (!this._isValidRenderer(renderer)) { + throw new Error("Invalid renderer object provided"); + } + + this.renderers.push(renderer); + } + }]); + + return CardKit; + }(); // Export it + + + module.exports = CardKit; // Add it to the window object if we have one + + if (typeof window !== "undefined") { + window.CardKit = CardKit; + } + /***/ + + }, + /* 1 */ + + /***/ + function (module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE__1__; + /***/ + } + /******/ + ]) + ); +}); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(11)(module))) + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + + + +var base64 = __webpack_require__(80) +var ieee754 = __webpack_require__(81) +var isArray = __webpack_require__(82) + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +/* + * Export kMaxLength after typed array support is determined. + */ +exports.kMaxLength = kMaxLength() + +function typedArraySupport () { + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length) + } + that.length = length + } + + return that +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} + +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) + } +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (that, size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +} + +function allocUnsafe (that, size) { + assertSize(size) + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0 + } + } + return that +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0 + that = createBuffer(that, length) + + var actual = that.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual) + } + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + that = createBuffer(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array) + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset) + } else { + array = new Uint8Array(array, byteOffset, length) + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array) + } + return that +} + +function fromObject (that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + that = createBuffer(that, len) + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len) + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string + } + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end) + newBuf.__proto__ = Buffer.prototype + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start] + } + } + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(25))) + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + + +/***/ }), +/* 81 */ +/***/ (function(module, exports) { + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + + +/***/ }), +/* 82 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +(function webpackUniversalModuleDefinition(root, factory) { + if (( false ? undefined : _typeof2(exports)) === 'object' && ( false ? undefined : _typeof2(module)) === 'object') module.exports = factory(__webpack_require__(0), __webpack_require__(1), __webpack_require__(45), __webpack_require__(46), __webpack_require__(15), __webpack_require__(72));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(1), __webpack_require__(45), __webpack_require__(46), __webpack_require__(15), __webpack_require__(72)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {} +})(window, function (__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__17__, __WEBPACK_EXTERNAL_MODULE__21__, __WEBPACK_EXTERNAL_MODULE__31__, __WEBPACK_EXTERNAL_MODULE__47__) { + return ( + /******/ + function (modules) { + // webpackBootstrap + + /******/ + // The module cache + + /******/ + var installedModules = {}; + /******/ + + /******/ + // The require function + + /******/ + + function __webpack_require__(moduleId) { + /******/ + + /******/ + // Check if module is in cache + + /******/ + if (installedModules[moduleId]) { + /******/ + return installedModules[moduleId].exports; + /******/ + } + /******/ + // Create a new module (and put it into the cache) + + /******/ + + + var module = installedModules[moduleId] = { + /******/ + i: moduleId, + + /******/ + l: false, + + /******/ + exports: {} + /******/ + + }; + /******/ + + /******/ + // Execute the module function + + /******/ + + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + /******/ + + /******/ + // Flag the module as loaded + + /******/ + + module.l = true; + /******/ + + /******/ + // Return the exports of the module + + /******/ + + return module.exports; + /******/ + } + /******/ + + /******/ + + /******/ + // expose the modules object (__webpack_modules__) + + /******/ + + + __webpack_require__.m = modules; + /******/ + + /******/ + // expose the module cache + + /******/ + + __webpack_require__.c = installedModules; + /******/ + + /******/ + // define getter function for harmony exports + + /******/ + + __webpack_require__.d = function (exports, name, getter) { + /******/ + if (!__webpack_require__.o(exports, name)) { + /******/ + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + /******/ + } + /******/ + + }; + /******/ + + /******/ + // define __esModule on exports + + /******/ + + + __webpack_require__.r = function (exports) { + /******/ + if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ + Object.defineProperty(exports, Symbol.toStringTag, { + value: 'Module' + }); + /******/ + } + /******/ + + + Object.defineProperty(exports, '__esModule', { + value: true + }); + /******/ + }; + /******/ + + /******/ + // create a fake namespace object + + /******/ + // mode & 1: value is a module id, require it + + /******/ + // mode & 2: merge all properties of value into the ns + + /******/ + // mode & 4: return value when already ns object + + /******/ + // mode & 8|1: behave like require + + /******/ + + + __webpack_require__.t = function (value, mode) { + /******/ + if (mode & 1) value = __webpack_require__(value); + /******/ + + if (mode & 8) return value; + /******/ + + if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value; + /******/ + + var ns = Object.create(null); + /******/ + + __webpack_require__.r(ns); + /******/ + + + Object.defineProperty(ns, 'default', { + enumerable: true, + value: value + }); + /******/ + + if (mode & 2 && typeof value != 'string') for (var key in value) { + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + } + /******/ + + return ns; + /******/ + }; + /******/ + + /******/ + // getDefaultExport function for compatibility with non-harmony modules + + /******/ + + + __webpack_require__.n = function (module) { + /******/ + var getter = module && module.__esModule ? + /******/ + function getDefault() { + return module['default']; + } : + /******/ + function getModuleExports() { + return module; + }; + /******/ + + __webpack_require__.d(getter, 'a', getter); + /******/ + + + return getter; + /******/ + }; + /******/ + + /******/ + // Object.prototype.hasOwnProperty.call + + /******/ + + + __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + /******/ + + /******/ + // __webpack_public_path__ + + /******/ + + + __webpack_require__.p = ""; + /******/ + + /******/ + + /******/ + // Load entry module and return exports + + /******/ + + return __webpack_require__(__webpack_require__.s = 16); + /******/ + }( + /************************************************************************/ + + /******/ + [ + /* 0 */ + + /***/ + function (module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE__0__; + /***/ + }, + /* 1 */ + + /***/ + function (module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE__1__; + /***/ + }, + /* 2 */ + + /***/ + function (module, exports, __webpack_require__) { + "use strict"; + + var isOldIE = function isOldIE() { + var memo; + return function memorize() { + if (typeof memo === 'undefined') { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + memo = Boolean(window && document && document.all && !window.atob); + } + + return memo; + }; + }(); + + var getTarget = function getTarget() { + var memo = {}; + return function memorize(target) { + if (typeof memo[target] === 'undefined') { + var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself + + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch (e) { + // istanbul ignore next + styleTarget = null; + } + } + + memo[target] = styleTarget; + } + + return memo[target]; + }; + }(); + + var stylesInDom = []; + + function getIndexByIdentifier(identifier) { + var result = -1; + + for (var i = 0; i < stylesInDom.length; i++) { + if (stylesInDom[i].identifier === identifier) { + result = i; + break; + } + } + + return result; + } + + function modulesToDom(list, options) { + var idCountMap = {}; + var identifiers = []; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var id = options.base ? item[0] + options.base : item[0]; + var count = idCountMap[id] || 0; + var identifier = "".concat(id, " ").concat(count); + idCountMap[id] = count + 1; + var index = getIndexByIdentifier(identifier); + var obj = { + css: item[1], + media: item[2], + sourceMap: item[3] + }; + + if (index !== -1) { + stylesInDom[index].references++; + stylesInDom[index].updater(obj); + } else { + stylesInDom.push({ + identifier: identifier, + updater: addStyle(obj, options), + references: 1 + }); + } + + identifiers.push(identifier); + } + + return identifiers; + } + + function insertStyleElement(options) { + var style = document.createElement('style'); + var attributes = options.attributes || {}; + + if (typeof attributes.nonce === 'undefined') { + var nonce = true ? __webpack_require__.nc : undefined; + + if (nonce) { + attributes.nonce = nonce; + } + } + + Object.keys(attributes).forEach(function (key) { + style.setAttribute(key, attributes[key]); + }); + + if (typeof options.insert === 'function') { + options.insert(style); + } else { + var target = getTarget(options.insert || 'head'); + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + } + + target.appendChild(style); + } + + return style; + } + + function removeStyleElement(style) { + // istanbul ignore if + if (style.parentNode === null) { + return false; + } + + style.parentNode.removeChild(style); + } + /* istanbul ignore next */ + + + var replaceText = function replaceText() { + var textStore = []; + return function replace(index, replacement) { + textStore[index] = replacement; + return textStore.filter(Boolean).join('\n'); + }; + }(); + + function applyToSingletonTag(style, index, remove, obj) { + var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE + + /* istanbul ignore if */ + + if (style.styleSheet) { + style.styleSheet.cssText = replaceText(index, css); + } else { + var cssNode = document.createTextNode(css); + var childNodes = style.childNodes; + + if (childNodes[index]) { + style.removeChild(childNodes[index]); + } + + if (childNodes.length) { + style.insertBefore(cssNode, childNodes[index]); + } else { + style.appendChild(cssNode); + } + } + } + + function applyToTag(style, options, obj) { + var css = obj.css; + var media = obj.media; + var sourceMap = obj.sourceMap; + + if (media) { + style.setAttribute('media', media); + } else { + style.removeAttribute('media'); + } + + if (sourceMap && typeof btoa !== 'undefined') { + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); + } // For old IE + + /* istanbul ignore if */ + + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + while (style.firstChild) { + style.removeChild(style.firstChild); + } + + style.appendChild(document.createTextNode(css)); + } + } + + var singleton = null; + var singletonCounter = 0; + + function addStyle(obj, options) { + var style; + var update; + var remove; + + if (options.singleton) { + var styleIndex = singletonCounter++; + style = singleton || (singleton = insertStyleElement(options)); + update = applyToSingletonTag.bind(null, style, styleIndex, false); + remove = applyToSingletonTag.bind(null, style, styleIndex, true); + } else { + style = insertStyleElement(options); + update = applyToTag.bind(null, style, options); + + remove = function remove() { + removeStyleElement(style); + }; + } + + update(obj); + return function updateStyle(newObj) { + if (newObj) { + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { + return; + } + + update(obj = newObj); + } else { + remove(); + } + }; + } + + module.exports = function (list, options) { + options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of - - + nav#parent ul li.active a, + nav#parent ul li:hover a { + border-bottom: 2px solid #ffffff; + } + + + + - +
-
- - - - \ No newline at end of file + + + diff --git a/dom.js b/dom.js index 666a01c..3ce8356 100644 --- a/dom.js +++ b/dom.js @@ -1,13 +1,13 @@ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("react"), require("prop-types"), require("react-dom"), require("rvg.js"), require("deep-extend"), require("react-color")); + module.exports = factory(require("react"), require("prop-types"), require("react-dom"), require("util"), require("deep-extend"), require("react-color")); else if(typeof define === 'function' && define.amd) - define("CardKitDOM", ["react", "prop-types", "react-dom", "rvg.js", "deep-extend", "react-color"], factory); + define("CardKitDOM", ["react", "prop-types", "react-dom", "util", "deep-extend", "react-color"], factory); else if(typeof exports === 'object') - exports["CardKitDOM"] = factory(require("react"), require("prop-types"), require("react-dom"), require("rvg.js"), require("deep-extend"), require("react-color")); + exports["CardKitDOM"] = factory(require("react"), require("prop-types"), require("react-dom"), require("util"), require("deep-extend"), require("react-color")); else - root["CardKitDOM"] = factory(root["react"], root["prop-types"], root["react-dom"], root["rvg.js"], root["deep-extend"], root["react-color"]); -})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__16__, __WEBPACK_EXTERNAL_MODULE__17__, __WEBPACK_EXTERNAL_MODULE__20__, __WEBPACK_EXTERNAL_MODULE__36__) { + root["CardKitDOM"] = factory(root["react"], root["prop-types"], root["react-dom"], root["util"], root["deep-extend"], root["react-color"]); +})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__17__, __WEBPACK_EXTERNAL_MODULE__21__, __WEBPACK_EXTERNAL_MODULE__31__, __WEBPACK_EXTERNAL_MODULE__47__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 15); +/******/ return __webpack_require__(__webpack_require__.s = 16); /******/ }) /************************************************************************/ /******/ ([ @@ -102,6 +102,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__0__; /***/ }), /* 1 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__1__; + +/***/ }), +/* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -376,7 +382,7 @@ module.exports = function (list, options) { }; /***/ }), -/* 2 */ +/* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -448,13 +454,72 @@ module.exports = function (cssWithMappingToString) { }; /***/ }), -/* 3 */ -/***/ (function(module, exports) { +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); -module.exports = __WEBPACK_EXTERNAL_MODULE__3__; +var DraggableBase = /*#__PURE__*/function (_React$Component) { + _inherits(DraggableBase, _React$Component); + + var _super = _createSuper(DraggableBase); + + function DraggableBase(props) { + var _this; + + _classCallCheck(this, DraggableBase); + + _this = _super.call(this, props); + _this.draggableProps = {}; + + if (_this.props.draggable) { + _this.draggableProps = { + "data-draggable": true, + style: { + cursor: "move" + } + }; + } else { + _this.draggableProps = { + style: { + pointerEvents: "none" + } + }; + } + + return _this; + } + + return DraggableBase; +}(React.Component); + +DraggableBase.propTypes = { + draggable: PropTypes.bool.isRequired +}; +module.exports = DraggableBase; /***/ }), -/* 4 */ +/* 5 */ /***/ (function(module, exports) { module.exports = { @@ -499,11 +564,11 @@ module.exports = { }; /***/ }), -/* 5 */ +/* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -515,11 +580,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, "html{font-size:62.5%}body{font-size:1.4 /***/ }), -/* 6 */ +/* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -531,11 +596,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, ".header{background:#4da5bd;height:5.7re /***/ }), -/* 7 */ +/* 8 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -547,11 +612,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, "aside.sidebar{background:#eee;color:#ff /***/ }), -/* 8 */ +/* 9 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -563,11 +628,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, ".layer-config{background:#fff;margin:0 /***/ }), -/* 9 */ +/* 10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -579,11 +644,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, ".panel.panel--content .chrome-picker,.p /***/ }), -/* 10 */ +/* 11 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -595,11 +660,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, ".panel.panel--template ul{margin:0;padd /***/ }), -/* 11 */ +/* 12 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -611,11 +676,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, "", ""]); /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -627,11 +692,11 @@ ___CSS_LOADER_EXPORT___.push([module.i, ".panel.panel--layout .layout{background /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); // Imports @@ -643,7 +708,7 @@ ___CSS_LOADER_EXPORT___.push([module.i, ".canvas{transition:transform .2s ease;w /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -671,10 +736,10 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // RVG Elements +var PropTypes = __webpack_require__(1); // RVG Elements -var _require = __webpack_require__(17), +var _require = __webpack_require__(18), SVG = _require.SVG, Text = _require.Text, Rectangle = _require.Rectangle, @@ -696,30 +761,21 @@ var Card = /*#__PURE__*/function (_React$Component) { var _super = _createSuper(Card); function Card(props) { - var _this; - _classCallCheck(this, Card); - _this = _super.call(this, props); - _this.svgRef = React.createRef(); - return _this; + return _super.call(this, props); } + /** + * Calculates the Y position of an element based on any attachments etc. + * + * @param {object} layers - The object of all layers + * @param {object} layer - The layer to calculate the Y position for + * + * @return {integer} The Y position + */ - _createClass(Card, [{ - key: "componentDidMount", - value: function componentDidMount() { - this.props.onMount(this.svgRef); - } - /** - * Calculates the Y position of an element based on any attachments etc. - * - * @param {object} layers - The object of all layers - * @param {object} layer - The layer to calculate the Y position for - * - * @return {integer} The Y position - */ - }, { + _createClass(Card, [{ key: "calculateYPosition", value: function calculateYPosition(layers, layer) { // Get the layer's currently configured Y position @@ -773,7 +829,7 @@ var Card = /*#__PURE__*/function (_React$Component) { key: "getLayerValue", value: function getLayerValue(layers, layer, key) { if (typeof layer[key] === "function") { - return layer[key](layers, this.svgRef); + return layer[key](layers, this.props.svgRef); } return layer[key]; @@ -789,15 +845,15 @@ var Card = /*#__PURE__*/function (_React$Component) { }, { key: "computeGradients", value: function computeGradients(layers) { - var _this2 = this; + var _this = this; var array = []; var layer, gradient; Object.keys(layers).forEach(function (key) { layer = layers[key]; - if (_this2.getLayerValue(layers, layer, "gradient")) { - gradient = _this2.getLayerValue(layers, layer, "gradient"); + if (_this.getLayerValue(layers, layer, "gradient")) { + gradient = _this.getLayerValue(layers, layer, "gradient"); array.push( /*#__PURE__*/React.createElement(LinearGradient, { key: key, name: key, @@ -822,7 +878,7 @@ var Card = /*#__PURE__*/function (_React$Component) { }, { key: "computeLayers", value: function computeLayers(layers) { - var _this3 = this; + var _this2 = this; var array = []; var layer; // Iterate over the layers @@ -830,7 +886,7 @@ var Card = /*#__PURE__*/function (_React$Component) { Object.keys(layers).forEach(function (key) { layer = layers[key]; // If the layer is hidden, ignore it - if (_this3.getLayerValue(layers, layer, "hidden") === true) { + if (_this2.getLayerValue(layers, layer, "hidden") === true) { return; } // Setup an object to contain our layer data @@ -838,11 +894,11 @@ var Card = /*#__PURE__*/function (_React$Component) { var layerData = {}; // Iterate over the properties of the layer, and compute the value (handles getters, functions, and object implementations such as `y`) Object.keys(layer).forEach(function (k) { - layerData[k] = _this3.getLayerValue(layers, layer, k); + layerData[k] = _this2.getLayerValue(layers, layer, k); }); // Make the fill value map to a gradient name, if a gradient has been configured // See computeGradients() for the creation of gradient definitions - if (_this3.getLayerValue(layers, layer, "gradient")) { + if (_this2.getLayerValue(layers, layer, "gradient")) { layerData.fill = "url(#".concat(key, ")"); } // Switch over the layer type to ensure we create the card correctly @@ -854,7 +910,7 @@ var Card = /*#__PURE__*/function (_React$Component) { var text = layerData.text.split("\n"); array.push( /*#__PURE__*/React.createElement(Text, { x: layerData.x, - y: _this3.calculateYPosition(layers, layerData), + y: _this2.calculateYPosition(layers, layerData), fontFamily: layerData.fontFamily, fontSize: layerData.fontSize, fontWeight: layerData.fontWeight, @@ -872,7 +928,7 @@ var Card = /*#__PURE__*/function (_React$Component) { case "image": array.push( /*#__PURE__*/React.createElement(Image, { x: layerData.x, - y: _this3.calculateYPosition(layers, layerData), + y: _this2.calculateYPosition(layers, layerData), href: layerData.src, height: layerData.height, width: layerData.width, @@ -886,7 +942,7 @@ var Card = /*#__PURE__*/function (_React$Component) { case "rectangle": array.push( /*#__PURE__*/React.createElement(Rectangle, { x: layerData.x, - y: _this3.calculateYPosition(layers, layerData), + y: _this2.calculateYPosition(layers, layerData), fill: layerData.fill, height: layerData.height, width: layerData.width, @@ -899,7 +955,7 @@ var Card = /*#__PURE__*/function (_React$Component) { case "circle": array.push( /*#__PURE__*/React.createElement(Circle, { x: layerData.x, - y: _this3.calculateYPosition(layers, layerData), + y: _this2.calculateYPosition(layers, layerData), fill: layerData.fill, radius: layerData.radius, draggable: layerData.draggable, @@ -911,7 +967,7 @@ var Card = /*#__PURE__*/function (_React$Component) { case "ellipse": array.push( /*#__PURE__*/React.createElement(Ellipse, { x: layerData.x, - y: _this3.calculateYPosition(layers, layerData), + y: _this2.calculateYPosition(layers, layerData), fill: layerData.fill, radiusX: layerData.radiusX, radiusY: layerData.radiusY, @@ -992,7 +1048,7 @@ var Card = /*#__PURE__*/function (_React$Component) { return /*#__PURE__*/React.createElement("div", { className: "card", - ref: this.svgRef, + ref: this.props.svgRef, style: { maxWidth: card.width, maxHeight: card.height @@ -1014,13 +1070,13 @@ Card.propTypes = { fonts: PropTypes.object, layers: PropTypes.object }), - onMount: PropTypes.func + svgRef: PropTypes.any.isRequired }; // Export module.exports = Card; /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -1048,17 +1104,17 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Dependencies var React = __webpack_require__(0); -var ReactDOM = __webpack_require__(16); +var ReactDOM = __webpack_require__(17); -var Card = __webpack_require__(14); +var Card = __webpack_require__(15); -var CardKitRenderer = __webpack_require__(18); +var CardKitRenderer = __webpack_require__(29); -var UI = __webpack_require__(21); +var UI = __webpack_require__(32); -var SVGToImage = __webpack_require__(50); +var SVGToImage = __webpack_require__(61); -var _require = __webpack_require__(4), +var _require = __webpack_require__(5), slugify = _require.slugify; /** * @name CardKitDOM @@ -1066,179 +1122,1046 @@ var _require = __webpack_require__(4), */ -var CardKitDOM = /*#__PURE__*/function (_CardKitRenderer) { - _inherits(CardKitDOM, _CardKitRenderer); +var CardKitDOM = /*#__PURE__*/function (_CardKitRenderer) { + _inherits(CardKitDOM, _CardKitRenderer); + + var _super = _createSuper(CardKitDOM); + + /** + * Constructor takes in an instance of CardKit and stores it for later use + * + * @param {CardKit} cardkit - An instance of CardKit + */ + function CardKitDOM(cardkit) { + var _this; + + _classCallCheck(this, CardKitDOM); + + // Ensure we're operating in a browser environment + if (typeof document === "undefined") { + throw new Error("CardKitDOM can only be used in a browser environment"); + } + + _this = _super.call(this, cardkit); // Store render IDs + + _this.renderedCardID = null; + _this.renderedUIID = null; + return _this; + } + /** + * Renders the built-in UI to the supplied element + * + * @param {string} id - The ID of the element to render the UI into + */ + + + _createClass(CardKitDOM, [{ + key: "renderUI", + value: function renderUI(id) { + if (!this._isValidElement(id)) { + throw new Error("Invalid element ID provided"); + } + + var element = document.getElementById(id); + var template = this.cardkit.templates ? Object.keys(this.cardkit.templates)[0] : false; + var theme = this.cardkit.themes ? Object.keys(this.cardkit.themes)[0] : false; + var layout = this.cardkit.layouts ? Object.keys(this.cardkit.layouts)[0] : false; + this.renderedUIID = id; + ReactDOM.render(React.createElement(UI, { + configuration: this.computeConfiguration({ + template: template, + theme: theme, + layout: layout + }), + templates: this.cardkit.templates, + themes: this.cardkit.themes, + layouts: this.cardkit.layouts, + cardKit: this + }), element); + } + /** + * Renders just the Card as a React component to the supplied element + * + * @param {string} id - The ID of the element to render the card into + * @param {object} options - Any override data (e.g. theme, layout) to use when rendering the card + */ + + }, { + key: "renderCard", + value: function renderCard(id, options) { + if (!this._isValidElement(id)) { + throw new Error("Invalid element ID provided"); + } + + var element = document.getElementById(id); + this.renderedCardID = id; + ReactDOM.render(React.createElement(Card, { + configuration: this.computeConfiguration(options) + }), element); + } + /** + * Checks if the ID provided is valid + * + * @param {string} id - The ID to validate + * @return {boolean} If the ID was valid + */ + + }, { + key: "_isValidElement", + value: function _isValidElement(id) { + if (!id) { + return false; + } + + var element = document.getElementById(id); + + if (!element) { + return false; + } + + return true; + } + /** + * Re-renders the Card or UI + */ + + }, { + key: "rerender", + value: function rerender() { + if (this.renderedUIID) { + this.renderUI(this.renderedUIID); + } + + if (this.renderedCardID) { + this.renderCard(this.renderedCardID); + } + } + /** + * Downloads the card as an image in the browser + * + * @param {number} scale - The scale to output at + * @param {object} element - The element to use to generate the image + */ + + }, { + key: "download", + value: function download() { + var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2; + var element = arguments.length > 1 ? arguments[1] : undefined; + element = element.childNodes[0] || document.getElementById(this.renderedCardID).childNodes[0]; + var svgToImage = new SVGToImage(element); // Setup default filename + + var filename = "cardkit-default.jpg"; // Get the configuration + + var configuration = this.computeConfiguration(); // If there's a layer that has the useAsFilename property, find it + + var filenameLayerKey = Object.keys(configuration.layers).find(function (key) { + var layer = configuration.layers[key]; + return layer.useAsFilename === true && // Has the useAsFilename property + layer.hidden !== true && // Is not hidden + layer.type === "text"; // Is of type text + }); // Get the layer that has the filename on it + + var filenameLayer = configuration.layers[filenameLayerKey]; // Update the filename + + if (filenameLayer) { + filename = slugify(filenameLayer.text) + ".jpg"; + } // Trigger the download + + + svgToImage.download(filename, { + format: "image/jpeg", + scale: scale + }); + } + }]); + + return CardKitDOM; +}(CardKitRenderer); + +module.exports = CardKitDOM; + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__17__; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { + SVG: __webpack_require__(19), + Text: __webpack_require__(20), + Rectangle: __webpack_require__(22), + Circle: __webpack_require__(23), + Ellipse: __webpack_require__(24), + Line: __webpack_require__(25), + Image: __webpack_require__(26), + Path: __webpack_require__(27), + LinearGradient: __webpack_require__(28) +}; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); + +var SVG = /*#__PURE__*/function (_React$Component) { + _inherits(SVG, _React$Component); + + var _super = _createSuper(SVG); + + function SVG(props) { + var _this; + + _classCallCheck(this, SVG); + + _this = _super.call(this, props); + _this.lastTransformation = { + x: 0, + y: 0 + }; + _this.isDragging = false; + _this.handleMouseDown = _this.handleMouseDown.bind(_assertThisInitialized(_this)); + _this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this)); + _this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this)); + return _this; + } + + _createClass(SVG, [{ + key: "handleMouseDown", + value: function handleMouseDown(e) { + if (e.target.nodeName === "tspan") { + e.target = e.target.parentNode; + } + + if (e.target.getAttribute("data-draggable")) { + this.isDragging = e.target; + this.clickPosition = { + x: e.pageX, + y: e.pageY + }; + var transform = this.isDragging.transform; + var x = transform.animVal[0].matrix.e; + var y = transform.animVal[0].matrix.f; + this.lastTransformation = { + x: x, + y: y + }; + } else { + this.isDragging = false; + } + } + }, { + key: "handleMouseMove", + value: function handleMouseMove(e) { + if (this.isDragging) { + var targetBaseWidth, targetRealWidth; + + try { + targetBaseWidth = this.isDragging.width.baseVal.value; + targetRealWidth = this.isDragging.getBoundingClientRect().width; + } catch (e) { + targetBaseWidth = 1; + targetRealWidth = 1; + } + + var multiplier = parseFloat((targetBaseWidth / targetRealWidth).toFixed(2)); + var xDiff = (e.pageX - this.clickPosition.x) * multiplier + this.lastTransformation.x; + var yDiff = (e.pageY - this.clickPosition.y) * multiplier + this.lastTransformation.y; + var matrix = "matrix(1 0 0 1 " + xDiff + " " + yDiff + ")"; + this.isDragging.setAttribute("transform", matrix); + } + } + }, { + key: "handleMouseUp", + value: function handleMouseUp() { + if (this.isDragging) { + this.isDragging = false; + this.lastTransformation = { + x: 0, + y: 0 + }; + } + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + height = _this$props.height, + width = _this$props.width, + fill = _this$props.fill, + children = _this$props.children; + return /*#__PURE__*/React.createElement("svg", { + height: "100%", + width: "100%", + onMouseDown: this.handleMouseDown, + onMouseMove: this.handleMouseMove, + onMouseUp: this.handleMouseUp, + viewBox: "0 0 " + width + " " + height + }, /*#__PURE__*/React.createElement("rect", { + x: "0", + y: "0", + width: width, + height: height, + fill: fill + }), children); + } + }]); + + return SVG; +}(React.Component); // Prop types + + +SVG.propTypes = { + height: PropTypes.number.isRequired, + width: PropTypes.number.isRequired, + fill: PropTypes.string.isRequired, + children: PropTypes.any.isRequired +}; +SVG.defaultProps = { + height: 400, + width: 600, + fill: "transparent" +}; +module.exports = SVG; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var util = __webpack_require__(21); + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); + +var DraggableBase = __webpack_require__(4); + +String.prototype.addSmartQuotes = function () { + return this.replace(/(\W|^)"(\S)/g, "$1\u201C$2") // beginning " + .replace(/(\u201c[^"]*)"([^"]*$|[^\u201c"]*\u201c)/g, "$1\u201D$2") // ending " + .replace(/([^0-9])"/g, "$1\u201D") // remaining " at end of word + .replace(/(\W|^)'(\S)/g, "$1\u2018$2") // beginning ' + .replace(/([a-z])'([a-z])/gi, "$1\u2019$2") // conjunction's possession + .replace(/((\u2018[^']*)|[a-z])'([^0-9]|$)/gi, "$1\u2019$3") // ending ' + .replace(/(\u2018)([0-9]{2}[^\u2019]*)(\u2018([^0-9]|$)|$|\u2019[a-z])/gi, "\u2019$2$3") // abbrev. years like '93 + .replace(/(\B|^)\u2018(?=([^\u2019]*\u2019\b)*([^\u2019\u2018]*\W[\u2019\u2018]\b|[^\u2019\u2018]*$))/gi, "$1\u2019") // backwards apostrophe + .replace(/'''/g, "\u2034") // triple prime + .replace(/("|'')/g, "\u2033") // double prime + .replace(/'/g, "\u2032"); // prime +}; + +var Text = /*#__PURE__*/function (_DraggableBase) { + _inherits(Text, _DraggableBase); + + var _super = _createSuper(Text); + + function Text() { + _classCallCheck(this, Text); + + return _super.apply(this, arguments); + } + + _createClass(Text, [{ + key: "render", + value: function render() { + var _this$props = this.props, + x = _this$props.x, + y = _this$props.y, + fill = _this$props.fill, + fontSize = _this$props.fontSize, + fontFamily = _this$props.fontFamily, + fontWeight = _this$props.fontWeight, + textAnchor = _this$props.textAnchor, + smartQuotes = _this$props.smartQuotes; + var text = this.props.children; + var lineHeight = this.props.lineHeight || fontSize; + + if (util.isArray(text)) { + text = text.map(function (string, index) { + if (true === smartQuotes) { + string = string.addSmartQuotes(); + } + + return /*#__PURE__*/React.createElement("tspan", { + key: index, + x: x, + y: lineHeight * index + y, + alignmentBaseline: "before-edge" + }, string); + }); + } else { + if (true === smartQuotes) { + text = text.addSmartQuotes(); + } + } + + return /*#__PURE__*/React.createElement("text", _extends({ + x: x, + y: y, + fill: fill, + textAnchor: textAnchor, + fontSize: fontSize, + fontFamily: fontFamily, + fontWeight: fontWeight + }, this.draggableProps), text); + } + }]); + + return Text; +}(DraggableBase); // Prop types + + +Text.propTypes = { + x: PropTypes.any.isRequired, + y: PropTypes.any.isRequired, + fill: PropTypes.string.isRequired, + fontSize: PropTypes.number, + fontFamily: PropTypes.string, + textAnchor: PropTypes.string +}; +Text.defaultProps = { + x: 0, + y: 0, + fill: "#000", + fontSize: 20, + fontFamily: "serif", + textAnchor: "start" +}; +module.exports = Text; + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__21__; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); + +var DraggableBase = __webpack_require__(4); + +var Rectangle = /*#__PURE__*/function (_DraggableBase) { + _inherits(Rectangle, _DraggableBase); + + var _super = _createSuper(Rectangle); + + function Rectangle() { + _classCallCheck(this, Rectangle); + + return _super.apply(this, arguments); + } + + _createClass(Rectangle, [{ + key: "render", + value: function render() { + var _this$props = this.props, + x = _this$props.x, + y = _this$props.y, + fill = _this$props.fill, + gradient = _this$props.gradient, + height = _this$props.height, + width = _this$props.width; + + if (gradient) { + fill = gradient; + } + + return /*#__PURE__*/React.createElement("rect", _extends({ + x: x, + y: y, + fill: fill, + height: height, + width: width + }, this.draggableProps)); + } + }]); + + return Rectangle; +}(DraggableBase); // Prop types + + +Rectangle.propTypes = { + x: PropTypes.any.isRequired, + y: PropTypes.any.isRequired, + fill: PropTypes.string.isRequired, + height: PropTypes.any.isRequired, + width: PropTypes.any.isRequired +}; +Rectangle.defaultProps = { + x: 0, + y: 0, + fill: "#000", + height: 100, + width: 100 +}; +module.exports = Rectangle; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); + +var DraggableBase = __webpack_require__(4); + +var Circle = /*#__PURE__*/function (_DraggableBase) { + _inherits(Circle, _DraggableBase); + + var _super = _createSuper(Circle); + + function Circle() { + _classCallCheck(this, Circle); + + return _super.apply(this, arguments); + } + + _createClass(Circle, [{ + key: "render", + value: function render() { + var _this$props = this.props, + x = _this$props.x, + y = _this$props.y, + fill = _this$props.fill, + radius = _this$props.radius; + return /*#__PURE__*/React.createElement("circle", _extends({ + cx: x, + cy: y, + fill: fill, + r: radius + }, this.draggableProps)); + } + }]); + + return Circle; +}(DraggableBase); // Prop types + + +Circle.propTypes = { + x: PropTypes.any.isRequired, + y: PropTypes.any.isRequired, + fill: PropTypes.string.isRequired, + radius: PropTypes.any.isRequired +}; +Circle.defaultProps = { + x: 100, + y: 100, + fill: "#000", + radius: 100 +}; +module.exports = Circle; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); + +var DraggableBase = __webpack_require__(4); + +var Ellipse = /*#__PURE__*/function (_DraggableBase) { + _inherits(Ellipse, _DraggableBase); + + var _super = _createSuper(Ellipse); + + function Ellipse() { + _classCallCheck(this, Ellipse); + + return _super.apply(this, arguments); + } + + _createClass(Ellipse, [{ + key: "render", + value: function render() { + var _this$props = this.props, + x = _this$props.x, + y = _this$props.y, + fill = _this$props.fill, + radiusX = _this$props.radiusX, + radiusY = _this$props.radiusY; + return /*#__PURE__*/React.createElement("ellipse", _extends({ + cx: x, + cy: y, + fill: fill, + rx: radiusX, + ry: radiusY + }, this.draggableProps)); + } + }]); + + return Ellipse; +}(DraggableBase); // Prop types + + +Ellipse.propTypes = { + x: PropTypes.any.isRequired, + y: PropTypes.any.isRequired, + fill: PropTypes.string.isRequired, + radiusX: PropTypes.any.isRequired, + radiusY: PropTypes.any.isRequired +}; +Ellipse.defaultProps = { + x: 100, + y: 50, + fill: "#000", + radiusX: 100, + radiusY: 50 +}; +module.exports = Ellipse; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); + +var DraggableBase = __webpack_require__(4); + +var Line = /*#__PURE__*/function (_DraggableBase) { + _inherits(Line, _DraggableBase); + + var _super = _createSuper(Line); + + function Line() { + _classCallCheck(this, Line); + + return _super.apply(this, arguments); + } + + _createClass(Line, [{ + key: "render", + value: function render() { + var _this$props = this.props, + x = _this$props.x, + y = _this$props.y, + stroke = _this$props.stroke; + return /*#__PURE__*/React.createElement("line", _extends({ + x1: x[0], + x2: x[1], + y1: y[0], + y2: y[1], + stroke: stroke + }, this.draggableProps)); + } + }]); + + return Line; +}(DraggableBase); // Prop types + + +Line.propTypes = { + x: PropTypes.array.isRequired, + y: PropTypes.array.isRequired, + stroke: PropTypes.string.isRequired +}; +Line.defaultProps = { + x: [100, 200], + y: [50, 100], + stroke: "#000" +}; +module.exports = Line; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var React = __webpack_require__(0); + +var PropTypes = __webpack_require__(1); + +var DraggableBase = __webpack_require__(4); + +var Image = /*#__PURE__*/function (_DraggableBase) { + _inherits(Image, _DraggableBase); + + var _super = _createSuper(Image); + + function Image() { + _classCallCheck(this, Image); + + return _super.apply(this, arguments); + } + + _createClass(Image, [{ + key: "render", + value: function render() { + var _this$props = this.props, + x = _this$props.x, + y = _this$props.y, + height = _this$props.height, + width = _this$props.width, + href = _this$props.href, + opacity = _this$props.opacity; + return /*#__PURE__*/React.createElement("image", _extends({ + xlinkHref: href, + x: x, + y: y, + height: height, + width: width, + preserveAspectRatio: "xMinYMin meet", + opacity: opacity + }, this.draggableProps)); + } + }]); + + return Image; +}(DraggableBase); // Prop types + + +Image.propTypes = { + x: PropTypes.number.isRequired, + y: PropTypes.number.isRequired, + href: PropTypes.string.isRequired, + ratio: PropTypes.string.isRequired +}; +Image.defaultProps = { + x: 0, + y: 0, + ratio: "auto" +}; +module.exports = Image; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - var _super = _createSuper(CardKitDOM); +var React = __webpack_require__(0); - /** - * Constructor takes in an instance of CardKit and stores it for later use - * - * @param {CardKit} cardkit - An instance of CardKit - */ - function CardKitDOM(cardkit) { - var _this; +var PropTypes = __webpack_require__(1); - _classCallCheck(this, CardKitDOM); +var DraggableBase = __webpack_require__(4); - // Ensure we're operating in a browser environment - if (typeof document === "undefined") { - throw new Error("CardKitDOM can only be used in a browser environment"); - } +var Path = /*#__PURE__*/function (_DraggableBase) { + _inherits(Path, _DraggableBase); - _this = _super.call(this, cardkit); // Store render IDs + var _super = _createSuper(Path); - _this.renderedCardID = null; - _this.renderedUIID = null; - return _this; + function Path() { + _classCallCheck(this, Path); + + return _super.apply(this, arguments); } - /** - * Renders the built-in UI to the supplied element - * - * @param {string} id - The ID of the element to render the UI into - */ + _createClass(Path, [{ + key: "render", + value: function render() { + var _this$props = this.props, + d = _this$props.d, + fill = _this$props.fill, + transform = _this$props.transform; + return /*#__PURE__*/React.createElement("path", _extends({ + d: d, + fill: fill, + transform: transform + }, this.draggableProps)); + } + }]); - _createClass(CardKitDOM, [{ - key: "renderUI", - value: function renderUI(id) { - if (!this._isValidElement(id)) { - throw new Error("Invalid element ID provided"); - } + return Path; +}(DraggableBase); // Prop types - var element = document.getElementById(id); - var template = this.cardkit.templates ? Object.keys(this.cardkit.templates)[0] : false; - var theme = this.cardkit.themes ? Object.keys(this.cardkit.themes)[0] : false; - var layout = this.cardkit.layouts ? Object.keys(this.cardkit.layouts)[0] : false; - this.renderedUIID = id; - ReactDOM.render(React.createElement(UI, { - configuration: this.computeConfiguration({ - template: template, - theme: theme, - layout: layout - }), - templates: this.cardkit.templates, - themes: this.cardkit.themes, - layouts: this.cardkit.layouts, - cardKit: this - }), element); - } - /** - * Renders just the Card as a React component to the supplied element - * - * @param {string} id - The ID of the element to render the card into - * @param {object} options - Any override data (e.g. theme, layout) to use when rendering the card - */ - }, { - key: "renderCard", - value: function renderCard(id, options) { - if (!this._isValidElement(id)) { - throw new Error("Invalid element ID provided"); - } +Path.propTypes = { + d: PropTypes.string.isRequired +}; +Path.defaultProps = {}; +module.exports = Path; - var element = document.getElementById(id); - this.renderedCardID = id; - ReactDOM.render(React.createElement(Card, { - configuration: this.computeConfiguration(options) - }), element); - } - /** - * Checks if the ID provided is valid - * - * @param {string} id - The ID to validate - * @return {boolean} If the ID was valid - */ +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { - }, { - key: "_isValidElement", - value: function _isValidElement(id) { - if (!id) { - return false; - } +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - var element = document.getElementById(id); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - if (!element) { - return false; - } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - return true; - } - /** - * Re-renders the Card or UI - */ +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - }, { - key: "rerender", - value: function rerender() { - if (this.renderedUIID) { - this.renderUI(this.renderedUIID); - } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - if (this.renderedCardID) { - this.renderCard(this.renderedCardID); - } - } - /** - * Downloads the card as an image in the browser - * - * @param {number} scale - The scale to output at - * @param {object} element - The element to use to generate the image - */ +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - }, { - key: "download", - value: function download() { - var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2; - var element = arguments.length > 1 ? arguments[1] : undefined; - element = element.childNodes[0] || document.getElementById(this.renderedCardID).childNodes[0]; - var svgToImage = new SVGToImage(element); // Setup default filename +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - var filename = "cardkit-default.jpg"; // Get the configuration +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - var configuration = this.computeConfiguration(); // If there's a layer that has the useAsFilename property, find it +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - var filenameLayerKey = Object.keys(configuration.layers).find(function (key) { - var layer = configuration.layers[key]; - return layer.useAsFilename === true && // Has the useAsFilename property - layer.hidden !== true && // Is not hidden - layer.type === "text"; // Is of type text - }); // Get the layer that has the filename on it +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - var filenameLayer = configuration.layers[filenameLayerKey]; // Update the filename +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - if (filenameLayer) { - filename = slugify(filenameLayer.text) + ".jpg"; - } // Trigger the download +var React = __webpack_require__(0); +var PropTypes = __webpack_require__(1); - svgToImage.download(filename, { - format: "image/jpeg", - scale: scale - }); - } - }]); +var LinearGradient = /*#__PURE__*/function (_React$Component) { + _inherits(LinearGradient, _React$Component); - return CardKitDOM; -}(CardKitRenderer); + var _super = _createSuper(LinearGradient); -module.exports = CardKitDOM; + function LinearGradient() { + _classCallCheck(this, LinearGradient); -/***/ }), -/* 16 */ -/***/ (function(module, exports) { + return _super.apply(this, arguments); + } + + _createClass(LinearGradient, [{ + key: "render", + value: function render() { + var _this$props = this.props, + name = _this$props.name, + x1 = _this$props.x1, + x2 = _this$props.x2, + y1 = _this$props.y1, + y2 = _this$props.y2, + stops = _this$props.stops; + return /*#__PURE__*/React.createElement("linearGradient", { + id: name, + x1: x1, + x2: x2, + y1: y1, + y2: y2 + }, stops.map(function (stop, index) { + return /*#__PURE__*/React.createElement("stop", { + key: index, + offset: stop.offset, + stopColor: stop.color, + stopOpacity: stop.opacity + }); + })); + } + }]); -module.exports = __WEBPACK_EXTERNAL_MODULE__16__; + return LinearGradient; +}(React.Component); // Prop types -/***/ }), -/* 17 */ -/***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE__17__; +LinearGradient.propTypes = { + name: PropTypes.string.isRequired, + x1: PropTypes.number.isRequired, + x2: PropTypes.number.isRequired, + y1: PropTypes.number.isRequired, + y2: PropTypes.number.isRequired, + stops: PropTypes.arrayOf(PropTypes.shape({ + offset: PropTypes.any.isRequired, + color: PropTypes.string.isRequired, + opacity: PropTypes.number.isRequired + })).isRequired +}; +module.exports = LinearGradient; /***/ }), -/* 18 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -1248,7 +2171,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } // Dependencies -var CardKit = __webpack_require__(19); +var CardKit = __webpack_require__(30); /** * @name CardKitRenderer * @class @@ -1309,7 +2232,7 @@ var CardKitRenderer = /*#__PURE__*/function () { module.exports = CardKitRenderer; /***/ }), -/* 19 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -1320,7 +2243,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -var deepExtend = __webpack_require__(20); +var deepExtend = __webpack_require__(31); /** * @name CardKit * @class Core CardKit class used for managing a single card instance @@ -1572,13 +2495,13 @@ if (typeof window !== "undefined") { } /***/ }), -/* 20 */ +/* 31 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE__20__; +module.exports = __WEBPACK_EXTERNAL_MODULE__31__; /***/ }), -/* 21 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -1606,13 +2529,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // Styles +var PropTypes = __webpack_require__(1); // Styles -__webpack_require__(22); // Elements +__webpack_require__(33); // Elements -var _require = __webpack_require__(23), +var _require = __webpack_require__(34), Header = _require.Header, Sidebar = _require.Sidebar, Canvas = _require.Canvas; // UI class @@ -1630,7 +2553,7 @@ var UI = /*#__PURE__*/function (_React$Component) { _this = _super.call(this, props); _this.canvasRef = React.createRef(); - _this.svgRef = null; + _this.svgRef = React.createRef(); _this.state = { configuration: _this.props.configuration, template: _this.props.templates ? Object.keys(_this.props.templates)[0] : false, @@ -1700,7 +2623,7 @@ var UI = /*#__PURE__*/function (_React$Component) { return; } - this.props.cardKit.download(2, this.svgRef); + this.props.cardKit.download(2, this.svgRef.current); } }, { key: "handleSidebarChange", @@ -1714,11 +2637,6 @@ var UI = /*#__PURE__*/function (_React$Component) { value: function UNSAFE_componentWillReceiveProps(nextProps) { this.updateConfiguration(nextProps.configuration); } - }, { - key: "handleMount", - value: function handleMount(svgRef) { - this.svgRef = svgRef; - } }, { key: "render", value: function render() { @@ -1740,7 +2658,7 @@ var UI = /*#__PURE__*/function (_React$Component) { onSidebarChange: this.handleSidebarChange }), /*#__PURE__*/React.createElement(Canvas, { ref: this.canvasRef, - onMount: this.handleMount, + svgRef: this.svgRef, sidebarOpen: this.state.sidebarOpen, configuration: this.state.configuration }))); @@ -1761,14 +2679,14 @@ UI.propTypes = { module.exports = UI; /***/ }), -/* 22 */ +/* 33 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_base_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_base_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); @@ -1784,17 +2702,17 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_base_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 23 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { - Header: __webpack_require__(24), - Sidebar: __webpack_require__(27), - Canvas: __webpack_require__(48) + Header: __webpack_require__(35), + Sidebar: __webpack_require__(38), + Canvas: __webpack_require__(59) }; /***/ }), -/* 24 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -1823,11 +2741,11 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g var React = __webpack_require__(0); // Styles -__webpack_require__(25); // Images +__webpack_require__(36); // Images var images = { - logo: __webpack_require__(26) + logo: __webpack_require__(37) }; // Header class var Header = /*#__PURE__*/function (_React$Component) { @@ -1847,9 +2765,9 @@ var Header = /*#__PURE__*/function (_React$Component) { return /*#__PURE__*/React.createElement("header", { className: "header" }, /*#__PURE__*/React.createElement("img", { - src: images.logo + src: images.logo["default"] }), /*#__PURE__*/React.createElement("a", { - href: "http://github.com/times/cardkit", + href: "https://www.github.com/chrishutchinson/cardkit", target: "_blank", rel: "noreferrer" }, "About CardKit")); @@ -1864,14 +2782,14 @@ Header.propTypes = {}; // Export module.exports = Header; /***/ }), -/* 25 */ +/* 36 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); @@ -1887,7 +2805,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 26 */ +/* 37 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -1895,7 +2813,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAACcCAYAAACjgNVXAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAI3RJREFUeNrs3Xe0VdW1x/EvcEGKAioiWFDsiAZFjTX2FsPTaAQr9haf/Zmm0RSNz5bEEvVZUEREbLHEGlGJihq72KKiIiAIotI73PfHXAxR4e65Ttvl/D5j3GE069x7ztrn7DP32nPN2ayxsXEM0B4REZHaGw9sAizSVEiRNABdwz9FRERqbaGmQIqoOTBT0yAiIimZpSmQogZYIiIiIqIAS0REREQBloiIiIgCLBERERFRgCUiIiKiAEtEREREAZaIiIiIKMASERERUYAlIiIiogBLRERERBRgiYiIiCjAEhEREVGAJSIiIqIAS0REREQUYImIiIgowBIRERFRgCUiIiIiCrBEREREFGCJiIiIKMASEREREQVYIiIiIgqwRERERPKrQVOQaBYwDpgNTAG++E5g2hj+vRvQCugMrKppExERUYAlFkh9BrwJvAe8DnwOTAa+BOYBM5p4fJswnx2WCLI2BrYHeoV/b6dpFhERKb5mjY2NU0JQUI++BJ4GXgUeC8FVYzXmGfgB8GNgO2D3EJAJTAP+7hy7HbBBDl/ju8BLOT0+7YBOQGtgTWA1sptaMAxbbc6ClkDX8NlfeYmf1vrIf884YC1gkaZCFGDl20LgGeAm4HlgdArPoQewFXAMtsJVzyuJVwOnOcfuAzycw9d4AXB+AY5VF2wldvXwHt4hBL2rhEAibVsAr2Vw3loDKwIdwxyuAmwKrANsE/5b2zo+B4wJAZaIAqycmgncBdwAvJih5/VD4BTgkDoMtBqBzYCRzvEdwthuOXudVwGnF/QYLg9sCRwI7ARskuJz6ZPDALwNttK1I/Cj8HnoXWfngfEhOF64lEC9efjvX4V/FtUaWBpKkobwmZuE5QR7gvuVgAVN/L65YX4bHZ/1lYA5Cp0StQSm10uAdRVwPXarJqt6AycBx9fRm/Ax7LZp7LE8VQFWJrUC9gR+jq02KsAqzS7AtsChQM86eN8sxPJfF/H928/NQyCxDzC2gK+9I3A3tqI51zF+5XDePB742jF+P+DaJgKslsDHYX6nJfyu88NiwGzFT64A646ir5j8E/g98EIOnutrwAnAzcCl4Wq26AaV+JhT9fnNpHnAQ+FnT+BcbGVG4jwdfq7EVrRODRci7Qv6elvQ9Kr0GiF4L5o1wvlsl4jHPAuc6QyuwG5Nr5YwpnU4BklWx25vi8+aRa2D9TF2y22vnARXS3oxfCkdhW8JOK/GAfeX8LhXgH/ps5uLi5udgCOx0iYSbyYwAjgYW9G6nKZ3MhfVFIqXAL8hlgMcE1w9CuxG3ErePOf8ejZ3zdJHMu7zW8QVrCHAGRU8qXcIV44rAssB3cM/F3/gG7ByDpOA6VhZh0oERrdipSKuiPwQ5sWdlL7UPCB8eUv2DQpfJNdgq1pSmneBX2CpDucDh5ONjQUS74fAHdiuXK+rwvdao6YvP4oWYP0Ku71Wjs7YClJPYCMsabcLtlU9yVzgI+ADrOTDy8BTZQQSI7FVuKuBEwt0nBop7fbgYv8IAbSWq/NhFPAT4JYQGEh5c3lEuAC7KHxZS35sg+VQxeQ9X0195HAqwMqoKUB/LPejFF3CF8ChwPqRVxZLWg4rLrox8NPw3z7E8qtuxG7/zYz8nfOx5PdRwGUFOV7D8O8cXNbxvgdLpi6KjksE0Y0ZOTdMxnZ4jcdWab/El4i7NAvCZ3QeVp4kLVsC+1L5W23Nw2d1VDh+XwETsB1X07DV7Up6ElvFvQA4W19lubA/doclphbauSGQFgVYqV3R9ae00gs9sRyRo6jeasj64ecg4A1siX8o8bcRL8fugV9TgGN2UwV+x9CCBVidgIsz/Py+xjocPBOC44dJ3nW0NMdiNZ8OTul17AacV8O/Nw2r8zQmnKs+xGrvjQz/rRxzsNuGz2PlZzohWXU4cFvkY87ANjpkhYrkxmmT9wDrbWBX4vOtNsKWXA/HanvUymbAdeGkeDG2qhXjWmz75xU5PmafAY8kjOkVjun4JsY8E4LqbQryYcx6Eu+KWFHR7cK/f4Stolwa/neMQ4F1sWK7tTavxn+vPZZm8N36YBOxzTivY7e8XwCmlvg37gPeAe4l3TpksnRHY7vDvRrDY27N2OuYjOUap6khnIuS8g+/xlaU0zQpzwHWKOw2XGxwdRq2rJ7mlud1whXnz4DfhJOs15XY7Yi/5PS43UPy7ZmbwjF6MGHcbQUKsPJm3fBzeLho+B3+29+N4XGvU/sK5llJEl41/GwLnIztqr07XHwMK+H3fYDla96rz0SmXBTO8V4Lw/fCAxl8LX8k/duVPYDhwAoJ4/Yn/fZkC/NapuFzYI/IK+de2FL6lWSnnsxeWCL8/0Q+7q/hSy1v5mOJzk3ZAsuT8ew4+zul3aaSymkb3r8vE5dw/QG2KUXMGlh9oyeA57Db37Hn5/HhvDhc05kJF0QGVxOBvTMaXC0+f89O+cd7vp+Wgec6L48B1iKgH3E9BA/HCvdtm8HX0wLLrxpM3D3uU8KJOE/+he2ubMph4Z/7ktwQ+3Ps9oikr0dYeekT8ZjrsLwu+bbtsXSAl7AWRDFmhPPjJ5rGVA0Gfhsxfkr47AzT1DVpuQqPq6o8BlgnYtVsY64ibsPu22bZYeHqtWNEoNmf0vM20jAg4f/vyDfJz2vyzU7MptyCZMUK2KpiL+f4hcAfNG3LtAV22/BOrP6e1xdYMv+XmsJULpjvWOJC0eMt7LbuK5q+YslbgHUzcTvQrou8ikjbDliOkrctxGgsYT4PxmCViJvSB2t8u1hfx+/9F7Y7U7KhZQgIvBc09wGfatqa1A/b0HFAxGM+wXZHS+20xvJGY3bIvgbsDryv6VOAlaYPiOtBdwNWPypvdsPajHhvF95IPnIuhpK82vbdIpR70XSPssXu0Ec5UzbEbnt7zCN+N2096owlsMfk9DwEXKKpq4mVsTSUmCbnz2L1Fydp+hRgpakRK07o7YV0LdZtPK92ivzSOYtst1BYgOUkNKVnuJJbUlssFyvJXZReAFOq4xj8ZRgeRy1AvC4ibgfxOWh1pBYXFE8Qt3vzHqzE0OeaPgVYabsSa3rqcQbFKEB5OFYE1eN14PYMv5YRWJ5BU/qx9I7untYqo0ku6SC1511tGYmS3WOciX9lahFWBkKqozu2Urh5xGPuxWrBLdD0KcBK21isxo7HdlgJg6K4DquZ5XEJVtk5i65K+P9bhBPO0myN7apKMkAf58z5L6xWVpJ5WNFg8fsltpPY46mMX4Dl1Z7Av4H1Ih5zBbYzdL6mTwFWFlyOr/bF8sS3Isi6NvhvB7xNNnOxPiW5cvtPEk5SRzi/REbpI50pDViLKI+Rmq5oV/NNZf0k51L7KvZFtjO2Yzamxdrl2OqjKMDKhNewfCqPG/Cv9uTJfljxOY8s9ikcQPLKWlK+XB+Sy1fMx7a0S7bs6hw3WlNVkkH42n19ikqaVMoh2I7odhGPOYv87PiWOgmwLsB3n3rX8KYvqvOd44ZjLTeyYi7JO/zW5vvJ7d+1mmMMwECULJ016wEdHONGodsmpVgX+JNz7F81XWU7DhhCXFHokzX3CrCy5i18icttgP8r+HHaFl/rmBlkq7L5cJJv2x3gPFn1d4z5AGucK9mxGr4clfkKjkt2GtZIPsn7aJW3HGcSt7t7FrYL+jpNnQKsrLkZ2wHjuaJYvw6O1enOcSMy9Jw9iefHOH/Xj/HVxBqoj3WmtMSq8ieZi1V2l9J4V7Fu0lSVJLY8xnws/1AXfAqwMmeS88u5HfGNkvNqL2cgOQL4KgPP9xOSV9P2wOpfeb+oPSUb/ok1vZXs8Nwi/AiYrqkq2T5Yk/Qkz6DK+bEuJ67A6xisluFDmjoFWFl0h/Nk2x9Yq06OVQt8rWPGkY2E4VtIzp/rH/k7+zneszOxVi2SHS0dYzqRkQatOXaGY8wcbPeb+M9jMRfxY7FNOS9o6iSrAdY9zud+Rp0drz2c49IuVzDXcQxXweokxeiF1cVKMkgf7Uzx3CLsjOVTSul+CnRxjHtMU5WoFVYQ9KiIx4zEdny/pemTrAZYb2LF25Lsh7UoqCdbYj2vkjyf8vN8muTK3P1ILr2wNJ5VvDeAYfp4Z8ZnjjFKcC9fO2B/x7jhqCxGUzphrW9imms/D+wAvKvpkywHWMPwbdc+sg6P1/IhsFwDq/m17lJ+umXgy8pTb+eIEn/3QfjqzwzUxzszPAUuu4RVAylPH+fxGKGpWqpVsMT0HSMeMzwEY8ohlG9pyNjzWYRv+XoNYLc6PWbXAFOwvJZmS/n/F6R8XMcADySM2Qr4YYm/f7VwlZ7UPPoxbLNEZ33MUzfZMaabpqkidg/nx6R6eI8Dh2m6vqUXVhoo5r14F/5uBVJnsraCNRZ4zjFuX3zVi4uodbjaXxlYaSk/ncM/0zIQy8FqytFl/g3PbsIvsRwKSdcCfLvW1tNUVUQrYBfHuDfRbdklbQjcHxlc3aLgSvIUYI3A17B4Dx26TJpDcj/IlbBmp+XYCV/Jitvx1VKT6nmP5Hw88BXKFB9PgPUpVkpFrATOs1hXCa/L8NfwEwVYmTDcMaYTsL0OXSYNJ3kH477ENUhdmtb4kt1HYP0sJT0vklyuoxOwsaaqYno5xkxFDbbB6oc9GHlOOg/4paZO8hZgveoYs0UFvqClOgY6xlSqZ2Q/fPWV1OA2Xbc6xmyM5dZJZayFrz7gf+p8ng7F0ghiNlecCFyot5jkLcD6DF+uxs46bJk0huQChpvg66novUr31MS6B9sUILU3DN9utX00VRW1Mr6cto/reI5OxlIIvE2bFwHHAzfo7SV5DLBexRKTk2yjw5ZJA0kur3FUhf+mpxL8JNTgNi2/d4xZjtJLdsiybeAMsOoxR/EX2G5sr+lYL1T1cZTcBlgfOca0AbrrsGXOXJKT29sCB1f47+6Lr1jpEB2imrsd3+rVoUBXTVcqAdYn1N/q7mXApRHj52A1rv6pt5TkOcDyLFdvhOoaZdE/SE5u/zGweoX/bhes8GqS4cDbOkw18ym+NlYN1E+z9lrztMyZgCW714vrgbMjxo/D6i2qK4TURYC1MepXlkWDHWOOrtLfPriCz1HKNwOrJu4pLnoQ0FNTVrUAq0XCmNnUT/Xxu4ETIsZ/iJW7eF5vJcl7gDUHy5VJso4OWeaMAh5OGLM+VmumGnbB15NyUPhCkeqZiuXFeVYLlwN+pymrmq5Ae8e4cQWfhxWwAqIxtfdeD+erUXobSRECrK/wNYRdU4cscwaSXOeoL9Vr37McvppYE4ChOlxV8yHwo/Bl5vEXfMVipTSr4OvZWeQVrK5Y4/n9Ih7zVHgfqwirFCbAmg587Ri3og5ZpiwkOYG8AV9rm3J4e6qpdU513IVV13/LOf5AbJu8VE97fO3EilqqoXMI9reIeMw/sZyrmXr7SJECrKkkt8hpjTUxley4x3Gl1wfoUeXnsRG++lrD8O1WFZ/XsdXDg7AVQo/N0Xb3WmjAdu4mmV/A194b+DfxDeW7YjXERAoVYHmajrbEtyVfameQY8xhNXounr8zF90mLNcU7DZKP2CHEGR7bYIVo+2gaayJuY4xrQv2mnsDDxHXV3CxTbFk+OZ660iRAixPomUrqpfHI/H+Q3JtmNWpXnL7d/3EefU5wPnFU6+fxe+ajSWt3wKcjvUB3S18Ec2K+D27Av8q8YtPSuNpKVakJPe9sFXqcuqq7QJcp7eOVEJWApavHGNWQv3KsuQukpPb98d28dTCylitraRyDJ9gzV37Zmw+P8eKbmblvDAVq2c1HeuwUGq9pGbAr7D+bS30sakpT0rFhIK81gOoXI7lCViT+Ov1FpIiBFie59FcJ+jMWICvsfOxNX5e/fHVu7ojgwHWjPC8imQX4DfAHvrIpMKTetGqAK/zWODaCv/Ov2ErtyP0NpJS5elecyP12TcrizzJ7bsCm9X4ee2Or0XIMIpf/yctywE7hvfIUwquMh9g5d2Z2KaJSgeKDdgqvUoDSV0EWJIdnt5+h6f0fvb83emoAXQlrY7dnj0HeAHLtfqZpkWq7PdYPTWvCcTd9lsNuFPfk5L3AKvR+Vx1izB9o4DHE8Z0AX6a0vPri62iJLkerYhWwgbAMdgtmj9hZRgkGzypFwtz+tquJq4TwGfhIuAkbKOL17aRQZxI5gIsj7nE7VqS6hgCzEsYsw/pFYXdCLtFleR9bKVFyvMZlq+yBdYr9DfYrUFJ3wzHmLzkYC3+rmoZgqtTIh47Btth+Gb495OAlyMefzpwlN5OktcAa23HmC8pzo6XvJoH3OwYd3zKz9O7G0+7hMo3E+vC8BXwHnAxVsZhJ3wbIaR6PFXau+fgdTTjm5zJByODqzeA7YB3lvhvC7BdhzHfJzcAW+ktJXkMsDxb+edTzKrDefIQtnW/KZsB26T8PPcHOjnGDcPKI0jlPQMcja1mqq9bOjypF3koNDoFuxV9PbB3xOOGYxtfltbndlx4f3q1xJLeV9XbSryyUqbBk1s1G5ikQ5aqGx1jTsrA8+yAJVknrVB9ie12OyUDz7nLEs83K7u/mmN5auOBsVhrnBHENQh+FGtZMgDYVx+hzF1A5+GidQWsqHGXiMc8F95vTb1XHwfOBi53/s61sTIw2hkruQqwVghXUkn9CL/SIUvNe1hn+qZ0JK5zfTUdjO8W4MCMBFjtcxKAfBpWBv4GvOJ8zOTwvriJ2tdGq1dfO8+X3XLwWlaKHH9LuNCb5xj7Zyx38Bjn794duAz4hd5iUokrnFro6Lw6Ue2i9AwmucXMnpFXmdW0Hdb7LsmrwEsZeL4LcvI+WAs4EksSvpa4voLHAU/qo1QTs/C1hFqhYK/7jhAszYt4zMnAyIjxZ0cEZKIAK3Ur4mvrMFaHLBXT8SUsn5Sh59wKf6PpG3WIS/JzbFXzBxGP6Y/dcpTqmgRMc4zrWqDXfDGltZuai6UUTI54zI3YzlmRzAdYDfj6DI7SIUvFo44vxU2w8ggLsdWYtH8agT7OK/QHKL3XXr3bHMtl2cw5fgLWm1CqawLJKRfga5CeB+dhJUJKNQo4JPK783bs7ovIMgObrPDkArwdvgg71PlxW4Ql/bdcxv+/MBzbBmyLc7k8uUwTga2xpNksJGm3CCdBz623L7BbCyfplFCSLlheVm98pQEGh7neXlNXNeNJLqS7CsW4RXgaVhurXMOAs/AXFt0Q6wihpHfJfIDVwzFmNFY0btM6P27PYMnCy7p6moPteLmN+ATRpQW1zzmDlC9yPKf3KsAqS4fwftsZ3860PwGPaNqqxlMaozv5X8E6BBhawd/3V2BL/Lcad8cS5f9HbznJeoDV0nFyfk0BFu86VgomV+hvDSYuYTSvngrvrd46LZRsu/BFc7Fj7KNY8ceemraqGOMMsJbL6eubApyI1aaqtKOB9bDyIh5nYUnyt+ptJ0vKUqucjbEl6yQv6LAlFvtcHLCW265mRpVOYFm0CMupkPL8Cmv+7HGnpqsqZvHtyuXLsk5OX99srOxHtc5N87AVrJgV+WvDd5hIJgOsDvhWphRg2QpWktUoP//qYeqrCvfQcGUspeuIv1XS85quqhiP3dpPskEOX9s4YBcsTaKaPsJ2vHq1BR6j/JQMUYBVNVs53/jv1/Exm40V/UzSowJ/64Y6/GK6T6eFsh2Nr4nwSGxzhFTWBySnWjTDboPlycdYQvm/a/T3Hicut2pNdJtQMhxg7eoYMxNrm1CvPg5BZrWvTt8Bnq3D+b1Lp4WydcNX0f8LVHqlGjybUlYnrn5Z2t4LwdV/avx3/4Jt3vDqA1yot6BAtpLcwVawupGcoPkkcGqdHrMRjjGtsPpE5bjNeRXcGctfWpThOWsenqunl+UT2C1Y5VOUZz9sC3uS/6ByDZXmqZbfE2vPlAfTgYPwlQCphuPCBevWzvHnAm9gfU5FAVZmLI9t8x6UMO5pLNF7rTo8ZsMcY9ahvBWsGc6rthOB34VAbGGG56xF+LkQuC5h7EJsFev3Oj2UfbHk6S/6nqaqosbiS3DfLkevaT5WODUt87B8rJfx12C8FfgQeFNvSQVYWbKXI8CaBtwPnF5nx2sGvvyDncr8O4+QXLm9BXAC2ek96HEaMIDkshO3AL/N6OcjL9bHVgFfSxj3kaaqov6OpVEk2TlHr6k5VhB1corP4UOsgfyjzvFtsRXczbBdnVKHmmfwOe0NdHKMG0C2V02q4Tl89W3KPXkOcIzZgvJvQ9baRviW+cegIpjlaobvNusEslH5vyjud4zphm9DkXzbY8D5kRcZgzVtCrCyZCV8ye5vhTd8PRniGNMG2LaMv/E2vk0ER+R0Do90jrtJp4eybeIYMxZfOyNJNhJrWZSkXzhPSLwLiMut2h9f4V1RgFUzRzvHXVlHx2q884P9Q8rLTfOsXrXHkk7zqC++9iBPoB1u5VrbMWYOvqbEkuz/nOP21FSV5Th8eW6L/Qo4UNOmACsr9sZ3e+EJql9wLituxWpgJelTxt+YieVwJDkU323cLGqPb/VtDtoFVK5uJBe7nY2vM4E0bSKWO5hkPeBHmq6yTMVWpqZEXriqLZQCrMz4b+e4C+rgOM3HV/SzLfDTMv7O/fhyvPrmfD7740tgH4jyg8rRleRedwvRClYlXOScx77Y7k4pz4fAsZEXdneT396PUrAA60h8Pc2GUfzquTcAox3j9qa86sw3Osb8gPJ3KaZtc2BLx7j38dUUkqVbBSu90pRm+Kq+y7K9i+/2YBustIpUxt+B8yLG9wDu0LQpwMqCdsDZzrHnYaUbimgqcJlzbDknz1fx3W49CCvRkHfeHLIbdJooWStgjYQx81C7nHKdSXLpEbDk9rU0XRV1IXBvxPj9sUKkogArdSfiW8UaC5xT0GN0Eb4clU0przzDTSTfDmuF5V8VweFYbZ0kj4T3l8RrILn5baMCrLL8Bd+u3+bAWZquqjiWuKT3CykvV1YUYFVEG+AS59hr8NWAyZNX8a9enUPpt1qmOOduf3w7w/KgE3CIY9xM4AGdKkrSzHmB1EJTVZJn8Tcj7k++eg/myVQst21KxGPuxuryiQKsVB2ClR7wOBH4siDHZmG4MvIkWW+CLf+X6jHgc+exKJL+znG361RRspaOMaqYH29ixOexPfAHTVlVvQccEzG+NVbXcHlNnQKstJ/jNc6xk7AaL3MLcGzOwt/H6rwyj+X1jjFrArsX7P2/rfOq/kWsir7E6+YYM17TFB1c7Q185hx/Icq9qoX7iOthujlws6ZNAVbatsS/W+M1/CsTWTUEuMo5dlfKW716HV/154OxjQdF0gJ/Tpkqu5emrWPMZE2T2ydYKZY3nOO3A07RtNXMH4irn9cX+IWmTQFW2v6IvwP83eS3VtNT+Nu5NAB/LfPveQKHFhHPKW8OdwYB92MrpBLHc4uwmabJ5eFwsfmic3x7bIVE81tb/bHSGV6XYvmtogArVYOAjs6x9wCHYUU68+JpYD/8vdnOobzE1Wn4KrfvRHGrEK+OrzjrVJTsXgrPralPNE1NWgT8Cdt59lXE4/4GbKjpq7k52Mr4jIjH3AKso6lTgJWmdYlLOB4C7IivOnnangH2jfhQ7kjc/f6luQ9fcnvRixN6e18O1Skjmqdq+AxN0zI9ibW2+W3k4/5I/lMl8uxN4kradAgXu0p6V4CVqn2w2i9eL2IrMI9m+DVdhyWQe79o2mK9rcpd+h/kGNOV4iW3f9f2+LZMP4XlrInfKo4xX2uavuddrKnwXsDzkY89krgK41Id/yCulVsvfN00RAFWVZ0J/DJi/OgQmJ2Lr2FyrUwDTgdOJu5W5iDKa4mz+ArrKce4PiQXi8y7Nlgulocqu1f+HPMFMEtTBcCDWPmFTcNF1MLIxx+C9dCUbDgfu1PgdTAqCKsAKwMuAX4T+ZiLsJpaD2bg+T8KbIV/t+BifwN+VoG/790Vd2SdfBYOxLdL8gGs+Kj4rIQVdW3KOOq3VMMk4N/hovEHWA7mUCzvKtavsbQIyZYjgLcixv8ZKzckCrBSdVEJ0f7b4STWF195gkp7EzgeW1H7IPKxZwD/XYHnMBPfVuJe2O2zerAhsINj3ITIK9J6147kvJJp1K5dTpqNpRdiba8ewHb/HorVQtoGuCLyS/i7rgD+V2+3TJoRjnVMv9xbSO7jKRlXhArKf8aKYJ4Z+bh7ws9ewFHhnytW8Xm+jBX0HEJptynPoPySDEu+dk9y+wl19nk4FnjcMW4w/luK9a4Dvp2/Y2oUzE+leuU2vgiBYssQiH8V/tZHWFHQieHfK/n3e2Cr4LvrrZZpb2OV3r01slYLF3Lb42vkLQqwquYMrGL0CcS3ynk8/KyKbdf/L2ADYP0KPK+RWOHToVhD1sYSf8/l+HuOeQx2jGlD/dVm2QfrtTja8Z55h+KWrqikVs4Ll5HUphXTAHybO0oxj/icqXIcEi66VtXbLBfuxXZ3nu8cvyXWxeR4TZ0CrLQdgC23/9y5CvFdE7EVpuuxAn2bAN2xW0fdQwDXAei8lCvyceFq9XPgQ6wv1dvYjrNy6nCtEJ5PJb94XsW2fifpi+0grCftsJwzT9+2IVhtIknWyTFmeI2eywL8deayqhfW/qaP3lq58zugd8SxOy58p1yqqVOAlbbuWOPii7EaUaX2JJyGbY1ecnt0C2zpvzXfz+OYFf5WJYua9gRuBbao8BzdiG8l7eA6/UwchOWyJC3LDwkny1Y6jSTq4hjzCnZbrauma5nWw9renIivvphk09HAC/h3gl8CvEQ6OcNShuYFfV2/Dm/gH1fwdy7EKvRO4Zs8isU/MyocXP0S21lU6eBqInCXY9zG1G9ORw98uUCjsSV/SbaZY8wCfGVD6tHW2Er2a1hZFwVX+TYZS0eZE/GYuym/NI8owKqYzYFHgDvJT67Mrli7nEuoTmPle/AVdTwQXw+5ojrCOU6V3f0Bgudco4D1G92x1dRh2MrFCVjKgBTDO8BJEeM7Yavm6iupACtT+mG5UFc5r6TTsFv4sn4S2LlKf2MRvho5Lamf2lfL0hffba3HsPwIadrGzouch4GP63ieNsFySG8L56yh4dygFatiujVcTHttha1kigKsTGkJnAo8G66Sd8YS1tPUDrsN9wDwRLharaYn8bXc2BM1HW2HbxVrHnCzY5znVsCUAs9nM3wbNeZhu2VLTUKfnpP5aI01wd4S6+IwGHgDeA64FisB0gGpB7/G7rR4HY/tmpccaKiz17s8ttvwAKzX1xC+SR6cX6PnsHUI8Pphu0lq5ZUQOLVZxv+/CEt+/7k+FgAchpXWmMWyb5cuwIrFLkq4WFkN243agqUv8c+rg6D2KOD+EEguaz4bsTyjV8PnJFZPLFE+7Y0HC7Gdxp3Da+qK7UxeE+vN2B1brVJjXwGrv/cCViLG48/hfP6cpi7jV5aNjY1TdLXEe1gdnpfCG/1jrOxCuUFXR6xGzWbYUn9vbIt1GoHtlHCyb2giwELvhW+Zja0+NTTxRboAawfTVIA1LwRqzZcRYC0IQUfRv3DnYxtCGpoIsBavXpXS/3Lxbt60LxwXYaugDfoIVezc1Rv4pMCvsTdWjNp7V+lzrAPApwnjDgVuTxjzSfj7U3IwTz3Dd3RSPuK2wItpP1mdAEyP8LP4Nt20EHB9CozFdn1MDF8Qny0OTpf4UmgVrlKbYe0N1g4/G2L1s7JwK7ajDnO0Nix7xS9GK1TOgRBEVrNbQtvwI8XSsQ6+q17DKr0PdI7vgqWW7EjTXTk8m6XWID/pQi3xbfZYLgtPVitYIiKSpi+x3KJlNbiej6VxzKqDudjJeTHcLARPT9B066U1SC73M4vapsmUY4UQVCYF3M/g2zGvAEtERAprNJaXJlIozTUFIiKSogZ9F4kCLBERERFRgCUiIiKiAEtEREREAZaIiIiIKMASERERUYAlIiIiogBLRERERAGWiIiIiCjAEhEREVGAJSIiIqIAS0REREQUYImIiIgowBIRERFRgCUiIiIiCrBEREREFGCJiIiIKMASEREREQVYIiIiIgqwRERERBRgiYiIiCjAEhEREREFWCIiIiIKsEREREQUYImIiIiIAiwRERGRlAOsdpoGERFJSVtNgRRRAzABaK+pEBGRFEzUFEgR/f8A5tThZxe18LcAAAAASUVORK5CYII="); /***/ }), -/* 27 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -1923,18 +2841,18 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // Styles +var PropTypes = __webpack_require__(1); // Styles -__webpack_require__(28); +__webpack_require__(39); -var _require = __webpack_require__(29), +var _require = __webpack_require__(40), Content = _require.Content, Template = _require.Template, Theme = _require.Theme, Layout = _require.Layout; -var PanelButton = __webpack_require__(47); // Sidebar class +var PanelButton = __webpack_require__(58); // Sidebar class var Sidebar = /*#__PURE__*/function (_React$Component) { @@ -2106,14 +3024,14 @@ Sidebar.propTypes = { module.exports = Sidebar; /***/ }), -/* 28 */ +/* 39 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8); @@ -2129,18 +3047,18 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 29 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { - Content: __webpack_require__(30), - Template: __webpack_require__(39), - Theme: __webpack_require__(42), - Layout: __webpack_require__(44) + Content: __webpack_require__(41), + Template: __webpack_require__(50), + Theme: __webpack_require__(53), + Layout: __webpack_require__(55) }; /***/ }), -/* 30 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -2168,12 +3086,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); +var PropTypes = __webpack_require__(1); -var LayerConfig = __webpack_require__(31); // Styles +var LayerConfig = __webpack_require__(42); // Styles -__webpack_require__(38); // Content class +__webpack_require__(49); // Content class var ContentPanel = /*#__PURE__*/function (_React$Component) { @@ -2245,7 +3163,7 @@ ContentPanel.propTypes = { module.exports = ContentPanel; /***/ }), -/* 31 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -2273,19 +3191,19 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // Styles +var PropTypes = __webpack_require__(1); // Styles -__webpack_require__(32); // Require in our controls +__webpack_require__(43); // Require in our controls -var TextControl = __webpack_require__(33); +var TextControl = __webpack_require__(44); -var SizeControl = __webpack_require__(34); +var SizeControl = __webpack_require__(45); -var ColorControl = __webpack_require__(35); +var ColorControl = __webpack_require__(46); -var SourceControl = __webpack_require__(37); // LayerConfig class +var SourceControl = __webpack_require__(48); // LayerConfig class var LayerConfig = /*#__PURE__*/function (_React$Component) { @@ -2402,14 +3320,14 @@ LayerConfig.propTypes = { module.exports = LayerConfig; /***/ }), -/* 32 */ +/* 43 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); @@ -2425,7 +3343,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 33 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } @@ -2455,7 +3373,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // TextControl class +var PropTypes = __webpack_require__(1); // TextControl class var TextControl = /*#__PURE__*/function (_React$Component) { @@ -2528,7 +3446,7 @@ TextControl.propTypes = { module.exports = TextControl; /***/ }), -/* 34 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } @@ -2558,9 +3476,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); +var PropTypes = __webpack_require__(1); -var helpers = __webpack_require__(4); // SizeControl class +var helpers = __webpack_require__(5); // SizeControl class var SizeControl = /*#__PURE__*/function (_React$Component) { @@ -2631,7 +3549,7 @@ SizeControl.propTypes = { module.exports = SizeControl; /***/ }), -/* 35 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -2659,13 +3577,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var _require = __webpack_require__(36), +var _require = __webpack_require__(47), ChromePicker = _require.ChromePicker, CirclePicker = _require.CirclePicker; -var PropTypes = __webpack_require__(3); +var PropTypes = __webpack_require__(1); -var helpers = __webpack_require__(4); // ColorControl class +var helpers = __webpack_require__(5); // ColorControl class var ColorControl = /*#__PURE__*/function (_React$Component) { @@ -2739,13 +3657,13 @@ ColorControl.propTypes = { module.exports = ColorControl; /***/ }), -/* 36 */ +/* 47 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE__36__; +module.exports = __WEBPACK_EXTERNAL_MODULE__47__; /***/ }), -/* 37 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -2773,7 +3691,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // SizeControl class +var PropTypes = __webpack_require__(1); // SizeControl class var SizeControl = /*#__PURE__*/function (_React$Component) { @@ -2863,14 +3781,14 @@ SizeControl.propTypes = { module.exports = SizeControl; /***/ }), -/* 38 */ +/* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10); @@ -2886,7 +3804,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 39 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -2914,12 +3832,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); +var PropTypes = __webpack_require__(1); -var CardTemplate = __webpack_require__(40); // Styles +var CardTemplate = __webpack_require__(51); // Styles -__webpack_require__(41); // TemplatePanel class +__webpack_require__(52); // TemplatePanel class var TemplatePanel = /*#__PURE__*/function (_React$Component) { @@ -3004,7 +3922,7 @@ TemplatePanel.propTypes = { module.exports = TemplatePanel; /***/ }), -/* 40 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -3032,7 +3950,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // CardTemplate class +var PropTypes = __webpack_require__(1); // CardTemplate class var CardTemplate = /*#__PURE__*/function (_React$Component) { @@ -3082,14 +4000,14 @@ CardTemplate.propTypes = { module.exports = CardTemplate; /***/ }), -/* 41 */ +/* 52 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); @@ -3105,7 +4023,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 42 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -3133,10 +4051,10 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // Styles +var PropTypes = __webpack_require__(1); // Styles -__webpack_require__(43); // ThemePanel class +__webpack_require__(54); // ThemePanel class var ThemePanel = /*#__PURE__*/function (_React$Component) { @@ -3191,14 +4109,14 @@ ThemePanel.propTypes = { module.exports = ThemePanel; /***/ }), -/* 43 */ +/* 54 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); @@ -3214,7 +4132,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 44 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -3242,12 +4160,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); +var PropTypes = __webpack_require__(1); -var CardLayout = __webpack_require__(45); // Styles +var CardLayout = __webpack_require__(56); // Styles -__webpack_require__(46); // LayoutPanel class +__webpack_require__(57); // LayoutPanel class var LayoutPanel = /*#__PURE__*/function (_React$Component) { @@ -3307,7 +4225,7 @@ LayoutPanel.propTypes = { module.exports = LayoutPanel; /***/ }), -/* 45 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -3335,7 +4253,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // CardLayout class +var PropTypes = __webpack_require__(1); // CardLayout class var CardLayout = /*#__PURE__*/function (_React$Component) { @@ -3391,14 +4309,14 @@ CardLayout.propTypes = { module.exports = CardLayout; /***/ }), -/* 46 */ +/* 57 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); @@ -3414,7 +4332,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 47 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -3442,7 +4360,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // PanelButton class +var PropTypes = __webpack_require__(1); // PanelButton class var PanelButton = /*#__PURE__*/function (_React$Component) { @@ -3491,7 +4409,7 @@ PanelButton.propTypes = { module.exports = PanelButton; /***/ }), -/* 48 */ +/* 59 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -3519,13 +4437,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g // Libraries var React = __webpack_require__(0); -var PropTypes = __webpack_require__(3); // Styles +var PropTypes = __webpack_require__(1); // Styles -__webpack_require__(49); // Card +__webpack_require__(60); // Card -var Card = __webpack_require__(14); // Canvas class +var Card = __webpack_require__(15); // Canvas class var Canvas = /*#__PURE__*/function (_React$Component) { @@ -3533,29 +4451,20 @@ var Canvas = /*#__PURE__*/function (_React$Component) { var _super = _createSuper(Canvas); - function Canvas(props) { - var _this; - + function Canvas() { _classCallCheck(this, Canvas); - _this = _super.call(this, props); - _this.handleMount = _this.handleMount.bind(_assertThisInitialized(_this)); - return _this; + return _super.apply(this, arguments); } _createClass(Canvas, [{ - key: "handleMount", - value: function handleMount(svgRef) { - this.props.onMount(svgRef); - } - }, { key: "render", value: function render() { return /*#__PURE__*/React.createElement("div", { className: "canvas" + (this.props.sidebarOpen ? " canvas--with-sidebar" : "") }, /*#__PURE__*/React.createElement(Card, { configuration: this.props.configuration, - onMount: this.handleMount + svgRef: this.props.svgRef })); } }]); @@ -3566,20 +4475,20 @@ var Canvas = /*#__PURE__*/function (_React$Component) { Canvas.propTypes = { sidebarOpen: PropTypes.bool, configuration: PropTypes.object.isRequired, - onMount: PropTypes.func + svgRef: PropTypes.any.isRequired }; // Export module.exports = Canvas; /***/ }), -/* 49 */ +/* 60 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14); @@ -3595,7 +4504,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_style_scss__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].locals || {}); /***/ }), -/* 50 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -3606,7 +4515,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -var helpers = __webpack_require__(4); +var helpers = __webpack_require__(5); /** * @name SVGToImage * @class Used for downloading an SVG DOM element in your browser diff --git a/examples/browser-script/index.html b/examples/browser-script/index.html index 30592ea..796ae14 100644 --- a/examples/browser-script/index.html +++ b/examples/browser-script/index.html @@ -22,8 +22,9 @@
- - + + + diff --git a/examples/configurations/sample.js b/examples/configurations/sample.js index e7c4b33..e93e583 100644 --- a/examples/configurations/sample.js +++ b/examples/configurations/sample.js @@ -89,8 +89,7 @@ var configuration = { text: true, fontSize: true, }, - text: - "Created by The Times of London, available on GitHub at github.com/times/cardkit", + text: "Available on GitHub at github.com/chrishutchinson/cardkit", }, features: { type: "text", diff --git a/index.html b/index.html index 9987c46..c732d44 100644 --- a/index.html +++ b/index.html @@ -1,250 +1,257 @@ - - CardKit - - - + + CardKit + + + +
-
- - - - - - + + + + - - \ No newline at end of file + // Render the UI + renderer.renderUI("ui"); + + + diff --git a/package-lock.json b/package-lock.json index 6d6f345..05bb609 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cardkit", - "version": "2.0.6", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -13422,6 +13422,16 @@ } } }, + "webpack-merge": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.7.3.tgz", + "integrity": "sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, "webpack-sources": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", @@ -13550,6 +13560,12 @@ "string-width": "^1.0.2 || 2" } }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, "window-size": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", diff --git a/package.json b/package.json index 36d2c7f..65ad906 100644 --- a/package.json +++ b/package.json @@ -3,29 +3,29 @@ "version": "3.0.0", "description": "A simple, powerful and fully configurable image editor for web browsers and servers. Optional UI included.", "main": "cardkit.js", - "homepage": "https://times.github.io/cardkit", + "homepage": "https://chrishutchinson.github.io/cardkit", "bugs": { - "url": "https://github.com/times/cardkit/issues" + "url": "https://github.com/chrishutchinson/cardkit/issues" }, "repository": { "type": "git", - "url": "https://github.com/times/cardkit.git" + "url": "https://github.com/chrishutchinson/cardkit.git" }, "scripts": { - "test": "./node_modules/.bin/istanbul cover --dir test/coverage ./node_modules/.bin/_mocha -- --require @babel/register --require ignore-styles", - "jsdoc": "./node_modules/.bin/jsdoc -c ./jsdoc.config.json -d ./docs/code -t ./node_modules/minami --verbose -R ./README.md", - "demo": "./node_modules/webpack/bin/webpack.js --env=dist-docs", - "docs": "npm run jsdoc; npm run demo", - "start": "./node_modules/webpack-dev-server/bin/webpack-dev-server.js -d --content-base ./src --hot --open", + "test": "istanbul cover --dir test/coverage _mocha -- --require @babel/register --require ignore-styles", + "jsdoc": "jsdoc -c ./jsdoc.config.json -d ./docs/code -t ./node_modules/minami --verbose -R ./README.md", + "demo": "webpack --env=dist-docs", + "docs": "npm run jsdoc", + "start": "webpack-dev-server -d --content-base ./src --hot --open", "dist": "npm run build", "build": "echo \"[NOTICE] This task will build ALL CardKit versions\"; echo \"[LOG] Building DOM library\"; npm run build-dom; echo \"[LOG] Building server library\"; npm run build-server; echo \"[LOG] Building core library\"; npm run build-core; echo \"[LOG] Building DOM