!function(a,b){"use strict";return"object"==typeofmodule&&"object"==typeofmodule.exports?(module.exports=a.document?b(a):function(a){if(!a.document)thrownewError("jscolor needs a window with document");returnb(a)},void0):(b(a),void0)}("undefined"!=typeofwindow?window:this,function(a){"use strict";varb=function(){varb={initialized:!1,instances:[],readyQueue:[],register:function(){"undefined"!=typeofa&&a.document&&a.document.addEventListener("DOMContentLoaded",b.pub.init,!1)},installBySelector:function(c,d){vare,f,g,h,i,j,k,l;if(d=d?b.node(d):a.document,!d)thrownewError("Missing root node");for(e=d.querySelectorAll(c),f=newRegExp("(^|\\s)("+b.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),g=0;g<e.length;g+=1)if(!(e[g].jscolor&&e[g].jscolorinstanceofb.pub||void0!==e[g].type&&"color"==e[g].type.toLowerCase()&&b.isColorAttrSupported||!(null!==(h=b.getDataAttr(e[g],"jscolor"))||e[g].className&&(i=e[g].className.match(f))))){if(j=e[g],k="",null!==h?k=h:i&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+b.docsRef),i[4]&&(k=i[4])),l=null,k.trim())try{l=b.parseOptionsStr(k)}catch(m){console.warn(m+"\n"+k)}try{newb.pub(j,l)}catch(m){console.warn(m)}}},parseOptionsStr:function(a){varc=null;try{c=JSON.parse(a)}catch(d){if(!b.pub.looseJSON)thrownewError("Could not parse jscolor options as JSON: "+d);try{c=newFunction("var opts = ("+a+'); return typeof opts === "object" ? opts : {};')()}catch(e){thrownewError("Could not evaluate jscolor options: "+e)}}returnc},getInstances:function(){varc,a=[];for(c=0;c<b.instances.length;c+=1)b.instances[c]&&b.instances[c].targetElement&&a.push(b.instances[c]);returna},createEl:function(c){vard=a.document.createElement(c);returnb.setData(d,"gui",!0),d},node:function(c){vard,e;if(!c)returnnull;if("string"==typeofc){d=c,e=null;try{e=a.document.querySelector(d)}catch(f){returnconsole.warn(f),null}returne||console.warn("No element matches the selector: %s",d),e}returnb.isNode(c)?c:(console.warn("Invalid node of type %s: %s",typeofc,c),null)},isNode:function(a){return"object"==typeofNode?ainstanceofNode:a&&"object"==typeofa&&"number"==typeofa.nodeType&&"string"==typeofa.nodeName},nodeName:function(a){returna&&a.nodeName?a.nodeName.toLowerCase():!1},removeChildren:function(a){for(;a.firstChild;)a.removeChild(a.firstChild)},isTextInput:function(a){returna&&"input"===b.nodeName(a)&&"text"===a.type.toLowerCase()},isButton:function(a){if(!a)return!1;varc=b.nodeName(a);return"button"===c||"input"===c&&["button","submit","reset"].indexOf(a.type.toLowerCase())>-1},isButtonEmpty:function(a){switch(b.nodeName(a)){case"input":return!a.value||""===a.value.trim();case"button":return""===a.textContent.trim()}returnnull},isPassiveEventSupported:function(){varc,b=!1;try{c=Object.defineProperty({},"passive",{get:function(){b=!0}}),a.addEventListener("testPassive",null,c),a.removeEventListener("testPassive",null,c)}catch(d){}returnb}(),isColorAttrSupported:function(){varb=a.document.createElement("input");returnb.setAttribute&&(b.setAttribute("type","color"),"color"==b.type.toLowerCase())?!0:!1}(),dataProp:"_data_jscolor",setData:function(){varc,d,e,f,a=arguments[0];if(3===arguments.length)returnc=a.hasOwnProperty(b.dataProp)?a[b.dataProp]:a[b.dataProp]={},d=arguments[1],e=arguments[2],c[d]=e,!0;if(2===arguments.length&&"object"==typeofarguments[1]){c=a.hasOwnProperty(b.dataProp)?a[b.dataProp]:a[b.dataProp]={},f=arguments[1];for(dinf)f.hasOwnProperty(d)&&(c[d]=f[d]);return!0}thrownewError("Invalid arguments")},removeData:function(){varc,d,a=arguments[0];if(!a.hasOwnProperty(b.dataProp))return!0;for(c=1;c<arguments.length;c+=1)d=arguments[c],deletea[b.dataProp][d];return!0},getData:function(a,c,d){if(!a.hasOwnProperty(b.dataProp)){if(void0===d)returnvoid0;a[b.dataProp]={}}vare=a[b.dataProp];returne.hasOwnProperty(c)||void0===d||(e[c]=d),e[c]},getDataAttr:function(a,b){varc="data-"+b,d=a.getAttribute(c);returnd},setDataAttr:function(a,b,c){vard="data-"+b;a.setAttribute(d,c)},_attachedGroupEvents:{},atta
break;case"v":l=b.HSV_RGB(e.channels.h,e.channels.s,100),j="rgb("+Math.round(l[0])+","+Math.round(l[1])+","+Math.round(l[2])+")",k="#000",b.picker.sldGrad.draw(e.sliderSize,e.height,j,k)}b.picker.asldGrad.draw(e.sliderSize,e.height,e.toHEXString())}functionk(){varc,a=b.getSliderChannel(e);a&&(c=Math.round((1-e.channels[a]/100)*(e.height-1)),b.picker.sldPtrOB.style.top=c-(2*e.pointerBorderWidth+e.pointerThickness)-Math.floor(b.pub.sliderInnerSpace/2)+"px"),b.picker.asldGrad.draw(e.sliderSize,e.height,e.toHEXString())}functionl(){vara=Math.round((1-e.channels.a)*(e.height-1));b.picker.asldPtrOB.style.top=a-(2*e.pointerBorderWidth+e.pointerThickness)-Math.floor(b.pub.sliderInnerSpace/2)+"px"}functionm(){returnb.picker&&b.picker.owner===e}functionn(a){"Enter"===b.eventKey(a)&&(e.valueElement&&e.processValueInput(e.valueElement.value),e.tryHide())}functiono(a){"Enter"===b.eventKey(a)&&(e.alphaElement&&e.processAlphaInput(e.alphaElement.value),e.tryHide())}functionp(a){if(!b.getData(a,"internal")){varc=e.valueElement.value;e.processValueInput(e.valueElement.value),b.triggerCallback(e,"onChange"),e.valueElement.value!==c&&b.triggerInputEvent(e.valueElement,"change",!0,!0)}}functionq(a){if(!b.getData(a,"internal")){varc=e.alphaElement.value;e.processAlphaInput(e.alphaElement.value),b.triggerCallback(e,"onChange"),b.triggerInputEvent(e.valueElement,"change",!0,!0),e.alphaElement.value!==c&&b.triggerInputEvent(e.alphaElement,"change",!0,!0)}}functionr(a){b.getData(a,"internal")||(e.valueElement&&e.fromString(e.valueElement.value,b.flags.leaveValue),b.triggerCallback(e,"onInput"))}functions(a){b.getData(a,"internal")||(e.alphaElement&&e.fromHSVA(null,null,null,parseFloat(e.alphaElement.value),b.flags.leaveAlpha),b.triggerCallback(e,"onInput"),b.triggerInputEvent(e.valueElement,"input",!0,!0))}vart,v,w,x,y,z,A,B,C,D,E,F,e=this;if(d||(d={}),this.channels={r:255,g:255,b:255,h:0,s:0,v:100,a:1},this.format="auto",this.value=void0,this.alpha=void0,this.random=!1,this.onChange=void0,this.onInput=void0,this.valueElement=void0,this.alphaElement=void0,this.previewElement=void0,this.previewPosition="left",this.previewSize=32,this.previewPadding=8,this.required=!0,this.hash=!0,this.uppercase=!0,this.forceStyle=!0,this.width=181,this.height=101,this.mode="HSV",this.alphaChannel="auto",this.position="bottom",this.smartPosition=!0,this.showOnClick=!0,this.hideOnLeave=!0,this.palette=[],this.paletteCols=10,this.paletteSetsAlpha="auto",this.paletteHeight=16,this.paletteSpacing=4,this.hideOnPaletteClick=!1,this.sliderSize=16,this.crossSize=8,this.closeButton=!1,this.closeText="Close",this.buttonColor="rgba(0,0,0,1)",this.buttonHeight=18,this.padding=12,this.backgroundColor="rgba(255,255,255,1)",this.borderWidth=1,this.borderColor="rgba(187,187,187,1)",this.borderRadius=8,this.controlBorderWidth=1,this.controlBorderColor="rgba(187,187,187,1)",this.shadow=!0,this.shadowBlur=15,this.shadowColor="rgba(0,0,0,0.2)",this.pointerColor="rgba(76,76,76,1)",this.pointerBorderWidth=1,this.pointerBorderColor="rgba(255,255,255,1)",this.pointerThickness=2,this.zIndex=5e3,this.container=void0,this.minS=0,this.maxS=100,this.minV=0,this.maxV=100,this.minA=0,this.maxA=1,this.option=function(){varb,c,d;if(!arguments.length)thrownewError("No option specified");if(1===arguments.length&&"string"==typeofarguments[0]){try{returng(arguments[0])}catch(a){console.warn(a)}return!1}if(arguments.length>=2&&"string"==typeofarguments[0]){try{if(!f(arguments[0],arguments[1]))return!1}catch(a){returnconsole.warn(a),!1}returnthis.redraw(),this.exposeColor(),!0}if(1===arguments.length&&"object"==typeofarguments[0]){b=arguments[0],c=!0;for(dinb)if(b.hasOwnProperty(d))try{f(d,b[d])||(c=!1)}catch(a){console.warn(a),c=!1}returnthis.redraw(),this.exposeColor(),c}thrownewError("Invalid arguments")},this.channel=function(a,b){if("string"!=typeofa)thrownewError("Invalid value for channel name: "+a);if(void0===b)returnthis.channels.hasOwnProperty(a.toLowerCase())?this.channels[a.toLowerCase()]:(console.warn("Getting unknown channel: "+a),!1);varc=!1;sw