HEX
Server: LiteSpeed
System: Linux cpir1.prohostdns.com 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: pelakir (2976)
PHP: 8.2.31
Disabled: exec, shell_exec, system, passthru, proc_open, proc_close, proc_terminate, proc_get_status, popen, pclose, pcntl_exec
Upload Files
File: //home/pelakir/www/wp-content/plugins/digits/admin/assets/js/wp-color-picker-alpha.min.js
/**!
 * wp-color-picker-alpha
 *
 * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
 * Only run in input and is defined data alpha in true
 *
 * Version: 3.0.0
 * https://github.com/kallookoo/wp-color-picker-alpha
 * Licensed under the GPLv2 license or later.
 */
!function(o,t){var i,a,e,l,s={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var n=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(n)&&n>=s.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var t="";return"hex"===o?t=this.toString():this.error||(t=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),t},window.wpColorPickerAlpha=s;var p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";o.widget("a8c.iris",o.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return(o===t&&(o=this._color),this.alphaOptions.alphaEnabled)?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(t){}o.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(o){var t=this,i=function(i){var a=o.val(),e=new Color(a),a=a.replace(/^(#|(rgb|hsl)a?)/,""),l=t.alphaOptions.alphaColorType;o.removeClass("iris-error"),e.error?""!==a&&o.addClass("iris-error"):"hex"===l&&"keyup"===i.type&&a.match(/^[0-9a-fA-F]{3}$/)||e.toIEOctoHex()===t._color.toIEOctoHex()||t._setOption("color",t._getColor(e))};o.on("change",i).on("keyup",t._debounce(i,100)),t.options.hide&&o.one("focus",function(){t.show()})},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var t=this,i=t.controls.strip.clone(!1,!1),a=i.find(".iris-slider-offset");i.addClass("iris-strip-alpha"),a.addClass("iris-slider-offset-alpha"),i.appendTo(t.picker.find(".iris-picker-inner")),o.each({stripAlpha:i,stripAlphaSlider:a},function(o,i){t.controls[o]=i}),t.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,i){t.active="strip",t._color._alpha=parseFloat(i.value/100),t._change.apply(t,arguments)}})}},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){var t,i,a,e,l,s=this.options,n=this.controls.square,p=this.picker.find(".iris-strip");for(e=Math.round((a=Math.round(((t=Math.round(this.picker.outerWidth(!0)-(s.border?22:0)))-(i=Math.round(n.outerWidth())))/2))/2),l=Math.round(i+2*a+2*e);l>t;)l=Math.round(i+2*(a=Math.round(a-2))+2*(e=Math.round(e-1)));n.css("margin","0"),p.width(a).css("margin-left",e+"px")}},_change:function(){var t=this,i=t.active;if(t._super(),t.alphaOptions.alphaEnabled){var a=t.controls,e=parseInt(100*t._color._alpha),l=t._color.toRgb(),s=["rgb("+l.r+","+l.g+","+l.b+") 0%","rgba("+l.r+","+l.g+","+l.b+", 0) 100%"];t.picker.closest(".wp-picker-container").find(".wp-color-result"),t.options.color=t._getColor(),a.stripAlpha.css({background:"linear-gradient(to bottom, "+s.join(", ")+"), url("+p+")"}),i&&a.stripAlphaSlider.slider("value",e),t._color.error||t.element.removeClass("iris-error").val(t.options.color),t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){var i=o(this).data("color");t.alphaOptions.alphaReset&&(t._color._alpha=1,i=t._getColor()),t._setOption("color",i)})}},_paintDimension:function(o,t){var i=this,a=!1;i.alphaOptions.alphaEnabled&&"strip"===t&&(a=i._color,i._color=new Color(a.toString()),i.hue=i._color.h()),i._super(o,t),a&&(i._color=a)},_setOption:function(o,t){var i=this;if("color"!==o||!i.alphaOptions.alphaEnabled)return i._super(o,t);t=""+t,(newColor=new Color(t).setHSpace(i.options.mode)).error||i._getColor(newColor)===i._getColor()||(i._color=newColor,i.options.color=i._getColor(),i.active="external",i._change())},color:function(o){return!0===o?this._color.clone():o===t?this._getColor():void this.option("color",o)}}),o.widget("wp.wpColorPicker",o.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var t=this.element,i=t.data("type")||this.options.type,a=t.data("defaultColor")||t.val(),e={alphaEnabled:t.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1};return e.alphaEnabled&&(e.alphaEnabled=t.is("input")&&"full"===i),e.alphaEnabled&&(e.alphaColorWithSpace=a&&a.match(/\s/),o.each(e,function(o,i){var l=t.data(o)||i;switch(o){case"alphaCustomWidth":l=isNaN(l=l?parseInt(l,10):0)?i:l;break;case"alphaColorType":l.match(/^(hex|(rgb|hsl)a?)$/)||(l=a&&a.match(/^#/)?"hex":a&&a.match(/^hsla?/)?"hsl":i);break;default:l=!!l}e[o]=l})),e},_create:function(){o.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super(),this.loadUI())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var t=this,s=t.element,n=t.toggler.is("a");this.alphaOptions.defaultWidth=s.width(),this.alphaOptions.alphaCustomWidth&&s.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),t.toggler.css({position:"relative","background-image":"url("+p+")"}),n?t.toggler.html('<span class="color-alpha" />'):t.toggler.append('<span class="color-alpha" />'),t.colorAlpha=t.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":s.val()}),"ltr"===t.colorAlpha.css("direction")?t.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):t.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),s.iris({change:function(s,n){t.colorAlpha.css({"background-color":n.color.to_s(t.alphaOptions.alphaColorType)}),i=n.color.to_s(t.alphaOptions.alphaColorType),(selfAlphaSibs=t.colorAlpha[0].parentNode.nextSibling).lastElementChild.innerText=i;var p=!1;if((e=i).includes("rgba(")?(e=e.substring(e.indexOf("rgba(")+5,e.indexOf(")")),p=!0):e=e.substring(e.indexOf("rgb(")+4,e.indexOf(")")),r=parseInt((l=e.split(","))[0]),g=parseInt(l[1]),b=parseInt(l[2]),l.includes("#"))a=l;else if(p){var h=c(256*l[3])||0;a="#"+(16777216+(r<<16)+(g<<8)+b).toString(16).slice(1)+h}else a="#"+(16777216+(r<<16)+(g<<8)+b).toString(16).slice(1);selfAlphaSibs.firstElementChild.innerText=a,o.isFunction(t.options.change)&&t.options.change.call(this,s,n)}}),t.wrap.on("click.wpcolorpicker",function(o){o.stopPropagation()}),t.toggler.click(function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()}),s.change(function(i){var a=o(this).val();(s.hasClass("iris-error")||""===a||a.match(/^(#|(rgb|hsl)a?)$/))&&(n&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,i))}),t.button.click(function(i){o(this).hasClass("wp-picker-default")?s.val(t.options.defaultColor).change():o(this).hasClass("wp-picker-clear")&&(s.val(""),n&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,i),s.trigger("change"))})},loadUI:function(){var o,t,i,a,e,s,n=jQuery(this.element);if(n.hasClass("digits_color_picker")){var p=n.closest(".wp-picker-container"),h=p.find(".wp-picker-input-wrap"),d=p.find(".wp-color-result");i=n.val();var u=1;i.includes("#")?(r=parseInt(i.slice(1,3),16),g=parseInt(i.slice(3,5),16),b=parseInt(i.slice(5,7),16),u=1):(r=parseInt((l=(i=i.includes("rgba(")?i.substring(i.indexOf("rgba(")+5,i.indexOf(")")):i.substring(i.indexOf("rgb(")+4,i.indexOf(")"))).split(","))[0]),g=parseInt(l[1]),b=parseInt(l[2]),u=l[3]?parseFloat(l[3]):1),e=1===u?`rgb(${r}, ${g}, ${b})`:`rgba(${r},${g},${b},${u})`;var f=c(256*u)||0;1===u&&(f=""),a="#"+(16777216+(r<<16)+(g<<8)+b).toString(16).slice(1)+f,h.hide(),o=jQuery(t=`<div class="show-texts">