dbf-mirador-annotation-editor 1.5.0-testing14 → 1.5.0-testing15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -189,7 +189,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
189
189
|
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
190
190
|
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
191
191
|
}
|
|
192
|
-
`),D.createElement("div",{style:g.white,className:"saturation-white"},D.createElement("div",{style:g.black,className:"saturation-black"}),D.createElement("div",{style:g.pointer},this.props.pointer?D.createElement(this.props.pointer,this.props):D.createElement("div",{style:g.circle}))))}}]),e})(D.PureComponent||D.Component);function wN(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var cJ=pN(Object.keys,Object),dJ=Object.prototype,fJ=dJ.hasOwnProperty;function hJ(n){if(!u4(n))return cJ(n);var e=[];for(var t in Object(n))fJ.call(n,t)&&t!="constructor"&&e.push(t);return e}function p4(n){return bp(n)?CN(n):hJ(n)}function pJ(n,e){return n&&cN(n,e,p4)}function gJ(n,e){return function(t,r){if(t==null)return t;if(!bp(t))return n(t,r);for(var i=t.length,a=-1,s=Object(t);++a<i&&r(s[a],a,s)!==!1;);return t}}var AN=gJ(pJ);function mJ(n){return typeof n=="function"?n:ky}function vJ(n,e){var t=Fs(n)?wN:AN;return t(n,mJ(e))}function iy(n){"@babel/helpers - typeof";return iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iy(n)}var yJ=/^\s+/,bJ=/\s+$/;function Dt(n,e){if(n=n||"",e=e||{},n instanceof Dt)return n;if(!(this instanceof Dt))return new Dt(n,e);var t=xJ(n);this._originalInput=n,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}Dt.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(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,i,a,s,u;return t=e.r/255,r=e.g/255,i=e.b/255,t<=.03928?a=t/12.92:a=Math.pow((t+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?u=i/12.92:u=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*s+.0722*u},setAlpha:function(e){return this._a=RN(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=jR(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=jR(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+i+"%)":"hsva("+t+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=PR(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=PR(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+i+"%)":"hsla("+t+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return FR(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return _J(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Jr(this._r,255)*100)+"%",g:Math.round(Jr(this._g,255)*100)+"%",b:Math.round(Jr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Jr(this._r,255)*100)+"%, "+Math.round(Jr(this._g,255)*100)+"%, "+Math.round(Jr(this._b,255)*100)+"%)":"rgba("+Math.round(Jr(this._r,255)*100)+"%, "+Math.round(Jr(this._g,255)*100)+"%, "+Math.round(Jr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:PJ[FR(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+BR(this._r,this._g,this._b,this._a),r=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var a=Dt(e);r="#"+BR(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return a?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Dt(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(RJ,arguments)},brighten:function(){return this._applyModification(IJ,arguments)},darken:function(){return this._applyModification(OJ,arguments)},desaturate:function(){return this._applyModification(TJ,arguments)},saturate:function(){return this._applyModification(wJ,arguments)},greyscale:function(){return this._applyModification(AJ,arguments)},spin:function(){return this._applyModification(DJ,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(LJ,arguments)},complement:function(){return this._applyCombination(NJ,arguments)},monochromatic:function(){return this._applyCombination(kJ,arguments)},splitcomplement:function(){return this._applyCombination(MJ,arguments)},triad:function(){return this._applyCombination(GR,[3])},tetrad:function(){return this._applyCombination(GR,[4])}};Dt.fromRatio=function(n,e){if(iy(n)=="object"){var t={};for(var r in n)n.hasOwnProperty(r)&&(r==="a"?t[r]=n[r]:t[r]=pm(n[r]));n=t}return Dt(n,e)};function xJ(n){var e={r:0,g:0,b:0},t=1,r=null,i=null,a=null,s=!1,u=!1;return typeof n=="string"&&(n=GJ(n)),iy(n)=="object"&&(wu(n.r)&&wu(n.g)&&wu(n.b)?(e=SJ(n.r,n.g,n.b),s=!0,u=String(n.r).substr(-1)==="%"?"prgb":"rgb"):wu(n.h)&&wu(n.s)&&wu(n.v)?(r=pm(n.s),i=pm(n.v),e=EJ(n.h,r,i),s=!0,u="hsv"):wu(n.h)&&wu(n.s)&&wu(n.l)&&(r=pm(n.s),a=pm(n.l),e=CJ(n.h,r,a),s=!0,u="hsl"),n.hasOwnProperty("a")&&(t=n.a)),t=RN(t),{ok:s,format:n.format||u,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function SJ(n,e,t){return{r:Jr(n,255)*255,g:Jr(e,255)*255,b:Jr(t,255)*255}}function PR(n,e,t){n=Jr(n,255),e=Jr(e,255),t=Jr(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,s,u=(r+i)/2;if(r==i)a=s=0;else{var c=r-i;switch(s=u>.5?c/(2-r-i):c/(r+i),r){case n:a=(e-t)/c+(e<t?6:0);break;case e:a=(t-n)/c+2;break;case t:a=(n-e)/c+4;break}a/=6}return{h:a,s,l:u}}function CJ(n,e,t){var r,i,a;n=Jr(n,360),e=Jr(e,100),t=Jr(t,100);function s(h,g,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?h+(g-h)*6*v:v<1/2?g:v<2/3?h+(g-h)*(2/3-v)*6:h}if(e===0)r=i=a=t;else{var u=t<.5?t*(1+e):t+e-t*e,c=2*t-u;r=s(c,u,n+1/3),i=s(c,u,n),a=s(c,u,n-1/3)}return{r:r*255,g:i*255,b:a*255}}function jR(n,e,t){n=Jr(n,255),e=Jr(e,255),t=Jr(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,s,u=r,c=r-i;if(s=r===0?0:c/r,r==i)a=0;else{switch(r){case n:a=(e-t)/c+(e<t?6:0);break;case e:a=(t-n)/c+2;break;case t:a=(n-e)/c+4;break}a/=6}return{h:a,s,v:u}}function EJ(n,e,t){n=Jr(n,360)*6,e=Jr(e,100),t=Jr(t,100);var r=Math.floor(n),i=n-r,a=t*(1-e),s=t*(1-i*e),u=t*(1-(1-i)*e),c=r%6,h=[t,s,a,a,u,t][c],g=[u,t,t,s,a,a][c],v=[a,a,u,t,t,s][c];return{r:h*255,g:g*255,b:v*255}}function FR(n,e,t,r){var i=[ul(Math.round(n).toString(16)),ul(Math.round(e).toString(16)),ul(Math.round(t).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function _J(n,e,t,r,i){var a=[ul(Math.round(n).toString(16)),ul(Math.round(e).toString(16)),ul(Math.round(t).toString(16)),ul(IN(r))];return i&&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)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function BR(n,e,t,r){var i=[ul(IN(r)),ul(Math.round(n).toString(16)),ul(Math.round(e).toString(16)),ul(Math.round(t).toString(16))];return i.join("")}Dt.equals=function(n,e){return!n||!e?!1:Dt(n).toRgbString()==Dt(e).toRgbString()};Dt.random=function(){return Dt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function TJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.s-=e/100,t.s=Fy(t.s),Dt(t)}function wJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.s+=e/100,t.s=Fy(t.s),Dt(t)}function AJ(n){return Dt(n).desaturate(100)}function RJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.l+=e/100,t.l=Fy(t.l),Dt(t)}function IJ(n,e){e=e===0?0:e||10;var t=Dt(n).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),Dt(t)}function OJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.l-=e/100,t.l=Fy(t.l),Dt(t)}function DJ(n,e){var t=Dt(n).toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,Dt(t)}function NJ(n){var e=Dt(n).toHsl();return e.h=(e.h+180)%360,Dt(e)}function GR(n,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Dt(n).toHsl(),r=[Dt(n)],i=360/e,a=1;a<e;a++)r.push(Dt({h:(t.h+a*i)%360,s:t.s,l:t.l}));return r}function MJ(n){var e=Dt(n).toHsl(),t=e.h;return[Dt(n),Dt({h:(t+72)%360,s:e.s,l:e.l}),Dt({h:(t+216)%360,s:e.s,l:e.l})]}function LJ(n,e,t){e=e||6,t=t||30;var r=Dt(n).toHsl(),i=360/t,a=[Dt(n)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,a.push(Dt(r));return a}function kJ(n,e){e=e||6;for(var t=Dt(n).toHsv(),r=t.h,i=t.s,a=t.v,s=[],u=1/e;e--;)s.push(Dt({h:r,s:i,v:a})),a=(a+u)%1;return s}Dt.mix=function(n,e,t){t=t===0?0:t||50;var r=Dt(n).toRgb(),i=Dt(e).toRgb(),a=t/100,s={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return Dt(s)};Dt.readability=function(n,e){var t=Dt(n),r=Dt(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};Dt.isReadable=function(n,e,t){var r=Dt.readability(n,e),i,a;switch(a=!1,i=HJ(t),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};Dt.mostReadable=function(n,e,t){var r=null,i=0,a,s,u,c;t=t||{},s=t.includeFallbackColors,u=t.level,c=t.size;for(var h=0;h<e.length;h++)a=Dt.readability(n,e[h]),a>i&&(i=a,r=Dt(e[h]));return Dt.isReadable(n,r,{level:u,size:c})||!s?r:(t.includeFallbackColors=!1,Dt.mostReadable(n,["#fff","#000"],t))};var H_=Dt.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"},PJ=Dt.hexNames=jJ(H_);function jJ(n){var e={};for(var t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function RN(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Jr(n,e){FJ(n)&&(n="100%");var t=BJ(n);return n=Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(n*e,10)/100),Math.abs(n-e)<1e-6?1:n%e/parseFloat(e)}function Fy(n){return Math.min(1,Math.max(0,n))}function ro(n){return parseInt(n,16)}function FJ(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function BJ(n){return typeof n=="string"&&n.indexOf("%")!=-1}function ul(n){return n.length==1?"0"+n:""+n}function pm(n){return n<=1&&(n=n*100+"%"),n}function IN(n){return Math.round(parseFloat(n)*255).toString(16)}function HR(n){return ro(n)/255}var il=(function(){var n="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+n+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,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 wu(n){return!!il.CSS_UNIT.exec(n)}function GJ(n){n=n.replace(yJ,"").replace(bJ,"").toLowerCase();var e=!1;if(H_[n])n=H_[n],e=!0;else if(n=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=il.rgb.exec(n))?{r:t[1],g:t[2],b:t[3]}:(t=il.rgba.exec(n))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=il.hsl.exec(n))?{h:t[1],s:t[2],l:t[3]}:(t=il.hsla.exec(n))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=il.hsv.exec(n))?{h:t[1],s:t[2],v:t[3]}:(t=il.hsva.exec(n))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=il.hex8.exec(n))?{r:ro(t[1]),g:ro(t[2]),b:ro(t[3]),a:HR(t[4]),format:e?"name":"hex8"}:(t=il.hex6.exec(n))?{r:ro(t[1]),g:ro(t[2]),b:ro(t[3]),format:e?"name":"hex"}:(t=il.hex4.exec(n))?{r:ro(t[1]+""+t[1]),g:ro(t[2]+""+t[2]),b:ro(t[3]+""+t[3]),a:HR(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=il.hex3.exec(n))?{r:ro(t[1]+""+t[1]),g:ro(t[2]+""+t[2]),b:ro(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function HJ(n){var e,t;return n=n||{level:"AA",size:"small"},e=(n.level||"AA").toUpperCase(),t=(n.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}var zR=function(e){var t=["r","g","b","a","h","s","l","v"],r=0,i=0;return vJ(t,function(a){if(e[a]&&(r+=1,isNaN(e[a])||(i+=1),a==="s"||a==="l")){var s=/^\d+%$/;s.test(e[a])&&(i+=1)}}),r===i?e:!1},gm=function(e,t){var r=e.hex?Dt(e.hex):Dt(e),i=r.toHsl(),a=r.toHsv(),s=r.toRgb(),u=r.toHex();i.s===0&&(i.h=t||0,a.h=t||0);var c=u==="000000"&&s.a===0;return{hsl:i,hex:c?"transparent":"#"+u,rgb:s,hsv:a,oldHue:e.h||t||i.h,source:e.source}},Pc=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&Dt(e).isValid()},g4=function(e){if(!e)return"#fff";var t=gm(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},GE=function(e,t){var r=e.replace("°","");return Dt(t+" ("+r+")")._ok},Vg=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},zJ=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function qJ(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function UJ(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function VJ(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var Gs=function(e){var t=(function(r){VJ(i,r);function i(a){qJ(this,i);var s=UJ(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return s.handleChange=function(u,c){var h=zR(u);if(h){var g=gm(u,u.h||s.state.oldHue);s.setState(g),s.props.onChangeComplete&&s.debounce(s.props.onChangeComplete,g,c),s.props.onChange&&s.props.onChange(g,c)}},s.handleSwatchHover=function(u,c){var h=zR(u);if(h){var g=gm(u,u.h||s.state.oldHue);s.props.onSwatchHover&&s.props.onSwatchHover(g,c)}},s.state=Vg({},gm(a.color,0)),s.debounce=TN(function(u,c,h){u(c,h)},100),s}return zJ(i,[{key:"render",value:function(){var s={};return this.props.onSwatchHover&&(s.onSwatchHover=this.handleSwatchHover),D.createElement(e,Vg({},this.props,this.state,{onChange:this.handleChange},s))}}],[{key:"getDerivedStateFromProps",value:function(s,u){return Vg({},gm(s.color,u.oldHue))}}]),i})(D.PureComponent||D.Component);return t.propTypes=Vg({},e.propTypes),t.defaultProps=Vg({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},WJ=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},XJ=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function YJ(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function qR(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function ZJ(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var JJ=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(r){ZJ(i,r);function i(){var a,s,u,c;YJ(this,i);for(var h=arguments.length,g=Array(h),v=0;v<h;v++)g[v]=arguments[v];return c=(s=(u=qR(this,(a=i.__proto__||Object.getPrototypeOf(i)).call.apply(a,[this].concat(g))),u),u.state={focus:!1},u.handleFocus=function(){return u.setState({focus:!0})},u.handleBlur=function(){return u.setState({focus:!1})},s),qR(u,c)}return XJ(i,[{key:"render",value:function(){return D.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},D.createElement(e,WJ({},this.props,this.state)))}}]),i})(D.Component)},UR=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},KJ=13,$J=function(e){var t=e.color,r=e.style,i=e.onClick,a=i===void 0?function(){}:i,s=e.onHover,u=e.title,c=u===void 0?t:u,h=e.children,g=e.focus,v=e.focusStyle,y=v===void 0?{}:v,S=t==="transparent",_=on({default:{swatch:UR({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,g?y:{})}}),O=function(k){return a(t,k)},E=function(k){return k.keyCode===KJ&&a(t,k)},w=function(k){return s(t,k)},N={};return s&&(N.onMouseOver=w),D.createElement("div",UR({style:_.swatch,onClick:O,title:c,tabIndex:0,onKeyDown:E},N),h,S&&D.createElement(vp,{borderRadius:_.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const Yd=JJ($J);var QJ=function(e){var t=e.direction,r=on({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:t==="vertical"});return D.createElement("div",{style:r.picker})},eK=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ON=function(e){var t=e.rgb,r=e.hsl,i=e.width,a=e.height,s=e.onChange,u=e.direction,c=e.style,h=e.renderers,g=e.pointer,v=e.className,y=v===void 0?"":v,S=on({default:{picker:{position:"relative",width:i,height:a},alpha:{radius:"2px",style:c}}});return D.createElement("div",{style:S.picker,className:"alpha-picker "+y},D.createElement(a4,eK({},S.alpha,{rgb:t,hsl:r,pointer:g,renderers:h,onChange:s,direction:u})))};ON.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:QJ};Gs(ON);function DN(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var tK="__lodash_hash_undefined__";function nK(n){return this.__data__.set(n,tK),this}function rK(n){return this.__data__.has(n)}function ay(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Fu;++e<t;)this.add(n[e])}ay.prototype.add=ay.prototype.push=nK;ay.prototype.has=rK;function iK(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function aK(n,e){return n.has(e)}var sK=1,oK=2;function NN(n,e,t,r,i,a){var s=t&sK,u=n.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var h=a.get(n),g=a.get(e);if(h&&g)return h==e&&g==n;var v=-1,y=!0,S=t&oK?new ay:void 0;for(a.set(n,e),a.set(e,n);++v<u;){var _=n[v],O=e[v];if(r)var E=s?r(O,_,v,e,n,a):r(_,O,v,n,e,a);if(E!==void 0){if(E)continue;y=!1;break}if(S){if(!iK(e,function(w,N){if(!aK(S,N)&&(_===w||i(_,w,t,r,a)))return S.push(N)})){y=!1;break}}else if(!(_===O||i(_,O,t,r,a))){y=!1;break}}return a.delete(n),a.delete(e),y}function lK(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function uK(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var cK=1,dK=2,fK="[object Boolean]",hK="[object Date]",pK="[object Error]",gK="[object Map]",mK="[object Number]",vK="[object RegExp]",yK="[object Set]",bK="[object String]",xK="[object Symbol]",SK="[object ArrayBuffer]",CK="[object DataView]",VR=Xl?Xl.prototype:void 0,HE=VR?VR.valueOf:void 0;function EK(n,e,t,r,i,a,s){switch(t){case CK:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case SK:return!(n.byteLength!=e.byteLength||!a(new ny(n),new ny(e)));case fK:case hK:case mK:return Zm(+n,+e);case pK:return n.name==e.name&&n.message==e.message;case vK:case bK:return n==e+"";case gK:var u=lK;case yK:var c=r&cK;if(u||(u=uK),n.size!=e.size&&!c)return!1;var h=s.get(n);if(h)return h==e;r|=dK,s.set(n,e);var g=NN(u(n),u(e),r,i,a,s);return s.delete(n),g;case xK:if(HE)return HE.call(n)==HE.call(e)}return!1}function _K(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}function TK(n,e,t){var r=e(n);return Fs(n)?r:_K(r,t(n))}function wK(n,e){for(var t=-1,r=n==null?0:n.length,i=0,a=[];++t<r;){var s=n[t];e(s,t,n)&&(a[i++]=s)}return a}function AK(){return[]}var RK=Object.prototype,IK=RK.propertyIsEnumerable,WR=Object.getOwnPropertySymbols,OK=WR?function(n){return n==null?[]:(n=Object(n),wK(WR(n),function(e){return IK.call(n,e)}))}:AK;function z_(n){return TK(n,p4,OK)}var DK=1,NK=Object.prototype,MK=NK.hasOwnProperty;function LK(n,e,t,r,i,a){var s=t&DK,u=z_(n),c=u.length,h=z_(e),g=h.length;if(c!=g&&!s)return!1;for(var v=c;v--;){var y=u[v];if(!(s?y in e:MK.call(e,y)))return!1}var S=a.get(n),_=a.get(e);if(S&&_)return S==e&&_==n;var O=!0;a.set(n,e),a.set(e,n);for(var E=s;++v<c;){y=u[v];var w=n[y],N=e[y];if(r)var L=s?r(N,w,y,e,n,a):r(w,N,y,n,e,a);if(!(L===void 0?w===N||i(w,N,t,r,a):L)){O=!1;break}E||(E=y=="constructor")}if(O&&!E){var k=n.constructor,G=e.constructor;k!=G&&"constructor"in n&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof G=="function"&&G instanceof G)&&(O=!1)}return a.delete(n),a.delete(e),O}var q_=Xd(gl,"DataView"),U_=Xd(gl,"Promise"),V_=Xd(gl,"Set"),W_=Xd(gl,"WeakMap"),XR="[object Map]",kK="[object Object]",YR="[object Promise]",ZR="[object Set]",JR="[object WeakMap]",KR="[object DataView]",PK=Wd(q_),jK=Wd(km),FK=Wd(U_),BK=Wd(V_),GK=Wd(W_),sl=Vd;(q_&&sl(new q_(new ArrayBuffer(1)))!=KR||km&&sl(new km)!=XR||U_&&sl(U_.resolve())!=YR||V_&&sl(new V_)!=ZR||W_&&sl(new W_)!=JR)&&(sl=function(n){var e=Vd(n),t=e==kK?n.constructor:void 0,r=t?Wd(t):"";if(r)switch(r){case PK:return KR;case jK:return XR;case FK:return YR;case BK:return ZR;case GK:return JR}return e});var HK=1,$R="[object Arguments]",QR="[object Array]",S1="[object Object]",zK=Object.prototype,eI=zK.hasOwnProperty;function qK(n,e,t,r,i,a){var s=Fs(n),u=Fs(e),c=s?QR:sl(n),h=u?QR:sl(e);c=c==$R?S1:c,h=h==$R?S1:h;var g=c==S1,v=h==S1,y=c==h;if(y&&jm(n)){if(!jm(e))return!1;s=!0,g=!1}if(y&&!g)return a||(a=new cl),s||f4(n)?NN(n,e,t,r,i,a):EK(n,e,c,t,r,i,a);if(!(t&HK)){var S=g&&eI.call(n,"__wrapped__"),_=v&&eI.call(e,"__wrapped__");if(S||_){var O=S?n.value():n,E=_?e.value():e;return a||(a=new cl),i(O,E,t,r,a)}}return y?(a||(a=new cl),LK(n,e,t,r,i,a)):!1}function By(n,e,t,r,i){return n===e?!0:n==null||e==null||!Yl(n)&&!Yl(e)?n!==n&&e!==e:qK(n,e,t,r,By,i)}var UK=1,VK=2;function WK(n,e,t,r){var i=t.length,a=i;if(n==null)return!a;for(n=Object(n);i--;){var s=t[i];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<a;){s=t[i];var u=s[0],c=n[u],h=s[1];if(s[2]){if(c===void 0&&!(u in n))return!1}else{var g=new cl,v;if(!(v===void 0?By(h,c,UK|VK,r,g):v))return!1}}return!0}function MN(n){return n===n&&!uo(n)}function XK(n){for(var e=p4(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,MN(i)]}return e}function LN(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}function YK(n){var e=XK(n);return e.length==1&&e[0][2]?LN(e[0][0],e[0][1]):function(t){return t===n||WK(t,n,e)}}var ZK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,JK=/^\w*$/;function m4(n,e){if(Fs(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||Py(n)?!0:JK.test(n)||!ZK.test(n)||e!=null&&n in Object(e)}var KK="Expected a function";function v4(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(KK);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=t.cache;if(a.has(i))return a.get(i);var s=n.apply(this,r);return t.cache=a.set(i,s)||a,s};return t.cache=new(v4.Cache||Fu),t}v4.Cache=Fu;var $K=500;function QK(n){var e=v4(n,function(r){return t.size===$K&&t.clear(),r}),t=e.cache;return e}var e$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t$=/\\(\\)?/g,n$=QK(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(e$,function(t,r,i,a){e.push(i?a.replace(t$,"$1"):r||t)}),e}),tI=Xl?Xl.prototype:void 0,nI=tI?tI.toString:void 0;function kN(n){if(typeof n=="string")return n;if(Fs(n))return DN(n,kN)+"";if(Py(n))return nI?nI.call(n):"";var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function r$(n){return n==null?"":kN(n)}function PN(n,e){return Fs(n)?n:m4(n,e)?[n]:n$(r$(n))}function Gy(n){if(typeof n=="string"||Py(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function jN(n,e){e=PN(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[Gy(e[t++])];return t&&t==r?n:void 0}function i$(n,e,t){var r=n==null?void 0:jN(n,e);return r===void 0?t:r}function a$(n,e){return n!=null&&e in Object(n)}function s$(n,e,t){e=PN(e,n);for(var r=-1,i=e.length,a=!1;++r<i;){var s=Gy(e[r]);if(!(a=n!=null&&t(n,s)))break;n=n[s]}return a||++r!=i?a:(i=n==null?0:n.length,!!i&&c4(i)&&h4(s,i)&&(Fs(n)||ry(n)))}function o$(n,e){return n!=null&&s$(n,e,a$)}var l$=1,u$=2;function c$(n,e){return m4(n)&&MN(e)?LN(Gy(n),e):function(t){var r=i$(t,n);return r===void 0&&r===e?o$(t,n):By(e,r,l$|u$)}}function d$(n){return function(e){return e?.[n]}}function f$(n){return function(e){return jN(e,n)}}function h$(n){return m4(n)?d$(Gy(n)):f$(n)}function p$(n){return typeof n=="function"?n:n==null?ky:typeof n=="object"?Fs(n)?c$(n[0],n[1]):YK(n):h$(n)}function g$(n,e){var t=-1,r=bp(n)?Array(n.length):[];return AN(n,function(i,a,s){r[++t]=e(i,a,s)}),r}function Zd(n,e){var t=Fs(n)?DN:g$;return t(n,p$(e))}var m$=function(e){var t=e.colors,r=e.onClick,i=e.onSwatchHover,a=on({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return D.createElement("div",{style:a.swatches},Zd(t,function(s){return D.createElement(Yd,{key:s,color:s,style:a.swatch,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+s}})}),D.createElement("div",{style:a.clear}))},y4=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.hex,a=e.colors,s=e.width,u=e.triangle,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=i==="transparent",S=function(E,w){Pc(E)&&t({hex:E,source:"hex"},w)},_=on(Si({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:i,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:g4(i),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+i+" 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"}}},h),{"hide-triangle":u==="hide"});return D.createElement("div",{style:_.card,className:"block-picker "+v},D.createElement("div",{style:_.triangle}),D.createElement("div",{style:_.head},y&&D.createElement(vp,{borderRadius:"6px 6px 0 0"}),D.createElement("div",{style:_.label},i)),D.createElement("div",{style:_.body},D.createElement(m$,{colors:a,onClick:S,onSwatchHover:r}),D.createElement(Yn,{style:{input:_.input},value:i,onChange:S})))};y4.propTypes={width:C.oneOfType([C.string,C.number]),colors:C.arrayOf(C.string),triangle:C.oneOf(["top","hide"]),styles:C.object};y4.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Gs(y4);var Oh={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},Dh={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},Nh={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},Mh={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},Lh={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},kh={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},Ph={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},jh={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},Fh={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},mm={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},Bh={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},Gh={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},Hh={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},zh={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},qh={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},Uh={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},Vh={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},Wh={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},FN=function(e){var t=e.color,r=e.onClick,i=e.onSwatchHover,a=e.hover,s=e.active,u=e.circleSize,c=e.circleSpacing,h=on({default:{swatch:{width:u,height:u,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(u/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:a,active:s});return D.createElement("div",{style:h.swatch},D.createElement(Yd,{style:h.Swatch,color:t,onClick:r,onHover:i,focusStyle:{boxShadow:h.Swatch.boxShadow+", 0 0 5px "+t}}))};FN.defaultProps={circleSize:28,circleSpacing:14};const v$=i4.handleHover(FN);var b4=function(e){var t=e.width,r=e.onChange,i=e.onSwatchHover,a=e.colors,s=e.hex,u=e.circleSize,c=e.styles,h=c===void 0?{}:c,g=e.circleSpacing,v=e.className,y=v===void 0?"":v,S=on(Si({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-g,marginBottom:-g}}},h)),_=function(E,w){return r({hex:E,source:"hex"},w)};return D.createElement("div",{style:S.card,className:"circle-picker "+y},Zd(a,function(O){return D.createElement(v$,{key:O,color:O,onClick:_,onSwatchHover:i,active:s===O.toLowerCase(),circleSize:u,circleSpacing:g})}))};b4.propTypes={width:C.oneOfType([C.string,C.number]),circleSize:C.number,circleSpacing:C.number,styles:C.object};b4.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Oh[500],Dh[500],Nh[500],Mh[500],Lh[500],kh[500],Ph[500],jh[500],Fh[500],mm[500],Bh[500],Gh[500],Hh[500],zh[500],qh[500],Uh[500],Vh[500],Wh[500]],styles:{}};Gs(b4);function rI(n){return n===void 0}var C1={},iI;function y$(){if(iI)return C1;iI=1,Object.defineProperty(C1,"__esModule",{value:!0});var n=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var c=arguments[u];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(s[h]=c[h])}return s},e=D,t=r(e);function r(s){return s&&s.__esModule?s:{default:s}}function i(s,u){var c={};for(var h in s)u.indexOf(h)>=0||Object.prototype.hasOwnProperty.call(s,h)&&(c[h]=s[h]);return c}var a=24;return C1.default=function(s){var u=s.fill,c=u===void 0?"currentColor":u,h=s.width,g=h===void 0?a:h,v=s.height,y=v===void 0?a:v,S=s.style,_=S===void 0?{}:S,O=i(s,["fill","width","height","style"]);return t.default.createElement("svg",n({viewBox:"0 0 "+a+" "+a,style:n({fill:c,width:g,height:y},_)},O),t.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"}))},C1}var b$=y$();const x$=Pd(b$);var S$=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function C$(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function E$(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function _$(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var BN=(function(n){_$(e,n);function e(t){C$(this,e);var r=E$(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(i,a){i.hex?Pc(i.hex)&&r.props.onChange({hex:i.hex,source:"hex"},a):i.r||i.g||i.b?r.props.onChange({r:i.r||r.props.rgb.r,g:i.g||r.props.rgb.g,b:i.b||r.props.rgb.b,source:"rgb"},a):i.a?(i.a<0?i.a=0:i.a>1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},a)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(rI(i.s)?r.props.hsl.s:i.s),l:Number(rI(i.l)?r.props.hsl.l:i.l),source:"hsl"},a))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?r.state={view:"rgb"}:r.state={view:t.view},r}return S$(e,[{key:"render",value:function(){var r=this,i=on({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),a=void 0;return this.state.view==="hex"?a=D.createElement("div",{style:i.fields,className:"flexbox-fix"},D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?a=D.createElement("div",{style:i.fields,className:"flexbox-fix"},D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),D.createElement("div",{style:i.alpha},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(a=D.createElement("div",{style:i.fields,className:"flexbox-fix"},D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),D.createElement("div",{style:i.alpha},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),D.createElement("div",{style:i.wrap,className:"flexbox-fix"},a,D.createElement("div",{style:i.toggle},D.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(u){return r.icon=u}},D.createElement(x$,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e})(D.Component);BN.defaultProps={view:"hex"};var aI=function(){var e=on({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 D.createElement("div",{style:e.picker})},T$=function(){var e=on({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return D.createElement("div",{style:e.picker})},x4=function(e){var t=e.width,r=e.onChange,i=e.disableAlpha,a=e.rgb,s=e.hsl,u=e.hsv,c=e.hex,h=e.renderers,g=e.styles,v=g===void 0?{}:g,y=e.className,S=y===void 0?"":y,_=e.defaultView,O=on(Si({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"}}},v),{disableAlpha:i});return D.createElement("div",{style:O.picker,className:"chrome-picker "+S},D.createElement("div",{style:O.saturation},D.createElement(jy,{style:O.Saturation,hsl:s,hsv:u,pointer:T$,onChange:r})),D.createElement("div",{style:O.body},D.createElement("div",{style:O.controls,className:"flexbox-fix"},D.createElement("div",{style:O.color},D.createElement("div",{style:O.swatch},D.createElement("div",{style:O.active}),D.createElement(vp,{renderers:h}))),D.createElement("div",{style:O.toggles},D.createElement("div",{style:O.hue},D.createElement(yp,{style:O.Hue,hsl:s,pointer:aI,onChange:r})),D.createElement("div",{style:O.alpha},D.createElement(a4,{style:O.Alpha,rgb:a,hsl:s,pointer:aI,renderers:h,onChange:r})))),D.createElement(BN,{rgb:a,hsl:s,hex:c,view:_,onChange:r,disableAlpha:i})))};x4.propTypes={width:C.oneOfType([C.string,C.number]),disableAlpha:C.bool,styles:C.object,defaultView:C.oneOf(["hex","rgb","hsl"])};x4.defaultProps={width:225,disableAlpha:!1,styles:{}};Gs(x4);var w$=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,a=e.onSwatchHover,s=e.active,u=on({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:g4(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:s,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return D.createElement(Yd,{style:u.color,color:t,onClick:i,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}},D.createElement("div",{style:u.dot}))},A$=function(e){var t=e.hex,r=e.rgb,i=e.onChange,a=on({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"}}}),s=function(c,h){c.r||c.g||c.b?i({r:c.r||r.r,g:c.g||r.g,b:c.b||r.b,source:"rgb"},h):i({hex:c.hex,source:"hex"},h)};return D.createElement("div",{style:a.fields,className:"flexbox-fix"},D.createElement("div",{style:a.active}),D.createElement(Yn,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:t,onChange:s}),D.createElement(Yn,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:s}),D.createElement(Yn,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:s}),D.createElement(Yn,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:s}))},S4=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.colors,a=e.hex,s=e.rgb,u=e.styles,c=u===void 0?{}:u,h=e.className,g=h===void 0?"":h,v=on(Si({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),y=function(_,O){_.hex?Pc(_.hex)&&t({hex:_.hex,source:"hex"},O):t(_,O)};return D.createElement(Jm,{style:v.Compact,styles:c},D.createElement("div",{style:v.compact,className:"compact-picker "+g},D.createElement("div",null,Zd(i,function(S){return D.createElement(w$,{key:S,color:S,active:S.toLowerCase()===a,onClick:y,onSwatchHover:r})}),D.createElement("div",{style:v.clear})),D.createElement(A$,{hex:a,rgb:s,onChange:y})))};S4.propTypes={colors:C.arrayOf(C.string),styles:C.object};S4.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:{}};Gs(S4);var R$=function(e){var t=e.hover,r=e.color,i=e.onClick,a=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=on({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return D.createElement("div",{style:u.swatch},D.createElement(Yd,{color:r,onClick:i,onHover:a,focusStyle:s}))};const I$=i4.handleHover(R$);var C4=function(e){var t=e.width,r=e.colors,i=e.onChange,a=e.onSwatchHover,s=e.triangle,u=e.styles,c=u===void 0?{}:u,h=e.className,g=h===void 0?"":h,v=on(Si({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)"}}},c),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right","bottom-left-triangle":s==="bottom-left","bottom-right-triangle":s==="bottom-right"}),y=function(_,O){return i({hex:_,source:"hex"},O)};return D.createElement("div",{style:v.card,className:"github-picker "+g},D.createElement("div",{style:v.triangleShadow}),D.createElement("div",{style:v.triangle}),Zd(r,function(S){return D.createElement(I$,{color:S,key:S,onClick:y,onSwatchHover:a})}))};C4.propTypes={width:C.oneOfType([C.string,C.number]),colors:C.arrayOf(C.string),triangle:C.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:C.object};C4.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Gs(C4);var O$=function(e){var t=e.direction,r=on({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:t==="vertical"});return D.createElement("div",{style:r.picker})},D$=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},E4=function(e){var t=e.width,r=e.height,i=e.onChange,a=e.hsl,s=e.direction,u=e.pointer,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=on(Si({default:{picker:{position:"relative",width:t,height:r},hue:{radius:"2px"}}},h)),S=function(O){return i({a:1,h:O.h,l:.5,s:1})};return D.createElement("div",{style:y.picker,className:"hue-picker "+v},D.createElement(yp,D$({},y.hue,{hsl:a,pointer:u,onChange:S,direction:s})))};E4.propTypes={styles:C.object};E4.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:O$,styles:{}};Gs(E4);var N$=function(e){var t=e.onChange,r=e.hex,i=e.rgb,a=e.styles,s=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=on(Si({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 "+r,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"}}},s)),g=function(y,S){y.hex?Pc(y.hex)&&t({hex:y.hex,source:"hex"},S):(y.r||y.g||y.b)&&t({r:y.r||i.r,g:y.g||i.g,b:y.b||i.b,source:"rgb"},S)};return D.createElement(Jm,{styles:s},D.createElement("div",{style:h.material,className:"material-picker "+c},D.createElement(Yn,{style:{wrap:h.HEXwrap,input:h.HEXinput,label:h.HEXlabel},label:"hex",value:r,onChange:g}),D.createElement("div",{style:h.split,className:"flexbox-fix"},D.createElement("div",{style:h.third},D.createElement(Yn,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"r",value:i.r,onChange:g})),D.createElement("div",{style:h.third},D.createElement(Yn,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"g",value:i.g,onChange:g})),D.createElement("div",{style:h.third},D.createElement(Yn,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"b",value:i.b,onChange:g})))))};Gs(N$);var M$=function(e){var t=e.onChange,r=e.rgb,i=e.hsv,a=e.hex,s=on({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"}}}),u=function(h,g){h["#"]?Pc(h["#"])&&t({hex:h["#"],source:"hex"},g):h.r||h.g||h.b?t({r:h.r||r.r,g:h.g||r.g,b:h.b||r.b,source:"rgb"},g):(h.h||h.s||h.v)&&t({h:h.h||i.h,s:h.s||i.s,v:h.v||i.v,source:"hsv"},g)};return D.createElement("div",{style:s.fields},D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(i.h),onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(i.s*100),onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(i.v*100),onChange:u}),D.createElement("div",{style:s.divider}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:r.r,onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:r.g,onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:r.b,onChange:u}),D.createElement("div",{style:s.divider}),D.createElement(Yn,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:a.replace("#",""),onChange:u}),D.createElement("div",{style:s.fieldSymbols},D.createElement("div",{style:s.symbol},"°"),D.createElement("div",{style:s.symbol},"%"),D.createElement("div",{style:s.symbol},"%")))},L$=function(e){var t=e.hsl,r=on({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":t.l>.5});return D.createElement("div",{style:r.picker})},k$=function(){var e=on({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 D.createElement("div",{style:e.pointer},D.createElement("div",{style:e.left},D.createElement("div",{style:e.leftInside})),D.createElement("div",{style:e.right},D.createElement("div",{style:e.rightInside})))},sI=function(e){var t=e.onClick,r=e.label,i=e.children,a=e.active,s=on({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 D.createElement("div",{style:s.button,onClick:t},r||i)},P$=function(e){var t=e.rgb,r=e.currentColor,i=on({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 D.createElement("div",null,D.createElement("div",{style:i.label},"new"),D.createElement("div",{style:i.swatches},D.createElement("div",{style:i.new}),D.createElement("div",{style:i.current})),D.createElement("div",{style:i.label},"current"))},j$=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function F$(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function B$(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function G$(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var _4=(function(n){G$(e,n);function e(t){F$(this,e);var r=B$(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.state={currentColor:t.hex},r}return j$(e,[{key:"render",value:function(){var r=this.props,i=r.styles,a=i===void 0?{}:i,s=r.className,u=s===void 0?"":s,c=on(Si({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"}}},a));return D.createElement("div",{style:c.picker,className:"photoshop-picker "+u},D.createElement("div",{style:c.head},this.props.header),D.createElement("div",{style:c.body,className:"flexbox-fix"},D.createElement("div",{style:c.saturation},D.createElement(jy,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:L$,onChange:this.props.onChange})),D.createElement("div",{style:c.hue},D.createElement(yp,{direction:"vertical",hsl:this.props.hsl,pointer:k$,onChange:this.props.onChange})),D.createElement("div",{style:c.controls},D.createElement("div",{style:c.top,className:"flexbox-fix"},D.createElement("div",{style:c.previews},D.createElement(P$,{rgb:this.props.rgb,currentColor:this.state.currentColor})),D.createElement("div",{style:c.actions},D.createElement(sI,{label:"OK",onClick:this.props.onAccept,active:!0}),D.createElement(sI,{label:"Cancel",onClick:this.props.onCancel}),D.createElement(M$,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e})(D.Component);_4.propTypes={header:C.string,styles:C.object};_4.defaultProps={header:"Color Picker",styles:{}};Gs(_4);var H$=function(e){var t=e.onChange,r=e.rgb,i=e.hsl,a=e.hex,s=e.disableAlpha,u=on({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:s}),c=function(g,v){g.hex?Pc(g.hex)&&t({hex:g.hex,source:"hex"},v):g.r||g.g||g.b?t({r:g.r||r.r,g:g.g||r.g,b:g.b||r.b,a:r.a,source:"rgb"},v):g.a&&(g.a<0?g.a=0:g.a>100&&(g.a=100),g.a/=100,t({h:i.h,s:i.s,l:i.l,a:g.a,source:"rgb"},v))};return D.createElement("div",{style:u.fields,className:"flexbox-fix"},D.createElement("div",{style:u.double},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"hex",value:a.replace("#",""),onChange:c})),D.createElement("div",{style:u.single},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"r",value:r.r,onChange:c,dragLabel:"true",dragMax:"255"})),D.createElement("div",{style:u.single},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"g",value:r.g,onChange:c,dragLabel:"true",dragMax:"255"})),D.createElement("div",{style:u.single},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"b",value:r.b,onChange:c,dragLabel:"true",dragMax:"255"})),D.createElement("div",{style:u.alpha},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"a",value:Math.round(r.a*100),onChange:c,dragLabel:"true",dragMax:"100"})))},z$=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},GN=function(e){var t=e.colors,r=e.onClick,i=r===void 0?function(){}:r,a=e.onSwatchHover,s=on({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":!t||!t.length}),u=function(h,g){i({hex:h,source:"hex"},g)};return D.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map(function(c){var h=typeof c=="string"?{color:c}:c,g=""+h.color+(h.title||"");return D.createElement("div",{key:g,style:s.swatchWrap},D.createElement(Yd,z$({},h,{style:s.swatch,onClick:u,onHover:a,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+h.color}})))}))};GN.propTypes={colors:C.arrayOf(C.oneOfType([C.string,C.shape({color:C.string,title:C.string})])).isRequired};var q$=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},T4=function(e){var t=e.width,r=e.rgb,i=e.hex,a=e.hsv,s=e.hsl,u=e.onChange,c=e.onSwatchHover,h=e.disableAlpha,g=e.presetColors,v=e.renderers,y=e.styles,S=y===void 0?{}:y,_=e.className,O=_===void 0?"":_,E=on(Si({default:q$({picker:{width:t,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("+r.r+","+r.g+","+r.b+","+r.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)"}},S),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},S),{disableAlpha:h});return D.createElement("div",{style:E.picker,className:"sketch-picker "+O},D.createElement("div",{style:E.saturation},D.createElement(jy,{style:E.Saturation,hsl:s,hsv:a,onChange:u})),D.createElement("div",{style:E.controls,className:"flexbox-fix"},D.createElement("div",{style:E.sliders},D.createElement("div",{style:E.hue},D.createElement(yp,{style:E.Hue,hsl:s,onChange:u})),D.createElement("div",{style:E.alpha},D.createElement(a4,{style:E.Alpha,rgb:r,hsl:s,renderers:v,onChange:u}))),D.createElement("div",{style:E.color},D.createElement(vp,null),D.createElement("div",{style:E.activeColor}))),D.createElement(H$,{rgb:r,hsl:s,hex:i,onChange:u,disableAlpha:h}),D.createElement(GN,{colors:g,onClick:u,onSwatchHover:c}))};T4.propTypes={disableAlpha:C.bool,width:C.oneOfType([C.string,C.number]),styles:C.object};T4.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const U$=Gs(T4);var Wg=function(e){var t=e.hsl,r=e.offset,i=e.onClick,a=i===void 0?function(){}:i,s=e.active,u=e.first,c=e.last,h=on({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+r*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:s,first:u,last:c}),g=function(y){return a({h:t.h,s:.5,l:r,source:"hsl"},y)};return D.createElement("div",{style:h.swatch,onClick:g})},V$=function(e){var t=e.onClick,r=e.hsl,i=on({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),a=.1;return D.createElement("div",{style:i.swatches},D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<a&&Math.abs(r.s-.5)<a,onClick:t,first:!0})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<a&&Math.abs(r.s-.5)<a,onClick:t})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<a&&Math.abs(r.s-.5)<a,onClick:t})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<a&&Math.abs(r.s-.5)<a,onClick:t})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<a&&Math.abs(r.s-.5)<a,onClick:t,last:!0})),D.createElement("div",{style:i.clear}))},W$=function(){var e=on({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 D.createElement("div",{style:e.picker})},w4=function(e){var t=e.hsl,r=e.onChange,i=e.pointer,a=e.styles,s=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=on(Si({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return D.createElement("div",{style:h.wrap||{},className:"slider-picker "+c},D.createElement("div",{style:h.hue},D.createElement(yp,{style:h.Hue,hsl:t,pointer:i,onChange:r})),D.createElement("div",{style:h.swatches},D.createElement(V$,{hsl:t,onClick:r})))};w4.propTypes={styles:C.object};w4.defaultProps={pointer:W$,styles:{}};Gs(w4);var E1={},oI;function X$(){if(oI)return E1;oI=1,Object.defineProperty(E1,"__esModule",{value:!0});var n=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var c=arguments[u];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(s[h]=c[h])}return s},e=D,t=r(e);function r(s){return s&&s.__esModule?s:{default:s}}function i(s,u){var c={};for(var h in s)u.indexOf(h)>=0||Object.prototype.hasOwnProperty.call(s,h)&&(c[h]=s[h]);return c}var a=24;return E1.default=function(s){var u=s.fill,c=u===void 0?"currentColor":u,h=s.width,g=h===void 0?a:h,v=s.height,y=v===void 0?a:v,S=s.style,_=S===void 0?{}:S,O=i(s,["fill","width","height","style"]);return t.default.createElement("svg",n({viewBox:"0 0 "+a+" "+a,style:n({fill:c,width:g,height:y},_)},O),t.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},E1}var Y$=X$();const Z$=Pd(Y$);var J$=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,a=e.onSwatchHover,s=e.first,u=e.last,c=e.active,h=on({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:g4(t),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:s,last:u,active:c,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return D.createElement(Yd,{color:t,style:h.color,onClick:i,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}},D.createElement("div",{style:h.check},D.createElement(Z$,null)))},K$=function(e){var t=e.onClick,r=e.onSwatchHover,i=e.group,a=e.active,s=on({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return D.createElement("div",{style:s.group},Zd(i,function(u,c){return D.createElement(J$,{key:u,color:u,active:u.toLowerCase()===a,first:c===0,last:c===i.length-1,onClick:t,onSwatchHover:r})}))},A4=function(e){var t=e.width,r=e.height,i=e.onChange,a=e.onSwatchHover,s=e.colors,u=e.hex,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=on(Si({default:{picker:{width:t,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},h)),S=function(O,E){return i({hex:O,source:"hex"},E)};return D.createElement("div",{style:y.picker,className:"swatches-picker "+v},D.createElement(Jm,null,D.createElement("div",{style:y.overflow},D.createElement("div",{style:y.body},Zd(s,function(_){return D.createElement(K$,{key:_.toString(),group:_,active:u,onClick:S,onSwatchHover:a})}),D.createElement("div",{style:y.clear})))))};A4.propTypes={width:C.oneOfType([C.string,C.number]),height:C.oneOfType([C.string,C.number]),colors:C.arrayOf(C.arrayOf(C.string)),styles:C.object};A4.defaultProps={width:320,height:240,colors:[[Oh[900],Oh[700],Oh[500],Oh[300],Oh[100]],[Dh[900],Dh[700],Dh[500],Dh[300],Dh[100]],[Nh[900],Nh[700],Nh[500],Nh[300],Nh[100]],[Mh[900],Mh[700],Mh[500],Mh[300],Mh[100]],[Lh[900],Lh[700],Lh[500],Lh[300],Lh[100]],[kh[900],kh[700],kh[500],kh[300],kh[100]],[Ph[900],Ph[700],Ph[500],Ph[300],Ph[100]],[jh[900],jh[700],jh[500],jh[300],jh[100]],[Fh[900],Fh[700],Fh[500],Fh[300],Fh[100]],["#194D33",mm[700],mm[500],mm[300],mm[100]],[Bh[900],Bh[700],Bh[500],Bh[300],Bh[100]],[Gh[900],Gh[700],Gh[500],Gh[300],Gh[100]],[Hh[900],Hh[700],Hh[500],Hh[300],Hh[100]],[zh[900],zh[700],zh[500],zh[300],zh[100]],[qh[900],qh[700],qh[500],qh[300],qh[100]],[Uh[900],Uh[700],Uh[500],Uh[300],Uh[100]],[Vh[900],Vh[700],Vh[500],Vh[300],Vh[100]],[Wh[900],Wh[700],Wh[500],Wh[300],Wh[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Gs(A4);var R4=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.hex,a=e.colors,s=e.width,u=e.triangle,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=on(Si({default:{card:{width:s,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"}}},h),{"hide-triangle":u==="hide","top-left-triangle":u==="top-left","top-right-triangle":u==="top-right"}),S=function(O,E){Pc(O)&&t({hex:O,source:"hex"},E)};return D.createElement("div",{style:y.card,className:"twitter-picker "+v},D.createElement("div",{style:y.triangleShadow}),D.createElement("div",{style:y.triangle}),D.createElement("div",{style:y.body},Zd(a,function(_,O){return D.createElement(Yd,{key:O,color:_,hex:_,style:y.swatch,onClick:S,onHover:r,focusStyle:{boxShadow:"0 0 4px "+_}})}),D.createElement("div",{style:y.hash},"#"),D.createElement(Yn,{label:null,style:{input:y.input},value:i.replace("#",""),onChange:S}),D.createElement("div",{style:y.clear})))};R4.propTypes={width:C.oneOfType([C.string,C.number]),triangle:C.oneOf(["hide","top-left","top-right"]),colors:C.arrayOf(C.string),styles:C.object};R4.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Gs(R4);var I4=function(e){var t=on({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return D.createElement("div",{style:t.picker})};I4.propTypes={hsl:C.shape({h:C.number,s:C.number,l:C.number,a:C.number})};I4.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var O4=function(e){var t=on({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return D.createElement("div",{style:t.picker})};O4.propTypes={hsl:C.shape({h:C.number,s:C.number,l:C.number,a:C.number})};O4.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var $$=function(e){var t=e.onChange,r=e.rgb,i=e.hsl,a=e.hex,s=e.hsv,u=function(S,_){if(S.hex)Pc(S.hex)&&t({hex:S.hex,source:"hex"},_);else if(S.rgb){var O=S.rgb.split(",");GE(S.rgb,"rgb")&&t({r:O[0],g:O[1],b:O[2],a:1,source:"rgb"},_)}else if(S.hsv){var E=S.hsv.split(",");GE(S.hsv,"hsv")&&(E[2]=E[2].replace("%",""),E[1]=E[1].replace("%",""),E[0]=E[0].replace("°",""),E[1]==1?E[1]=.01:E[2]==1&&(E[2]=.01),t({h:Number(E[0]),s:Number(E[1]),v:Number(E[2]),source:"hsv"},_))}else if(S.hsl){var w=S.hsl.split(",");GE(S.hsl,"hsl")&&(w[2]=w[2].replace("%",""),w[1]=w[1].replace("%",""),w[0]=w[0].replace("°",""),v[1]==1?v[1]=.01:v[2]==1&&(v[2]=.01),t({h:Number(w[0]),s:Number(w[1]),v:Number(w[2]),source:"hsl"},_))}},c=on({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"}}}),h=r.r+", "+r.g+", "+r.b,g=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",v=Math.round(s.h)+"°, "+Math.round(s.s*100)+"%, "+Math.round(s.v*100)+"%";return D.createElement("div",{style:c.wrap,className:"flexbox-fix"},D.createElement("div",{style:c.fields},D.createElement("div",{style:c.double},D.createElement(Yn,{style:{input:c.input,label:c.label},label:"hex",value:a,onChange:u})),D.createElement("div",{style:c.column},D.createElement("div",{style:c.single},D.createElement(Yn,{style:{input:c.input2,label:c.label2},label:"rgb",value:h,onChange:u})),D.createElement("div",{style:c.single},D.createElement(Yn,{style:{input:c.input2,label:c.label2},label:"hsv",value:v,onChange:u})),D.createElement("div",{style:c.single},D.createElement(Yn,{style:{input:c.input2,label:c.label2},label:"hsl",value:g,onChange:u})))))},D4=function(e){var t=e.width,r=e.onChange,i=e.rgb,a=e.hsl,s=e.hsv,u=e.hex,c=e.header,h=e.styles,g=h===void 0?{}:h,v=e.className,y=v===void 0?"":v,S=on(Si({default:{picker:{width:t,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("+i.r+", "+i.g+", "+i.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"}}},g));return D.createElement("div",{style:S.picker,className:"google-picker "+y},D.createElement("div",{style:S.head},c),D.createElement("div",{style:S.swatch}),D.createElement("div",{style:S.saturation},D.createElement(jy,{hsl:a,hsv:s,pointer:I4,onChange:r})),D.createElement("div",{style:S.body},D.createElement("div",{style:S.controls,className:"flexbox-fix"},D.createElement("div",{style:S.hue},D.createElement(yp,{style:S.Hue,hsl:a,radius:"4px",pointer:O4,onChange:r}))),D.createElement($$,{rgb:i,hsl:a,hex:u,hsv:s,onChange:r})))};D4.propTypes={width:C.oneOfType([C.string,C.number]),styles:C.object,header:C.string};D4.defaultProps={width:652,styles:{},header:"Color picker"};Gs(D4);function X_({closeChooseColor:n,currentColor:e,handleCloseLineWeight:t,handleLineWeightSelect:r,openChooseColor:i,openChooseLineWeight:a,toolOptions:s,toolState:u,updateColor:c}){const{t:h}=Bs.useTranslation();return A.jsxs(he.Grid,{container:!0,spacing:1,children:[A.jsx(he.Grid,{size:{xs:12},children:A.jsx(mn,{variant:"overline",children:h("style")})}),A.jsx(he.Grid,{size:{xs:12},children:A.jsxs(vy,{"aria-label":h("style_selection"),size:"small",children:[u.activeTool!==Ur.TEXT&&[A.jsxs(Gi,{value:"strokeColor","aria-label":h("border_color"),onClick:i,children:[A.jsx(he.Tooltip,{title:h("border_color"),children:A.jsx("span",{children:A.jsx(sV,{style:{fill:u.strokeColor}})})}),A.jsx(eS,{})]},"strokeColor"),A.jsxs(Gi,{value:"lineWeight","aria-label":h("line_weight"),onClick:a,children:[A.jsx(he.Tooltip,{title:h("line_weight"),children:A.jsx("span",{children:A.jsx(oV,{})})}),A.jsx(eS,{})]},"lineWeight")],A.jsxs(Gi,{value:"fillColor","aria-label":h("fill_color"),onClick:i,children:[A.jsx(he.Tooltip,{title:h("fill_color"),children:A.jsx("span",{children:A.jsx(lV,{})})}),A.jsx(eS,{})]})]})}),A.jsx(he.Popover,{open:s.lineWeightPopoverOpen,anchorEl:s.popoverLineWeightAnchorEl,children:A.jsx("div",{children:A.jsx(he.ClickAwayListener,{onClickAway:t,children:A.jsx(he.MenuList,{autoFocus:!0,role:"listbox",children:hG.map(g=>A.jsx(he.MenuItem,{onClick:r,value:g,selected:g===u.strokeWidth,role:"option","aria-selected":g===u.strokeWidth,children:g},g))})})})}),A.jsx(he.Popover,{open:s.colorPopoverOpen,anchorEl:s.popoverAnchorEl,onClose:n,children:A.jsx(U$,{disableAlpha:!1,color:e,onChange:c})})]})}X_.propTypes={closeChooseColor:gc.func.isRequired,currentColor:gc.string.isRequired,handleCloseLineWeight:gc.func.isRequired,handleLineWeightSelect:gc.func.isRequired,openChooseColor:gc.func.isRequired,openChooseLineWeight:gc.func.isRequired,toolOptions:gc.shape({colorPopoverOpen:C.bool,currentColorType:C.any,lineWeightPopoverOpen:C.bool,popoverAnchorEl:C.any,popoverLineWeightAnchorEl:C.any}).isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string,image:C.shape({id:C.string}),strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,text:C.string,textBody:C.string,updateColor:C.func}).isRequired,updateColor:gc.func.isRequired};function Y_({currentShape:n,displayMode:e,setToolState:t,t:r,toolState:i}){const[a,s]=D.useState({colorPopoverOpen:!1,currentColorType:null,lineWeightPopoverOpen:!1,popoverAnchorEl:null,popoverLineWeightAnchorEl:null}),u=a.currentColorType?mO(i[a.currentColorType]):"rgba(255, 0, 0, 0.5)",c=k=>{s({...a,lineWeightPopoverOpen:!0,popoverLineWeightAnchorEl:k.currentTarget})},h=k=>{s({...a,lineWeightPopoverOpen:!1,popoverLineWeightAnchorEl:null}),t({...i,strokeWidth:k.currentTarget.value})},g=k=>{s({...a,colorPopoverOpen:!1,currentColorType:null,popoverAnchorEl:null})},v=k=>{s({...a,colorPopoverOpen:!0,currentColorType:k.currentTarget.value,popoverAnchorEl:k.currentTarget})},y=k=>{s({...a,lineWeightPopoverOpen:!1,popoverLineWeightAnchorEl:null})},S=k=>{t({...i,closedMode:k.currentTarget.value})},_=k=>{t({...i,[a.currentColorType]:mG(k.rgb)})},O=(k,G)=>{t({...i,image:{...i.image,id:k}})},E=()=>{const k={id:i?.image?.id,uuid:ys()};t({...i,image:{id:null},imageEvent:k})},w=k=>{const G=k.target.value;t({...i,text:G})},L=Ka.useSelector(k=>Pt.getConfig(k)).annotation?.allowTargetShapesStyling===!0;return A.jsxs("div",{children:[(e===va.DRAW||L&&e===va.TARGET)&&w5(i.activeTool)&&A.jsx(he.Grid,{container:!0,children:A.jsx(X_,{currentColor:u,changeClosedMode:S,closeChooseColor:g,handleCloseLineWeight:y,handleLineWeightSelect:h,openChooseColor:v,openChooseLineWeight:c,updateColor:_,toolOptions:a,toolState:i})}),i.activeTool===Ur.TEXT&&A.jsxs(he.Grid,{container:!0,direction:"column",spacing:1,children:[A.jsx(he.Grid,{children:A.jsx(mn,{variant:"overline",children:r("text")})}),n?A.jsxs(A.Fragment,{children:[A.jsx(he.Grid,{children:A.jsx(he.TextField,{value:i.text,placeholder:r("text"),fullwidth:!0,onChange:w})}),A.jsx(he.Grid,{children:A.jsx(X_,{changeClosedMode:S,closeChooseColor:g,currentColor:u,handleCloseLineWeight:y,handleLineWeightSelect:h,openChooseColor:v,openChooseLineWeight:c,toolOptions:a,toolState:i,updateColor:_})})]}):A.jsx(he.Grid,{children:A.jsx(mn,{children:r("click_on_canvas_to_write")})})]}),i.activeTool===Ur.IMAGE&&A.jsx(he.Grid,{container:!0,children:A.jsx(FD,{size:{xs:8},imageUrl:i.image?.id,onChange:O,isReadOnly:!!n,onAddImage:E,t:r})}),i.activeTool===Xt.POLYGON&&A.jsx(mn,{children:r("pressEnterOrClickFirstPointToClose")})]})}Y_.propTypes={currentShape:C.object.isRequired,displayMode:C.string.isRequired,setToolState:C.func.isRequired,t:C.func.isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string,image:C.shape({id:C.string}),strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,text:C.string,textBody:C.string,updateColor:C.func}).isRequired};const Q$=xs.styled(he.ListItem)(({theme:n})=>({display:"flex",justifyContent:"space-between"}));function HN({currentShapeId:n,deleteShape:e,shapes:t,t:r,updateCurrentShapeInShapes:i}){return A.jsx(j7,{children:t.map(a=>A.jsxs(D.Fragment,{children:[A.jsx(W1,{disableGutters:!0,children:A.jsxs(Q$,{children:[A.jsx(mn,{component:"span",sx:{color:"black",cursor:"pointer",fontWeight:a.id===n?"bold":void 0},onClick:()=>i(a),children:r(a.type)}),A.jsx(he.Tooltip,{title:A.jsx(Ic,{label:r("delete"),action:"delete"}),children:A.jsx(he.IconButton,{onClick:()=>e(a.id),edge:"end","aria-label":"delete",children:A.jsx(X7,{})})})]})}),A.jsx(he.Divider,{component:"li"})]},a.id))})}HN.propTypes={currentShapeId:C.string.isRequired,deleteShape:C.func.isRequired,shapes:C.array.isRequired,t:C.func.isRequired,updateCurrentShapeInShapes:C.func.isRequired};function zN({currentShape:n,deleteShape:e,displayMode:t,setToolState:r,shapes:i,t:a,toolState:s,updateCurrentShapeInShapes:u}){const c=(v,y)=>{if(!y)return;const S=y===Ur.SHAPE?Xt.RECTANGLE:y;r(_=>_.activeTool===S?_:{..._,activeTool:S})},h=v=>{if(r(y=>({...y,...v,activeTool:Ur.EDIT})),n){const y={};Object.prototype.hasOwnProperty.call(v,"strokeWidth")&&v.strokeWidth!==n.strokeWidth&&(y.strokeWidth=v.strokeWidth),Object.prototype.hasOwnProperty.call(v,"strokeColor")&&v.strokeColor!==n.stroke&&(y.stroke=v.strokeColor),Object.prototype.hasOwnProperty.call(v,"fillColor")&&v.fillColor!==n.fill&&(y.fill=v.fillColor),Object.prototype.hasOwnProperty.call(v,"text")&&v.text!==n.text&&(y.text=v.text),Object.prototype.hasOwnProperty.call(v,"image")&&v.image?.id!==n.url&&(y.url=v.image?.id??null),Object.keys(y).length&&u({...n,...y})}};D.useEffect(()=>{s.activeTool===Ur.SHAPE&&r(v=>({...v,activeTool:Xt.RECTANGLE}))},[s.activeTool,r]);const g=D.useMemo(()=>n?{...s,activeTool:n.type,closedMode:n.closedMode,fillColor:n.fill,image:{id:n.url},strokeColor:n.stroke,strokeWidth:n.strokeWidth,text:n.text}:s,[s,n]);return A.jsxs(A.Fragment,{children:[s.activeTool===Ur.EDIT&&A.jsxs(A.Fragment,{children:[n&&(t===va.DRAW||t===va.TARGET)&&A.jsxs("div",{children:[A.jsx(mn,{variant:"subFormSectionTitle",children:a("selected_object")}),A.jsx(Y_,{t:a,toolState:g,setToolState:h,displayMode:t,currentShape:n})]}),t===va.DRAW&&i.length>0&&A.jsxs(A.Fragment,{children:[A.jsx(mn,{variant:"subFormSectionTitle",children:a("object_list")}),A.jsx(HN,{currentShapeId:n?.id,shapes:i,deleteShape:e,updateCurrentShapeInShapes:u,t:a})]})]}),w5(s.activeTool)&&A.jsxs(yO,{value:s.activeTool,exclusive:!0,onChange:c,"aria-label":a("tool_selection"),size:"small","data-testid":"tool_selection",children:[t!==va.IMAGE&&A.jsx(he.Tooltip,{title:a("rectangle"),children:A.jsx(Gi,{value:Xt.RECTANGLE,"aria-label":a("add_a_rectangle"),children:A.jsx(QU,{})})}),t===va.TARGET&&A.jsx(he.Tooltip,{title:a("circle"),children:A.jsx(Gi,{value:Xt.CIRCLE,"aria-label":a("add_a_circle"),children:A.jsx(R9,{})})}),t!==va.IMAGE&&A.jsx("div",{children:A.jsx(he.Tooltip,{title:a("line"),children:A.jsx(Gi,{value:Xt.POLYGON,"aria-label":a("add_a_line"),children:A.jsx(tV,{})})})}),t===va.DRAW&&A.jsxs(A.Fragment,{children:[A.jsx(he.Tooltip,{title:"Ellipse shape",children:A.jsx(Gi,{value:Xt.ELLIPSE,"aria-label":a("add_an_ellipse"),children:A.jsx(R9,{})})}),A.jsx(he.Tooltip,{title:a("arrow"),children:A.jsx(Gi,{value:Xt.ARROW,"aria-label":a("add_an_arrow_shape"),children:A.jsx(eV,{})})})]})]}),s.activeTool===Ur.DELETE&&A.jsxs(A.Fragment,{children:[A.jsx(mn,{variant:"overline",children:a("delete")}),A.jsx("p",{children:a("click_to_delete_shape")}),A.jsxs(he.Button,{onClick:()=>e(),children:[A.jsx("span",{children:a("delete_all")}),A.jsx(jD,{color:"red"})]})]}),A.jsx(Y_,{t:a,toolState:s,setToolState:r,displayMode:t,currentShape:n})]})}zN.propTypes={currentShape:C.object.isRequired,deleteShape:C.func.isRequired,displayMode:C.string.isRequired,setToolState:C.func.isRequired,shapes:C.array.isRequired,t:C.func.isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string.isRequired,image:C.shape({id:C.string}).isRequired,strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,updateColor:C.func.isRequired}).isRequired,updateCurrentShapeInShapes:C.func.isRequired};const eQ=xs.styled(he.Grid)(({})=>({display:"flex",flexDirection:"column"}));function qN({displayMode:n,setToolState:e,toolState:t,deleteShape:r,currentShape:i,updateCurrentShapeInShapes:a,setViewTool:s,shapes:u,t:c}){D.useEffect(()=>{},[t.fillColor,t.strokeColor,t.strokeWidth]);const h=D.useCallback((y,S)=>{S&&(n?(e(_=>_.activeTool===S?_:{..._,activeTool:S}),S!==Ur.EDIT&&a(null)):(S===Ur.SHAPE&&e({...vG,activeTool:S}),a(null)))},[n,e,a]),g=D.useCallback(y=>()=>{s(y)},[s]),{activeTool:v}=t;return A.jsx(he.Grid,{container:!0,children:A.jsxs(eQ,{item:!0,xs:12,children:[A.jsxs(yO,{value:v,exclusive:!0,onChange:h,"aria-label":c("tool_selection"),size:"small",children:[n!==va.IMAGE&&A.jsx(he.Tooltip,{title:c("shape_selection"),children:A.jsx(Gi,{value:w5(v)?v:Ur.SHAPE,"aria-label":c("select_cursor"),onClick:g(r1),children:A.jsx(KU,{})})}),n===va.DRAW&&A.jsx(he.Tooltip,{title:c("text"),children:A.jsx(Gi,{value:Ur.TEXT,"aria-label":c("select_text"),onClick:g(r1),children:A.jsx(JU,{})})}),n===va.IMAGE&&A.jsx(he.Tooltip,{title:c("image"),children:A.jsx(Gi,{value:Ur.IMAGE,"aria-label":c("select_cursor"),onClick:g(r1),children:A.jsx(PD,{})})}),A.jsx(he.Tooltip,{title:c("edit"),children:A.jsx(Gi,{value:Ur.EDIT,"aria-label":c("select_cursor"),onClick:g(vO),children:A.jsx($U,{})})}),A.jsx(he.Tooltip,{title:A.jsx(Ic,{label:c("delete"),action:"delete"}),children:A.jsx(Gi,{value:Ur.DELETE,"aria-label":c("select_cursor"),onClick:g(r1),children:A.jsx(jD,{})})})]}),A.jsx(zN,{currentShape:i,deleteShape:r,displayMode:n,setToolState:e,shapes:u,t:c,toolState:t,updateCurrentShapeInShapes:a})]})})}qN.propTypes={currentShape:C.shape({id:C.string,rotation:C.number,scaleX:C.number,scaleY:C.number,type:C.string,url:C.string,x:C.number,y:C.number}).isRequired,deleteShape:C.func.isRequired,displayMode:C.string.isRequired,setToolState:C.func.isRequired,setViewTool:C.func.isRequired,shapes:C.arrayOf(C.shape({id:C.string,rotation:C.number,scaleX:C.number,scaleY:C.number,type:C.string,url:C.string,x:C.number,y:C.number})).isRequired,t:C.func.isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string.isRequired,image:C.shape({id:C.string}).isRequired,strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,updateColor:C.func.isRequired}).isRequired,updateCurrentShapeInShapes:C.func.isRequired};function UN({playerReferences:n,setTargetDrawingState:e,targetDrawingState:t,windowId:r}){const{t:i}=Bs.useTranslation(),a=Ka.useSelector(k=>Pt.getConfig(k)),{editMode:s}=Xm(a),[u,c]=D.useState(()=>{const k=Array.isArray(t?.shapes)?t.shapes:[];return{currentShape:null,isDrawing:!1,shapes:k,...t,...s&&k.length>0?{currentShape:k[0]}:{}}}),h=Array.isArray(t?.shapes)&&t.shapes.length>0,[g,v]=D.useState(h?oo:{...oo,activeTool:Ur.SHAPE}),[,y]=D.useState(vO),[S,_]=D.useState(n.getScale()),O=D.useCallback(()=>{const k=n.getScale();_(G=>G===k?G:k)},[n]),E=D.useRef(u.shapes);D.useLayoutEffect(()=>{const k=E.current,G=u.shapes;k!==G&&(k&&G&&k.length===G.length&&k.every((B,z)=>B===G[z])||(E.current=G,e({drawingState:u})))},[u.shapes,e,u]);const w=D.useCallback(k=>{c(G=>{if(!k)return G.shapes.length===0&&G.currentShape==null?G:{...G,currentShape:null,shapes:[]};const B=G.shapes.filter(z=>z.id!==k);return B.length===G.shapes.length?G:{...G,currentShape:null,shapes:B}})},[]),N=D.useRef(u);N.current=u,D.useEffect(()=>{const k=()=>{const{currentShape:G,shapes:B}=N.current;if(G){const z=B.filter(V=>V.id!==G.id);c(V=>({...V,currentShape:null,shapes:z}))}};return document.addEventListener(m_,k),()=>document.removeEventListener(m_,k)},[]);const L=D.useCallback(k=>{setTimeout(()=>{c(G=>{if(!k)return G.currentShape==null?G:{...G,currentShape:null};const B=G.shapes.findIndex(z=>z.id===k.id);if(B!==-1){if(G.shapes[B]===k&&G.currentShape===k)return G;const V=G.shapes===void 0?[]:[...G.shapes];return V[B]=k,{...G,currentShape:k,shapes:V}}return{...G,currentShape:k,shapes:[...G.shapes||[],k]}})},0)},[]);return A.jsx(he.Grid,{container:!0,direction:"column",children:A.jsxs(he.Grid,{container:!0,direction:"column",children:[A.jsx(mn,{variant:"subFormSectionTitle",children:i("spatialTarget")}),A.jsxs(he.Grid,{direction:"row",spacing:2,children:[A.jsx(H5,{displayMode:va.TARGET,drawingState:u,playerReferences:n,scale:S,setColorToolFromCurrentShape:()=>{},setDrawingState:c,tabView:"edit",toolState:g,updateCurrentShapeInShapes:L,updateScale:O,windowId:r,setToolState:v}),A.jsx(qN,{toolState:g,deleteShape:w,setToolState:v,shapes:u.shapes,currentShape:u.currentShape,setViewTool:y,t:i,displayMode:va.TARGET,updateCurrentShapeInShapes:L})]})]})})}UN.propTypes={playerReferences:C.object.isRequired,setTargetDrawingState:C.func.isRequired,targetDrawingState:C.object.isRequired,windowId:C.string.isRequired};const tQ={activeTool:Xt.POI},lI=()=>{};function VN({playerReferences:n,setTargetDrawingState:e,targetDrawingState:t,windowId:r}){const{t:i}=Bs.useTranslation(),[a,s]=D.useState(()=>({currentShape:null,isDrawing:!1,shapes:Array.isArray(t?.shapes)?t.shapes:[],...t})),[u,c]=D.useState(n.getScale()),h=D.useCallback(()=>{const y=n.getScale();c(S=>S===y?S:y)},[n]),g=D.useRef(a.shapes);D.useLayoutEffect(()=>{const y=g.current,S=a.shapes;y!==S&&(g.current=S,e({drawingState:a}))},[a.shapes,e,a]);const v=D.useCallback(y=>{setTimeout(()=>{s(S=>y?S.currentShape===y&&S.shapes[0]===y?S:{...S,currentShape:y,shapes:[y]}:S.currentShape==null?S:{...S,currentShape:null})},0)},[]);return A.jsxs(he.Grid,{container:!0,direction:"column",children:[A.jsx(he.Typography,{variant:"subFormSectionTitle",children:i("poi_click_to_place")}),A.jsx(he.Grid,{container:!0,direction:"row",spacing:2,children:A.jsx(H5,{displayMode:va.POI,drawingState:a,playerReferences:n,scale:u,setColorToolFromCurrentShape:lI,setDrawingState:s,setToolState:lI,tabView:"edit",toolState:tQ,updateCurrentShapeInShapes:v,updateScale:h,windowId:r})})]})}VN.propTypes={playerReferences:C.object.isRequired,setTargetDrawingState:C.func.isRequired,targetDrawingState:C.object.isRequired,windowId:C.string.isRequired};function N4({onChangeTarget:n,spatialTarget:e,pointOnly:t,playerReferences:r,target:i,windowId:a}){const{t:s}=Bs.useTranslation(),u=r.getMediaType(),c=D.useMemo(()=>{if(i)return i;const g={drawingState:{currentShape:null,isDrawing:!1,shapes:[]}};return u===Bi.IMAGE&&(g.fullCanvaXYWH=`0,0,${r.getMediaTrueWidth()},${r.getMediaTrueHeight()}`),g},[i,u,r]);D.useEffect(()=>{i||n(c)},[i,c,n]);const h=g=>{n({...c,...g})};return e?(console.log("ttot"),A.jsxs(he.Grid,{container:!0,direction:"column",spacing:1,children:[A.jsx(he.Grid,{children:!t&&A.jsx(he.Typography,{variant:"formSectionTitle",children:s("target")})}),e&&u!==Bi.AUDIO&&A.jsx(he.Grid,{container:!0,direction:"column",children:t?A.jsx(VN,{playerReferences:r,setTargetDrawingState:h,targetDrawingState:c.drawingState,windowId:a}):A.jsx(UN,{playerReferences:r,setTargetDrawingState:h,targetDrawingState:c.drawingState,windowId:a})})]})):null}N4.propTypes={onChangeTarget:C.func.isRequired,playerReferences:C.object.isRequired,pointOnly:C.bool,spatialTarget:C.bool.isRequired,target:C.object,windowId:C.string.isRequired};N4.defaultProps={pointOnly:!1};var nQ=Object.prototype,rQ=nQ.hasOwnProperty;function iQ(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&rQ.call(n,"index")&&(t.index=n.index,t.input=n.input),t}function aQ(n,e){var t=l4(n.buffer);return new n.constructor(t,n.byteOffset,n.byteLength)}var sQ=/\w*$/;function oQ(n){var e=new n.constructor(n.source,sQ.exec(n));return e.lastIndex=n.lastIndex,e}var uI=Xl?Xl.prototype:void 0,cI=uI?uI.valueOf:void 0;function lQ(n){return cI?Object(cI.call(n)):{}}var uQ="[object Boolean]",cQ="[object Date]",dQ="[object Map]",fQ="[object Number]",hQ="[object RegExp]",pQ="[object Set]",gQ="[object String]",mQ="[object Symbol]",vQ="[object ArrayBuffer]",yQ="[object DataView]",bQ="[object Float32Array]",xQ="[object Float64Array]",SQ="[object Int8Array]",CQ="[object Int16Array]",EQ="[object Int32Array]",_Q="[object Uint8Array]",TQ="[object Uint8ClampedArray]",wQ="[object Uint16Array]",AQ="[object Uint32Array]";function RQ(n,e,t){var r=n.constructor;switch(e){case vQ:return l4(n);case uQ:case cQ:return new r(+n);case yQ:return aQ(n);case bQ:case xQ:case SQ:case CQ:case EQ:case _Q:case TQ:case wQ:case AQ:return hN(n,t);case dQ:return new r;case fQ:case gQ:return new r(n);case hQ:return oQ(n);case pQ:return new r;case mQ:return lQ(n)}}var IQ="[object Map]";function OQ(n){return Yl(n)&&sl(n)==IQ}var dI=dp&&dp.isMap,DQ=dI?d4(dI):OQ,NQ="[object Set]";function MQ(n){return Yl(n)&&sl(n)==NQ}var fI=dp&&dp.isSet,LQ=fI?d4(fI):MQ,kQ=1,WN="[object Arguments]",PQ="[object Array]",jQ="[object Boolean]",FQ="[object Date]",BQ="[object Error]",XN="[object Function]",GQ="[object GeneratorFunction]",HQ="[object Map]",zQ="[object Number]",YN="[object Object]",qQ="[object RegExp]",UQ="[object Set]",VQ="[object String]",WQ="[object Symbol]",XQ="[object WeakMap]",YQ="[object ArrayBuffer]",ZQ="[object DataView]",JQ="[object Float32Array]",KQ="[object Float64Array]",$Q="[object Int8Array]",QQ="[object Int16Array]",eee="[object Int32Array]",tee="[object Uint8Array]",nee="[object Uint8ClampedArray]",ree="[object Uint16Array]",iee="[object Uint32Array]",Lr={};Lr[WN]=Lr[PQ]=Lr[YQ]=Lr[ZQ]=Lr[jQ]=Lr[FQ]=Lr[JQ]=Lr[KQ]=Lr[$Q]=Lr[QQ]=Lr[eee]=Lr[HQ]=Lr[zQ]=Lr[YN]=Lr[qQ]=Lr[UQ]=Lr[VQ]=Lr[WQ]=Lr[tee]=Lr[nee]=Lr[ree]=Lr[iee]=!0;Lr[BQ]=Lr[XN]=Lr[XQ]=!1;function U1(n,e,t,r,i,a){var s,u=e&kQ;if(s!==void 0)return s;if(!uo(n))return n;var c=Fs(n);if(c)s=iQ(n);else{var h=sl(n),g=h==XN||h==GQ;if(jm(n))return fN(n,u);if(h==YN||h==WN||g&&!i)s=g?{}:mN(n);else{if(!Lr[h])return i?n:{};s=RQ(n,h,u)}}a||(a=new cl);var v=a.get(n);if(v)return v;a.set(n,s),LQ(n)?n.forEach(function(_){s.add(U1(_,e,t,_,n,a))}):DQ(n)&&n.forEach(function(_,O){s.set(O,U1(_,e,t,O,n,a))});var y=z_,S=c?void 0:y(n);return wN(S||n,function(_,O){S&&(O=_,_=n[O]),SN(s,O,U1(_,e,t,O,n,a))}),s}var aee=1,see=4;function tp(n){return U1(n,aee|see)}function _c(n,e){return By(n,e)}var Ot=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(Ot||{});class Zl{constructor(e,t,r={}){this.attrName=e,this.keyName=t;const i=Ot.TYPE&Ot.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Ot.LEVEL|i:Ot.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class np extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const ZN=class Z_{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,t)}return null}create(e,t,r){const i=this.query(t);if(i==null)throw new np(`Unable to create ${t} blot`);const a=i,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),u=new a(e,s,r);return Z_.blots.set(u.domNode,u),u}find(e,t=!1){return Z_.find(e,t)}query(e,t=Ot.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&Ot.LEVEL&Ot.BLOCK?r=this.types.block:e&Ot.LEVEL&Ot.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&t&Ot.LEVEL&r.scope&&t&Ot.TYPE&r.scope?r:null}register(...e){return e.map(t=>{const r="blotName"in t,i="attrName"in t;if(!r&&!i)throw new np("Invalid definition");if(r&&t.blotName==="abstract")throw new np("Cannot register abstract class");const a=r?t.blotName:i?t.attrName:void 0;return this.types[a]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};ZN.blots=new WeakMap;let fp=ZN;function hI(n,e){return(n.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class oee extends Zl{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){hI(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(hI(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const ml=oee;function zE(n){const e=n.split("-"),t=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+t}class lee extends Zl{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[zE(this.keyName)]=t,!0):!1}remove(e){e.style[zE(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[zE(this.keyName)];return this.canAdd(e,t)?t:""}}const jc=lee;class uee{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=fp.find(this.domNode);if(e==null)return;const t=Zl.keys(this.domNode),r=ml.keys(this.domNode),i=jc.keys(this.domNode);t.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,Ot.ATTRIBUTE);s instanceof Zl&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(t=>{const r=this.attributes[t].value(this.domNode);e.format(t,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Hy=uee,JN=class{constructor(e,t){this.scroll=e,this.domNode=t,fp.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new np("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),fp.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,i){const a=this.isolate(e,t);if(this.scroll.query(r,Ot.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,Ot.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,t,r){const i=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new np(`Cannot wrap ${e}`);return r.appendChild(this),r}};JN.blotName="abstract";let KN=JN;const $N=class extends KN{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};$N.scope=Ot.INLINE_BLOT;let cee=$N;const Ja=cee;class dee{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let r=t();for(;r&&e>0;)e-=1,r=t();return r}contains(e){const t=this.iterator();let r=t();for(;r;){if(r===e)return!0;r=t()}return!1}indexOf(e){const t=this.iterator();let r=t(),i=0;for(;r;){if(r===e)return i;i+=1,r=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,r=this.head;for(;r!=null;){if(r===e)return t;t+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||t&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const t=this.iterator();let r=t();for(;r;)e(r),r=t()}forEachAt(e,t,r){if(t<=0)return;const[i,a]=this.find(e);let s=e-a;const u=this.iterator(i);let c=u();for(;c&&s<e+t;){const h=c.length();e>s?r(c,e-s,Math.min(t,s+h-e)):r(c,0,Math.min(h,e+t-s)),s+=h,c=u()}}map(e){return this.reduce((t,r)=>(t.push(e(r)),t),[])}reduce(e,t){const r=this.iterator();let i=r();for(;i;)t=e(t,i),i=r();return t}}function pI(n,e){const t=e.find(n);if(t)return t;try{return e.create(n)}catch{const r=e.create(Ot.INLINE);return Array.from(n.childNodes).forEach(i=>{r.domNode.appendChild(i)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const QN=class xc extends KN{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,xc.uiClass&&this.uiNode.classList.add(xc.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new dee,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=pI(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof np)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,t=0){const[r,i]=this.children.find(t);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof xc?r.descendant(e,i):[null,-1]}descendants(e,t=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(t,r,(s,u,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof xc&&(i=i.concat(s.descendants(e,u,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===Ot.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof xc?t.unwrap():t.remove())})}formatAt(e,t,r,i){this.children.forEachAt(e,t,(a,s,u)=>{a.formatAt(s,u,r,i)})}insertAt(e,t,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,t,r);else{const s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(r=>{e.insertBefore(r,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[r,i]=this.children.find(e,t),a=[[this,e]];return r instanceof xc?a.concat(r.path(i,t)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return r instanceof xc&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const u=i.split(a,t);u!=null&&r.appendChild(u)}),r}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const u=pI(a,this.scroll);(u.next!==s||u.next==null)&&(u.parent!=null&&u.parent.removeChild(this),this.insertBefore(u,s||void 0))}),this.enforceAllowedChildren()}};QN.uiClass="";let fee=QN;const dl=fee;function hee(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}const Xh=class Yh extends dl{static create(e){return super.create(e)}static formats(e,t){const r=t.query(Yh.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Hy(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Yh||(r=r.wrap(Yh.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,Ot.INLINE);if(r==null)return;r instanceof Zl?this.attributes.attribute(r,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.formats()[r]!=null||this.scroll.query(r,Ot.ATTRIBUTE)?this.isolate(e,t).format(r,i):super.formatAt(e,t,r,i)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const r=this.next;r instanceof Yh&&r.prev===this&&hee(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,t){const r=super.wrap(e,t);return r instanceof Yh&&this.attributes.move(r),r}};Xh.allowedChildren=[Xh,Ja],Xh.blotName="inline",Xh.scope=Ot.INLINE_BLOT,Xh.tagName="SPAN";let pee=Xh;const M4=pee,Zh=class J_ extends dl{static create(e){return super.create(e)}static formats(e,t){const r=t.query(J_.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Hy(this.domNode)}format(e,t){const r=this.scroll.query(e,Ot.BLOCK);r!=null&&(r instanceof Zl?this.attributes.attribute(r,t):e===this.statics.blotName&&!t?this.replaceWith(J_.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.scroll.query(r,Ot.BLOCK)!=null?this.format(r,i):super.formatAt(e,t,r,i)}insertAt(e,t,r){if(r==null||this.scroll.query(t,Ot.INLINE)!=null)super.insertAt(e,t,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(t,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Zh.blotName="block",Zh.scope=Ot.BLOCK_BLOT,Zh.tagName="P",Zh.allowedChildren=[M4,Zh,Ja];let gee=Zh;const Fm=gee,K_=class extends dl{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,i){super.formatAt(e,t,r,i),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};K_.blotName="container",K_.scope=Ot.BLOCK_BLOT;let mee=K_;const zy=mee;class vee extends Ja{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,r,i){e===0&&t===this.length()?this.format(r,i):super.formatAt(e,t,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const co=vee,yee={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},bee=100,Jh=class extends dl{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,yee),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=Ot.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,i){this.update(),super.formatAt(e,t,r,i)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,h=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),h&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof dl&&c.children.forEach(s),r.delete(c.domNode),c.optimize(t))};let u=e;for(let c=0;u.length>0;c+=1){if(c>=bee)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(h=>{const g=this.find(h.target,!0);g!=null&&(g.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(v=>{const y=this.find(v,!1);a(y,!1),y instanceof dl&&y.children.forEach(S=>{a(S,!1)})})):h.type==="attributes"&&a(g.prev)),a(g))}),this.children.forEach(s),u=Array.from(this.observer.takeRecords()),i=u.slice();i.length>0;)e.push(i.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};Jh.blotName="scroll",Jh.defaultChild=Fm,Jh.allowedChildren=[Fm,zy],Jh.scope=Ot.BLOCK_BLOT,Jh.tagName="DIV";let xee=Jh;const L4=xee,$_=class eM extends Ja{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,r){r==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof eM&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,t){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};$_.blotName="text",$_.scope=Ot.INLINE_BLOT;let See=$_;const sy=See,Cee=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Zl,AttributorStore:Hy,BlockBlot:Fm,ClassAttributor:ml,ContainerBlot:zy,EmbedBlot:co,InlineBlot:M4,LeafBlot:Ja,ParentBlot:dl,Registry:fp,Scope:Ot,ScrollBlot:L4,StyleAttributor:jc,TextBlot:sy},Symbol.toStringTag,{value:"Module"}));var _1={exports:{}},qE,gI;function Eee(){if(gI)return qE;gI=1;var n=-1,e=1,t=0;function r(P,q,H,ee,te){if(P===q)return P?[[t,P]]:[];if(H!=null){var Z=Y(P,q,H);if(Z)return Z}var le=u(P,q),Q=P.substring(0,le);P=P.substring(le),q=q.substring(le),le=h(P,q);var se=P.substring(P.length-le);P=P.substring(0,P.length-le),q=q.substring(0,q.length-le);var oe=i(P,q);return Q&&oe.unshift([t,Q]),se&&oe.push([t,se]),N(oe,te),ee&&v(oe),oe}function i(P,q){var H;if(!P)return[[e,q]];if(!q)return[[n,P]];var ee=P.length>q.length?P:q,te=P.length>q.length?q:P,Z=ee.indexOf(te);if(Z!==-1)return H=[[e,ee.substring(0,Z)],[t,te],[e,ee.substring(Z+te.length)]],P.length>q.length&&(H[0][0]=H[2][0]=n),H;if(te.length===1)return[[n,P],[e,q]];var le=g(P,q);if(le){var Q=le[0],se=le[1],oe=le[2],be=le[3],pe=le[4],Oe=r(Q,oe),Te=r(se,be);return Oe.concat([[t,pe]],Te)}return a(P,q)}function a(P,q){for(var H=P.length,ee=q.length,te=Math.ceil((H+ee)/2),Z=te,le=2*te,Q=new Array(le),se=new Array(le),oe=0;oe<le;oe++)Q[oe]=-1,se[oe]=-1;Q[Z+1]=0,se[Z+1]=0;for(var be=H-ee,pe=be%2!==0,Oe=0,Te=0,Pe=0,Ze=0,pt=0;pt<te;pt++){for(var at=-pt+Oe;at<=pt-Te;at+=2){var mt=Z+at,Et;at===-pt||at!==pt&&Q[mt-1]<Q[mt+1]?Et=Q[mt+1]:Et=Q[mt-1]+1;for(var ft=Et-at;Et<H&&ft<ee&&P.charAt(Et)===q.charAt(ft);)Et++,ft++;if(Q[mt]=Et,Et>H)Te+=2;else if(ft>ee)Oe+=2;else if(pe){var Rt=Z+be-at;if(Rt>=0&&Rt<le&&se[Rt]!==-1){var yt=H-se[Rt];if(Et>=yt)return s(P,q,Et,ft)}}}for(var ht=-pt+Pe;ht<=pt-Ze;ht+=2){var Rt=Z+ht,yt;ht===-pt||ht!==pt&&se[Rt-1]<se[Rt+1]?yt=se[Rt+1]:yt=se[Rt-1]+1;for(var ot=yt-ht;yt<H&&ot<ee&&P.charAt(H-yt-1)===q.charAt(ee-ot-1);)yt++,ot++;if(se[Rt]=yt,yt>H)Ze+=2;else if(ot>ee)Pe+=2;else if(!pe){var mt=Z+be-ht;if(mt>=0&&mt<le&&Q[mt]!==-1){var Et=Q[mt],ft=Z+Et-mt;if(yt=H-yt,Et>=yt)return s(P,q,Et,ft)}}}}return[[n,P],[e,q]]}function s(P,q,H,ee){var te=P.substring(0,H),Z=q.substring(0,ee),le=P.substring(H),Q=q.substring(ee),se=r(te,Z),oe=r(le,Q);return se.concat(oe)}function u(P,q){if(!P||!q||P.charAt(0)!==q.charAt(0))return 0;for(var H=0,ee=Math.min(P.length,q.length),te=ee,Z=0;H<te;)P.substring(Z,te)==q.substring(Z,te)?(H=te,Z=H):ee=te,te=Math.floor((ee-H)/2+H);return L(P.charCodeAt(te-1))&&te--,te}function c(P,q){var H=P.length,ee=q.length;if(H==0||ee==0)return 0;H>ee?P=P.substring(H-ee):H<ee&&(q=q.substring(0,H));var te=Math.min(H,ee);if(P==q)return te;for(var Z=0,le=1;;){var Q=P.substring(te-le),se=q.indexOf(Q);if(se==-1)return Z;le+=se,(se==0||P.substring(te-le)==q.substring(0,le))&&(Z=le,le++)}}function h(P,q){if(!P||!q||P.slice(-1)!==q.slice(-1))return 0;for(var H=0,ee=Math.min(P.length,q.length),te=ee,Z=0;H<te;)P.substring(P.length-te,P.length-Z)==q.substring(q.length-te,q.length-Z)?(H=te,Z=H):ee=te,te=Math.floor((ee-H)/2+H);return k(P.charCodeAt(P.length-te))&&te--,te}function g(P,q){var H=P.length>q.length?P:q,ee=P.length>q.length?q:P;if(H.length<4||ee.length*2<H.length)return null;function te(Te,Pe,Ze){for(var pt=Te.substring(Ze,Ze+Math.floor(Te.length/4)),at=-1,mt="",Et,ft,Rt,yt;(at=Pe.indexOf(pt,at+1))!==-1;){var ht=u(Te.substring(Ze),Pe.substring(at)),ot=h(Te.substring(0,Ze),Pe.substring(0,at));mt.length<ot+ht&&(mt=Pe.substring(at-ot,at)+Pe.substring(at,at+ht),Et=Te.substring(0,Ze-ot),ft=Te.substring(Ze+ht),Rt=Pe.substring(0,at-ot),yt=Pe.substring(at+ht))}return mt.length*2>=Te.length?[Et,ft,Rt,yt,mt]:null}var Z=te(H,ee,Math.ceil(H.length/4)),le=te(H,ee,Math.ceil(H.length/2)),Q;if(!Z&&!le)return null;le?Z?Q=Z[4].length>le[4].length?Z:le:Q=le:Q=Z;var se,oe,be,pe;P.length>q.length?(se=Q[0],oe=Q[1],be=Q[2],pe=Q[3]):(be=Q[0],pe=Q[1],se=Q[2],oe=Q[3]);var Oe=Q[4];return[se,oe,be,pe,Oe]}function v(P){for(var q=!1,H=[],ee=0,te=null,Z=0,le=0,Q=0,se=0,oe=0;Z<P.length;)P[Z][0]==t?(H[ee++]=Z,le=se,Q=oe,se=0,oe=0,te=P[Z][1]):(P[Z][0]==e?se+=P[Z][1].length:oe+=P[Z][1].length,te&&te.length<=Math.max(le,Q)&&te.length<=Math.max(se,oe)&&(P.splice(H[ee-1],0,[n,te]),P[H[ee-1]+1][0]=e,ee--,ee--,Z=ee>0?H[ee-1]:-1,le=0,Q=0,se=0,oe=0,te=null,q=!0)),Z++;for(q&&N(P),w(P),Z=1;Z<P.length;){if(P[Z-1][0]==n&&P[Z][0]==e){var be=P[Z-1][1],pe=P[Z][1],Oe=c(be,pe),Te=c(pe,be);Oe>=Te?(Oe>=be.length/2||Oe>=pe.length/2)&&(P.splice(Z,0,[t,pe.substring(0,Oe)]),P[Z-1][1]=be.substring(0,be.length-Oe),P[Z+1][1]=pe.substring(Oe),Z++):(Te>=be.length/2||Te>=pe.length/2)&&(P.splice(Z,0,[t,be.substring(0,Te)]),P[Z-1][0]=e,P[Z-1][1]=pe.substring(0,pe.length-Te),P[Z+1][0]=n,P[Z+1][1]=be.substring(Te),Z++),Z++}Z++}}var y=/[^a-zA-Z0-9]/,S=/\s/,_=/[\r\n]/,O=/\n\r?\n$/,E=/^\r?\n\r?\n/;function w(P){function q(Te,Pe){if(!Te||!Pe)return 6;var Ze=Te.charAt(Te.length-1),pt=Pe.charAt(0),at=Ze.match(y),mt=pt.match(y),Et=at&&Ze.match(S),ft=mt&&pt.match(S),Rt=Et&&Ze.match(_),yt=ft&&pt.match(_),ht=Rt&&Te.match(O),ot=yt&&Pe.match(E);return ht||ot?5:Rt||yt?4:at&&!Et&&ft?3:Et||ft?2:at||mt?1:0}for(var H=1;H<P.length-1;){if(P[H-1][0]==t&&P[H+1][0]==t){var ee=P[H-1][1],te=P[H][1],Z=P[H+1][1],le=h(ee,te);if(le){var Q=te.substring(te.length-le);ee=ee.substring(0,ee.length-le),te=Q+te.substring(0,te.length-le),Z=Q+Z}for(var se=ee,oe=te,be=Z,pe=q(ee,te)+q(te,Z);te.charAt(0)===Z.charAt(0);){ee+=te.charAt(0),te=te.substring(1)+Z.charAt(0),Z=Z.substring(1);var Oe=q(ee,te)+q(te,Z);Oe>=pe&&(pe=Oe,se=ee,oe=te,be=Z)}P[H-1][1]!=se&&(se?P[H-1][1]=se:(P.splice(H-1,1),H--),P[H][1]=oe,be?P[H+1][1]=be:(P.splice(H+1,1),H--))}H++}}function N(P,q){P.push([t,""]);for(var H=0,ee=0,te=0,Z="",le="",Q;H<P.length;){if(H<P.length-1&&!P[H][1]){P.splice(H,1);continue}switch(P[H][0]){case e:te++,le+=P[H][1],H++;break;case n:ee++,Z+=P[H][1],H++;break;case t:var se=H-te-ee-1;if(q){if(se>=0&&B(P[se][1])){var oe=P[se][1].slice(-1);if(P[se][1]=P[se][1].slice(0,-1),Z=oe+Z,le=oe+le,!P[se][1]){P.splice(se,1),H--;var be=se-1;P[be]&&P[be][0]===e&&(te++,le=P[be][1]+le,be--),P[be]&&P[be][0]===n&&(ee++,Z=P[be][1]+Z,be--),se=be}}if(G(P[H][1])){var oe=P[H][1].charAt(0);P[H][1]=P[H][1].slice(1),Z+=oe,le+=oe}}if(H<P.length-1&&!P[H][1]){P.splice(H,1);break}if(Z.length>0||le.length>0){Z.length>0&&le.length>0&&(Q=u(le,Z),Q!==0&&(se>=0?P[se][1]+=le.substring(0,Q):(P.splice(0,0,[t,le.substring(0,Q)]),H++),le=le.substring(Q),Z=Z.substring(Q)),Q=h(le,Z),Q!==0&&(P[H][1]=le.substring(le.length-Q)+P[H][1],le=le.substring(0,le.length-Q),Z=Z.substring(0,Z.length-Q)));var pe=te+ee;Z.length===0&&le.length===0?(P.splice(H-pe,pe),H=H-pe):Z.length===0?(P.splice(H-pe,pe,[e,le]),H=H-pe+1):le.length===0?(P.splice(H-pe,pe,[n,Z]),H=H-pe+1):(P.splice(H-pe,pe,[n,Z],[e,le]),H=H-pe+2)}H!==0&&P[H-1][0]===t?(P[H-1][1]+=P[H][1],P.splice(H,1)):H++,te=0,ee=0,Z="",le="";break}}P[P.length-1][1]===""&&P.pop();var Oe=!1;for(H=1;H<P.length-1;)P[H-1][0]===t&&P[H+1][0]===t&&(P[H][1].substring(P[H][1].length-P[H-1][1].length)===P[H-1][1]?(P[H][1]=P[H-1][1]+P[H][1].substring(0,P[H][1].length-P[H-1][1].length),P[H+1][1]=P[H-1][1]+P[H+1][1],P.splice(H-1,1),Oe=!0):P[H][1].substring(0,P[H+1][1].length)==P[H+1][1]&&(P[H-1][1]+=P[H+1][1],P[H][1]=P[H][1].substring(P[H+1][1].length)+P[H+1][1],P.splice(H+1,1),Oe=!0)),H++;Oe&&N(P,q)}function L(P){return P>=55296&&P<=56319}function k(P){return P>=56320&&P<=57343}function G(P){return k(P.charCodeAt(0))}function B(P){return L(P.charCodeAt(P.length-1))}function z(P){for(var q=[],H=0;H<P.length;H++)P[H][1].length>0&&q.push(P[H]);return q}function V(P,q,H,ee){return B(P)||G(ee)?null:z([[t,P],[n,q],[e,H],[t,ee]])}function Y(P,q,H){var ee=typeof H=="number"?{index:H,length:0}:H.oldRange,te=typeof H=="number"?null:H.newRange,Z=P.length,le=q.length;if(ee.length===0&&(te===null||te.length===0)){var Q=ee.index,se=P.slice(0,Q),oe=P.slice(Q),be=te?te.index:null;e:{var pe=Q+le-Z;if(be!==null&&be!==pe||pe<0||pe>le)break e;var Oe=q.slice(0,pe),Te=q.slice(pe);if(Te!==oe)break e;var Pe=Math.min(Q,pe),Ze=se.slice(0,Pe),pt=Oe.slice(0,Pe);if(Ze!==pt)break e;var at=se.slice(Pe),mt=Oe.slice(Pe);return V(Ze,at,mt,oe)}e:{if(be!==null&&be!==Q)break e;var Et=Q,Oe=q.slice(0,Et),Te=q.slice(Et);if(Oe!==se)break e;var ft=Math.min(Z-Et,le-Et),Rt=oe.slice(oe.length-ft),yt=Te.slice(Te.length-ft);if(Rt!==yt)break e;var at=oe.slice(0,oe.length-ft),mt=Te.slice(0,Te.length-ft);return V(se,at,mt,Rt)}}if(ee.length>0&&te&&te.length===0)e:{var Ze=P.slice(0,ee.index),Rt=P.slice(ee.index+ee.length),Pe=Ze.length,ft=Rt.length;if(le<Pe+ft)break e;var pt=q.slice(0,Pe),yt=q.slice(le-ft);if(Ze!==pt||Rt!==yt)break e;var at=P.slice(Pe,Z-ft),mt=q.slice(Pe,le-ft);return V(Ze,at,mt,Rt)}return null}function J(P,q,H,ee){return r(P,q,H,ee,!0)}return J.INSERT=e,J.DELETE=n,J.EQUAL=t,qE=J,qE}var vm={exports:{}};vm.exports;var mI;function tM(){return mI||(mI=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",h="[object Error]",g="[object Function]",v="[object GeneratorFunction]",y="[object Map]",S="[object Number]",_="[object Object]",O="[object Promise]",E="[object RegExp]",w="[object Set]",N="[object String]",L="[object Symbol]",k="[object WeakMap]",G="[object ArrayBuffer]",B="[object DataView]",z="[object Float32Array]",V="[object Float64Array]",Y="[object Int8Array]",J="[object Int16Array]",P="[object Int32Array]",q="[object Uint8Array]",H="[object Uint8ClampedArray]",ee="[object Uint16Array]",te="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,le=/\w*$/,Q=/^\[object .+?Constructor\]$/,se=/^(?:0|[1-9]\d*)$/,oe={};oe[a]=oe[s]=oe[G]=oe[B]=oe[u]=oe[c]=oe[z]=oe[V]=oe[Y]=oe[J]=oe[P]=oe[y]=oe[S]=oe[_]=oe[E]=oe[w]=oe[N]=oe[L]=oe[q]=oe[H]=oe[ee]=oe[te]=!0,oe[h]=oe[g]=oe[k]=!1;var be=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo,pe=typeof self=="object"&&self&&self.Object===Object&&self,Oe=be||pe||Function("return this")(),Te=e&&!e.nodeType&&e,Pe=Te&&!0&&n&&!n.nodeType&&n,Ze=Pe&&Pe.exports===Te;function pt(M,X){return M.set(X[0],X[1]),M}function at(M,X){return M.add(X),M}function mt(M,X){for(var ie=-1,Ce=M?M.length:0;++ie<Ce&&X(M[ie],ie,M)!==!1;);return M}function Et(M,X){for(var ie=-1,Ce=X.length,Zt=M.length;++ie<Ce;)M[Zt+ie]=X[ie];return M}function ft(M,X,ie,Ce){for(var Zt=-1,Ct=M?M.length:0;++Zt<Ct;)ie=X(ie,M[Zt],Zt,M);return ie}function Rt(M,X){for(var ie=-1,Ce=Array(M);++ie<M;)Ce[ie]=X(ie);return Ce}function yt(M,X){return M?.[X]}function ht(M){var X=!1;if(M!=null&&typeof M.toString!="function")try{X=!!(M+"")}catch{}return X}function ot(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce,Zt){ie[++X]=[Zt,Ce]}),ie}function jt(M,X){return function(ie){return M(X(ie))}}function _t(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce){ie[++X]=Ce}),ie}var pn=Array.prototype,It=Function.prototype,Yt=Object.prototype,Nt=Oe["__core-js_shared__"],Un=(function(){var M=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""})(),vn=It.toString,On=Yt.hasOwnProperty,ar=Yt.toString,dr=RegExp("^"+vn.call(On).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jn=Ze?Oe.Buffer:void 0,Dn=Oe.Symbol,Kn=Oe.Uint8Array,Me=jt(Object.getPrototypeOf,Object),Qe=Object.create,Lt=Yt.propertyIsEnumerable,Ye=pn.splice,Ut=Object.getOwnPropertySymbols,Vn=Jn?Jn.isBuffer:void 0,st=jt(Object.keys,Object),Ve=lr(Oe,"DataView"),Vt=lr(Oe,"Map"),Wt=lr(Oe,"Promise"),He=lr(Oe,"Set"),lt=lr(Oe,"WeakMap"),Tt=lr(Object,"create"),fn=_e(Ve),$e=_e(Vt),Fe=_e(Wt),bt=_e(He),$t=_e(lt),yn=Dn?Dn.prototype:void 0,gn=yn?yn.valueOf:void 0;function an(M){var X=-1,ie=M?M.length:0;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Vr(){this.__data__=Tt?Tt(null):{}}function qi(M){return this.has(M)&&delete this.__data__[M]}function Ui(M){var X=this.__data__;if(Tt){var ie=X[M];return ie===r?void 0:ie}return On.call(X,M)?X[M]:void 0}function sr(M){var X=this.__data__;return Tt?X[M]!==void 0:On.call(X,M)}function Ei(M,X){var ie=this.__data__;return ie[M]=Tt&&X===void 0?r:X,this}an.prototype.clear=Vr,an.prototype.delete=qi,an.prototype.get=Ui,an.prototype.has=sr,an.prototype.set=Ei;function fr(M){var X=-1,ie=M?M.length:0;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function ua(){this.__data__=[]}function li(M){var X=this.__data__,ie=Sr(X,M);if(ie<0)return!1;var Ce=X.length-1;return ie==Ce?X.pop():Ye.call(X,ie,1),!0}function La(M){var X=this.__data__,ie=Sr(X,M);return ie<0?void 0:X[ie][1]}function ui(M){return Sr(this.__data__,M)>-1}function ba(M,X){var ie=this.__data__,Ce=Sr(ie,M);return Ce<0?ie.push([M,X]):ie[Ce][1]=X,this}fr.prototype.clear=ua,fr.prototype.delete=li,fr.prototype.get=La,fr.prototype.has=ui,fr.prototype.set=ba;function Cr(M){var X=-1,ie=M?M.length:0;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Wn(){this.__data__={hash:new an,map:new(Vt||fr),string:new an}}function Ii(M){return xa(this,M).delete(M)}function ka(M){return xa(this,M).get(M)}function ci(M){return xa(this,M).has(M)}function Cs(M,X){return xa(this,M).set(M,X),this}Cr.prototype.clear=Wn,Cr.prototype.delete=Ii,Cr.prototype.get=ka,Cr.prototype.has=ci,Cr.prototype.set=Cs;function xr(M){this.__data__=new fr(M)}function Hs(){this.__data__=new fr}function Fo(M){return this.__data__.delete(M)}function zs(M){return this.__data__.get(M)}function $a(M){return this.__data__.has(M)}function ca(M,X){var ie=this.__data__;if(ie instanceof fr){var Ce=ie.__data__;if(!Vt||Ce.length<t-1)return Ce.push([M,X]),this;ie=this.__data__=new Cr(Ce)}return ie.set(M,X),this}xr.prototype.clear=Hs,xr.prototype.delete=Fo,xr.prototype.get=zs,xr.prototype.has=$a,xr.prototype.set=ca;function it(M,X){var ie=Nn(M)||Mt(M)?Rt(M.length,String):[],Ce=ie.length,Zt=!!Ce;for(var Ct in M)On.call(M,Ct)&&!(Zt&&(Ct=="length"||qs(Ct,Ce)))&&ie.push(Ct);return ie}function bn(M,X,ie){var Ce=M[X];(!(On.call(M,X)&&je(Ce,ie))||ie===void 0&&!(X in M))&&(M[X]=ie)}function Sr(M,X){for(var ie=M.length;ie--;)if(je(M[ie][0],X))return ie;return-1}function Fn(M,X){return M&&Fr(X,tu(X),M)}function wn(M,X,ie,Ce,Zt,Ct,Mn){var Ln;if(Ce&&(Ln=Ct?Ce(M,Zt,Ct,Mn):Ce(M)),Ln!==void 0)return Ln;if(!Es(M))return M;var $n=Nn(M);if($n){if(Ln=fo(M),!X)return es(M,Ln)}else{var xn=Yi(M),Ir=xn==g||xn==v;if($r(M))return tr(M,X);if(xn==_||xn==a||Ir&&!Ct){if(ht(M))return Ct?M:{};if(Ln=Sa(Ir?{}:M),!X)return yl(M,Fn(Ln,M))}else{if(!oe[xn])return Ct?M:{};Ln=ho(M,xn,wn,X)}}Mn||(Mn=new xr);var hi=Mn.get(M);if(hi)return hi;if(Mn.set(M,Ln),!$n)var Or=ie?di(M):tu(M);return mt(Or||M,function(ur,nr){Or&&(nr=ur,ur=M[nr]),bn(Ln,nr,wn(ur,X,ie,Ce,nr,M,Mn))}),Ln}function Kr(M){return Es(M)?Qe(M):{}}function An(M,X,ie){var Ce=X(M);return Nn(M)?Ce:Et(Ce,ie(M))}function Rn(M){return ar.call(M)}function Vi(M){if(!Es(M)||$(M))return!1;var X=hr(M)||ht(M)?dr:Q;return X.test(_e(M))}function vr(M){if(!de(M))return st(M);var X=[];for(var ie in Object(M))On.call(M,ie)&&ie!="constructor"&&X.push(ie);return X}function tr(M,X){if(X)return M.slice();var ie=new M.constructor(M.length);return M.copy(ie),ie}function Wr(M){var X=new M.constructor(M.byteLength);return new Kn(X).set(new Kn(M)),X}function jr(M,X){var ie=X?Wr(M.buffer):M.buffer;return new M.constructor(ie,M.byteOffset,M.byteLength)}function or(M,X,ie){var Ce=X?ie(ot(M),!0):ot(M);return ft(Ce,pt,new M.constructor)}function _i(M){var X=new M.constructor(M.source,le.exec(M));return X.lastIndex=M.lastIndex,X}function Xr(M,X,ie){var Ce=X?ie(_t(M),!0):_t(M);return ft(Ce,at,new M.constructor)}function Qa(M){return gn?Object(gn.call(M)):{}}function Wi(M,X){var ie=X?Wr(M.buffer):M.buffer;return new M.constructor(ie,M.byteOffset,M.length)}function es(M,X){var ie=-1,Ce=M.length;for(X||(X=Array(Ce));++ie<Ce;)X[ie]=M[ie];return X}function Fr(M,X,ie,Ce){ie||(ie={});for(var Zt=-1,Ct=X.length;++Zt<Ct;){var Mn=X[Zt],Ln=void 0;bn(ie,Mn,Ln===void 0?M[Mn]:Ln)}return ie}function yl(M,X){return Fr(M,Xi(M),X)}function di(M){return An(M,tu,Xi)}function xa(M,X){var ie=M.__data__;return Le(X)?ie[typeof X=="string"?"string":"hash"]:ie.map}function lr(M,X){var ie=yt(M,X);return Vi(ie)?ie:void 0}var Xi=Ut?jt(Ut,Object):xl,Yi=Rn;(Ve&&Yi(new Ve(new ArrayBuffer(1)))!=B||Vt&&Yi(new Vt)!=y||Wt&&Yi(Wt.resolve())!=O||He&&Yi(new He)!=w||lt&&Yi(new lt)!=k)&&(Yi=function(M){var X=ar.call(M),ie=X==_?M.constructor:void 0,Ce=ie?_e(ie):void 0;if(Ce)switch(Ce){case fn:return B;case $e:return y;case Fe:return O;case bt:return w;case $t:return k}return X});function fo(M){var X=M.length,ie=M.constructor(X);return X&&typeof M[0]=="string"&&On.call(M,"index")&&(ie.index=M.index,ie.input=M.input),ie}function Sa(M){return typeof M.constructor=="function"&&!de(M)?Kr(Me(M)):{}}function ho(M,X,ie,Ce){var Zt=M.constructor;switch(X){case G:return Wr(M);case u:case c:return new Zt(+M);case B:return jr(M,Ce);case z:case V:case Y:case J:case P:case q:case H:case ee:case te:return Wi(M,Ce);case y:return or(M,Ce,ie);case S:case N:return new Zt(M);case E:return _i(M);case w:return Xr(M,Ce,ie);case L:return Qa(M)}}function qs(M,X){return X=X??i,!!X&&(typeof M=="number"||se.test(M))&&M>-1&&M%1==0&&M<X}function Le(M){var X=typeof M;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?M!=="__proto__":M===null}function $(M){return!!Un&&Un in M}function de(M){var X=M&&M.constructor,ie=typeof X=="function"&&X.prototype||Yt;return M===ie}function _e(M){if(M!=null){try{return vn.call(M)}catch{}try{return M+""}catch{}}return""}function Xe(M){return wn(M,!0,!0)}function je(M,X){return M===X||M!==M&&X!==X}function Mt(M){return fi(M)&&On.call(M,"callee")&&(!Lt.call(M,"callee")||ar.call(M)==a)}var Nn=Array.isArray;function Xn(M){return M!=null&&Rr(M.length)&&!hr(M)}function fi(M){return bl(M)&&Xn(M)}var $r=Vn||Ca;function hr(M){var X=Es(M)?ar.call(M):"";return X==g||X==v}function Rr(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=i}function Es(M){var X=typeof M;return!!M&&(X=="object"||X=="function")}function bl(M){return!!M&&typeof M=="object"}function tu(M){return Xn(M)?it(M):vr(M)}function xl(){return[]}function Ca(){return!1}n.exports=Xe})(vm,vm.exports)),vm.exports}var ym={exports:{}};ym.exports;var vI;function nM(){return vI||(vI=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,u="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",g="[object Boolean]",v="[object Date]",y="[object Error]",S="[object Function]",_="[object GeneratorFunction]",O="[object Map]",E="[object Number]",w="[object Null]",N="[object Object]",L="[object Promise]",k="[object Proxy]",G="[object RegExp]",B="[object Set]",z="[object String]",V="[object Symbol]",Y="[object Undefined]",J="[object WeakMap]",P="[object ArrayBuffer]",q="[object DataView]",H="[object Float32Array]",ee="[object Float64Array]",te="[object Int8Array]",Z="[object Int16Array]",le="[object Int32Array]",Q="[object Uint8Array]",se="[object Uint8ClampedArray]",oe="[object Uint16Array]",be="[object Uint32Array]",pe=/[\\^$.*+?()[\]{}|]/g,Oe=/^\[object .+?Constructor\]$/,Te=/^(?:0|[1-9]\d*)$/,Pe={};Pe[H]=Pe[ee]=Pe[te]=Pe[Z]=Pe[le]=Pe[Q]=Pe[se]=Pe[oe]=Pe[be]=!0,Pe[u]=Pe[c]=Pe[P]=Pe[g]=Pe[q]=Pe[v]=Pe[y]=Pe[S]=Pe[O]=Pe[E]=Pe[N]=Pe[G]=Pe[B]=Pe[z]=Pe[J]=!1;var Ze=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo,pt=typeof self=="object"&&self&&self.Object===Object&&self,at=Ze||pt||Function("return this")(),mt=e&&!e.nodeType&&e,Et=mt&&!0&&n&&!n.nodeType&&n,ft=Et&&Et.exports===mt,Rt=ft&&Ze.process,yt=(function(){try{return Rt&&Rt.binding&&Rt.binding("util")}catch{}})(),ht=yt&&yt.isTypedArray;function ot(M,X){for(var ie=-1,Ce=M==null?0:M.length,Zt=0,Ct=[];++ie<Ce;){var Mn=M[ie];X(Mn,ie,M)&&(Ct[Zt++]=Mn)}return Ct}function jt(M,X){for(var ie=-1,Ce=X.length,Zt=M.length;++ie<Ce;)M[Zt+ie]=X[ie];return M}function _t(M,X){for(var ie=-1,Ce=M==null?0:M.length;++ie<Ce;)if(X(M[ie],ie,M))return!0;return!1}function pn(M,X){for(var ie=-1,Ce=Array(M);++ie<M;)Ce[ie]=X(ie);return Ce}function It(M){return function(X){return M(X)}}function Yt(M,X){return M.has(X)}function Nt(M,X){return M?.[X]}function Un(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce,Zt){ie[++X]=[Zt,Ce]}),ie}function vn(M,X){return function(ie){return M(X(ie))}}function On(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce){ie[++X]=Ce}),ie}var ar=Array.prototype,dr=Function.prototype,Jn=Object.prototype,Dn=at["__core-js_shared__"],Kn=dr.toString,Me=Jn.hasOwnProperty,Qe=(function(){var M=/[^.]+$/.exec(Dn&&Dn.keys&&Dn.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""})(),Lt=Jn.toString,Ye=RegExp("^"+Kn.call(Me).replace(pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=ft?at.Buffer:void 0,Vn=at.Symbol,st=at.Uint8Array,Ve=Jn.propertyIsEnumerable,Vt=ar.splice,Wt=Vn?Vn.toStringTag:void 0,He=Object.getOwnPropertySymbols,lt=Ut?Ut.isBuffer:void 0,Tt=vn(Object.keys,Object),fn=Xi(at,"DataView"),$e=Xi(at,"Map"),Fe=Xi(at,"Promise"),bt=Xi(at,"Set"),$t=Xi(at,"WeakMap"),yn=Xi(Object,"create"),gn=_e(fn),an=_e($e),Vr=_e(Fe),qi=_e(bt),Ui=_e($t),sr=Vn?Vn.prototype:void 0,Ei=sr?sr.valueOf:void 0;function fr(M){var X=-1,ie=M==null?0:M.length;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function ua(){this.__data__=yn?yn(null):{},this.size=0}function li(M){var X=this.has(M)&&delete this.__data__[M];return this.size-=X?1:0,X}function La(M){var X=this.__data__;if(yn){var ie=X[M];return ie===r?void 0:ie}return Me.call(X,M)?X[M]:void 0}function ui(M){var X=this.__data__;return yn?X[M]!==void 0:Me.call(X,M)}function ba(M,X){var ie=this.__data__;return this.size+=this.has(M)?0:1,ie[M]=yn&&X===void 0?r:X,this}fr.prototype.clear=ua,fr.prototype.delete=li,fr.prototype.get=La,fr.prototype.has=ui,fr.prototype.set=ba;function Cr(M){var X=-1,ie=M==null?0:M.length;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Wn(){this.__data__=[],this.size=0}function Ii(M){var X=this.__data__,ie=tr(X,M);if(ie<0)return!1;var Ce=X.length-1;return ie==Ce?X.pop():Vt.call(X,ie,1),--this.size,!0}function ka(M){var X=this.__data__,ie=tr(X,M);return ie<0?void 0:X[ie][1]}function ci(M){return tr(this.__data__,M)>-1}function Cs(M,X){var ie=this.__data__,Ce=tr(ie,M);return Ce<0?(++this.size,ie.push([M,X])):ie[Ce][1]=X,this}Cr.prototype.clear=Wn,Cr.prototype.delete=Ii,Cr.prototype.get=ka,Cr.prototype.has=ci,Cr.prototype.set=Cs;function xr(M){var X=-1,ie=M==null?0:M.length;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Hs(){this.size=0,this.__data__={hash:new fr,map:new($e||Cr),string:new fr}}function Fo(M){var X=lr(this,M).delete(M);return this.size-=X?1:0,X}function zs(M){return lr(this,M).get(M)}function $a(M){return lr(this,M).has(M)}function ca(M,X){var ie=lr(this,M),Ce=ie.size;return ie.set(M,X),this.size+=ie.size==Ce?0:1,this}xr.prototype.clear=Hs,xr.prototype.delete=Fo,xr.prototype.get=zs,xr.prototype.has=$a,xr.prototype.set=ca;function it(M){var X=-1,ie=M==null?0:M.length;for(this.__data__=new xr;++X<ie;)this.add(M[X])}function bn(M){return this.__data__.set(M,r),this}function Sr(M){return this.__data__.has(M)}it.prototype.add=it.prototype.push=bn,it.prototype.has=Sr;function Fn(M){var X=this.__data__=new Cr(M);this.size=X.size}function wn(){this.__data__=new Cr,this.size=0}function Kr(M){var X=this.__data__,ie=X.delete(M);return this.size=X.size,ie}function An(M){return this.__data__.get(M)}function Rn(M){return this.__data__.has(M)}function Vi(M,X){var ie=this.__data__;if(ie instanceof Cr){var Ce=ie.__data__;if(!$e||Ce.length<t-1)return Ce.push([M,X]),this.size=++ie.size,this;ie=this.__data__=new xr(Ce)}return ie.set(M,X),this.size=ie.size,this}Fn.prototype.clear=wn,Fn.prototype.delete=Kr,Fn.prototype.get=An,Fn.prototype.has=Rn,Fn.prototype.set=Vi;function vr(M,X){var ie=Mt(M),Ce=!ie&&je(M),Zt=!ie&&!Ce&&Xn(M),Ct=!ie&&!Ce&&!Zt&&bl(M),Mn=ie||Ce||Zt||Ct,Ln=Mn?pn(M.length,String):[],$n=Ln.length;for(var xn in M)Me.call(M,xn)&&!(Mn&&(xn=="length"||Zt&&(xn=="offset"||xn=="parent")||Ct&&(xn=="buffer"||xn=="byteLength"||xn=="byteOffset")||ho(xn,$n)))&&Ln.push(xn);return Ln}function tr(M,X){for(var ie=M.length;ie--;)if(Xe(M[ie][0],X))return ie;return-1}function Wr(M,X,ie){var Ce=X(M);return Mt(M)?Ce:jt(Ce,ie(M))}function jr(M){return M==null?M===void 0?Y:w:Wt&&Wt in Object(M)?Yi(M):de(M)}function or(M){return Es(M)&&jr(M)==u}function _i(M,X,ie,Ce,Zt){return M===X?!0:M==null||X==null||!Es(M)&&!Es(X)?M!==M&&X!==X:Xr(M,X,ie,Ce,_i,Zt)}function Xr(M,X,ie,Ce,Zt,Ct){var Mn=Mt(M),Ln=Mt(X),$n=Mn?c:Sa(M),xn=Ln?c:Sa(X);$n=$n==u?N:$n,xn=xn==u?N:xn;var Ir=$n==N,hi=xn==N,Or=$n==xn;if(Or&&Xn(M)){if(!Xn(X))return!1;Mn=!0,Ir=!1}if(Or&&!Ir)return Ct||(Ct=new Fn),Mn||bl(M)?Fr(M,X,ie,Ce,Zt,Ct):yl(M,X,$n,ie,Ce,Zt,Ct);if(!(ie&i)){var ur=Ir&&Me.call(M,"__wrapped__"),nr=hi&&Me.call(X,"__wrapped__");if(ur||nr){var Zi=ur?M.value():M,Qr=nr?X.value():X;return Ct||(Ct=new Fn),Zt(Zi,Qr,ie,Ce,Ct)}}return Or?(Ct||(Ct=new Fn),di(M,X,ie,Ce,Zt,Ct)):!1}function Qa(M){if(!Rr(M)||Le(M))return!1;var X=$r(M)?Ye:Oe;return X.test(_e(M))}function Wi(M){return Es(M)&&hr(M.length)&&!!Pe[jr(M)]}function es(M){if(!$(M))return Tt(M);var X=[];for(var ie in Object(M))Me.call(M,ie)&&ie!="constructor"&&X.push(ie);return X}function Fr(M,X,ie,Ce,Zt,Ct){var Mn=ie&i,Ln=M.length,$n=X.length;if(Ln!=$n&&!(Mn&&$n>Ln))return!1;var xn=Ct.get(M);if(xn&&Ct.get(X))return xn==X;var Ir=-1,hi=!0,Or=ie&a?new it:void 0;for(Ct.set(M,X),Ct.set(X,M);++Ir<Ln;){var ur=M[Ir],nr=X[Ir];if(Ce)var Zi=Mn?Ce(nr,ur,Ir,X,M,Ct):Ce(ur,nr,Ir,M,X,Ct);if(Zi!==void 0){if(Zi)continue;hi=!1;break}if(Or){if(!_t(X,function(Qr,Ji){if(!Yt(Or,Ji)&&(ur===Qr||Zt(ur,Qr,ie,Ce,Ct)))return Or.push(Ji)})){hi=!1;break}}else if(!(ur===nr||Zt(ur,nr,ie,Ce,Ct))){hi=!1;break}}return Ct.delete(M),Ct.delete(X),hi}function yl(M,X,ie,Ce,Zt,Ct,Mn){switch(ie){case q:if(M.byteLength!=X.byteLength||M.byteOffset!=X.byteOffset)return!1;M=M.buffer,X=X.buffer;case P:return!(M.byteLength!=X.byteLength||!Ct(new st(M),new st(X)));case g:case v:case E:return Xe(+M,+X);case y:return M.name==X.name&&M.message==X.message;case G:case z:return M==X+"";case O:var Ln=Un;case B:var $n=Ce&i;if(Ln||(Ln=On),M.size!=X.size&&!$n)return!1;var xn=Mn.get(M);if(xn)return xn==X;Ce|=a,Mn.set(M,X);var Ir=Fr(Ln(M),Ln(X),Ce,Zt,Ct,Mn);return Mn.delete(M),Ir;case V:if(Ei)return Ei.call(M)==Ei.call(X)}return!1}function di(M,X,ie,Ce,Zt,Ct){var Mn=ie&i,Ln=xa(M),$n=Ln.length,xn=xa(X),Ir=xn.length;if($n!=Ir&&!Mn)return!1;for(var hi=$n;hi--;){var Or=Ln[hi];if(!(Mn?Or in X:Me.call(X,Or)))return!1}var ur=Ct.get(M);if(ur&&Ct.get(X))return ur==X;var nr=!0;Ct.set(M,X),Ct.set(X,M);for(var Zi=Mn;++hi<$n;){Or=Ln[hi];var Qr=M[Or],Ji=X[Or];if(Ce)var po=Mn?Ce(Ji,Qr,Or,X,M,Ct):Ce(Qr,Ji,Or,M,X,Ct);if(!(po===void 0?Qr===Ji||Zt(Qr,Ji,ie,Ce,Ct):po)){nr=!1;break}Zi||(Zi=Or=="constructor")}if(nr&&!Zi){var go=M.constructor,Sl=X.constructor;go!=Sl&&"constructor"in M&&"constructor"in X&&!(typeof go=="function"&&go instanceof go&&typeof Sl=="function"&&Sl instanceof Sl)&&(nr=!1)}return Ct.delete(M),Ct.delete(X),nr}function xa(M){return Wr(M,tu,fo)}function lr(M,X){var ie=M.__data__;return qs(X)?ie[typeof X=="string"?"string":"hash"]:ie.map}function Xi(M,X){var ie=Nt(M,X);return Qa(ie)?ie:void 0}function Yi(M){var X=Me.call(M,Wt),ie=M[Wt];try{M[Wt]=void 0;var Ce=!0}catch{}var Zt=Lt.call(M);return Ce&&(X?M[Wt]=ie:delete M[Wt]),Zt}var fo=He?function(M){return M==null?[]:(M=Object(M),ot(He(M),function(X){return Ve.call(M,X)}))}:xl,Sa=jr;(fn&&Sa(new fn(new ArrayBuffer(1)))!=q||$e&&Sa(new $e)!=O||Fe&&Sa(Fe.resolve())!=L||bt&&Sa(new bt)!=B||$t&&Sa(new $t)!=J)&&(Sa=function(M){var X=jr(M),ie=X==N?M.constructor:void 0,Ce=ie?_e(ie):"";if(Ce)switch(Ce){case gn:return q;case an:return O;case Vr:return L;case qi:return B;case Ui:return J}return X});function ho(M,X){return X=X??s,!!X&&(typeof M=="number"||Te.test(M))&&M>-1&&M%1==0&&M<X}function qs(M){var X=typeof M;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?M!=="__proto__":M===null}function Le(M){return!!Qe&&Qe in M}function $(M){var X=M&&M.constructor,ie=typeof X=="function"&&X.prototype||Jn;return M===ie}function de(M){return Lt.call(M)}function _e(M){if(M!=null){try{return Kn.call(M)}catch{}try{return M+""}catch{}}return""}function Xe(M,X){return M===X||M!==M&&X!==X}var je=or((function(){return arguments})())?or:function(M){return Es(M)&&Me.call(M,"callee")&&!Ve.call(M,"callee")},Mt=Array.isArray;function Nn(M){return M!=null&&hr(M.length)&&!$r(M)}var Xn=lt||Ca;function fi(M,X){return _i(M,X)}function $r(M){if(!Rr(M))return!1;var X=jr(M);return X==S||X==_||X==h||X==k}function hr(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=s}function Rr(M){var X=typeof M;return M!=null&&(X=="object"||X=="function")}function Es(M){return M!=null&&typeof M=="object"}var bl=ht?It(ht):Wi;function tu(M){return Nn(M)?vr(M):es(M)}function xl(){return[]}function Ca(){return!1}n.exports=fi})(ym,ym.exports)),ym.exports}var T1={},yI;function _ee(){if(yI)return T1;yI=1,Object.defineProperty(T1,"__esModule",{value:!0});const n=tM(),e=nM();var t;return(function(r){function i(c={},h={},g=!1){typeof c!="object"&&(c={}),typeof h!="object"&&(h={});let v=n(h);g||(v=Object.keys(v).reduce((y,S)=>(v[S]!=null&&(y[S]=v[S]),y),{}));for(const y in c)c[y]!==void 0&&h[y]===void 0&&(v[y]=c[y]);return Object.keys(v).length>0?v:void 0}r.compose=i;function a(c={},h={}){typeof c!="object"&&(c={}),typeof h!="object"&&(h={});const g=Object.keys(c).concat(Object.keys(h)).reduce((v,y)=>(e(c[y],h[y])||(v[y]=h[y]===void 0?null:h[y]),v),{});return Object.keys(g).length>0?g:void 0}r.diff=a;function s(c={},h={}){c=c||{};const g=Object.keys(h).reduce((v,y)=>(h[y]!==c[y]&&c[y]!==void 0&&(v[y]=h[y]),v),{});return Object.keys(c).reduce((v,y)=>(c[y]!==h[y]&&h[y]===void 0&&(v[y]=null),v),g)}r.invert=s;function u(c,h,g=!1){if(typeof c!="object")return h;if(typeof h!="object")return;if(!g)return h;const v=Object.keys(h).reduce((y,S)=>(c[S]===void 0&&(y[S]=h[S]),y),{});return Object.keys(v).length>0?v:void 0}r.transform=u})(t||(t={})),T1.default=t,T1}var w1={},bI;function rM(){if(bI)return w1;bI=1,Object.defineProperty(w1,"__esModule",{value:!0});var n;return(function(e){function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(n||(n={})),w1.default=n,w1}var A1={},xI;function Tee(){if(xI)return A1;xI=1,Object.defineProperty(A1,"__esModule",{value:!0});const n=rM();class e{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const i=this.ops[this.index];if(i){const a=this.offset,s=n.default.length(i);if(r>=s-a?(r=s-a,this.index+=1,this.offset=0):this.offset+=r,typeof i.delete=="number")return{delete:r};{const u={};return i.attributes&&(u.attributes=i.attributes),typeof i.retain=="number"?u.retain=r:typeof i.retain=="object"&&i.retain!==null?u.retain=i.retain:typeof i.insert=="string"?u.insert=i.insert.substr(a,r):u.insert=i.insert,u}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,i=this.index,a=this.next(),s=this.ops.slice(this.index);return this.offset=r,this.index=i,[a].concat(s)}}else return[]}}return A1.default=e,A1}var SI;function wee(){return SI||(SI=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=Eee(),r=tM(),i=nM(),a=_ee();e.AttributeMap=a.default;const s=rM();e.Op=s.default;const u=Tee();e.OpIterator=u.default;const c="\0",h=(v,y)=>{if(typeof v!="object"||v===null)throw new Error(`cannot retain a ${typeof v}`);if(typeof y!="object"||y===null)throw new Error(`cannot retain a ${typeof y}`);const S=Object.keys(v)[0];if(!S||S!==Object.keys(y)[0])throw new Error(`embed types not matched: ${S} != ${Object.keys(y)[0]}`);return[S,v[S],y[S]]};class g{constructor(y){Array.isArray(y)?this.ops=y:y!=null&&Array.isArray(y.ops)?this.ops=y.ops:this.ops=[]}static registerEmbed(y,S){this.handlers[y]=S}static unregisterEmbed(y){delete this.handlers[y]}static getHandler(y){const S=this.handlers[y];if(!S)throw new Error(`no handlers for embed type "${y}"`);return S}insert(y,S){const _={};return typeof y=="string"&&y.length===0?this:(_.insert=y,S!=null&&typeof S=="object"&&Object.keys(S).length>0&&(_.attributes=S),this.push(_))}delete(y){return y<=0?this:this.push({delete:y})}retain(y,S){if(typeof y=="number"&&y<=0)return this;const _={retain:y};return S!=null&&typeof S=="object"&&Object.keys(S).length>0&&(_.attributes=S),this.push(_)}push(y){let S=this.ops.length,_=this.ops[S-1];if(y=r(y),typeof _=="object"){if(typeof y.delete=="number"&&typeof _.delete=="number")return this.ops[S-1]={delete:_.delete+y.delete},this;if(typeof _.delete=="number"&&y.insert!=null&&(S-=1,_=this.ops[S-1],typeof _!="object"))return this.ops.unshift(y),this;if(i(y.attributes,_.attributes)){if(typeof y.insert=="string"&&typeof _.insert=="string")return this.ops[S-1]={insert:_.insert+y.insert},typeof y.attributes=="object"&&(this.ops[S-1].attributes=y.attributes),this;if(typeof y.retain=="number"&&typeof _.retain=="number")return this.ops[S-1]={retain:_.retain+y.retain},typeof y.attributes=="object"&&(this.ops[S-1].attributes=y.attributes),this}}return S===this.ops.length?this.ops.push(y):this.ops.splice(S,0,y),this}chop(){const y=this.ops[this.ops.length-1];return y&&typeof y.retain=="number"&&!y.attributes&&this.ops.pop(),this}filter(y){return this.ops.filter(y)}forEach(y){this.ops.forEach(y)}map(y){return this.ops.map(y)}partition(y){const S=[],_=[];return this.forEach(O=>{(y(O)?S:_).push(O)}),[S,_]}reduce(y,S){return this.ops.reduce(y,S)}changeLength(){return this.reduce((y,S)=>S.insert?y+s.default.length(S):S.delete?y-S.delete:y,0)}length(){return this.reduce((y,S)=>y+s.default.length(S),0)}slice(y=0,S=1/0){const _=[],O=new u.default(this.ops);let E=0;for(;E<S&&O.hasNext();){let w;E<y?w=O.next(y-E):(w=O.next(S-E),_.push(w)),E+=s.default.length(w)}return new g(_)}compose(y){const S=new u.default(this.ops),_=new u.default(y.ops),O=[],E=_.peek();if(E!=null&&typeof E.retain=="number"&&E.attributes==null){let N=E.retain;for(;S.peekType()==="insert"&&S.peekLength()<=N;)N-=S.peekLength(),O.push(S.next());E.retain-N>0&&_.next(E.retain-N)}const w=new g(O);for(;S.hasNext()||_.hasNext();)if(_.peekType()==="insert")w.push(_.next());else if(S.peekType()==="delete")w.push(S.next());else{const N=Math.min(S.peekLength(),_.peekLength()),L=S.next(N),k=_.next(N);if(k.retain){const G={};if(typeof L.retain=="number")G.retain=typeof k.retain=="number"?N:k.retain;else if(typeof k.retain=="number")L.retain==null?G.insert=L.insert:G.retain=L.retain;else{const z=L.retain==null?"insert":"retain",[V,Y,J]=h(L[z],k.retain),P=g.getHandler(V);G[z]={[V]:P.compose(Y,J,z==="retain")}}const B=a.default.compose(L.attributes,k.attributes,typeof L.retain=="number");if(B&&(G.attributes=B),w.push(G),!_.hasNext()&&i(w.ops[w.ops.length-1],G)){const z=new g(S.rest());return w.concat(z).chop()}}else typeof k.delete=="number"&&(typeof L.retain=="number"||typeof L.retain=="object"&&L.retain!==null)&&w.push(k)}return w.chop()}concat(y){const S=new g(this.ops.slice());return y.ops.length>0&&(S.push(y.ops[0]),S.ops=S.ops.concat(y.ops.slice(1))),S}diff(y,S){if(this.ops===y.ops)return new g;const _=[this,y].map(L=>L.map(k=>{if(k.insert!=null)return typeof k.insert=="string"?k.insert:c;const G=L===y?"on":"with";throw new Error("diff() called "+G+" non-document")}).join("")),O=new g,E=t(_[0],_[1],S,!0),w=new u.default(this.ops),N=new u.default(y.ops);return E.forEach(L=>{let k=L[1].length;for(;k>0;){let G=0;switch(L[0]){case t.INSERT:G=Math.min(N.peekLength(),k),O.push(N.next(G));break;case t.DELETE:G=Math.min(k,w.peekLength()),w.next(G),O.delete(G);break;case t.EQUAL:G=Math.min(w.peekLength(),N.peekLength(),k);const B=w.next(G),z=N.next(G);i(B.insert,z.insert)?O.retain(G,a.default.diff(B.attributes,z.attributes)):O.push(z).delete(G);break}k-=G}}),O.chop()}eachLine(y,S=`
|
|
192
|
+
`),D.createElement("div",{style:g.white,className:"saturation-white"},D.createElement("div",{style:g.black,className:"saturation-black"}),D.createElement("div",{style:g.pointer},this.props.pointer?D.createElement(this.props.pointer,this.props):D.createElement("div",{style:g.circle}))))}}]),e})(D.PureComponent||D.Component);function wN(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var cJ=pN(Object.keys,Object),dJ=Object.prototype,fJ=dJ.hasOwnProperty;function hJ(n){if(!u4(n))return cJ(n);var e=[];for(var t in Object(n))fJ.call(n,t)&&t!="constructor"&&e.push(t);return e}function p4(n){return bp(n)?CN(n):hJ(n)}function pJ(n,e){return n&&cN(n,e,p4)}function gJ(n,e){return function(t,r){if(t==null)return t;if(!bp(t))return n(t,r);for(var i=t.length,a=-1,s=Object(t);++a<i&&r(s[a],a,s)!==!1;);return t}}var AN=gJ(pJ);function mJ(n){return typeof n=="function"?n:ky}function vJ(n,e){var t=Fs(n)?wN:AN;return t(n,mJ(e))}function iy(n){"@babel/helpers - typeof";return iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iy(n)}var yJ=/^\s+/,bJ=/\s+$/;function Dt(n,e){if(n=n||"",e=e||{},n instanceof Dt)return n;if(!(this instanceof Dt))return new Dt(n,e);var t=xJ(n);this._originalInput=n,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}Dt.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(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,i,a,s,u;return t=e.r/255,r=e.g/255,i=e.b/255,t<=.03928?a=t/12.92:a=Math.pow((t+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?u=i/12.92:u=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*s+.0722*u},setAlpha:function(e){return this._a=RN(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=jR(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=jR(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+i+"%)":"hsva("+t+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=PR(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=PR(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+i+"%)":"hsla("+t+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return FR(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return _J(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Jr(this._r,255)*100)+"%",g:Math.round(Jr(this._g,255)*100)+"%",b:Math.round(Jr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Jr(this._r,255)*100)+"%, "+Math.round(Jr(this._g,255)*100)+"%, "+Math.round(Jr(this._b,255)*100)+"%)":"rgba("+Math.round(Jr(this._r,255)*100)+"%, "+Math.round(Jr(this._g,255)*100)+"%, "+Math.round(Jr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:PJ[FR(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+BR(this._r,this._g,this._b,this._a),r=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var a=Dt(e);r="#"+BR(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return a?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Dt(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(RJ,arguments)},brighten:function(){return this._applyModification(IJ,arguments)},darken:function(){return this._applyModification(OJ,arguments)},desaturate:function(){return this._applyModification(TJ,arguments)},saturate:function(){return this._applyModification(wJ,arguments)},greyscale:function(){return this._applyModification(AJ,arguments)},spin:function(){return this._applyModification(DJ,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(LJ,arguments)},complement:function(){return this._applyCombination(NJ,arguments)},monochromatic:function(){return this._applyCombination(kJ,arguments)},splitcomplement:function(){return this._applyCombination(MJ,arguments)},triad:function(){return this._applyCombination(GR,[3])},tetrad:function(){return this._applyCombination(GR,[4])}};Dt.fromRatio=function(n,e){if(iy(n)=="object"){var t={};for(var r in n)n.hasOwnProperty(r)&&(r==="a"?t[r]=n[r]:t[r]=pm(n[r]));n=t}return Dt(n,e)};function xJ(n){var e={r:0,g:0,b:0},t=1,r=null,i=null,a=null,s=!1,u=!1;return typeof n=="string"&&(n=GJ(n)),iy(n)=="object"&&(wu(n.r)&&wu(n.g)&&wu(n.b)?(e=SJ(n.r,n.g,n.b),s=!0,u=String(n.r).substr(-1)==="%"?"prgb":"rgb"):wu(n.h)&&wu(n.s)&&wu(n.v)?(r=pm(n.s),i=pm(n.v),e=EJ(n.h,r,i),s=!0,u="hsv"):wu(n.h)&&wu(n.s)&&wu(n.l)&&(r=pm(n.s),a=pm(n.l),e=CJ(n.h,r,a),s=!0,u="hsl"),n.hasOwnProperty("a")&&(t=n.a)),t=RN(t),{ok:s,format:n.format||u,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function SJ(n,e,t){return{r:Jr(n,255)*255,g:Jr(e,255)*255,b:Jr(t,255)*255}}function PR(n,e,t){n=Jr(n,255),e=Jr(e,255),t=Jr(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,s,u=(r+i)/2;if(r==i)a=s=0;else{var c=r-i;switch(s=u>.5?c/(2-r-i):c/(r+i),r){case n:a=(e-t)/c+(e<t?6:0);break;case e:a=(t-n)/c+2;break;case t:a=(n-e)/c+4;break}a/=6}return{h:a,s,l:u}}function CJ(n,e,t){var r,i,a;n=Jr(n,360),e=Jr(e,100),t=Jr(t,100);function s(h,g,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?h+(g-h)*6*v:v<1/2?g:v<2/3?h+(g-h)*(2/3-v)*6:h}if(e===0)r=i=a=t;else{var u=t<.5?t*(1+e):t+e-t*e,c=2*t-u;r=s(c,u,n+1/3),i=s(c,u,n),a=s(c,u,n-1/3)}return{r:r*255,g:i*255,b:a*255}}function jR(n,e,t){n=Jr(n,255),e=Jr(e,255),t=Jr(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,s,u=r,c=r-i;if(s=r===0?0:c/r,r==i)a=0;else{switch(r){case n:a=(e-t)/c+(e<t?6:0);break;case e:a=(t-n)/c+2;break;case t:a=(n-e)/c+4;break}a/=6}return{h:a,s,v:u}}function EJ(n,e,t){n=Jr(n,360)*6,e=Jr(e,100),t=Jr(t,100);var r=Math.floor(n),i=n-r,a=t*(1-e),s=t*(1-i*e),u=t*(1-(1-i)*e),c=r%6,h=[t,s,a,a,u,t][c],g=[u,t,t,s,a,a][c],v=[a,a,u,t,t,s][c];return{r:h*255,g:g*255,b:v*255}}function FR(n,e,t,r){var i=[ul(Math.round(n).toString(16)),ul(Math.round(e).toString(16)),ul(Math.round(t).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function _J(n,e,t,r,i){var a=[ul(Math.round(n).toString(16)),ul(Math.round(e).toString(16)),ul(Math.round(t).toString(16)),ul(IN(r))];return i&&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)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function BR(n,e,t,r){var i=[ul(IN(r)),ul(Math.round(n).toString(16)),ul(Math.round(e).toString(16)),ul(Math.round(t).toString(16))];return i.join("")}Dt.equals=function(n,e){return!n||!e?!1:Dt(n).toRgbString()==Dt(e).toRgbString()};Dt.random=function(){return Dt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function TJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.s-=e/100,t.s=Fy(t.s),Dt(t)}function wJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.s+=e/100,t.s=Fy(t.s),Dt(t)}function AJ(n){return Dt(n).desaturate(100)}function RJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.l+=e/100,t.l=Fy(t.l),Dt(t)}function IJ(n,e){e=e===0?0:e||10;var t=Dt(n).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),Dt(t)}function OJ(n,e){e=e===0?0:e||10;var t=Dt(n).toHsl();return t.l-=e/100,t.l=Fy(t.l),Dt(t)}function DJ(n,e){var t=Dt(n).toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,Dt(t)}function NJ(n){var e=Dt(n).toHsl();return e.h=(e.h+180)%360,Dt(e)}function GR(n,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Dt(n).toHsl(),r=[Dt(n)],i=360/e,a=1;a<e;a++)r.push(Dt({h:(t.h+a*i)%360,s:t.s,l:t.l}));return r}function MJ(n){var e=Dt(n).toHsl(),t=e.h;return[Dt(n),Dt({h:(t+72)%360,s:e.s,l:e.l}),Dt({h:(t+216)%360,s:e.s,l:e.l})]}function LJ(n,e,t){e=e||6,t=t||30;var r=Dt(n).toHsl(),i=360/t,a=[Dt(n)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,a.push(Dt(r));return a}function kJ(n,e){e=e||6;for(var t=Dt(n).toHsv(),r=t.h,i=t.s,a=t.v,s=[],u=1/e;e--;)s.push(Dt({h:r,s:i,v:a})),a=(a+u)%1;return s}Dt.mix=function(n,e,t){t=t===0?0:t||50;var r=Dt(n).toRgb(),i=Dt(e).toRgb(),a=t/100,s={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return Dt(s)};Dt.readability=function(n,e){var t=Dt(n),r=Dt(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};Dt.isReadable=function(n,e,t){var r=Dt.readability(n,e),i,a;switch(a=!1,i=HJ(t),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};Dt.mostReadable=function(n,e,t){var r=null,i=0,a,s,u,c;t=t||{},s=t.includeFallbackColors,u=t.level,c=t.size;for(var h=0;h<e.length;h++)a=Dt.readability(n,e[h]),a>i&&(i=a,r=Dt(e[h]));return Dt.isReadable(n,r,{level:u,size:c})||!s?r:(t.includeFallbackColors=!1,Dt.mostReadable(n,["#fff","#000"],t))};var H_=Dt.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"},PJ=Dt.hexNames=jJ(H_);function jJ(n){var e={};for(var t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function RN(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Jr(n,e){FJ(n)&&(n="100%");var t=BJ(n);return n=Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(n*e,10)/100),Math.abs(n-e)<1e-6?1:n%e/parseFloat(e)}function Fy(n){return Math.min(1,Math.max(0,n))}function ro(n){return parseInt(n,16)}function FJ(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function BJ(n){return typeof n=="string"&&n.indexOf("%")!=-1}function ul(n){return n.length==1?"0"+n:""+n}function pm(n){return n<=1&&(n=n*100+"%"),n}function IN(n){return Math.round(parseFloat(n)*255).toString(16)}function HR(n){return ro(n)/255}var il=(function(){var n="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+n+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,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 wu(n){return!!il.CSS_UNIT.exec(n)}function GJ(n){n=n.replace(yJ,"").replace(bJ,"").toLowerCase();var e=!1;if(H_[n])n=H_[n],e=!0;else if(n=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=il.rgb.exec(n))?{r:t[1],g:t[2],b:t[3]}:(t=il.rgba.exec(n))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=il.hsl.exec(n))?{h:t[1],s:t[2],l:t[3]}:(t=il.hsla.exec(n))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=il.hsv.exec(n))?{h:t[1],s:t[2],v:t[3]}:(t=il.hsva.exec(n))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=il.hex8.exec(n))?{r:ro(t[1]),g:ro(t[2]),b:ro(t[3]),a:HR(t[4]),format:e?"name":"hex8"}:(t=il.hex6.exec(n))?{r:ro(t[1]),g:ro(t[2]),b:ro(t[3]),format:e?"name":"hex"}:(t=il.hex4.exec(n))?{r:ro(t[1]+""+t[1]),g:ro(t[2]+""+t[2]),b:ro(t[3]+""+t[3]),a:HR(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=il.hex3.exec(n))?{r:ro(t[1]+""+t[1]),g:ro(t[2]+""+t[2]),b:ro(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function HJ(n){var e,t;return n=n||{level:"AA",size:"small"},e=(n.level||"AA").toUpperCase(),t=(n.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}var zR=function(e){var t=["r","g","b","a","h","s","l","v"],r=0,i=0;return vJ(t,function(a){if(e[a]&&(r+=1,isNaN(e[a])||(i+=1),a==="s"||a==="l")){var s=/^\d+%$/;s.test(e[a])&&(i+=1)}}),r===i?e:!1},gm=function(e,t){var r=e.hex?Dt(e.hex):Dt(e),i=r.toHsl(),a=r.toHsv(),s=r.toRgb(),u=r.toHex();i.s===0&&(i.h=t||0,a.h=t||0);var c=u==="000000"&&s.a===0;return{hsl:i,hex:c?"transparent":"#"+u,rgb:s,hsv:a,oldHue:e.h||t||i.h,source:e.source}},Pc=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&Dt(e).isValid()},g4=function(e){if(!e)return"#fff";var t=gm(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},GE=function(e,t){var r=e.replace("°","");return Dt(t+" ("+r+")")._ok},Vg=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},zJ=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function qJ(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function UJ(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function VJ(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var Gs=function(e){var t=(function(r){VJ(i,r);function i(a){qJ(this,i);var s=UJ(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return s.handleChange=function(u,c){var h=zR(u);if(h){var g=gm(u,u.h||s.state.oldHue);s.setState(g),s.props.onChangeComplete&&s.debounce(s.props.onChangeComplete,g,c),s.props.onChange&&s.props.onChange(g,c)}},s.handleSwatchHover=function(u,c){var h=zR(u);if(h){var g=gm(u,u.h||s.state.oldHue);s.props.onSwatchHover&&s.props.onSwatchHover(g,c)}},s.state=Vg({},gm(a.color,0)),s.debounce=TN(function(u,c,h){u(c,h)},100),s}return zJ(i,[{key:"render",value:function(){var s={};return this.props.onSwatchHover&&(s.onSwatchHover=this.handleSwatchHover),D.createElement(e,Vg({},this.props,this.state,{onChange:this.handleChange},s))}}],[{key:"getDerivedStateFromProps",value:function(s,u){return Vg({},gm(s.color,u.oldHue))}}]),i})(D.PureComponent||D.Component);return t.propTypes=Vg({},e.propTypes),t.defaultProps=Vg({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},WJ=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},XJ=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function YJ(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function qR(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function ZJ(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var JJ=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(r){ZJ(i,r);function i(){var a,s,u,c;YJ(this,i);for(var h=arguments.length,g=Array(h),v=0;v<h;v++)g[v]=arguments[v];return c=(s=(u=qR(this,(a=i.__proto__||Object.getPrototypeOf(i)).call.apply(a,[this].concat(g))),u),u.state={focus:!1},u.handleFocus=function(){return u.setState({focus:!0})},u.handleBlur=function(){return u.setState({focus:!1})},s),qR(u,c)}return XJ(i,[{key:"render",value:function(){return D.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},D.createElement(e,WJ({},this.props,this.state)))}}]),i})(D.Component)},UR=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},KJ=13,$J=function(e){var t=e.color,r=e.style,i=e.onClick,a=i===void 0?function(){}:i,s=e.onHover,u=e.title,c=u===void 0?t:u,h=e.children,g=e.focus,v=e.focusStyle,y=v===void 0?{}:v,S=t==="transparent",_=on({default:{swatch:UR({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,g?y:{})}}),O=function(k){return a(t,k)},E=function(k){return k.keyCode===KJ&&a(t,k)},w=function(k){return s(t,k)},N={};return s&&(N.onMouseOver=w),D.createElement("div",UR({style:_.swatch,onClick:O,title:c,tabIndex:0,onKeyDown:E},N),h,S&&D.createElement(vp,{borderRadius:_.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const Yd=JJ($J);var QJ=function(e){var t=e.direction,r=on({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:t==="vertical"});return D.createElement("div",{style:r.picker})},eK=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ON=function(e){var t=e.rgb,r=e.hsl,i=e.width,a=e.height,s=e.onChange,u=e.direction,c=e.style,h=e.renderers,g=e.pointer,v=e.className,y=v===void 0?"":v,S=on({default:{picker:{position:"relative",width:i,height:a},alpha:{radius:"2px",style:c}}});return D.createElement("div",{style:S.picker,className:"alpha-picker "+y},D.createElement(a4,eK({},S.alpha,{rgb:t,hsl:r,pointer:g,renderers:h,onChange:s,direction:u})))};ON.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:QJ};Gs(ON);function DN(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var tK="__lodash_hash_undefined__";function nK(n){return this.__data__.set(n,tK),this}function rK(n){return this.__data__.has(n)}function ay(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Fu;++e<t;)this.add(n[e])}ay.prototype.add=ay.prototype.push=nK;ay.prototype.has=rK;function iK(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function aK(n,e){return n.has(e)}var sK=1,oK=2;function NN(n,e,t,r,i,a){var s=t&sK,u=n.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var h=a.get(n),g=a.get(e);if(h&&g)return h==e&&g==n;var v=-1,y=!0,S=t&oK?new ay:void 0;for(a.set(n,e),a.set(e,n);++v<u;){var _=n[v],O=e[v];if(r)var E=s?r(O,_,v,e,n,a):r(_,O,v,n,e,a);if(E!==void 0){if(E)continue;y=!1;break}if(S){if(!iK(e,function(w,N){if(!aK(S,N)&&(_===w||i(_,w,t,r,a)))return S.push(N)})){y=!1;break}}else if(!(_===O||i(_,O,t,r,a))){y=!1;break}}return a.delete(n),a.delete(e),y}function lK(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function uK(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var cK=1,dK=2,fK="[object Boolean]",hK="[object Date]",pK="[object Error]",gK="[object Map]",mK="[object Number]",vK="[object RegExp]",yK="[object Set]",bK="[object String]",xK="[object Symbol]",SK="[object ArrayBuffer]",CK="[object DataView]",VR=Xl?Xl.prototype:void 0,HE=VR?VR.valueOf:void 0;function EK(n,e,t,r,i,a,s){switch(t){case CK:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case SK:return!(n.byteLength!=e.byteLength||!a(new ny(n),new ny(e)));case fK:case hK:case mK:return Zm(+n,+e);case pK:return n.name==e.name&&n.message==e.message;case vK:case bK:return n==e+"";case gK:var u=lK;case yK:var c=r&cK;if(u||(u=uK),n.size!=e.size&&!c)return!1;var h=s.get(n);if(h)return h==e;r|=dK,s.set(n,e);var g=NN(u(n),u(e),r,i,a,s);return s.delete(n),g;case xK:if(HE)return HE.call(n)==HE.call(e)}return!1}function _K(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}function TK(n,e,t){var r=e(n);return Fs(n)?r:_K(r,t(n))}function wK(n,e){for(var t=-1,r=n==null?0:n.length,i=0,a=[];++t<r;){var s=n[t];e(s,t,n)&&(a[i++]=s)}return a}function AK(){return[]}var RK=Object.prototype,IK=RK.propertyIsEnumerable,WR=Object.getOwnPropertySymbols,OK=WR?function(n){return n==null?[]:(n=Object(n),wK(WR(n),function(e){return IK.call(n,e)}))}:AK;function z_(n){return TK(n,p4,OK)}var DK=1,NK=Object.prototype,MK=NK.hasOwnProperty;function LK(n,e,t,r,i,a){var s=t&DK,u=z_(n),c=u.length,h=z_(e),g=h.length;if(c!=g&&!s)return!1;for(var v=c;v--;){var y=u[v];if(!(s?y in e:MK.call(e,y)))return!1}var S=a.get(n),_=a.get(e);if(S&&_)return S==e&&_==n;var O=!0;a.set(n,e),a.set(e,n);for(var E=s;++v<c;){y=u[v];var w=n[y],N=e[y];if(r)var L=s?r(N,w,y,e,n,a):r(w,N,y,n,e,a);if(!(L===void 0?w===N||i(w,N,t,r,a):L)){O=!1;break}E||(E=y=="constructor")}if(O&&!E){var k=n.constructor,G=e.constructor;k!=G&&"constructor"in n&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof G=="function"&&G instanceof G)&&(O=!1)}return a.delete(n),a.delete(e),O}var q_=Xd(gl,"DataView"),U_=Xd(gl,"Promise"),V_=Xd(gl,"Set"),W_=Xd(gl,"WeakMap"),XR="[object Map]",kK="[object Object]",YR="[object Promise]",ZR="[object Set]",JR="[object WeakMap]",KR="[object DataView]",PK=Wd(q_),jK=Wd(km),FK=Wd(U_),BK=Wd(V_),GK=Wd(W_),sl=Vd;(q_&&sl(new q_(new ArrayBuffer(1)))!=KR||km&&sl(new km)!=XR||U_&&sl(U_.resolve())!=YR||V_&&sl(new V_)!=ZR||W_&&sl(new W_)!=JR)&&(sl=function(n){var e=Vd(n),t=e==kK?n.constructor:void 0,r=t?Wd(t):"";if(r)switch(r){case PK:return KR;case jK:return XR;case FK:return YR;case BK:return ZR;case GK:return JR}return e});var HK=1,$R="[object Arguments]",QR="[object Array]",S1="[object Object]",zK=Object.prototype,eI=zK.hasOwnProperty;function qK(n,e,t,r,i,a){var s=Fs(n),u=Fs(e),c=s?QR:sl(n),h=u?QR:sl(e);c=c==$R?S1:c,h=h==$R?S1:h;var g=c==S1,v=h==S1,y=c==h;if(y&&jm(n)){if(!jm(e))return!1;s=!0,g=!1}if(y&&!g)return a||(a=new cl),s||f4(n)?NN(n,e,t,r,i,a):EK(n,e,c,t,r,i,a);if(!(t&HK)){var S=g&&eI.call(n,"__wrapped__"),_=v&&eI.call(e,"__wrapped__");if(S||_){var O=S?n.value():n,E=_?e.value():e;return a||(a=new cl),i(O,E,t,r,a)}}return y?(a||(a=new cl),LK(n,e,t,r,i,a)):!1}function By(n,e,t,r,i){return n===e?!0:n==null||e==null||!Yl(n)&&!Yl(e)?n!==n&&e!==e:qK(n,e,t,r,By,i)}var UK=1,VK=2;function WK(n,e,t,r){var i=t.length,a=i;if(n==null)return!a;for(n=Object(n);i--;){var s=t[i];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<a;){s=t[i];var u=s[0],c=n[u],h=s[1];if(s[2]){if(c===void 0&&!(u in n))return!1}else{var g=new cl,v;if(!(v===void 0?By(h,c,UK|VK,r,g):v))return!1}}return!0}function MN(n){return n===n&&!uo(n)}function XK(n){for(var e=p4(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,MN(i)]}return e}function LN(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}function YK(n){var e=XK(n);return e.length==1&&e[0][2]?LN(e[0][0],e[0][1]):function(t){return t===n||WK(t,n,e)}}var ZK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,JK=/^\w*$/;function m4(n,e){if(Fs(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||Py(n)?!0:JK.test(n)||!ZK.test(n)||e!=null&&n in Object(e)}var KK="Expected a function";function v4(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(KK);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=t.cache;if(a.has(i))return a.get(i);var s=n.apply(this,r);return t.cache=a.set(i,s)||a,s};return t.cache=new(v4.Cache||Fu),t}v4.Cache=Fu;var $K=500;function QK(n){var e=v4(n,function(r){return t.size===$K&&t.clear(),r}),t=e.cache;return e}var e$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t$=/\\(\\)?/g,n$=QK(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(e$,function(t,r,i,a){e.push(i?a.replace(t$,"$1"):r||t)}),e}),tI=Xl?Xl.prototype:void 0,nI=tI?tI.toString:void 0;function kN(n){if(typeof n=="string")return n;if(Fs(n))return DN(n,kN)+"";if(Py(n))return nI?nI.call(n):"";var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function r$(n){return n==null?"":kN(n)}function PN(n,e){return Fs(n)?n:m4(n,e)?[n]:n$(r$(n))}function Gy(n){if(typeof n=="string"||Py(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function jN(n,e){e=PN(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[Gy(e[t++])];return t&&t==r?n:void 0}function i$(n,e,t){var r=n==null?void 0:jN(n,e);return r===void 0?t:r}function a$(n,e){return n!=null&&e in Object(n)}function s$(n,e,t){e=PN(e,n);for(var r=-1,i=e.length,a=!1;++r<i;){var s=Gy(e[r]);if(!(a=n!=null&&t(n,s)))break;n=n[s]}return a||++r!=i?a:(i=n==null?0:n.length,!!i&&c4(i)&&h4(s,i)&&(Fs(n)||ry(n)))}function o$(n,e){return n!=null&&s$(n,e,a$)}var l$=1,u$=2;function c$(n,e){return m4(n)&&MN(e)?LN(Gy(n),e):function(t){var r=i$(t,n);return r===void 0&&r===e?o$(t,n):By(e,r,l$|u$)}}function d$(n){return function(e){return e?.[n]}}function f$(n){return function(e){return jN(e,n)}}function h$(n){return m4(n)?d$(Gy(n)):f$(n)}function p$(n){return typeof n=="function"?n:n==null?ky:typeof n=="object"?Fs(n)?c$(n[0],n[1]):YK(n):h$(n)}function g$(n,e){var t=-1,r=bp(n)?Array(n.length):[];return AN(n,function(i,a,s){r[++t]=e(i,a,s)}),r}function Zd(n,e){var t=Fs(n)?DN:g$;return t(n,p$(e))}var m$=function(e){var t=e.colors,r=e.onClick,i=e.onSwatchHover,a=on({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return D.createElement("div",{style:a.swatches},Zd(t,function(s){return D.createElement(Yd,{key:s,color:s,style:a.swatch,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+s}})}),D.createElement("div",{style:a.clear}))},y4=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.hex,a=e.colors,s=e.width,u=e.triangle,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=i==="transparent",S=function(E,w){Pc(E)&&t({hex:E,source:"hex"},w)},_=on(Si({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:i,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:g4(i),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+i+" 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"}}},h),{"hide-triangle":u==="hide"});return D.createElement("div",{style:_.card,className:"block-picker "+v},D.createElement("div",{style:_.triangle}),D.createElement("div",{style:_.head},y&&D.createElement(vp,{borderRadius:"6px 6px 0 0"}),D.createElement("div",{style:_.label},i)),D.createElement("div",{style:_.body},D.createElement(m$,{colors:a,onClick:S,onSwatchHover:r}),D.createElement(Yn,{style:{input:_.input},value:i,onChange:S})))};y4.propTypes={width:C.oneOfType([C.string,C.number]),colors:C.arrayOf(C.string),triangle:C.oneOf(["top","hide"]),styles:C.object};y4.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Gs(y4);var Oh={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},Dh={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},Nh={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},Mh={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},Lh={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},kh={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},Ph={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},jh={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},Fh={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},mm={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},Bh={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},Gh={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},Hh={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},zh={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},qh={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},Uh={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},Vh={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},Wh={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},FN=function(e){var t=e.color,r=e.onClick,i=e.onSwatchHover,a=e.hover,s=e.active,u=e.circleSize,c=e.circleSpacing,h=on({default:{swatch:{width:u,height:u,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(u/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:a,active:s});return D.createElement("div",{style:h.swatch},D.createElement(Yd,{style:h.Swatch,color:t,onClick:r,onHover:i,focusStyle:{boxShadow:h.Swatch.boxShadow+", 0 0 5px "+t}}))};FN.defaultProps={circleSize:28,circleSpacing:14};const v$=i4.handleHover(FN);var b4=function(e){var t=e.width,r=e.onChange,i=e.onSwatchHover,a=e.colors,s=e.hex,u=e.circleSize,c=e.styles,h=c===void 0?{}:c,g=e.circleSpacing,v=e.className,y=v===void 0?"":v,S=on(Si({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-g,marginBottom:-g}}},h)),_=function(E,w){return r({hex:E,source:"hex"},w)};return D.createElement("div",{style:S.card,className:"circle-picker "+y},Zd(a,function(O){return D.createElement(v$,{key:O,color:O,onClick:_,onSwatchHover:i,active:s===O.toLowerCase(),circleSize:u,circleSpacing:g})}))};b4.propTypes={width:C.oneOfType([C.string,C.number]),circleSize:C.number,circleSpacing:C.number,styles:C.object};b4.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Oh[500],Dh[500],Nh[500],Mh[500],Lh[500],kh[500],Ph[500],jh[500],Fh[500],mm[500],Bh[500],Gh[500],Hh[500],zh[500],qh[500],Uh[500],Vh[500],Wh[500]],styles:{}};Gs(b4);function rI(n){return n===void 0}var C1={},iI;function y$(){if(iI)return C1;iI=1,Object.defineProperty(C1,"__esModule",{value:!0});var n=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var c=arguments[u];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(s[h]=c[h])}return s},e=D,t=r(e);function r(s){return s&&s.__esModule?s:{default:s}}function i(s,u){var c={};for(var h in s)u.indexOf(h)>=0||Object.prototype.hasOwnProperty.call(s,h)&&(c[h]=s[h]);return c}var a=24;return C1.default=function(s){var u=s.fill,c=u===void 0?"currentColor":u,h=s.width,g=h===void 0?a:h,v=s.height,y=v===void 0?a:v,S=s.style,_=S===void 0?{}:S,O=i(s,["fill","width","height","style"]);return t.default.createElement("svg",n({viewBox:"0 0 "+a+" "+a,style:n({fill:c,width:g,height:y},_)},O),t.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"}))},C1}var b$=y$();const x$=Pd(b$);var S$=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function C$(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function E$(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function _$(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var BN=(function(n){_$(e,n);function e(t){C$(this,e);var r=E$(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(i,a){i.hex?Pc(i.hex)&&r.props.onChange({hex:i.hex,source:"hex"},a):i.r||i.g||i.b?r.props.onChange({r:i.r||r.props.rgb.r,g:i.g||r.props.rgb.g,b:i.b||r.props.rgb.b,source:"rgb"},a):i.a?(i.a<0?i.a=0:i.a>1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},a)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(rI(i.s)?r.props.hsl.s:i.s),l:Number(rI(i.l)?r.props.hsl.l:i.l),source:"hsl"},a))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?r.state={view:"rgb"}:r.state={view:t.view},r}return S$(e,[{key:"render",value:function(){var r=this,i=on({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),a=void 0;return this.state.view==="hex"?a=D.createElement("div",{style:i.fields,className:"flexbox-fix"},D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?a=D.createElement("div",{style:i.fields,className:"flexbox-fix"},D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),D.createElement("div",{style:i.alpha},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(a=D.createElement("div",{style:i.fields,className:"flexbox-fix"},D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),D.createElement("div",{style:i.field},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),D.createElement("div",{style:i.alpha},D.createElement(Yn,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),D.createElement("div",{style:i.wrap,className:"flexbox-fix"},a,D.createElement("div",{style:i.toggle},D.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(u){return r.icon=u}},D.createElement(x$,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e})(D.Component);BN.defaultProps={view:"hex"};var aI=function(){var e=on({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 D.createElement("div",{style:e.picker})},T$=function(){var e=on({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return D.createElement("div",{style:e.picker})},x4=function(e){var t=e.width,r=e.onChange,i=e.disableAlpha,a=e.rgb,s=e.hsl,u=e.hsv,c=e.hex,h=e.renderers,g=e.styles,v=g===void 0?{}:g,y=e.className,S=y===void 0?"":y,_=e.defaultView,O=on(Si({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"}}},v),{disableAlpha:i});return D.createElement("div",{style:O.picker,className:"chrome-picker "+S},D.createElement("div",{style:O.saturation},D.createElement(jy,{style:O.Saturation,hsl:s,hsv:u,pointer:T$,onChange:r})),D.createElement("div",{style:O.body},D.createElement("div",{style:O.controls,className:"flexbox-fix"},D.createElement("div",{style:O.color},D.createElement("div",{style:O.swatch},D.createElement("div",{style:O.active}),D.createElement(vp,{renderers:h}))),D.createElement("div",{style:O.toggles},D.createElement("div",{style:O.hue},D.createElement(yp,{style:O.Hue,hsl:s,pointer:aI,onChange:r})),D.createElement("div",{style:O.alpha},D.createElement(a4,{style:O.Alpha,rgb:a,hsl:s,pointer:aI,renderers:h,onChange:r})))),D.createElement(BN,{rgb:a,hsl:s,hex:c,view:_,onChange:r,disableAlpha:i})))};x4.propTypes={width:C.oneOfType([C.string,C.number]),disableAlpha:C.bool,styles:C.object,defaultView:C.oneOf(["hex","rgb","hsl"])};x4.defaultProps={width:225,disableAlpha:!1,styles:{}};Gs(x4);var w$=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,a=e.onSwatchHover,s=e.active,u=on({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:g4(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:s,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return D.createElement(Yd,{style:u.color,color:t,onClick:i,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}},D.createElement("div",{style:u.dot}))},A$=function(e){var t=e.hex,r=e.rgb,i=e.onChange,a=on({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"}}}),s=function(c,h){c.r||c.g||c.b?i({r:c.r||r.r,g:c.g||r.g,b:c.b||r.b,source:"rgb"},h):i({hex:c.hex,source:"hex"},h)};return D.createElement("div",{style:a.fields,className:"flexbox-fix"},D.createElement("div",{style:a.active}),D.createElement(Yn,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:t,onChange:s}),D.createElement(Yn,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:s}),D.createElement(Yn,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:s}),D.createElement(Yn,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:s}))},S4=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.colors,a=e.hex,s=e.rgb,u=e.styles,c=u===void 0?{}:u,h=e.className,g=h===void 0?"":h,v=on(Si({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),y=function(_,O){_.hex?Pc(_.hex)&&t({hex:_.hex,source:"hex"},O):t(_,O)};return D.createElement(Jm,{style:v.Compact,styles:c},D.createElement("div",{style:v.compact,className:"compact-picker "+g},D.createElement("div",null,Zd(i,function(S){return D.createElement(w$,{key:S,color:S,active:S.toLowerCase()===a,onClick:y,onSwatchHover:r})}),D.createElement("div",{style:v.clear})),D.createElement(A$,{hex:a,rgb:s,onChange:y})))};S4.propTypes={colors:C.arrayOf(C.string),styles:C.object};S4.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:{}};Gs(S4);var R$=function(e){var t=e.hover,r=e.color,i=e.onClick,a=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=on({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return D.createElement("div",{style:u.swatch},D.createElement(Yd,{color:r,onClick:i,onHover:a,focusStyle:s}))};const I$=i4.handleHover(R$);var C4=function(e){var t=e.width,r=e.colors,i=e.onChange,a=e.onSwatchHover,s=e.triangle,u=e.styles,c=u===void 0?{}:u,h=e.className,g=h===void 0?"":h,v=on(Si({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)"}}},c),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right","bottom-left-triangle":s==="bottom-left","bottom-right-triangle":s==="bottom-right"}),y=function(_,O){return i({hex:_,source:"hex"},O)};return D.createElement("div",{style:v.card,className:"github-picker "+g},D.createElement("div",{style:v.triangleShadow}),D.createElement("div",{style:v.triangle}),Zd(r,function(S){return D.createElement(I$,{color:S,key:S,onClick:y,onSwatchHover:a})}))};C4.propTypes={width:C.oneOfType([C.string,C.number]),colors:C.arrayOf(C.string),triangle:C.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:C.object};C4.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Gs(C4);var O$=function(e){var t=e.direction,r=on({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:t==="vertical"});return D.createElement("div",{style:r.picker})},D$=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},E4=function(e){var t=e.width,r=e.height,i=e.onChange,a=e.hsl,s=e.direction,u=e.pointer,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=on(Si({default:{picker:{position:"relative",width:t,height:r},hue:{radius:"2px"}}},h)),S=function(O){return i({a:1,h:O.h,l:.5,s:1})};return D.createElement("div",{style:y.picker,className:"hue-picker "+v},D.createElement(yp,D$({},y.hue,{hsl:a,pointer:u,onChange:S,direction:s})))};E4.propTypes={styles:C.object};E4.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:O$,styles:{}};Gs(E4);var N$=function(e){var t=e.onChange,r=e.hex,i=e.rgb,a=e.styles,s=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=on(Si({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 "+r,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"}}},s)),g=function(y,S){y.hex?Pc(y.hex)&&t({hex:y.hex,source:"hex"},S):(y.r||y.g||y.b)&&t({r:y.r||i.r,g:y.g||i.g,b:y.b||i.b,source:"rgb"},S)};return D.createElement(Jm,{styles:s},D.createElement("div",{style:h.material,className:"material-picker "+c},D.createElement(Yn,{style:{wrap:h.HEXwrap,input:h.HEXinput,label:h.HEXlabel},label:"hex",value:r,onChange:g}),D.createElement("div",{style:h.split,className:"flexbox-fix"},D.createElement("div",{style:h.third},D.createElement(Yn,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"r",value:i.r,onChange:g})),D.createElement("div",{style:h.third},D.createElement(Yn,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"g",value:i.g,onChange:g})),D.createElement("div",{style:h.third},D.createElement(Yn,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"b",value:i.b,onChange:g})))))};Gs(N$);var M$=function(e){var t=e.onChange,r=e.rgb,i=e.hsv,a=e.hex,s=on({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"}}}),u=function(h,g){h["#"]?Pc(h["#"])&&t({hex:h["#"],source:"hex"},g):h.r||h.g||h.b?t({r:h.r||r.r,g:h.g||r.g,b:h.b||r.b,source:"rgb"},g):(h.h||h.s||h.v)&&t({h:h.h||i.h,s:h.s||i.s,v:h.v||i.v,source:"hsv"},g)};return D.createElement("div",{style:s.fields},D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(i.h),onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(i.s*100),onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(i.v*100),onChange:u}),D.createElement("div",{style:s.divider}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:r.r,onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:r.g,onChange:u}),D.createElement(Yn,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:r.b,onChange:u}),D.createElement("div",{style:s.divider}),D.createElement(Yn,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:a.replace("#",""),onChange:u}),D.createElement("div",{style:s.fieldSymbols},D.createElement("div",{style:s.symbol},"°"),D.createElement("div",{style:s.symbol},"%"),D.createElement("div",{style:s.symbol},"%")))},L$=function(e){var t=e.hsl,r=on({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":t.l>.5});return D.createElement("div",{style:r.picker})},k$=function(){var e=on({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 D.createElement("div",{style:e.pointer},D.createElement("div",{style:e.left},D.createElement("div",{style:e.leftInside})),D.createElement("div",{style:e.right},D.createElement("div",{style:e.rightInside})))},sI=function(e){var t=e.onClick,r=e.label,i=e.children,a=e.active,s=on({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 D.createElement("div",{style:s.button,onClick:t},r||i)},P$=function(e){var t=e.rgb,r=e.currentColor,i=on({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 D.createElement("div",null,D.createElement("div",{style:i.label},"new"),D.createElement("div",{style:i.swatches},D.createElement("div",{style:i.new}),D.createElement("div",{style:i.current})),D.createElement("div",{style:i.label},"current"))},j$=(function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}})();function F$(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function B$(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function G$(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var _4=(function(n){G$(e,n);function e(t){F$(this,e);var r=B$(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.state={currentColor:t.hex},r}return j$(e,[{key:"render",value:function(){var r=this.props,i=r.styles,a=i===void 0?{}:i,s=r.className,u=s===void 0?"":s,c=on(Si({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"}}},a));return D.createElement("div",{style:c.picker,className:"photoshop-picker "+u},D.createElement("div",{style:c.head},this.props.header),D.createElement("div",{style:c.body,className:"flexbox-fix"},D.createElement("div",{style:c.saturation},D.createElement(jy,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:L$,onChange:this.props.onChange})),D.createElement("div",{style:c.hue},D.createElement(yp,{direction:"vertical",hsl:this.props.hsl,pointer:k$,onChange:this.props.onChange})),D.createElement("div",{style:c.controls},D.createElement("div",{style:c.top,className:"flexbox-fix"},D.createElement("div",{style:c.previews},D.createElement(P$,{rgb:this.props.rgb,currentColor:this.state.currentColor})),D.createElement("div",{style:c.actions},D.createElement(sI,{label:"OK",onClick:this.props.onAccept,active:!0}),D.createElement(sI,{label:"Cancel",onClick:this.props.onCancel}),D.createElement(M$,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e})(D.Component);_4.propTypes={header:C.string,styles:C.object};_4.defaultProps={header:"Color Picker",styles:{}};Gs(_4);var H$=function(e){var t=e.onChange,r=e.rgb,i=e.hsl,a=e.hex,s=e.disableAlpha,u=on({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:s}),c=function(g,v){g.hex?Pc(g.hex)&&t({hex:g.hex,source:"hex"},v):g.r||g.g||g.b?t({r:g.r||r.r,g:g.g||r.g,b:g.b||r.b,a:r.a,source:"rgb"},v):g.a&&(g.a<0?g.a=0:g.a>100&&(g.a=100),g.a/=100,t({h:i.h,s:i.s,l:i.l,a:g.a,source:"rgb"},v))};return D.createElement("div",{style:u.fields,className:"flexbox-fix"},D.createElement("div",{style:u.double},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"hex",value:a.replace("#",""),onChange:c})),D.createElement("div",{style:u.single},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"r",value:r.r,onChange:c,dragLabel:"true",dragMax:"255"})),D.createElement("div",{style:u.single},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"g",value:r.g,onChange:c,dragLabel:"true",dragMax:"255"})),D.createElement("div",{style:u.single},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"b",value:r.b,onChange:c,dragLabel:"true",dragMax:"255"})),D.createElement("div",{style:u.alpha},D.createElement(Yn,{style:{input:u.input,label:u.label},label:"a",value:Math.round(r.a*100),onChange:c,dragLabel:"true",dragMax:"100"})))},z$=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},GN=function(e){var t=e.colors,r=e.onClick,i=r===void 0?function(){}:r,a=e.onSwatchHover,s=on({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":!t||!t.length}),u=function(h,g){i({hex:h,source:"hex"},g)};return D.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map(function(c){var h=typeof c=="string"?{color:c}:c,g=""+h.color+(h.title||"");return D.createElement("div",{key:g,style:s.swatchWrap},D.createElement(Yd,z$({},h,{style:s.swatch,onClick:u,onHover:a,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+h.color}})))}))};GN.propTypes={colors:C.arrayOf(C.oneOfType([C.string,C.shape({color:C.string,title:C.string})])).isRequired};var q$=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},T4=function(e){var t=e.width,r=e.rgb,i=e.hex,a=e.hsv,s=e.hsl,u=e.onChange,c=e.onSwatchHover,h=e.disableAlpha,g=e.presetColors,v=e.renderers,y=e.styles,S=y===void 0?{}:y,_=e.className,O=_===void 0?"":_,E=on(Si({default:q$({picker:{width:t,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("+r.r+","+r.g+","+r.b+","+r.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)"}},S),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},S),{disableAlpha:h});return D.createElement("div",{style:E.picker,className:"sketch-picker "+O},D.createElement("div",{style:E.saturation},D.createElement(jy,{style:E.Saturation,hsl:s,hsv:a,onChange:u})),D.createElement("div",{style:E.controls,className:"flexbox-fix"},D.createElement("div",{style:E.sliders},D.createElement("div",{style:E.hue},D.createElement(yp,{style:E.Hue,hsl:s,onChange:u})),D.createElement("div",{style:E.alpha},D.createElement(a4,{style:E.Alpha,rgb:r,hsl:s,renderers:v,onChange:u}))),D.createElement("div",{style:E.color},D.createElement(vp,null),D.createElement("div",{style:E.activeColor}))),D.createElement(H$,{rgb:r,hsl:s,hex:i,onChange:u,disableAlpha:h}),D.createElement(GN,{colors:g,onClick:u,onSwatchHover:c}))};T4.propTypes={disableAlpha:C.bool,width:C.oneOfType([C.string,C.number]),styles:C.object};T4.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const U$=Gs(T4);var Wg=function(e){var t=e.hsl,r=e.offset,i=e.onClick,a=i===void 0?function(){}:i,s=e.active,u=e.first,c=e.last,h=on({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+r*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:s,first:u,last:c}),g=function(y){return a({h:t.h,s:.5,l:r,source:"hsl"},y)};return D.createElement("div",{style:h.swatch,onClick:g})},V$=function(e){var t=e.onClick,r=e.hsl,i=on({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),a=.1;return D.createElement("div",{style:i.swatches},D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<a&&Math.abs(r.s-.5)<a,onClick:t,first:!0})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<a&&Math.abs(r.s-.5)<a,onClick:t})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<a&&Math.abs(r.s-.5)<a,onClick:t})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<a&&Math.abs(r.s-.5)<a,onClick:t})),D.createElement("div",{style:i.swatch},D.createElement(Wg,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<a&&Math.abs(r.s-.5)<a,onClick:t,last:!0})),D.createElement("div",{style:i.clear}))},W$=function(){var e=on({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 D.createElement("div",{style:e.picker})},w4=function(e){var t=e.hsl,r=e.onChange,i=e.pointer,a=e.styles,s=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=on(Si({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return D.createElement("div",{style:h.wrap||{},className:"slider-picker "+c},D.createElement("div",{style:h.hue},D.createElement(yp,{style:h.Hue,hsl:t,pointer:i,onChange:r})),D.createElement("div",{style:h.swatches},D.createElement(V$,{hsl:t,onClick:r})))};w4.propTypes={styles:C.object};w4.defaultProps={pointer:W$,styles:{}};Gs(w4);var E1={},oI;function X$(){if(oI)return E1;oI=1,Object.defineProperty(E1,"__esModule",{value:!0});var n=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var c=arguments[u];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(s[h]=c[h])}return s},e=D,t=r(e);function r(s){return s&&s.__esModule?s:{default:s}}function i(s,u){var c={};for(var h in s)u.indexOf(h)>=0||Object.prototype.hasOwnProperty.call(s,h)&&(c[h]=s[h]);return c}var a=24;return E1.default=function(s){var u=s.fill,c=u===void 0?"currentColor":u,h=s.width,g=h===void 0?a:h,v=s.height,y=v===void 0?a:v,S=s.style,_=S===void 0?{}:S,O=i(s,["fill","width","height","style"]);return t.default.createElement("svg",n({viewBox:"0 0 "+a+" "+a,style:n({fill:c,width:g,height:y},_)},O),t.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},E1}var Y$=X$();const Z$=Pd(Y$);var J$=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,a=e.onSwatchHover,s=e.first,u=e.last,c=e.active,h=on({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:g4(t),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:s,last:u,active:c,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return D.createElement(Yd,{color:t,style:h.color,onClick:i,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}},D.createElement("div",{style:h.check},D.createElement(Z$,null)))},K$=function(e){var t=e.onClick,r=e.onSwatchHover,i=e.group,a=e.active,s=on({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return D.createElement("div",{style:s.group},Zd(i,function(u,c){return D.createElement(J$,{key:u,color:u,active:u.toLowerCase()===a,first:c===0,last:c===i.length-1,onClick:t,onSwatchHover:r})}))},A4=function(e){var t=e.width,r=e.height,i=e.onChange,a=e.onSwatchHover,s=e.colors,u=e.hex,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=on(Si({default:{picker:{width:t,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},h)),S=function(O,E){return i({hex:O,source:"hex"},E)};return D.createElement("div",{style:y.picker,className:"swatches-picker "+v},D.createElement(Jm,null,D.createElement("div",{style:y.overflow},D.createElement("div",{style:y.body},Zd(s,function(_){return D.createElement(K$,{key:_.toString(),group:_,active:u,onClick:S,onSwatchHover:a})}),D.createElement("div",{style:y.clear})))))};A4.propTypes={width:C.oneOfType([C.string,C.number]),height:C.oneOfType([C.string,C.number]),colors:C.arrayOf(C.arrayOf(C.string)),styles:C.object};A4.defaultProps={width:320,height:240,colors:[[Oh[900],Oh[700],Oh[500],Oh[300],Oh[100]],[Dh[900],Dh[700],Dh[500],Dh[300],Dh[100]],[Nh[900],Nh[700],Nh[500],Nh[300],Nh[100]],[Mh[900],Mh[700],Mh[500],Mh[300],Mh[100]],[Lh[900],Lh[700],Lh[500],Lh[300],Lh[100]],[kh[900],kh[700],kh[500],kh[300],kh[100]],[Ph[900],Ph[700],Ph[500],Ph[300],Ph[100]],[jh[900],jh[700],jh[500],jh[300],jh[100]],[Fh[900],Fh[700],Fh[500],Fh[300],Fh[100]],["#194D33",mm[700],mm[500],mm[300],mm[100]],[Bh[900],Bh[700],Bh[500],Bh[300],Bh[100]],[Gh[900],Gh[700],Gh[500],Gh[300],Gh[100]],[Hh[900],Hh[700],Hh[500],Hh[300],Hh[100]],[zh[900],zh[700],zh[500],zh[300],zh[100]],[qh[900],qh[700],qh[500],qh[300],qh[100]],[Uh[900],Uh[700],Uh[500],Uh[300],Uh[100]],[Vh[900],Vh[700],Vh[500],Vh[300],Vh[100]],[Wh[900],Wh[700],Wh[500],Wh[300],Wh[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Gs(A4);var R4=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.hex,a=e.colors,s=e.width,u=e.triangle,c=e.styles,h=c===void 0?{}:c,g=e.className,v=g===void 0?"":g,y=on(Si({default:{card:{width:s,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"}}},h),{"hide-triangle":u==="hide","top-left-triangle":u==="top-left","top-right-triangle":u==="top-right"}),S=function(O,E){Pc(O)&&t({hex:O,source:"hex"},E)};return D.createElement("div",{style:y.card,className:"twitter-picker "+v},D.createElement("div",{style:y.triangleShadow}),D.createElement("div",{style:y.triangle}),D.createElement("div",{style:y.body},Zd(a,function(_,O){return D.createElement(Yd,{key:O,color:_,hex:_,style:y.swatch,onClick:S,onHover:r,focusStyle:{boxShadow:"0 0 4px "+_}})}),D.createElement("div",{style:y.hash},"#"),D.createElement(Yn,{label:null,style:{input:y.input},value:i.replace("#",""),onChange:S}),D.createElement("div",{style:y.clear})))};R4.propTypes={width:C.oneOfType([C.string,C.number]),triangle:C.oneOf(["hide","top-left","top-right"]),colors:C.arrayOf(C.string),styles:C.object};R4.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Gs(R4);var I4=function(e){var t=on({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return D.createElement("div",{style:t.picker})};I4.propTypes={hsl:C.shape({h:C.number,s:C.number,l:C.number,a:C.number})};I4.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var O4=function(e){var t=on({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return D.createElement("div",{style:t.picker})};O4.propTypes={hsl:C.shape({h:C.number,s:C.number,l:C.number,a:C.number})};O4.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var $$=function(e){var t=e.onChange,r=e.rgb,i=e.hsl,a=e.hex,s=e.hsv,u=function(S,_){if(S.hex)Pc(S.hex)&&t({hex:S.hex,source:"hex"},_);else if(S.rgb){var O=S.rgb.split(",");GE(S.rgb,"rgb")&&t({r:O[0],g:O[1],b:O[2],a:1,source:"rgb"},_)}else if(S.hsv){var E=S.hsv.split(",");GE(S.hsv,"hsv")&&(E[2]=E[2].replace("%",""),E[1]=E[1].replace("%",""),E[0]=E[0].replace("°",""),E[1]==1?E[1]=.01:E[2]==1&&(E[2]=.01),t({h:Number(E[0]),s:Number(E[1]),v:Number(E[2]),source:"hsv"},_))}else if(S.hsl){var w=S.hsl.split(",");GE(S.hsl,"hsl")&&(w[2]=w[2].replace("%",""),w[1]=w[1].replace("%",""),w[0]=w[0].replace("°",""),v[1]==1?v[1]=.01:v[2]==1&&(v[2]=.01),t({h:Number(w[0]),s:Number(w[1]),v:Number(w[2]),source:"hsl"},_))}},c=on({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"}}}),h=r.r+", "+r.g+", "+r.b,g=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",v=Math.round(s.h)+"°, "+Math.round(s.s*100)+"%, "+Math.round(s.v*100)+"%";return D.createElement("div",{style:c.wrap,className:"flexbox-fix"},D.createElement("div",{style:c.fields},D.createElement("div",{style:c.double},D.createElement(Yn,{style:{input:c.input,label:c.label},label:"hex",value:a,onChange:u})),D.createElement("div",{style:c.column},D.createElement("div",{style:c.single},D.createElement(Yn,{style:{input:c.input2,label:c.label2},label:"rgb",value:h,onChange:u})),D.createElement("div",{style:c.single},D.createElement(Yn,{style:{input:c.input2,label:c.label2},label:"hsv",value:v,onChange:u})),D.createElement("div",{style:c.single},D.createElement(Yn,{style:{input:c.input2,label:c.label2},label:"hsl",value:g,onChange:u})))))},D4=function(e){var t=e.width,r=e.onChange,i=e.rgb,a=e.hsl,s=e.hsv,u=e.hex,c=e.header,h=e.styles,g=h===void 0?{}:h,v=e.className,y=v===void 0?"":v,S=on(Si({default:{picker:{width:t,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("+i.r+", "+i.g+", "+i.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"}}},g));return D.createElement("div",{style:S.picker,className:"google-picker "+y},D.createElement("div",{style:S.head},c),D.createElement("div",{style:S.swatch}),D.createElement("div",{style:S.saturation},D.createElement(jy,{hsl:a,hsv:s,pointer:I4,onChange:r})),D.createElement("div",{style:S.body},D.createElement("div",{style:S.controls,className:"flexbox-fix"},D.createElement("div",{style:S.hue},D.createElement(yp,{style:S.Hue,hsl:a,radius:"4px",pointer:O4,onChange:r}))),D.createElement($$,{rgb:i,hsl:a,hex:u,hsv:s,onChange:r})))};D4.propTypes={width:C.oneOfType([C.string,C.number]),styles:C.object,header:C.string};D4.defaultProps={width:652,styles:{},header:"Color picker"};Gs(D4);function X_({closeChooseColor:n,currentColor:e,handleCloseLineWeight:t,handleLineWeightSelect:r,openChooseColor:i,openChooseLineWeight:a,toolOptions:s,toolState:u,updateColor:c}){const{t:h}=Bs.useTranslation();return A.jsxs(he.Grid,{container:!0,spacing:1,children:[A.jsx(he.Grid,{size:{xs:12},children:A.jsx(mn,{variant:"overline",children:h("style")})}),A.jsx(he.Grid,{size:{xs:12},children:A.jsxs(vy,{"aria-label":h("style_selection"),size:"small",children:[u.activeTool!==Ur.TEXT&&[A.jsxs(Gi,{value:"strokeColor","aria-label":h("border_color"),onClick:i,children:[A.jsx(he.Tooltip,{title:h("border_color"),children:A.jsx("span",{children:A.jsx(sV,{style:{fill:u.strokeColor}})})}),A.jsx(eS,{})]},"strokeColor"),A.jsxs(Gi,{value:"lineWeight","aria-label":h("line_weight"),onClick:a,children:[A.jsx(he.Tooltip,{title:h("line_weight"),children:A.jsx("span",{children:A.jsx(oV,{})})}),A.jsx(eS,{})]},"lineWeight")],A.jsxs(Gi,{value:"fillColor","aria-label":h("fill_color"),onClick:i,children:[A.jsx(he.Tooltip,{title:h("fill_color"),children:A.jsx("span",{children:A.jsx(lV,{})})}),A.jsx(eS,{})]})]})}),A.jsx(he.Popover,{open:s.lineWeightPopoverOpen,anchorEl:s.popoverLineWeightAnchorEl,children:A.jsx("div",{children:A.jsx(he.ClickAwayListener,{onClickAway:t,children:A.jsx(he.MenuList,{autoFocus:!0,role:"listbox",children:hG.map(g=>A.jsx(he.MenuItem,{onClick:r,value:g,selected:g===u.strokeWidth,role:"option","aria-selected":g===u.strokeWidth,children:g},g))})})})}),A.jsx(he.Popover,{open:s.colorPopoverOpen,anchorEl:s.popoverAnchorEl,onClose:n,children:A.jsx(U$,{disableAlpha:!1,color:e,onChange:c})})]})}X_.propTypes={closeChooseColor:gc.func.isRequired,currentColor:gc.string.isRequired,handleCloseLineWeight:gc.func.isRequired,handleLineWeightSelect:gc.func.isRequired,openChooseColor:gc.func.isRequired,openChooseLineWeight:gc.func.isRequired,toolOptions:gc.shape({colorPopoverOpen:C.bool,currentColorType:C.any,lineWeightPopoverOpen:C.bool,popoverAnchorEl:C.any,popoverLineWeightAnchorEl:C.any}).isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string,image:C.shape({id:C.string}),strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,text:C.string,textBody:C.string,updateColor:C.func}).isRequired,updateColor:gc.func.isRequired};function Y_({currentShape:n,displayMode:e,setToolState:t,t:r,toolState:i}){const[a,s]=D.useState({colorPopoverOpen:!1,currentColorType:null,lineWeightPopoverOpen:!1,popoverAnchorEl:null,popoverLineWeightAnchorEl:null}),u=a.currentColorType?mO(i[a.currentColorType]):"rgba(255, 0, 0, 0.5)",c=k=>{s({...a,lineWeightPopoverOpen:!0,popoverLineWeightAnchorEl:k.currentTarget})},h=k=>{s({...a,lineWeightPopoverOpen:!1,popoverLineWeightAnchorEl:null}),t({...i,strokeWidth:k.currentTarget.value})},g=k=>{s({...a,colorPopoverOpen:!1,currentColorType:null,popoverAnchorEl:null})},v=k=>{s({...a,colorPopoverOpen:!0,currentColorType:k.currentTarget.value,popoverAnchorEl:k.currentTarget})},y=k=>{s({...a,lineWeightPopoverOpen:!1,popoverLineWeightAnchorEl:null})},S=k=>{t({...i,closedMode:k.currentTarget.value})},_=k=>{t({...i,[a.currentColorType]:mG(k.rgb)})},O=(k,G)=>{t({...i,image:{...i.image,id:k}})},E=()=>{const k={id:i?.image?.id,uuid:ys()};t({...i,image:{id:null},imageEvent:k})},w=k=>{const G=k.target.value;t({...i,text:G})},L=Ka.useSelector(k=>Pt.getConfig(k)).annotation?.allowTargetShapesStyling===!0;return A.jsxs("div",{children:[(e===va.DRAW||L&&e===va.TARGET)&&w5(i.activeTool)&&A.jsx(he.Grid,{container:!0,children:A.jsx(X_,{currentColor:u,changeClosedMode:S,closeChooseColor:g,handleCloseLineWeight:y,handleLineWeightSelect:h,openChooseColor:v,openChooseLineWeight:c,updateColor:_,toolOptions:a,toolState:i})}),i.activeTool===Ur.TEXT&&A.jsxs(he.Grid,{container:!0,direction:"column",spacing:1,children:[A.jsx(he.Grid,{children:A.jsx(mn,{variant:"overline",children:r("text")})}),n?A.jsxs(A.Fragment,{children:[A.jsx(he.Grid,{children:A.jsx(he.TextField,{value:i.text,placeholder:r("text"),fullwidth:!0,onChange:w})}),A.jsx(he.Grid,{children:A.jsx(X_,{changeClosedMode:S,closeChooseColor:g,currentColor:u,handleCloseLineWeight:y,handleLineWeightSelect:h,openChooseColor:v,openChooseLineWeight:c,toolOptions:a,toolState:i,updateColor:_})})]}):A.jsx(he.Grid,{children:A.jsx(mn,{children:r("click_on_canvas_to_write")})})]}),i.activeTool===Ur.IMAGE&&A.jsx(he.Grid,{container:!0,children:A.jsx(FD,{size:{xs:8},imageUrl:i.image?.id,onChange:O,isReadOnly:!!n,onAddImage:E,t:r})}),i.activeTool===Xt.POLYGON&&A.jsx(mn,{children:r("pressEnterOrClickFirstPointToClose")})]})}Y_.propTypes={currentShape:C.object.isRequired,displayMode:C.string.isRequired,setToolState:C.func.isRequired,t:C.func.isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string,image:C.shape({id:C.string}),strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,text:C.string,textBody:C.string,updateColor:C.func}).isRequired};const Q$=xs.styled(he.ListItem)(({theme:n})=>({display:"flex",justifyContent:"space-between"}));function HN({currentShapeId:n,deleteShape:e,shapes:t,t:r,updateCurrentShapeInShapes:i}){return A.jsx(j7,{children:t.map(a=>A.jsxs(D.Fragment,{children:[A.jsx(W1,{disableGutters:!0,children:A.jsxs(Q$,{children:[A.jsx(mn,{component:"span",sx:{color:"black",cursor:"pointer",fontWeight:a.id===n?"bold":void 0},onClick:()=>i(a),children:r(a.type)}),A.jsx(he.Tooltip,{title:A.jsx(Ic,{label:r("delete"),action:"delete"}),children:A.jsx(he.IconButton,{onClick:()=>e(a.id),edge:"end","aria-label":"delete",children:A.jsx(X7,{})})})]})}),A.jsx(he.Divider,{component:"li"})]},a.id))})}HN.propTypes={currentShapeId:C.string.isRequired,deleteShape:C.func.isRequired,shapes:C.array.isRequired,t:C.func.isRequired,updateCurrentShapeInShapes:C.func.isRequired};function zN({currentShape:n,deleteShape:e,displayMode:t,setToolState:r,shapes:i,t:a,toolState:s,updateCurrentShapeInShapes:u}){const c=(v,y)=>{if(!y)return;const S=y===Ur.SHAPE?Xt.RECTANGLE:y;r(_=>_.activeTool===S?_:{..._,activeTool:S})},h=v=>{if(r(y=>({...y,...v,activeTool:Ur.EDIT})),n){const y={};Object.prototype.hasOwnProperty.call(v,"strokeWidth")&&v.strokeWidth!==n.strokeWidth&&(y.strokeWidth=v.strokeWidth),Object.prototype.hasOwnProperty.call(v,"strokeColor")&&v.strokeColor!==n.stroke&&(y.stroke=v.strokeColor),Object.prototype.hasOwnProperty.call(v,"fillColor")&&v.fillColor!==n.fill&&(y.fill=v.fillColor),Object.prototype.hasOwnProperty.call(v,"text")&&v.text!==n.text&&(y.text=v.text),Object.prototype.hasOwnProperty.call(v,"image")&&v.image?.id!==n.url&&(y.url=v.image?.id??null),Object.keys(y).length&&u({...n,...y})}};D.useEffect(()=>{s.activeTool===Ur.SHAPE&&r(v=>({...v,activeTool:Xt.RECTANGLE}))},[s.activeTool,r]);const g=D.useMemo(()=>n?{...s,activeTool:n.type,closedMode:n.closedMode,fillColor:n.fill,image:{id:n.url},strokeColor:n.stroke,strokeWidth:n.strokeWidth,text:n.text}:s,[s,n]);return A.jsxs(A.Fragment,{children:[s.activeTool===Ur.EDIT&&A.jsxs(A.Fragment,{children:[n&&(t===va.DRAW||t===va.TARGET)&&A.jsxs("div",{children:[A.jsx(mn,{variant:"subFormSectionTitle",children:a("selected_object")}),A.jsx(Y_,{t:a,toolState:g,setToolState:h,displayMode:t,currentShape:n})]}),t===va.DRAW&&i.length>0&&A.jsxs(A.Fragment,{children:[A.jsx(mn,{variant:"subFormSectionTitle",children:a("object_list")}),A.jsx(HN,{currentShapeId:n?.id,shapes:i,deleteShape:e,updateCurrentShapeInShapes:u,t:a})]})]}),w5(s.activeTool)&&A.jsxs(yO,{value:s.activeTool,exclusive:!0,onChange:c,"aria-label":a("tool_selection"),size:"small","data-testid":"tool_selection",children:[t!==va.IMAGE&&A.jsx(he.Tooltip,{title:a("rectangle"),children:A.jsx(Gi,{value:Xt.RECTANGLE,"aria-label":a("add_a_rectangle"),children:A.jsx(QU,{})})}),t===va.TARGET&&A.jsx(he.Tooltip,{title:a("circle"),children:A.jsx(Gi,{value:Xt.CIRCLE,"aria-label":a("add_a_circle"),children:A.jsx(R9,{})})}),t!==va.IMAGE&&A.jsx("div",{children:A.jsx(he.Tooltip,{title:a("line"),children:A.jsx(Gi,{value:Xt.POLYGON,"aria-label":a("add_a_line"),children:A.jsx(tV,{})})})}),t===va.DRAW&&A.jsxs(A.Fragment,{children:[A.jsx(he.Tooltip,{title:"Ellipse shape",children:A.jsx(Gi,{value:Xt.ELLIPSE,"aria-label":a("add_an_ellipse"),children:A.jsx(R9,{})})}),A.jsx(he.Tooltip,{title:a("arrow"),children:A.jsx(Gi,{value:Xt.ARROW,"aria-label":a("add_an_arrow_shape"),children:A.jsx(eV,{})})})]})]}),s.activeTool===Ur.DELETE&&A.jsxs(A.Fragment,{children:[A.jsx(mn,{variant:"overline",children:a("delete")}),A.jsx("p",{children:a("click_to_delete_shape")}),A.jsxs(he.Button,{onClick:()=>e(),children:[A.jsx("span",{children:a("delete_all")}),A.jsx(jD,{color:"red"})]})]}),A.jsx(Y_,{t:a,toolState:s,setToolState:r,displayMode:t,currentShape:n})]})}zN.propTypes={currentShape:C.object.isRequired,deleteShape:C.func.isRequired,displayMode:C.string.isRequired,setToolState:C.func.isRequired,shapes:C.array.isRequired,t:C.func.isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string.isRequired,image:C.shape({id:C.string}).isRequired,strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,updateColor:C.func.isRequired}).isRequired,updateCurrentShapeInShapes:C.func.isRequired};const eQ=xs.styled(he.Grid)(({})=>({display:"flex",flexDirection:"column"}));function qN({displayMode:n,setToolState:e,toolState:t,deleteShape:r,currentShape:i,updateCurrentShapeInShapes:a,setViewTool:s,shapes:u,t:c}){D.useEffect(()=>{},[t.fillColor,t.strokeColor,t.strokeWidth]);const h=D.useCallback((y,S)=>{S&&(n?(e(_=>_.activeTool===S?_:{..._,activeTool:S}),S!==Ur.EDIT&&a(null)):(S===Ur.SHAPE&&e({...vG,activeTool:S}),a(null)))},[n,e,a]),g=D.useCallback(y=>()=>{s(y)},[s]),{activeTool:v}=t;return A.jsx(he.Grid,{container:!0,children:A.jsxs(eQ,{item:!0,xs:12,children:[A.jsxs(yO,{value:v,exclusive:!0,onChange:h,"aria-label":c("tool_selection"),size:"small",children:[n!==va.IMAGE&&A.jsx(he.Tooltip,{title:c("shape_selection"),children:A.jsx(Gi,{value:w5(v)?v:Ur.SHAPE,"aria-label":c("select_cursor"),onClick:g(r1),children:A.jsx(KU,{})})}),n===va.DRAW&&A.jsx(he.Tooltip,{title:c("text"),children:A.jsx(Gi,{value:Ur.TEXT,"aria-label":c("select_text"),onClick:g(r1),children:A.jsx(JU,{})})}),n===va.IMAGE&&A.jsx(he.Tooltip,{title:c("image"),children:A.jsx(Gi,{value:Ur.IMAGE,"aria-label":c("select_cursor"),onClick:g(r1),children:A.jsx(PD,{})})}),A.jsx(he.Tooltip,{title:c("edit"),children:A.jsx(Gi,{value:Ur.EDIT,"aria-label":c("select_cursor"),onClick:g(vO),children:A.jsx($U,{})})}),A.jsx(he.Tooltip,{title:A.jsx(Ic,{label:c("delete"),action:"delete"}),children:A.jsx(Gi,{value:Ur.DELETE,"aria-label":c("select_cursor"),onClick:g(r1),children:A.jsx(jD,{})})})]}),A.jsx(zN,{currentShape:i,deleteShape:r,displayMode:n,setToolState:e,shapes:u,t:c,toolState:t,updateCurrentShapeInShapes:a})]})})}qN.propTypes={currentShape:C.shape({id:C.string,rotation:C.number,scaleX:C.number,scaleY:C.number,type:C.string,url:C.string,x:C.number,y:C.number}).isRequired,deleteShape:C.func.isRequired,displayMode:C.string.isRequired,setToolState:C.func.isRequired,setViewTool:C.func.isRequired,shapes:C.arrayOf(C.shape({id:C.string,rotation:C.number,scaleX:C.number,scaleY:C.number,type:C.string,url:C.string,x:C.number,y:C.number})).isRequired,t:C.func.isRequired,toolState:C.shape({activeTool:C.string.isRequired,closedMode:C.string.isRequired,fillColor:C.string.isRequired,image:C.shape({id:C.string}).isRequired,strokeColor:C.string.isRequired,strokeWidth:C.number.isRequired,updateColor:C.func.isRequired}).isRequired,updateCurrentShapeInShapes:C.func.isRequired};function UN({playerReferences:n,setTargetDrawingState:e,targetDrawingState:t,windowId:r}){const{t:i}=Bs.useTranslation(),a=Ka.useSelector(k=>Pt.getConfig(k)),{editMode:s}=Xm(a),[u,c]=D.useState(()=>{const k=Array.isArray(t?.shapes)?t.shapes:[];return{currentShape:null,isDrawing:!1,shapes:k,...t,...s&&k.length>0?{currentShape:k[0]}:{}}}),h=Array.isArray(t?.shapes)&&t.shapes.length>0,[g,v]=D.useState(h?oo:{...oo,activeTool:Ur.SHAPE}),[,y]=D.useState(vO),[S,_]=D.useState(n.getScale()),O=D.useCallback(()=>{const k=n.getScale();_(G=>G===k?G:k)},[n]),E=D.useRef(u.shapes);D.useLayoutEffect(()=>{const k=E.current,G=u.shapes;k!==G&&(k&&G&&k.length===G.length&&k.every((B,z)=>B===G[z])||(E.current=G,e({drawingState:u})))},[u.shapes,e,u]);const w=D.useCallback(k=>{c(G=>{if(!k)return G.shapes.length===0&&G.currentShape==null?G:{...G,currentShape:null,shapes:[]};const B=G.shapes.filter(z=>z.id!==k);return B.length===G.shapes.length?G:{...G,currentShape:null,shapes:B}})},[]),N=D.useRef(u);N.current=u,D.useEffect(()=>{const k=()=>{const{currentShape:G,shapes:B}=N.current;if(G){const z=B.filter(V=>V.id!==G.id);c(V=>({...V,currentShape:null,shapes:z}))}};return document.addEventListener(m_,k),()=>document.removeEventListener(m_,k)},[]);const L=D.useCallback(k=>{setTimeout(()=>{c(G=>{if(!k)return G.currentShape==null?G:{...G,currentShape:null};const B=G.shapes.findIndex(z=>z.id===k.id);if(B!==-1){if(G.shapes[B]===k&&G.currentShape===k)return G;const V=G.shapes===void 0?[]:[...G.shapes];return V[B]=k,{...G,currentShape:k,shapes:V}}return{...G,currentShape:k,shapes:[...G.shapes||[],k]}})},0)},[]);return A.jsx(he.Grid,{container:!0,direction:"column",children:A.jsxs(he.Grid,{container:!0,direction:"column",children:[A.jsx(mn,{variant:"subFormSectionTitle",children:i("spatialTarget")}),A.jsxs(he.Grid,{direction:"row",spacing:2,children:[A.jsx(H5,{displayMode:va.TARGET,drawingState:u,playerReferences:n,scale:S,setColorToolFromCurrentShape:()=>{},setDrawingState:c,tabView:"edit",toolState:g,updateCurrentShapeInShapes:L,updateScale:O,windowId:r,setToolState:v}),A.jsx(qN,{toolState:g,deleteShape:w,setToolState:v,shapes:u.shapes,currentShape:u.currentShape,setViewTool:y,t:i,displayMode:va.TARGET,updateCurrentShapeInShapes:L})]})]})})}UN.propTypes={playerReferences:C.object.isRequired,setTargetDrawingState:C.func.isRequired,targetDrawingState:C.object.isRequired,windowId:C.string.isRequired};const tQ={activeTool:Xt.POI},lI=()=>{};function VN({playerReferences:n,setTargetDrawingState:e,targetDrawingState:t,windowId:r}){const{t:i}=Bs.useTranslation(),[a,s]=D.useState(()=>{const y=Array.isArray(t?.shapes)?t.shapes:[];return{currentShape:null,isDrawing:!1,shapes:y,...t,...y.length>0?{currentShape:y[0]}:{}}}),[u,c]=D.useState(n.getScale()),h=D.useCallback(()=>{const y=n.getScale();c(S=>S===y?S:y)},[n]),g=D.useRef(a.shapes);D.useLayoutEffect(()=>{const y=g.current,S=a.shapes;y!==S&&(g.current=S,e({drawingState:a}))},[a.shapes,e,a]);const v=D.useCallback(y=>{setTimeout(()=>{s(S=>y?S.currentShape===y&&S.shapes[0]===y?S:{...S,currentShape:y,shapes:[y]}:S.currentShape==null?S:{...S,currentShape:null})},0)},[]);return A.jsxs(he.Grid,{container:!0,direction:"column",children:[A.jsx(he.Typography,{variant:"subFormSectionTitle",children:i("poi_click_to_place")}),A.jsx(he.Grid,{container:!0,direction:"row",spacing:2,children:A.jsx(H5,{displayMode:va.POI,drawingState:a,playerReferences:n,scale:u,setColorToolFromCurrentShape:lI,setDrawingState:s,setToolState:lI,tabView:"edit",toolState:tQ,updateCurrentShapeInShapes:v,updateScale:h,windowId:r})})]})}VN.propTypes={playerReferences:C.object.isRequired,setTargetDrawingState:C.func.isRequired,targetDrawingState:C.object.isRequired,windowId:C.string.isRequired};function N4({onChangeTarget:n,spatialTarget:e,pointOnly:t,playerReferences:r,target:i,windowId:a}){const{t:s}=Bs.useTranslation(),u=r.getMediaType(),c=D.useMemo(()=>{if(i)return i;const g={drawingState:{currentShape:null,isDrawing:!1,shapes:[]}};return u===Bi.IMAGE&&(g.fullCanvaXYWH=`0,0,${r.getMediaTrueWidth()},${r.getMediaTrueHeight()}`),g},[i,u,r]);D.useEffect(()=>{i||n(c)},[i,c,n]);const h=g=>{n({...c,...g})};return e?A.jsxs(he.Grid,{container:!0,direction:"column",spacing:1,children:[A.jsx(he.Grid,{children:!t&&A.jsx(he.Typography,{variant:"formSectionTitle",children:s("target")})}),e&&u!==Bi.AUDIO&&A.jsx(he.Grid,{container:!0,direction:"column",children:t?A.jsx(VN,{playerReferences:r,setTargetDrawingState:h,targetDrawingState:c.drawingState,windowId:a}):A.jsx(UN,{playerReferences:r,setTargetDrawingState:h,targetDrawingState:c.drawingState,windowId:a})})]}):null}N4.propTypes={onChangeTarget:C.func.isRequired,playerReferences:C.object.isRequired,pointOnly:C.bool,spatialTarget:C.bool.isRequired,target:C.object,windowId:C.string.isRequired};N4.defaultProps={pointOnly:!1};var nQ=Object.prototype,rQ=nQ.hasOwnProperty;function iQ(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&rQ.call(n,"index")&&(t.index=n.index,t.input=n.input),t}function aQ(n,e){var t=l4(n.buffer);return new n.constructor(t,n.byteOffset,n.byteLength)}var sQ=/\w*$/;function oQ(n){var e=new n.constructor(n.source,sQ.exec(n));return e.lastIndex=n.lastIndex,e}var uI=Xl?Xl.prototype:void 0,cI=uI?uI.valueOf:void 0;function lQ(n){return cI?Object(cI.call(n)):{}}var uQ="[object Boolean]",cQ="[object Date]",dQ="[object Map]",fQ="[object Number]",hQ="[object RegExp]",pQ="[object Set]",gQ="[object String]",mQ="[object Symbol]",vQ="[object ArrayBuffer]",yQ="[object DataView]",bQ="[object Float32Array]",xQ="[object Float64Array]",SQ="[object Int8Array]",CQ="[object Int16Array]",EQ="[object Int32Array]",_Q="[object Uint8Array]",TQ="[object Uint8ClampedArray]",wQ="[object Uint16Array]",AQ="[object Uint32Array]";function RQ(n,e,t){var r=n.constructor;switch(e){case vQ:return l4(n);case uQ:case cQ:return new r(+n);case yQ:return aQ(n);case bQ:case xQ:case SQ:case CQ:case EQ:case _Q:case TQ:case wQ:case AQ:return hN(n,t);case dQ:return new r;case fQ:case gQ:return new r(n);case hQ:return oQ(n);case pQ:return new r;case mQ:return lQ(n)}}var IQ="[object Map]";function OQ(n){return Yl(n)&&sl(n)==IQ}var dI=dp&&dp.isMap,DQ=dI?d4(dI):OQ,NQ="[object Set]";function MQ(n){return Yl(n)&&sl(n)==NQ}var fI=dp&&dp.isSet,LQ=fI?d4(fI):MQ,kQ=1,WN="[object Arguments]",PQ="[object Array]",jQ="[object Boolean]",FQ="[object Date]",BQ="[object Error]",XN="[object Function]",GQ="[object GeneratorFunction]",HQ="[object Map]",zQ="[object Number]",YN="[object Object]",qQ="[object RegExp]",UQ="[object Set]",VQ="[object String]",WQ="[object Symbol]",XQ="[object WeakMap]",YQ="[object ArrayBuffer]",ZQ="[object DataView]",JQ="[object Float32Array]",KQ="[object Float64Array]",$Q="[object Int8Array]",QQ="[object Int16Array]",eee="[object Int32Array]",tee="[object Uint8Array]",nee="[object Uint8ClampedArray]",ree="[object Uint16Array]",iee="[object Uint32Array]",Lr={};Lr[WN]=Lr[PQ]=Lr[YQ]=Lr[ZQ]=Lr[jQ]=Lr[FQ]=Lr[JQ]=Lr[KQ]=Lr[$Q]=Lr[QQ]=Lr[eee]=Lr[HQ]=Lr[zQ]=Lr[YN]=Lr[qQ]=Lr[UQ]=Lr[VQ]=Lr[WQ]=Lr[tee]=Lr[nee]=Lr[ree]=Lr[iee]=!0;Lr[BQ]=Lr[XN]=Lr[XQ]=!1;function U1(n,e,t,r,i,a){var s,u=e&kQ;if(s!==void 0)return s;if(!uo(n))return n;var c=Fs(n);if(c)s=iQ(n);else{var h=sl(n),g=h==XN||h==GQ;if(jm(n))return fN(n,u);if(h==YN||h==WN||g&&!i)s=g?{}:mN(n);else{if(!Lr[h])return i?n:{};s=RQ(n,h,u)}}a||(a=new cl);var v=a.get(n);if(v)return v;a.set(n,s),LQ(n)?n.forEach(function(_){s.add(U1(_,e,t,_,n,a))}):DQ(n)&&n.forEach(function(_,O){s.set(O,U1(_,e,t,O,n,a))});var y=z_,S=c?void 0:y(n);return wN(S||n,function(_,O){S&&(O=_,_=n[O]),SN(s,O,U1(_,e,t,O,n,a))}),s}var aee=1,see=4;function tp(n){return U1(n,aee|see)}function _c(n,e){return By(n,e)}var Ot=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(Ot||{});class Zl{constructor(e,t,r={}){this.attrName=e,this.keyName=t;const i=Ot.TYPE&Ot.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Ot.LEVEL|i:Ot.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class np extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const ZN=class Z_{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,t)}return null}create(e,t,r){const i=this.query(t);if(i==null)throw new np(`Unable to create ${t} blot`);const a=i,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),u=new a(e,s,r);return Z_.blots.set(u.domNode,u),u}find(e,t=!1){return Z_.find(e,t)}query(e,t=Ot.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&Ot.LEVEL&Ot.BLOCK?r=this.types.block:e&Ot.LEVEL&Ot.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&t&Ot.LEVEL&r.scope&&t&Ot.TYPE&r.scope?r:null}register(...e){return e.map(t=>{const r="blotName"in t,i="attrName"in t;if(!r&&!i)throw new np("Invalid definition");if(r&&t.blotName==="abstract")throw new np("Cannot register abstract class");const a=r?t.blotName:i?t.attrName:void 0;return this.types[a]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};ZN.blots=new WeakMap;let fp=ZN;function hI(n,e){return(n.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class oee extends Zl{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){hI(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(hI(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const ml=oee;function zE(n){const e=n.split("-"),t=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+t}class lee extends Zl{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[zE(this.keyName)]=t,!0):!1}remove(e){e.style[zE(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[zE(this.keyName)];return this.canAdd(e,t)?t:""}}const jc=lee;class uee{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=fp.find(this.domNode);if(e==null)return;const t=Zl.keys(this.domNode),r=ml.keys(this.domNode),i=jc.keys(this.domNode);t.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,Ot.ATTRIBUTE);s instanceof Zl&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(t=>{const r=this.attributes[t].value(this.domNode);e.format(t,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Hy=uee,JN=class{constructor(e,t){this.scroll=e,this.domNode=t,fp.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new np("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),fp.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,i){const a=this.isolate(e,t);if(this.scroll.query(r,Ot.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,Ot.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,t,r){const i=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new np(`Cannot wrap ${e}`);return r.appendChild(this),r}};JN.blotName="abstract";let KN=JN;const $N=class extends KN{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};$N.scope=Ot.INLINE_BLOT;let cee=$N;const Ja=cee;class dee{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let r=t();for(;r&&e>0;)e-=1,r=t();return r}contains(e){const t=this.iterator();let r=t();for(;r;){if(r===e)return!0;r=t()}return!1}indexOf(e){const t=this.iterator();let r=t(),i=0;for(;r;){if(r===e)return i;i+=1,r=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,r=this.head;for(;r!=null;){if(r===e)return t;t+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||t&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const t=this.iterator();let r=t();for(;r;)e(r),r=t()}forEachAt(e,t,r){if(t<=0)return;const[i,a]=this.find(e);let s=e-a;const u=this.iterator(i);let c=u();for(;c&&s<e+t;){const h=c.length();e>s?r(c,e-s,Math.min(t,s+h-e)):r(c,0,Math.min(h,e+t-s)),s+=h,c=u()}}map(e){return this.reduce((t,r)=>(t.push(e(r)),t),[])}reduce(e,t){const r=this.iterator();let i=r();for(;i;)t=e(t,i),i=r();return t}}function pI(n,e){const t=e.find(n);if(t)return t;try{return e.create(n)}catch{const r=e.create(Ot.INLINE);return Array.from(n.childNodes).forEach(i=>{r.domNode.appendChild(i)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const QN=class xc extends KN{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,xc.uiClass&&this.uiNode.classList.add(xc.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new dee,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=pI(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof np)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,t=0){const[r,i]=this.children.find(t);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof xc?r.descendant(e,i):[null,-1]}descendants(e,t=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(t,r,(s,u,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof xc&&(i=i.concat(s.descendants(e,u,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===Ot.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof xc?t.unwrap():t.remove())})}formatAt(e,t,r,i){this.children.forEachAt(e,t,(a,s,u)=>{a.formatAt(s,u,r,i)})}insertAt(e,t,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,t,r);else{const s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(r=>{e.insertBefore(r,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[r,i]=this.children.find(e,t),a=[[this,e]];return r instanceof xc?a.concat(r.path(i,t)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return r instanceof xc&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const u=i.split(a,t);u!=null&&r.appendChild(u)}),r}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const u=pI(a,this.scroll);(u.next!==s||u.next==null)&&(u.parent!=null&&u.parent.removeChild(this),this.insertBefore(u,s||void 0))}),this.enforceAllowedChildren()}};QN.uiClass="";let fee=QN;const dl=fee;function hee(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}const Xh=class Yh extends dl{static create(e){return super.create(e)}static formats(e,t){const r=t.query(Yh.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Hy(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Yh||(r=r.wrap(Yh.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,Ot.INLINE);if(r==null)return;r instanceof Zl?this.attributes.attribute(r,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.formats()[r]!=null||this.scroll.query(r,Ot.ATTRIBUTE)?this.isolate(e,t).format(r,i):super.formatAt(e,t,r,i)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const r=this.next;r instanceof Yh&&r.prev===this&&hee(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,t){const r=super.wrap(e,t);return r instanceof Yh&&this.attributes.move(r),r}};Xh.allowedChildren=[Xh,Ja],Xh.blotName="inline",Xh.scope=Ot.INLINE_BLOT,Xh.tagName="SPAN";let pee=Xh;const M4=pee,Zh=class J_ extends dl{static create(e){return super.create(e)}static formats(e,t){const r=t.query(J_.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Hy(this.domNode)}format(e,t){const r=this.scroll.query(e,Ot.BLOCK);r!=null&&(r instanceof Zl?this.attributes.attribute(r,t):e===this.statics.blotName&&!t?this.replaceWith(J_.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,i){this.scroll.query(r,Ot.BLOCK)!=null?this.format(r,i):super.formatAt(e,t,r,i)}insertAt(e,t,r){if(r==null||this.scroll.query(t,Ot.INLINE)!=null)super.insertAt(e,t,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(t,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Zh.blotName="block",Zh.scope=Ot.BLOCK_BLOT,Zh.tagName="P",Zh.allowedChildren=[M4,Zh,Ja];let gee=Zh;const Fm=gee,K_=class extends dl{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,i){super.formatAt(e,t,r,i),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};K_.blotName="container",K_.scope=Ot.BLOCK_BLOT;let mee=K_;const zy=mee;class vee extends Ja{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,r,i){e===0&&t===this.length()?this.format(r,i):super.formatAt(e,t,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const co=vee,yee={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},bee=100,Jh=class extends dl{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,yee),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=Ot.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,i){this.update(),super.formatAt(e,t,r,i)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,h=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),h&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof dl&&c.children.forEach(s),r.delete(c.domNode),c.optimize(t))};let u=e;for(let c=0;u.length>0;c+=1){if(c>=bee)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(h=>{const g=this.find(h.target,!0);g!=null&&(g.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(v=>{const y=this.find(v,!1);a(y,!1),y instanceof dl&&y.children.forEach(S=>{a(S,!1)})})):h.type==="attributes"&&a(g.prev)),a(g))}),this.children.forEach(s),u=Array.from(this.observer.takeRecords()),i=u.slice();i.length>0;)e.push(i.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};Jh.blotName="scroll",Jh.defaultChild=Fm,Jh.allowedChildren=[Fm,zy],Jh.scope=Ot.BLOCK_BLOT,Jh.tagName="DIV";let xee=Jh;const L4=xee,$_=class eM extends Ja{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,r){r==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof eM&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,t){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};$_.blotName="text",$_.scope=Ot.INLINE_BLOT;let See=$_;const sy=See,Cee=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Zl,AttributorStore:Hy,BlockBlot:Fm,ClassAttributor:ml,ContainerBlot:zy,EmbedBlot:co,InlineBlot:M4,LeafBlot:Ja,ParentBlot:dl,Registry:fp,Scope:Ot,ScrollBlot:L4,StyleAttributor:jc,TextBlot:sy},Symbol.toStringTag,{value:"Module"}));var _1={exports:{}},qE,gI;function Eee(){if(gI)return qE;gI=1;var n=-1,e=1,t=0;function r(P,q,H,ee,te){if(P===q)return P?[[t,P]]:[];if(H!=null){var Z=Y(P,q,H);if(Z)return Z}var le=u(P,q),Q=P.substring(0,le);P=P.substring(le),q=q.substring(le),le=h(P,q);var se=P.substring(P.length-le);P=P.substring(0,P.length-le),q=q.substring(0,q.length-le);var oe=i(P,q);return Q&&oe.unshift([t,Q]),se&&oe.push([t,se]),N(oe,te),ee&&v(oe),oe}function i(P,q){var H;if(!P)return[[e,q]];if(!q)return[[n,P]];var ee=P.length>q.length?P:q,te=P.length>q.length?q:P,Z=ee.indexOf(te);if(Z!==-1)return H=[[e,ee.substring(0,Z)],[t,te],[e,ee.substring(Z+te.length)]],P.length>q.length&&(H[0][0]=H[2][0]=n),H;if(te.length===1)return[[n,P],[e,q]];var le=g(P,q);if(le){var Q=le[0],se=le[1],oe=le[2],be=le[3],pe=le[4],Oe=r(Q,oe),Te=r(se,be);return Oe.concat([[t,pe]],Te)}return a(P,q)}function a(P,q){for(var H=P.length,ee=q.length,te=Math.ceil((H+ee)/2),Z=te,le=2*te,Q=new Array(le),se=new Array(le),oe=0;oe<le;oe++)Q[oe]=-1,se[oe]=-1;Q[Z+1]=0,se[Z+1]=0;for(var be=H-ee,pe=be%2!==0,Oe=0,Te=0,Pe=0,Ze=0,pt=0;pt<te;pt++){for(var at=-pt+Oe;at<=pt-Te;at+=2){var mt=Z+at,Et;at===-pt||at!==pt&&Q[mt-1]<Q[mt+1]?Et=Q[mt+1]:Et=Q[mt-1]+1;for(var ft=Et-at;Et<H&&ft<ee&&P.charAt(Et)===q.charAt(ft);)Et++,ft++;if(Q[mt]=Et,Et>H)Te+=2;else if(ft>ee)Oe+=2;else if(pe){var Rt=Z+be-at;if(Rt>=0&&Rt<le&&se[Rt]!==-1){var yt=H-se[Rt];if(Et>=yt)return s(P,q,Et,ft)}}}for(var ht=-pt+Pe;ht<=pt-Ze;ht+=2){var Rt=Z+ht,yt;ht===-pt||ht!==pt&&se[Rt-1]<se[Rt+1]?yt=se[Rt+1]:yt=se[Rt-1]+1;for(var ot=yt-ht;yt<H&&ot<ee&&P.charAt(H-yt-1)===q.charAt(ee-ot-1);)yt++,ot++;if(se[Rt]=yt,yt>H)Ze+=2;else if(ot>ee)Pe+=2;else if(!pe){var mt=Z+be-ht;if(mt>=0&&mt<le&&Q[mt]!==-1){var Et=Q[mt],ft=Z+Et-mt;if(yt=H-yt,Et>=yt)return s(P,q,Et,ft)}}}}return[[n,P],[e,q]]}function s(P,q,H,ee){var te=P.substring(0,H),Z=q.substring(0,ee),le=P.substring(H),Q=q.substring(ee),se=r(te,Z),oe=r(le,Q);return se.concat(oe)}function u(P,q){if(!P||!q||P.charAt(0)!==q.charAt(0))return 0;for(var H=0,ee=Math.min(P.length,q.length),te=ee,Z=0;H<te;)P.substring(Z,te)==q.substring(Z,te)?(H=te,Z=H):ee=te,te=Math.floor((ee-H)/2+H);return L(P.charCodeAt(te-1))&&te--,te}function c(P,q){var H=P.length,ee=q.length;if(H==0||ee==0)return 0;H>ee?P=P.substring(H-ee):H<ee&&(q=q.substring(0,H));var te=Math.min(H,ee);if(P==q)return te;for(var Z=0,le=1;;){var Q=P.substring(te-le),se=q.indexOf(Q);if(se==-1)return Z;le+=se,(se==0||P.substring(te-le)==q.substring(0,le))&&(Z=le,le++)}}function h(P,q){if(!P||!q||P.slice(-1)!==q.slice(-1))return 0;for(var H=0,ee=Math.min(P.length,q.length),te=ee,Z=0;H<te;)P.substring(P.length-te,P.length-Z)==q.substring(q.length-te,q.length-Z)?(H=te,Z=H):ee=te,te=Math.floor((ee-H)/2+H);return k(P.charCodeAt(P.length-te))&&te--,te}function g(P,q){var H=P.length>q.length?P:q,ee=P.length>q.length?q:P;if(H.length<4||ee.length*2<H.length)return null;function te(Te,Pe,Ze){for(var pt=Te.substring(Ze,Ze+Math.floor(Te.length/4)),at=-1,mt="",Et,ft,Rt,yt;(at=Pe.indexOf(pt,at+1))!==-1;){var ht=u(Te.substring(Ze),Pe.substring(at)),ot=h(Te.substring(0,Ze),Pe.substring(0,at));mt.length<ot+ht&&(mt=Pe.substring(at-ot,at)+Pe.substring(at,at+ht),Et=Te.substring(0,Ze-ot),ft=Te.substring(Ze+ht),Rt=Pe.substring(0,at-ot),yt=Pe.substring(at+ht))}return mt.length*2>=Te.length?[Et,ft,Rt,yt,mt]:null}var Z=te(H,ee,Math.ceil(H.length/4)),le=te(H,ee,Math.ceil(H.length/2)),Q;if(!Z&&!le)return null;le?Z?Q=Z[4].length>le[4].length?Z:le:Q=le:Q=Z;var se,oe,be,pe;P.length>q.length?(se=Q[0],oe=Q[1],be=Q[2],pe=Q[3]):(be=Q[0],pe=Q[1],se=Q[2],oe=Q[3]);var Oe=Q[4];return[se,oe,be,pe,Oe]}function v(P){for(var q=!1,H=[],ee=0,te=null,Z=0,le=0,Q=0,se=0,oe=0;Z<P.length;)P[Z][0]==t?(H[ee++]=Z,le=se,Q=oe,se=0,oe=0,te=P[Z][1]):(P[Z][0]==e?se+=P[Z][1].length:oe+=P[Z][1].length,te&&te.length<=Math.max(le,Q)&&te.length<=Math.max(se,oe)&&(P.splice(H[ee-1],0,[n,te]),P[H[ee-1]+1][0]=e,ee--,ee--,Z=ee>0?H[ee-1]:-1,le=0,Q=0,se=0,oe=0,te=null,q=!0)),Z++;for(q&&N(P),w(P),Z=1;Z<P.length;){if(P[Z-1][0]==n&&P[Z][0]==e){var be=P[Z-1][1],pe=P[Z][1],Oe=c(be,pe),Te=c(pe,be);Oe>=Te?(Oe>=be.length/2||Oe>=pe.length/2)&&(P.splice(Z,0,[t,pe.substring(0,Oe)]),P[Z-1][1]=be.substring(0,be.length-Oe),P[Z+1][1]=pe.substring(Oe),Z++):(Te>=be.length/2||Te>=pe.length/2)&&(P.splice(Z,0,[t,be.substring(0,Te)]),P[Z-1][0]=e,P[Z-1][1]=pe.substring(0,pe.length-Te),P[Z+1][0]=n,P[Z+1][1]=be.substring(Te),Z++),Z++}Z++}}var y=/[^a-zA-Z0-9]/,S=/\s/,_=/[\r\n]/,O=/\n\r?\n$/,E=/^\r?\n\r?\n/;function w(P){function q(Te,Pe){if(!Te||!Pe)return 6;var Ze=Te.charAt(Te.length-1),pt=Pe.charAt(0),at=Ze.match(y),mt=pt.match(y),Et=at&&Ze.match(S),ft=mt&&pt.match(S),Rt=Et&&Ze.match(_),yt=ft&&pt.match(_),ht=Rt&&Te.match(O),ot=yt&&Pe.match(E);return ht||ot?5:Rt||yt?4:at&&!Et&&ft?3:Et||ft?2:at||mt?1:0}for(var H=1;H<P.length-1;){if(P[H-1][0]==t&&P[H+1][0]==t){var ee=P[H-1][1],te=P[H][1],Z=P[H+1][1],le=h(ee,te);if(le){var Q=te.substring(te.length-le);ee=ee.substring(0,ee.length-le),te=Q+te.substring(0,te.length-le),Z=Q+Z}for(var se=ee,oe=te,be=Z,pe=q(ee,te)+q(te,Z);te.charAt(0)===Z.charAt(0);){ee+=te.charAt(0),te=te.substring(1)+Z.charAt(0),Z=Z.substring(1);var Oe=q(ee,te)+q(te,Z);Oe>=pe&&(pe=Oe,se=ee,oe=te,be=Z)}P[H-1][1]!=se&&(se?P[H-1][1]=se:(P.splice(H-1,1),H--),P[H][1]=oe,be?P[H+1][1]=be:(P.splice(H+1,1),H--))}H++}}function N(P,q){P.push([t,""]);for(var H=0,ee=0,te=0,Z="",le="",Q;H<P.length;){if(H<P.length-1&&!P[H][1]){P.splice(H,1);continue}switch(P[H][0]){case e:te++,le+=P[H][1],H++;break;case n:ee++,Z+=P[H][1],H++;break;case t:var se=H-te-ee-1;if(q){if(se>=0&&B(P[se][1])){var oe=P[se][1].slice(-1);if(P[se][1]=P[se][1].slice(0,-1),Z=oe+Z,le=oe+le,!P[se][1]){P.splice(se,1),H--;var be=se-1;P[be]&&P[be][0]===e&&(te++,le=P[be][1]+le,be--),P[be]&&P[be][0]===n&&(ee++,Z=P[be][1]+Z,be--),se=be}}if(G(P[H][1])){var oe=P[H][1].charAt(0);P[H][1]=P[H][1].slice(1),Z+=oe,le+=oe}}if(H<P.length-1&&!P[H][1]){P.splice(H,1);break}if(Z.length>0||le.length>0){Z.length>0&&le.length>0&&(Q=u(le,Z),Q!==0&&(se>=0?P[se][1]+=le.substring(0,Q):(P.splice(0,0,[t,le.substring(0,Q)]),H++),le=le.substring(Q),Z=Z.substring(Q)),Q=h(le,Z),Q!==0&&(P[H][1]=le.substring(le.length-Q)+P[H][1],le=le.substring(0,le.length-Q),Z=Z.substring(0,Z.length-Q)));var pe=te+ee;Z.length===0&&le.length===0?(P.splice(H-pe,pe),H=H-pe):Z.length===0?(P.splice(H-pe,pe,[e,le]),H=H-pe+1):le.length===0?(P.splice(H-pe,pe,[n,Z]),H=H-pe+1):(P.splice(H-pe,pe,[n,Z],[e,le]),H=H-pe+2)}H!==0&&P[H-1][0]===t?(P[H-1][1]+=P[H][1],P.splice(H,1)):H++,te=0,ee=0,Z="",le="";break}}P[P.length-1][1]===""&&P.pop();var Oe=!1;for(H=1;H<P.length-1;)P[H-1][0]===t&&P[H+1][0]===t&&(P[H][1].substring(P[H][1].length-P[H-1][1].length)===P[H-1][1]?(P[H][1]=P[H-1][1]+P[H][1].substring(0,P[H][1].length-P[H-1][1].length),P[H+1][1]=P[H-1][1]+P[H+1][1],P.splice(H-1,1),Oe=!0):P[H][1].substring(0,P[H+1][1].length)==P[H+1][1]&&(P[H-1][1]+=P[H+1][1],P[H][1]=P[H][1].substring(P[H+1][1].length)+P[H+1][1],P.splice(H+1,1),Oe=!0)),H++;Oe&&N(P,q)}function L(P){return P>=55296&&P<=56319}function k(P){return P>=56320&&P<=57343}function G(P){return k(P.charCodeAt(0))}function B(P){return L(P.charCodeAt(P.length-1))}function z(P){for(var q=[],H=0;H<P.length;H++)P[H][1].length>0&&q.push(P[H]);return q}function V(P,q,H,ee){return B(P)||G(ee)?null:z([[t,P],[n,q],[e,H],[t,ee]])}function Y(P,q,H){var ee=typeof H=="number"?{index:H,length:0}:H.oldRange,te=typeof H=="number"?null:H.newRange,Z=P.length,le=q.length;if(ee.length===0&&(te===null||te.length===0)){var Q=ee.index,se=P.slice(0,Q),oe=P.slice(Q),be=te?te.index:null;e:{var pe=Q+le-Z;if(be!==null&&be!==pe||pe<0||pe>le)break e;var Oe=q.slice(0,pe),Te=q.slice(pe);if(Te!==oe)break e;var Pe=Math.min(Q,pe),Ze=se.slice(0,Pe),pt=Oe.slice(0,Pe);if(Ze!==pt)break e;var at=se.slice(Pe),mt=Oe.slice(Pe);return V(Ze,at,mt,oe)}e:{if(be!==null&&be!==Q)break e;var Et=Q,Oe=q.slice(0,Et),Te=q.slice(Et);if(Oe!==se)break e;var ft=Math.min(Z-Et,le-Et),Rt=oe.slice(oe.length-ft),yt=Te.slice(Te.length-ft);if(Rt!==yt)break e;var at=oe.slice(0,oe.length-ft),mt=Te.slice(0,Te.length-ft);return V(se,at,mt,Rt)}}if(ee.length>0&&te&&te.length===0)e:{var Ze=P.slice(0,ee.index),Rt=P.slice(ee.index+ee.length),Pe=Ze.length,ft=Rt.length;if(le<Pe+ft)break e;var pt=q.slice(0,Pe),yt=q.slice(le-ft);if(Ze!==pt||Rt!==yt)break e;var at=P.slice(Pe,Z-ft),mt=q.slice(Pe,le-ft);return V(Ze,at,mt,Rt)}return null}function J(P,q,H,ee){return r(P,q,H,ee,!0)}return J.INSERT=e,J.DELETE=n,J.EQUAL=t,qE=J,qE}var vm={exports:{}};vm.exports;var mI;function tM(){return mI||(mI=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",h="[object Error]",g="[object Function]",v="[object GeneratorFunction]",y="[object Map]",S="[object Number]",_="[object Object]",O="[object Promise]",E="[object RegExp]",w="[object Set]",N="[object String]",L="[object Symbol]",k="[object WeakMap]",G="[object ArrayBuffer]",B="[object DataView]",z="[object Float32Array]",V="[object Float64Array]",Y="[object Int8Array]",J="[object Int16Array]",P="[object Int32Array]",q="[object Uint8Array]",H="[object Uint8ClampedArray]",ee="[object Uint16Array]",te="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,le=/\w*$/,Q=/^\[object .+?Constructor\]$/,se=/^(?:0|[1-9]\d*)$/,oe={};oe[a]=oe[s]=oe[G]=oe[B]=oe[u]=oe[c]=oe[z]=oe[V]=oe[Y]=oe[J]=oe[P]=oe[y]=oe[S]=oe[_]=oe[E]=oe[w]=oe[N]=oe[L]=oe[q]=oe[H]=oe[ee]=oe[te]=!0,oe[h]=oe[g]=oe[k]=!1;var be=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo,pe=typeof self=="object"&&self&&self.Object===Object&&self,Oe=be||pe||Function("return this")(),Te=e&&!e.nodeType&&e,Pe=Te&&!0&&n&&!n.nodeType&&n,Ze=Pe&&Pe.exports===Te;function pt(M,X){return M.set(X[0],X[1]),M}function at(M,X){return M.add(X),M}function mt(M,X){for(var ie=-1,Ce=M?M.length:0;++ie<Ce&&X(M[ie],ie,M)!==!1;);return M}function Et(M,X){for(var ie=-1,Ce=X.length,Zt=M.length;++ie<Ce;)M[Zt+ie]=X[ie];return M}function ft(M,X,ie,Ce){for(var Zt=-1,Ct=M?M.length:0;++Zt<Ct;)ie=X(ie,M[Zt],Zt,M);return ie}function Rt(M,X){for(var ie=-1,Ce=Array(M);++ie<M;)Ce[ie]=X(ie);return Ce}function yt(M,X){return M?.[X]}function ht(M){var X=!1;if(M!=null&&typeof M.toString!="function")try{X=!!(M+"")}catch{}return X}function ot(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce,Zt){ie[++X]=[Zt,Ce]}),ie}function jt(M,X){return function(ie){return M(X(ie))}}function _t(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce){ie[++X]=Ce}),ie}var pn=Array.prototype,It=Function.prototype,Yt=Object.prototype,Nt=Oe["__core-js_shared__"],Un=(function(){var M=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""})(),vn=It.toString,On=Yt.hasOwnProperty,ar=Yt.toString,dr=RegExp("^"+vn.call(On).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jn=Ze?Oe.Buffer:void 0,Dn=Oe.Symbol,Kn=Oe.Uint8Array,Me=jt(Object.getPrototypeOf,Object),Qe=Object.create,Lt=Yt.propertyIsEnumerable,Ye=pn.splice,Ut=Object.getOwnPropertySymbols,Vn=Jn?Jn.isBuffer:void 0,st=jt(Object.keys,Object),Ve=lr(Oe,"DataView"),Vt=lr(Oe,"Map"),Wt=lr(Oe,"Promise"),He=lr(Oe,"Set"),lt=lr(Oe,"WeakMap"),Tt=lr(Object,"create"),fn=_e(Ve),$e=_e(Vt),Fe=_e(Wt),bt=_e(He),$t=_e(lt),yn=Dn?Dn.prototype:void 0,gn=yn?yn.valueOf:void 0;function an(M){var X=-1,ie=M?M.length:0;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Vr(){this.__data__=Tt?Tt(null):{}}function qi(M){return this.has(M)&&delete this.__data__[M]}function Ui(M){var X=this.__data__;if(Tt){var ie=X[M];return ie===r?void 0:ie}return On.call(X,M)?X[M]:void 0}function sr(M){var X=this.__data__;return Tt?X[M]!==void 0:On.call(X,M)}function Ei(M,X){var ie=this.__data__;return ie[M]=Tt&&X===void 0?r:X,this}an.prototype.clear=Vr,an.prototype.delete=qi,an.prototype.get=Ui,an.prototype.has=sr,an.prototype.set=Ei;function fr(M){var X=-1,ie=M?M.length:0;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function ua(){this.__data__=[]}function li(M){var X=this.__data__,ie=Sr(X,M);if(ie<0)return!1;var Ce=X.length-1;return ie==Ce?X.pop():Ye.call(X,ie,1),!0}function La(M){var X=this.__data__,ie=Sr(X,M);return ie<0?void 0:X[ie][1]}function ui(M){return Sr(this.__data__,M)>-1}function ba(M,X){var ie=this.__data__,Ce=Sr(ie,M);return Ce<0?ie.push([M,X]):ie[Ce][1]=X,this}fr.prototype.clear=ua,fr.prototype.delete=li,fr.prototype.get=La,fr.prototype.has=ui,fr.prototype.set=ba;function Cr(M){var X=-1,ie=M?M.length:0;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Wn(){this.__data__={hash:new an,map:new(Vt||fr),string:new an}}function Ii(M){return xa(this,M).delete(M)}function ka(M){return xa(this,M).get(M)}function ci(M){return xa(this,M).has(M)}function Cs(M,X){return xa(this,M).set(M,X),this}Cr.prototype.clear=Wn,Cr.prototype.delete=Ii,Cr.prototype.get=ka,Cr.prototype.has=ci,Cr.prototype.set=Cs;function xr(M){this.__data__=new fr(M)}function Hs(){this.__data__=new fr}function Fo(M){return this.__data__.delete(M)}function zs(M){return this.__data__.get(M)}function $a(M){return this.__data__.has(M)}function ca(M,X){var ie=this.__data__;if(ie instanceof fr){var Ce=ie.__data__;if(!Vt||Ce.length<t-1)return Ce.push([M,X]),this;ie=this.__data__=new Cr(Ce)}return ie.set(M,X),this}xr.prototype.clear=Hs,xr.prototype.delete=Fo,xr.prototype.get=zs,xr.prototype.has=$a,xr.prototype.set=ca;function it(M,X){var ie=Nn(M)||Mt(M)?Rt(M.length,String):[],Ce=ie.length,Zt=!!Ce;for(var Ct in M)On.call(M,Ct)&&!(Zt&&(Ct=="length"||qs(Ct,Ce)))&&ie.push(Ct);return ie}function bn(M,X,ie){var Ce=M[X];(!(On.call(M,X)&&je(Ce,ie))||ie===void 0&&!(X in M))&&(M[X]=ie)}function Sr(M,X){for(var ie=M.length;ie--;)if(je(M[ie][0],X))return ie;return-1}function Fn(M,X){return M&&Fr(X,tu(X),M)}function wn(M,X,ie,Ce,Zt,Ct,Mn){var Ln;if(Ce&&(Ln=Ct?Ce(M,Zt,Ct,Mn):Ce(M)),Ln!==void 0)return Ln;if(!Es(M))return M;var $n=Nn(M);if($n){if(Ln=fo(M),!X)return es(M,Ln)}else{var xn=Yi(M),Ir=xn==g||xn==v;if($r(M))return tr(M,X);if(xn==_||xn==a||Ir&&!Ct){if(ht(M))return Ct?M:{};if(Ln=Sa(Ir?{}:M),!X)return yl(M,Fn(Ln,M))}else{if(!oe[xn])return Ct?M:{};Ln=ho(M,xn,wn,X)}}Mn||(Mn=new xr);var hi=Mn.get(M);if(hi)return hi;if(Mn.set(M,Ln),!$n)var Or=ie?di(M):tu(M);return mt(Or||M,function(ur,nr){Or&&(nr=ur,ur=M[nr]),bn(Ln,nr,wn(ur,X,ie,Ce,nr,M,Mn))}),Ln}function Kr(M){return Es(M)?Qe(M):{}}function An(M,X,ie){var Ce=X(M);return Nn(M)?Ce:Et(Ce,ie(M))}function Rn(M){return ar.call(M)}function Vi(M){if(!Es(M)||$(M))return!1;var X=hr(M)||ht(M)?dr:Q;return X.test(_e(M))}function vr(M){if(!de(M))return st(M);var X=[];for(var ie in Object(M))On.call(M,ie)&&ie!="constructor"&&X.push(ie);return X}function tr(M,X){if(X)return M.slice();var ie=new M.constructor(M.length);return M.copy(ie),ie}function Wr(M){var X=new M.constructor(M.byteLength);return new Kn(X).set(new Kn(M)),X}function jr(M,X){var ie=X?Wr(M.buffer):M.buffer;return new M.constructor(ie,M.byteOffset,M.byteLength)}function or(M,X,ie){var Ce=X?ie(ot(M),!0):ot(M);return ft(Ce,pt,new M.constructor)}function _i(M){var X=new M.constructor(M.source,le.exec(M));return X.lastIndex=M.lastIndex,X}function Xr(M,X,ie){var Ce=X?ie(_t(M),!0):_t(M);return ft(Ce,at,new M.constructor)}function Qa(M){return gn?Object(gn.call(M)):{}}function Wi(M,X){var ie=X?Wr(M.buffer):M.buffer;return new M.constructor(ie,M.byteOffset,M.length)}function es(M,X){var ie=-1,Ce=M.length;for(X||(X=Array(Ce));++ie<Ce;)X[ie]=M[ie];return X}function Fr(M,X,ie,Ce){ie||(ie={});for(var Zt=-1,Ct=X.length;++Zt<Ct;){var Mn=X[Zt],Ln=void 0;bn(ie,Mn,Ln===void 0?M[Mn]:Ln)}return ie}function yl(M,X){return Fr(M,Xi(M),X)}function di(M){return An(M,tu,Xi)}function xa(M,X){var ie=M.__data__;return Le(X)?ie[typeof X=="string"?"string":"hash"]:ie.map}function lr(M,X){var ie=yt(M,X);return Vi(ie)?ie:void 0}var Xi=Ut?jt(Ut,Object):xl,Yi=Rn;(Ve&&Yi(new Ve(new ArrayBuffer(1)))!=B||Vt&&Yi(new Vt)!=y||Wt&&Yi(Wt.resolve())!=O||He&&Yi(new He)!=w||lt&&Yi(new lt)!=k)&&(Yi=function(M){var X=ar.call(M),ie=X==_?M.constructor:void 0,Ce=ie?_e(ie):void 0;if(Ce)switch(Ce){case fn:return B;case $e:return y;case Fe:return O;case bt:return w;case $t:return k}return X});function fo(M){var X=M.length,ie=M.constructor(X);return X&&typeof M[0]=="string"&&On.call(M,"index")&&(ie.index=M.index,ie.input=M.input),ie}function Sa(M){return typeof M.constructor=="function"&&!de(M)?Kr(Me(M)):{}}function ho(M,X,ie,Ce){var Zt=M.constructor;switch(X){case G:return Wr(M);case u:case c:return new Zt(+M);case B:return jr(M,Ce);case z:case V:case Y:case J:case P:case q:case H:case ee:case te:return Wi(M,Ce);case y:return or(M,Ce,ie);case S:case N:return new Zt(M);case E:return _i(M);case w:return Xr(M,Ce,ie);case L:return Qa(M)}}function qs(M,X){return X=X??i,!!X&&(typeof M=="number"||se.test(M))&&M>-1&&M%1==0&&M<X}function Le(M){var X=typeof M;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?M!=="__proto__":M===null}function $(M){return!!Un&&Un in M}function de(M){var X=M&&M.constructor,ie=typeof X=="function"&&X.prototype||Yt;return M===ie}function _e(M){if(M!=null){try{return vn.call(M)}catch{}try{return M+""}catch{}}return""}function Xe(M){return wn(M,!0,!0)}function je(M,X){return M===X||M!==M&&X!==X}function Mt(M){return fi(M)&&On.call(M,"callee")&&(!Lt.call(M,"callee")||ar.call(M)==a)}var Nn=Array.isArray;function Xn(M){return M!=null&&Rr(M.length)&&!hr(M)}function fi(M){return bl(M)&&Xn(M)}var $r=Vn||Ca;function hr(M){var X=Es(M)?ar.call(M):"";return X==g||X==v}function Rr(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=i}function Es(M){var X=typeof M;return!!M&&(X=="object"||X=="function")}function bl(M){return!!M&&typeof M=="object"}function tu(M){return Xn(M)?it(M):vr(M)}function xl(){return[]}function Ca(){return!1}n.exports=Xe})(vm,vm.exports)),vm.exports}var ym={exports:{}};ym.exports;var vI;function nM(){return vI||(vI=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,u="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",g="[object Boolean]",v="[object Date]",y="[object Error]",S="[object Function]",_="[object GeneratorFunction]",O="[object Map]",E="[object Number]",w="[object Null]",N="[object Object]",L="[object Promise]",k="[object Proxy]",G="[object RegExp]",B="[object Set]",z="[object String]",V="[object Symbol]",Y="[object Undefined]",J="[object WeakMap]",P="[object ArrayBuffer]",q="[object DataView]",H="[object Float32Array]",ee="[object Float64Array]",te="[object Int8Array]",Z="[object Int16Array]",le="[object Int32Array]",Q="[object Uint8Array]",se="[object Uint8ClampedArray]",oe="[object Uint16Array]",be="[object Uint32Array]",pe=/[\\^$.*+?()[\]{}|]/g,Oe=/^\[object .+?Constructor\]$/,Te=/^(?:0|[1-9]\d*)$/,Pe={};Pe[H]=Pe[ee]=Pe[te]=Pe[Z]=Pe[le]=Pe[Q]=Pe[se]=Pe[oe]=Pe[be]=!0,Pe[u]=Pe[c]=Pe[P]=Pe[g]=Pe[q]=Pe[v]=Pe[y]=Pe[S]=Pe[O]=Pe[E]=Pe[N]=Pe[G]=Pe[B]=Pe[z]=Pe[J]=!1;var Ze=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo,pt=typeof self=="object"&&self&&self.Object===Object&&self,at=Ze||pt||Function("return this")(),mt=e&&!e.nodeType&&e,Et=mt&&!0&&n&&!n.nodeType&&n,ft=Et&&Et.exports===mt,Rt=ft&&Ze.process,yt=(function(){try{return Rt&&Rt.binding&&Rt.binding("util")}catch{}})(),ht=yt&&yt.isTypedArray;function ot(M,X){for(var ie=-1,Ce=M==null?0:M.length,Zt=0,Ct=[];++ie<Ce;){var Mn=M[ie];X(Mn,ie,M)&&(Ct[Zt++]=Mn)}return Ct}function jt(M,X){for(var ie=-1,Ce=X.length,Zt=M.length;++ie<Ce;)M[Zt+ie]=X[ie];return M}function _t(M,X){for(var ie=-1,Ce=M==null?0:M.length;++ie<Ce;)if(X(M[ie],ie,M))return!0;return!1}function pn(M,X){for(var ie=-1,Ce=Array(M);++ie<M;)Ce[ie]=X(ie);return Ce}function It(M){return function(X){return M(X)}}function Yt(M,X){return M.has(X)}function Nt(M,X){return M?.[X]}function Un(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce,Zt){ie[++X]=[Zt,Ce]}),ie}function vn(M,X){return function(ie){return M(X(ie))}}function On(M){var X=-1,ie=Array(M.size);return M.forEach(function(Ce){ie[++X]=Ce}),ie}var ar=Array.prototype,dr=Function.prototype,Jn=Object.prototype,Dn=at["__core-js_shared__"],Kn=dr.toString,Me=Jn.hasOwnProperty,Qe=(function(){var M=/[^.]+$/.exec(Dn&&Dn.keys&&Dn.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""})(),Lt=Jn.toString,Ye=RegExp("^"+Kn.call(Me).replace(pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=ft?at.Buffer:void 0,Vn=at.Symbol,st=at.Uint8Array,Ve=Jn.propertyIsEnumerable,Vt=ar.splice,Wt=Vn?Vn.toStringTag:void 0,He=Object.getOwnPropertySymbols,lt=Ut?Ut.isBuffer:void 0,Tt=vn(Object.keys,Object),fn=Xi(at,"DataView"),$e=Xi(at,"Map"),Fe=Xi(at,"Promise"),bt=Xi(at,"Set"),$t=Xi(at,"WeakMap"),yn=Xi(Object,"create"),gn=_e(fn),an=_e($e),Vr=_e(Fe),qi=_e(bt),Ui=_e($t),sr=Vn?Vn.prototype:void 0,Ei=sr?sr.valueOf:void 0;function fr(M){var X=-1,ie=M==null?0:M.length;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function ua(){this.__data__=yn?yn(null):{},this.size=0}function li(M){var X=this.has(M)&&delete this.__data__[M];return this.size-=X?1:0,X}function La(M){var X=this.__data__;if(yn){var ie=X[M];return ie===r?void 0:ie}return Me.call(X,M)?X[M]:void 0}function ui(M){var X=this.__data__;return yn?X[M]!==void 0:Me.call(X,M)}function ba(M,X){var ie=this.__data__;return this.size+=this.has(M)?0:1,ie[M]=yn&&X===void 0?r:X,this}fr.prototype.clear=ua,fr.prototype.delete=li,fr.prototype.get=La,fr.prototype.has=ui,fr.prototype.set=ba;function Cr(M){var X=-1,ie=M==null?0:M.length;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Wn(){this.__data__=[],this.size=0}function Ii(M){var X=this.__data__,ie=tr(X,M);if(ie<0)return!1;var Ce=X.length-1;return ie==Ce?X.pop():Vt.call(X,ie,1),--this.size,!0}function ka(M){var X=this.__data__,ie=tr(X,M);return ie<0?void 0:X[ie][1]}function ci(M){return tr(this.__data__,M)>-1}function Cs(M,X){var ie=this.__data__,Ce=tr(ie,M);return Ce<0?(++this.size,ie.push([M,X])):ie[Ce][1]=X,this}Cr.prototype.clear=Wn,Cr.prototype.delete=Ii,Cr.prototype.get=ka,Cr.prototype.has=ci,Cr.prototype.set=Cs;function xr(M){var X=-1,ie=M==null?0:M.length;for(this.clear();++X<ie;){var Ce=M[X];this.set(Ce[0],Ce[1])}}function Hs(){this.size=0,this.__data__={hash:new fr,map:new($e||Cr),string:new fr}}function Fo(M){var X=lr(this,M).delete(M);return this.size-=X?1:0,X}function zs(M){return lr(this,M).get(M)}function $a(M){return lr(this,M).has(M)}function ca(M,X){var ie=lr(this,M),Ce=ie.size;return ie.set(M,X),this.size+=ie.size==Ce?0:1,this}xr.prototype.clear=Hs,xr.prototype.delete=Fo,xr.prototype.get=zs,xr.prototype.has=$a,xr.prototype.set=ca;function it(M){var X=-1,ie=M==null?0:M.length;for(this.__data__=new xr;++X<ie;)this.add(M[X])}function bn(M){return this.__data__.set(M,r),this}function Sr(M){return this.__data__.has(M)}it.prototype.add=it.prototype.push=bn,it.prototype.has=Sr;function Fn(M){var X=this.__data__=new Cr(M);this.size=X.size}function wn(){this.__data__=new Cr,this.size=0}function Kr(M){var X=this.__data__,ie=X.delete(M);return this.size=X.size,ie}function An(M){return this.__data__.get(M)}function Rn(M){return this.__data__.has(M)}function Vi(M,X){var ie=this.__data__;if(ie instanceof Cr){var Ce=ie.__data__;if(!$e||Ce.length<t-1)return Ce.push([M,X]),this.size=++ie.size,this;ie=this.__data__=new xr(Ce)}return ie.set(M,X),this.size=ie.size,this}Fn.prototype.clear=wn,Fn.prototype.delete=Kr,Fn.prototype.get=An,Fn.prototype.has=Rn,Fn.prototype.set=Vi;function vr(M,X){var ie=Mt(M),Ce=!ie&&je(M),Zt=!ie&&!Ce&&Xn(M),Ct=!ie&&!Ce&&!Zt&&bl(M),Mn=ie||Ce||Zt||Ct,Ln=Mn?pn(M.length,String):[],$n=Ln.length;for(var xn in M)Me.call(M,xn)&&!(Mn&&(xn=="length"||Zt&&(xn=="offset"||xn=="parent")||Ct&&(xn=="buffer"||xn=="byteLength"||xn=="byteOffset")||ho(xn,$n)))&&Ln.push(xn);return Ln}function tr(M,X){for(var ie=M.length;ie--;)if(Xe(M[ie][0],X))return ie;return-1}function Wr(M,X,ie){var Ce=X(M);return Mt(M)?Ce:jt(Ce,ie(M))}function jr(M){return M==null?M===void 0?Y:w:Wt&&Wt in Object(M)?Yi(M):de(M)}function or(M){return Es(M)&&jr(M)==u}function _i(M,X,ie,Ce,Zt){return M===X?!0:M==null||X==null||!Es(M)&&!Es(X)?M!==M&&X!==X:Xr(M,X,ie,Ce,_i,Zt)}function Xr(M,X,ie,Ce,Zt,Ct){var Mn=Mt(M),Ln=Mt(X),$n=Mn?c:Sa(M),xn=Ln?c:Sa(X);$n=$n==u?N:$n,xn=xn==u?N:xn;var Ir=$n==N,hi=xn==N,Or=$n==xn;if(Or&&Xn(M)){if(!Xn(X))return!1;Mn=!0,Ir=!1}if(Or&&!Ir)return Ct||(Ct=new Fn),Mn||bl(M)?Fr(M,X,ie,Ce,Zt,Ct):yl(M,X,$n,ie,Ce,Zt,Ct);if(!(ie&i)){var ur=Ir&&Me.call(M,"__wrapped__"),nr=hi&&Me.call(X,"__wrapped__");if(ur||nr){var Zi=ur?M.value():M,Qr=nr?X.value():X;return Ct||(Ct=new Fn),Zt(Zi,Qr,ie,Ce,Ct)}}return Or?(Ct||(Ct=new Fn),di(M,X,ie,Ce,Zt,Ct)):!1}function Qa(M){if(!Rr(M)||Le(M))return!1;var X=$r(M)?Ye:Oe;return X.test(_e(M))}function Wi(M){return Es(M)&&hr(M.length)&&!!Pe[jr(M)]}function es(M){if(!$(M))return Tt(M);var X=[];for(var ie in Object(M))Me.call(M,ie)&&ie!="constructor"&&X.push(ie);return X}function Fr(M,X,ie,Ce,Zt,Ct){var Mn=ie&i,Ln=M.length,$n=X.length;if(Ln!=$n&&!(Mn&&$n>Ln))return!1;var xn=Ct.get(M);if(xn&&Ct.get(X))return xn==X;var Ir=-1,hi=!0,Or=ie&a?new it:void 0;for(Ct.set(M,X),Ct.set(X,M);++Ir<Ln;){var ur=M[Ir],nr=X[Ir];if(Ce)var Zi=Mn?Ce(nr,ur,Ir,X,M,Ct):Ce(ur,nr,Ir,M,X,Ct);if(Zi!==void 0){if(Zi)continue;hi=!1;break}if(Or){if(!_t(X,function(Qr,Ji){if(!Yt(Or,Ji)&&(ur===Qr||Zt(ur,Qr,ie,Ce,Ct)))return Or.push(Ji)})){hi=!1;break}}else if(!(ur===nr||Zt(ur,nr,ie,Ce,Ct))){hi=!1;break}}return Ct.delete(M),Ct.delete(X),hi}function yl(M,X,ie,Ce,Zt,Ct,Mn){switch(ie){case q:if(M.byteLength!=X.byteLength||M.byteOffset!=X.byteOffset)return!1;M=M.buffer,X=X.buffer;case P:return!(M.byteLength!=X.byteLength||!Ct(new st(M),new st(X)));case g:case v:case E:return Xe(+M,+X);case y:return M.name==X.name&&M.message==X.message;case G:case z:return M==X+"";case O:var Ln=Un;case B:var $n=Ce&i;if(Ln||(Ln=On),M.size!=X.size&&!$n)return!1;var xn=Mn.get(M);if(xn)return xn==X;Ce|=a,Mn.set(M,X);var Ir=Fr(Ln(M),Ln(X),Ce,Zt,Ct,Mn);return Mn.delete(M),Ir;case V:if(Ei)return Ei.call(M)==Ei.call(X)}return!1}function di(M,X,ie,Ce,Zt,Ct){var Mn=ie&i,Ln=xa(M),$n=Ln.length,xn=xa(X),Ir=xn.length;if($n!=Ir&&!Mn)return!1;for(var hi=$n;hi--;){var Or=Ln[hi];if(!(Mn?Or in X:Me.call(X,Or)))return!1}var ur=Ct.get(M);if(ur&&Ct.get(X))return ur==X;var nr=!0;Ct.set(M,X),Ct.set(X,M);for(var Zi=Mn;++hi<$n;){Or=Ln[hi];var Qr=M[Or],Ji=X[Or];if(Ce)var po=Mn?Ce(Ji,Qr,Or,X,M,Ct):Ce(Qr,Ji,Or,M,X,Ct);if(!(po===void 0?Qr===Ji||Zt(Qr,Ji,ie,Ce,Ct):po)){nr=!1;break}Zi||(Zi=Or=="constructor")}if(nr&&!Zi){var go=M.constructor,Sl=X.constructor;go!=Sl&&"constructor"in M&&"constructor"in X&&!(typeof go=="function"&&go instanceof go&&typeof Sl=="function"&&Sl instanceof Sl)&&(nr=!1)}return Ct.delete(M),Ct.delete(X),nr}function xa(M){return Wr(M,tu,fo)}function lr(M,X){var ie=M.__data__;return qs(X)?ie[typeof X=="string"?"string":"hash"]:ie.map}function Xi(M,X){var ie=Nt(M,X);return Qa(ie)?ie:void 0}function Yi(M){var X=Me.call(M,Wt),ie=M[Wt];try{M[Wt]=void 0;var Ce=!0}catch{}var Zt=Lt.call(M);return Ce&&(X?M[Wt]=ie:delete M[Wt]),Zt}var fo=He?function(M){return M==null?[]:(M=Object(M),ot(He(M),function(X){return Ve.call(M,X)}))}:xl,Sa=jr;(fn&&Sa(new fn(new ArrayBuffer(1)))!=q||$e&&Sa(new $e)!=O||Fe&&Sa(Fe.resolve())!=L||bt&&Sa(new bt)!=B||$t&&Sa(new $t)!=J)&&(Sa=function(M){var X=jr(M),ie=X==N?M.constructor:void 0,Ce=ie?_e(ie):"";if(Ce)switch(Ce){case gn:return q;case an:return O;case Vr:return L;case qi:return B;case Ui:return J}return X});function ho(M,X){return X=X??s,!!X&&(typeof M=="number"||Te.test(M))&&M>-1&&M%1==0&&M<X}function qs(M){var X=typeof M;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?M!=="__proto__":M===null}function Le(M){return!!Qe&&Qe in M}function $(M){var X=M&&M.constructor,ie=typeof X=="function"&&X.prototype||Jn;return M===ie}function de(M){return Lt.call(M)}function _e(M){if(M!=null){try{return Kn.call(M)}catch{}try{return M+""}catch{}}return""}function Xe(M,X){return M===X||M!==M&&X!==X}var je=or((function(){return arguments})())?or:function(M){return Es(M)&&Me.call(M,"callee")&&!Ve.call(M,"callee")},Mt=Array.isArray;function Nn(M){return M!=null&&hr(M.length)&&!$r(M)}var Xn=lt||Ca;function fi(M,X){return _i(M,X)}function $r(M){if(!Rr(M))return!1;var X=jr(M);return X==S||X==_||X==h||X==k}function hr(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=s}function Rr(M){var X=typeof M;return M!=null&&(X=="object"||X=="function")}function Es(M){return M!=null&&typeof M=="object"}var bl=ht?It(ht):Wi;function tu(M){return Nn(M)?vr(M):es(M)}function xl(){return[]}function Ca(){return!1}n.exports=fi})(ym,ym.exports)),ym.exports}var T1={},yI;function _ee(){if(yI)return T1;yI=1,Object.defineProperty(T1,"__esModule",{value:!0});const n=tM(),e=nM();var t;return(function(r){function i(c={},h={},g=!1){typeof c!="object"&&(c={}),typeof h!="object"&&(h={});let v=n(h);g||(v=Object.keys(v).reduce((y,S)=>(v[S]!=null&&(y[S]=v[S]),y),{}));for(const y in c)c[y]!==void 0&&h[y]===void 0&&(v[y]=c[y]);return Object.keys(v).length>0?v:void 0}r.compose=i;function a(c={},h={}){typeof c!="object"&&(c={}),typeof h!="object"&&(h={});const g=Object.keys(c).concat(Object.keys(h)).reduce((v,y)=>(e(c[y],h[y])||(v[y]=h[y]===void 0?null:h[y]),v),{});return Object.keys(g).length>0?g:void 0}r.diff=a;function s(c={},h={}){c=c||{};const g=Object.keys(h).reduce((v,y)=>(h[y]!==c[y]&&c[y]!==void 0&&(v[y]=h[y]),v),{});return Object.keys(c).reduce((v,y)=>(c[y]!==h[y]&&h[y]===void 0&&(v[y]=null),v),g)}r.invert=s;function u(c,h,g=!1){if(typeof c!="object")return h;if(typeof h!="object")return;if(!g)return h;const v=Object.keys(h).reduce((y,S)=>(c[S]===void 0&&(y[S]=h[S]),y),{});return Object.keys(v).length>0?v:void 0}r.transform=u})(t||(t={})),T1.default=t,T1}var w1={},bI;function rM(){if(bI)return w1;bI=1,Object.defineProperty(w1,"__esModule",{value:!0});var n;return(function(e){function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(n||(n={})),w1.default=n,w1}var A1={},xI;function Tee(){if(xI)return A1;xI=1,Object.defineProperty(A1,"__esModule",{value:!0});const n=rM();class e{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const i=this.ops[this.index];if(i){const a=this.offset,s=n.default.length(i);if(r>=s-a?(r=s-a,this.index+=1,this.offset=0):this.offset+=r,typeof i.delete=="number")return{delete:r};{const u={};return i.attributes&&(u.attributes=i.attributes),typeof i.retain=="number"?u.retain=r:typeof i.retain=="object"&&i.retain!==null?u.retain=i.retain:typeof i.insert=="string"?u.insert=i.insert.substr(a,r):u.insert=i.insert,u}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,i=this.index,a=this.next(),s=this.ops.slice(this.index);return this.offset=r,this.index=i,[a].concat(s)}}else return[]}}return A1.default=e,A1}var SI;function wee(){return SI||(SI=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=Eee(),r=tM(),i=nM(),a=_ee();e.AttributeMap=a.default;const s=rM();e.Op=s.default;const u=Tee();e.OpIterator=u.default;const c="\0",h=(v,y)=>{if(typeof v!="object"||v===null)throw new Error(`cannot retain a ${typeof v}`);if(typeof y!="object"||y===null)throw new Error(`cannot retain a ${typeof y}`);const S=Object.keys(v)[0];if(!S||S!==Object.keys(y)[0])throw new Error(`embed types not matched: ${S} != ${Object.keys(y)[0]}`);return[S,v[S],y[S]]};class g{constructor(y){Array.isArray(y)?this.ops=y:y!=null&&Array.isArray(y.ops)?this.ops=y.ops:this.ops=[]}static registerEmbed(y,S){this.handlers[y]=S}static unregisterEmbed(y){delete this.handlers[y]}static getHandler(y){const S=this.handlers[y];if(!S)throw new Error(`no handlers for embed type "${y}"`);return S}insert(y,S){const _={};return typeof y=="string"&&y.length===0?this:(_.insert=y,S!=null&&typeof S=="object"&&Object.keys(S).length>0&&(_.attributes=S),this.push(_))}delete(y){return y<=0?this:this.push({delete:y})}retain(y,S){if(typeof y=="number"&&y<=0)return this;const _={retain:y};return S!=null&&typeof S=="object"&&Object.keys(S).length>0&&(_.attributes=S),this.push(_)}push(y){let S=this.ops.length,_=this.ops[S-1];if(y=r(y),typeof _=="object"){if(typeof y.delete=="number"&&typeof _.delete=="number")return this.ops[S-1]={delete:_.delete+y.delete},this;if(typeof _.delete=="number"&&y.insert!=null&&(S-=1,_=this.ops[S-1],typeof _!="object"))return this.ops.unshift(y),this;if(i(y.attributes,_.attributes)){if(typeof y.insert=="string"&&typeof _.insert=="string")return this.ops[S-1]={insert:_.insert+y.insert},typeof y.attributes=="object"&&(this.ops[S-1].attributes=y.attributes),this;if(typeof y.retain=="number"&&typeof _.retain=="number")return this.ops[S-1]={retain:_.retain+y.retain},typeof y.attributes=="object"&&(this.ops[S-1].attributes=y.attributes),this}}return S===this.ops.length?this.ops.push(y):this.ops.splice(S,0,y),this}chop(){const y=this.ops[this.ops.length-1];return y&&typeof y.retain=="number"&&!y.attributes&&this.ops.pop(),this}filter(y){return this.ops.filter(y)}forEach(y){this.ops.forEach(y)}map(y){return this.ops.map(y)}partition(y){const S=[],_=[];return this.forEach(O=>{(y(O)?S:_).push(O)}),[S,_]}reduce(y,S){return this.ops.reduce(y,S)}changeLength(){return this.reduce((y,S)=>S.insert?y+s.default.length(S):S.delete?y-S.delete:y,0)}length(){return this.reduce((y,S)=>y+s.default.length(S),0)}slice(y=0,S=1/0){const _=[],O=new u.default(this.ops);let E=0;for(;E<S&&O.hasNext();){let w;E<y?w=O.next(y-E):(w=O.next(S-E),_.push(w)),E+=s.default.length(w)}return new g(_)}compose(y){const S=new u.default(this.ops),_=new u.default(y.ops),O=[],E=_.peek();if(E!=null&&typeof E.retain=="number"&&E.attributes==null){let N=E.retain;for(;S.peekType()==="insert"&&S.peekLength()<=N;)N-=S.peekLength(),O.push(S.next());E.retain-N>0&&_.next(E.retain-N)}const w=new g(O);for(;S.hasNext()||_.hasNext();)if(_.peekType()==="insert")w.push(_.next());else if(S.peekType()==="delete")w.push(S.next());else{const N=Math.min(S.peekLength(),_.peekLength()),L=S.next(N),k=_.next(N);if(k.retain){const G={};if(typeof L.retain=="number")G.retain=typeof k.retain=="number"?N:k.retain;else if(typeof k.retain=="number")L.retain==null?G.insert=L.insert:G.retain=L.retain;else{const z=L.retain==null?"insert":"retain",[V,Y,J]=h(L[z],k.retain),P=g.getHandler(V);G[z]={[V]:P.compose(Y,J,z==="retain")}}const B=a.default.compose(L.attributes,k.attributes,typeof L.retain=="number");if(B&&(G.attributes=B),w.push(G),!_.hasNext()&&i(w.ops[w.ops.length-1],G)){const z=new g(S.rest());return w.concat(z).chop()}}else typeof k.delete=="number"&&(typeof L.retain=="number"||typeof L.retain=="object"&&L.retain!==null)&&w.push(k)}return w.chop()}concat(y){const S=new g(this.ops.slice());return y.ops.length>0&&(S.push(y.ops[0]),S.ops=S.ops.concat(y.ops.slice(1))),S}diff(y,S){if(this.ops===y.ops)return new g;const _=[this,y].map(L=>L.map(k=>{if(k.insert!=null)return typeof k.insert=="string"?k.insert:c;const G=L===y?"on":"with";throw new Error("diff() called "+G+" non-document")}).join("")),O=new g,E=t(_[0],_[1],S,!0),w=new u.default(this.ops),N=new u.default(y.ops);return E.forEach(L=>{let k=L[1].length;for(;k>0;){let G=0;switch(L[0]){case t.INSERT:G=Math.min(N.peekLength(),k),O.push(N.next(G));break;case t.DELETE:G=Math.min(k,w.peekLength()),w.next(G),O.delete(G);break;case t.EQUAL:G=Math.min(w.peekLength(),N.peekLength(),k);const B=w.next(G),z=N.next(G);i(B.insert,z.insert)?O.retain(G,a.default.diff(B.attributes,z.attributes)):O.push(z).delete(G);break}k-=G}}),O.chop()}eachLine(y,S=`
|
|
193
193
|
`){const _=new u.default(this.ops);let O=new g,E=0;for(;_.hasNext();){if(_.peekType()!=="insert")return;const w=_.peek(),N=s.default.length(w)-_.peekLength(),L=typeof w.insert=="string"?w.insert.indexOf(S,N)-N:-1;if(L<0)O.push(_.next());else if(L>0)O.push(_.next(L));else{if(y(O,_.next(1).attributes||{},E)===!1)return;E+=1,O=new g}}O.length()>0&&y(O,{},E)}invert(y){const S=new g;return this.reduce((_,O)=>{if(O.insert)S.delete(s.default.length(O));else{if(typeof O.retain=="number"&&O.attributes==null)return S.retain(O.retain),_+O.retain;if(O.delete||typeof O.retain=="number"){const E=O.delete||O.retain;return y.slice(_,_+E).forEach(N=>{O.delete?S.push(N):O.retain&&O.attributes&&S.retain(s.default.length(N),a.default.invert(O.attributes,N.attributes))}),_+E}else if(typeof O.retain=="object"&&O.retain!==null){const E=y.slice(_,_+1),w=new u.default(E.ops).next(),[N,L,k]=h(O.retain,w.insert),G=g.getHandler(N);return S.retain({[N]:G.invert(L,k)},a.default.invert(O.attributes,w.attributes)),_+1}}return _},0),S.chop()}transform(y,S=!1){if(S=!!S,typeof y=="number")return this.transformPosition(y,S);const _=y,O=new u.default(this.ops),E=new u.default(_.ops),w=new g;for(;O.hasNext()||E.hasNext();)if(O.peekType()==="insert"&&(S||E.peekType()!=="insert"))w.retain(s.default.length(O.next()));else if(E.peekType()==="insert")w.push(E.next());else{const N=Math.min(O.peekLength(),E.peekLength()),L=O.next(N),k=E.next(N);if(L.delete)continue;if(k.delete)w.push(k);else{const G=L.retain,B=k.retain;let z=typeof B=="object"&&B!==null?B:N;if(typeof G=="object"&&G!==null&&typeof B=="object"&&B!==null){const V=Object.keys(G)[0];if(V===Object.keys(B)[0]){const Y=g.getHandler(V);Y&&(z={[V]:Y.transform(G[V],B[V],S)})}}w.retain(z,a.default.transform(L.attributes,k.attributes,S))}}return w.chop()}transformPosition(y,S=!1){S=!!S;const _=new u.default(this.ops);let O=0;for(;_.hasNext()&&O<=y;){const E=_.peekLength(),w=_.peekType();if(_.next(),w==="delete"){y-=Math.min(E,y-O);continue}else w==="insert"&&(O<y||!S)&&(y+=E);O+=E}return y}}g.Op=s.default,g.OpIterator=u.default,g.AttributeMap=a.default,g.handlers={},e.default=g,n.exports=g,n.exports.default=g})(_1,_1.exports)),_1.exports}var ko=wee();const At=Pd(ko);class vl extends co{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}vl.blotName="break";vl.tagName="BR";let fl=class extends sy{};const Aee={"&":"&","<":"<",">":">",'"':""","'":"'"};function qy(n){return n.replace(/[&<>"']/g,e=>Aee[e])}class bs extends M4{static allowedChildren=[bs,vl,co,fl];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,t){const r=bs.order.indexOf(e),i=bs.order.indexOf(t);return r>=0||i>=0?r-i:e===t?0:e<t?-1:1}formatAt(e,t,r,i){if(bs.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Ot.BLOT)){const a=this.isolate(e,t);i&&a.wrap(r,i)}else super.formatAt(e,t,r,i)}optimize(e){if(super.optimize(e),this.parent instanceof bs&&bs.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}const CI=1;class Ma extends Fm{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=iM(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,r,i){t<=0||(this.scroll.query(r,Ot.BLOCK)?e+t===this.length()&&this.format(r,i):super.formatAt(e,Math.min(t,this.length()-e-1),r,i),this.cache={})}insertAt(e,t,r){if(r!=null){super.insertAt(e,t,r),this.cache={};return}if(t.length===0)return;const i=t.split(`
|
|
194
194
|
`),a=i.shift();a.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});let s=this;i.reduce((u,c)=>(s=s.split(u,!0),s.insertAt(0,c),c.length),e+a.length)}insertBefore(e,t){const{head:r}=this.children;super.insertBefore(e,t),r instanceof vl&&r.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+CI),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t&&(e===0||e>=this.length()-CI)){const i=this.clone();return e===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}const r=super.split(e,t);return this.cache={},r}}Ma.blotName="block";Ma.tagName="P";Ma.defaultChild=vl;Ma.allowedChildren=[vl,bs,co,fl];class Mo extends co{attach(){super.attach(),this.attributes=new Hy(this.domNode)}delta(){return new At().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const r=this.scroll.query(e,Ot.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(e,t,r,i){this.format(r,i)}insertAt(e,t,r){if(r!=null){super.insertAt(e,t,r);return}const i=t.split(`
|
|
195
195
|
`),a=i.pop(),s=i.map(c=>{const h=this.scroll.create(Ma.blotName);return h.insertAt(0,c),h}),u=this.split(e);s.forEach(c=>{this.parent.insertBefore(c,u)}),a&&this.parent.insertBefore(this.scroll.create("text",a),u)}}Mo.scope=Ot.BLOCK_BLOT;function iM(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.descendants(Ja).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),Oo(r,{},e)),new At).insert(`
|