function fm_admin_ready(){jQuery(".wd-header a").on("click",function(){jQuery("input[name='task']").val("add"),jQuery(this).parents("form").submit()}),set_no_items(),jQuery(".wd-datepicker").each(function(){jQuery(this).datepicker(),jQuery(this).datepicker("option","dateFormat",jQuery(this).data("format"))}),jQuery(".hndle:not(.readonly), .handlediv").each(function(){jQuery(this).off("click").on("click",function(){fm_toggle_postbox(this)})}),jQuery(".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view").each(function(){jQuery(this).attr("title",form_maker.add_placeholder)}),jQuery(document).on("click",".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view",function(){fm_placeholders_popup(jQuery(this).data("id"))}),fm_disabled_uninstall_btn(),jQuery(".fm-uninstall-form #check_yes").on("click",function(){fm_disabled_uninstall_btn()}),void 0!==jQuery(document).tooltip&&jQuery(document).tooltip({show:null,items:".wd-info",content:function(){if(jQuery(this).is(".wd-info"))return jQuery("#"+jQuery(this).data("id")).html()},open:function(e,t){if(void 0===e.originalEvent)return!1;var r=jQuery(t.tooltip).attr("id");jQuery("div.ui-tooltip").not("#"+r).remove()},close:function(e,t){t.tooltip.hover(function(){jQuery(this).stop(!0).fadeTo(400,1)},function(){jQuery(this).fadeOut("400",function(){jQuery(this).remove()})})},position:{my:"center top+30",at:"center top",using:function(e,t){jQuery(this).css(e),jQuery("
").addClass("tooltip-arrow").addClass(t.vertical).addClass(t.horizontal).appendTo(this)}}})}function wd_insert_placeholder(e,t){var r=document.getElementById(e);if(tinyMCE.get(e)&&tinyMCE.get(e).focus(),"none"!=r.style.display)if(r.focus(),document.selection)sel=document.selection.createRange(),sel.text=t;else if(r.selectionStart||"0"==r.selectionStart){var a=r.selectionStart,n=r.selectionEnd;r.value=r.value.substring(0,a)+"{"+t+"}"+r.value.substring(n,r.value.length)}else r.value+="{"+t+"}";else tinyMCE.execCommand("mceInsertContent",!1,"{"+t+"}")}function fm_toggle_postbox(e){jQuery(e).parent(".postbox").toggleClass("closed")}function fm_option_tabs_mail_validation(){return!0}function fm_clear_input_value(e){jQuery("#"+e).val("")}function set_no_items(){jQuery(".colspanchange").attr("colspan",jQuery(".wd-form table.adminlist>thead>tr>th:visible").length+jQuery(".wd-form table.adminlist>thead>tr>td:visible").length)}function search(e){var t=jQuery(e).parents("form");t.attr("action",window.location+"&paged=1&s="+jQuery("input[name='s']").val()),t.submit()}function input_search(e,t){return 13==(e.keyCode?e.keyCode:e.which)&&search(t),!0}function input_pagination(e,t){if(13==(e.keyCode?e.keyCode:e.which)){var r=jQuery(t).parents("form"),a=jQuery(t).val();if(a<=jQuery(t).parents(".pagination-links").data("pages-count")&&0

Changes made in this table should be saved.

");var r=a;jQuery(".fm_order").each(function(e){jQuery(this).find("input").val()&&jQuery(this).find("input").val(r++)})}}),jQuery("#tbody_arr").sortable("enable"),jQuery("#tbody_arr").find(".handle").show(0),jQuery("#tbody_arr").find(".handle").attr("class","handle connectedSortable"),jQuery("#th_order").hide(0),jQuery("#tbody_arr").find(".fm_order").hide(0),jQuery("#show_hide_weights").val("Show order column"))}function fm_popup(e){if(void 0===e)e="";var a,i,s;(a=function(){var e,t,r=jQuery("#TB_window"),a=jQuery(window).height(),n=jQuery(window).width();e=i&&i'+(e.attr("title")||"")+"":'  '+(jQuery(this).attr("title")||"")+"",jQuery("#TB_title").css({"background-color":"#222",color:"#dfdfdf"}),jQuery("#TB_closeAjaxWindow").css({float:"right"}),jQuery("#TB_ajaxWindowTitle").css({float:"left"}).html(t),jQuery("#TB_iframeContent").width("100%"),a(),!1}),jQuery(".theme-detail").click(function(){return jQuery(this).siblings(".themedetaildiv").toggle(),!1})}function bwg_inputs(){jQuery(".fm_int_input").keypress(function(e){var t=e.which||e.paramlist_keyCode;return!(31

Items Successfully Deleted.

").insertBefore("#blocked_ips"),set_no_items()})}})}function fm_save_ip(t){var r=jQuery("#ip"+t).val();url=jQuery("#blocked_ips").attr("action"),jQuery.ajax({type:"POST",url:url,data:{ip:r,nonce_fm:jQuery("#nonce_fm").val(),task:"insert_blocked_ip"},success:function(e){jQuery("#td_ip_"+t).html(''+r+""),jQuery(".insert, .error").hide(),jQuery("#fm_blocked_ips_message").html("

Items Successfully Inserted.

"),jQuery("#fm_blocked_ips_message").show()}})}function fm_insert_blocked_ip(){jQuery("#tr .loading").css("display","initial");var e=jQuery("#fm_ip").val(),t=window.location.href;jQuery.ajax({type:"POST",url:t,data:{ip:e,nonce_fm:jQuery("#nonce_fm").val(),task:"insert_blocked_ip",last_id:1},success:function(e){jQuery("#blocked_ips").parent(".wrap").load(t+" #blocked_ips",function(){window.history.pushState(null,null,t),0!=jQuery(".updated").length?jQuery(".updated p strong").html("Items Successfully Saved"):jQuery("

Items Successfully Saved.

").insertBefore("#blocked_ips")})}})}function fm_edit_ip(e){var t='';t+='
',t+="
",jQuery("#td_ip_"+e).html(t)}function fm_enter_ip(e){if(13==e.which){if(fm_check_required("fm_ip","IP"))return!1;e.preventDefault(),fm_insert_blocked_ip()}}function fm_update_blocked_ip(e){jQuery("#td_ip_"+e+" .loading").css("display","initial");var t=jQuery("#ip"+e).val(),r=window.location.href;jQuery.ajax({type:"POST",url:r,data:{ip:t,current_id:e,nonce_fm:jQuery("#nonce_fm").val(),task:"update_blocked_ip"},success:function(e){jQuery(".wrap").load(r+" #blocked_ips",function(){0!=jQuery(".updated").length?(window.history.pushState(null,null,r),jQuery(".updated p strong").html("Items Successfully Updated")):jQuery("

Items Successfully Updated.

").insertBefore("#blocked_ips")})}})}function onEnableChange(e,t,r){var a=jQuery("#"+e+" #"+t);"1"==r?a.removeClass("hidden"):a.addClass("hidden")}function show_stats(){var e=jQuery(".fm-statistics .fm_error_sorted_label_key");""!=jQuery("#sorted_label_key").val()?(e.hide(),jQuery(".fm-div_stats-loading").addClass("is-active"),jQuery.ajax({dataType:"json",type:"POST",url:show_stats_url,data:{sorted_label_key:jQuery("#sorted_label_key").val(),startdate:jQuery("#startstats").val(),enddate:jQuery("#endstats").val(),nonce:fm_ajax.ajaxnonce},beforeSend:function(e){},error:function(e){},success:function(e){jQuery(".fm-div_stats-loading").removeClass("is-active"),e.html&&jQuery("#div_stats").html(e.html)}})):e.show()}function fm_loading_show(){jQuery("#fm_loading").show()}function fm_loading_hide(){jQuery("#fm_loading").hide(),"function"==typeof add_scroll_width&&add_scroll_width(),set_no_items()}function getFormLocalStorage(){var e={};formId=getAllUrlParams().current_id;var t=localStorage.getItem("fm_form"+formId);return null!=t&&(e=jQuery.parseJSON(t)),e}function getAllUrlParams(e){var t=e?e.split("?")[1]:window.location.search.slice(1),r={};if(t)for(var a=(t=t.split("#")[0]).split("&"),n=0;n'+t+'x';-1===n.html().indexOf('data-post_id="'+r+'"')&&(n.append(s),""===i.val()?i.val(r):i.val(function(e,t){return t+","+r}))}return!1}),jQuery("body").on("click",".pp_selected span.pp_selected_remove",function(){var e=jQuery(this).parent(),t=e.closest(".fm-pp").find(".pp_exclude"),r=t.val(),a=e.data("post_id");if(-1!==r.indexOf(a)){var n,i=-1!==r.indexOf(","+a)?","+a:a+",";i=-1!==r.indexOf(",")?i:a;n=r.replace(i,""),t.val(n)}return e.remove(),!1}),jQuery("body").on("click",'.pp_display_on_categories input[name="display_on_categories[]"]',function(){var e=jQuery('.pp_display_on_categories input[name="display_on_categories[]"]'),t=jQuery(".fm-display-all-categories");if("select_all_categories"==jQuery(this).val())jQuery(this).is(":checked")?e.prop("checked",!0):e.prop("checked",!1);else{var r=jQuery('input[name="display_on_categories[]"]:checked').length,a=parseInt(t.attr("data-categories-count"));jQuery(this).prop("checked")||(r-=1),t.prop("checked",!1),r==a&&t.prop("checked",!0)}})}),function(o){o.fn.serializeObject=function(){var n=this,i={},t={},s={validate:/^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,key:/[a-zA-Z0-9_]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_]+$/};return this.build=function(e,t,r){return e[t]=r,e},this.push_counter=function(e){return void 0===t[e]&&(t[e]=0),t[e]++},o.each(o(this).serializeArray(),function(){if(s.validate.test(this.name)){for(var e,t=this.name.match(s.key),r=this.value,a=this.name;void 0!==(e=t.pop());)a=a.replace(new RegExp("\\["+e+"\\]$"),""),e.match(s.push)?r=n.build([],n.push_counter(a),r):e.match(s.fixed)?r=n.build([],e,r):e.match(s.named)&&(r=n.build({},e,r));i=o.extend(!0,i,r)}}),i}}(jQuery),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):e(jQuery)}(function(Fe,Ee){"use strict";var Be={beforeShow:e,move:e,change:e,show:e,hide:e,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},De=[],Ne=!!/msie/i.exec(window.navigator.userAgent),qe=function(){function e(e,t){return!!~(""+e).indexOf(t)}var t=document.createElement("div").style;return t.cssText="background-color:rgba(0,0,0,.5)",e(t.backgroundColor,"rgba")||e(t.backgroundColor,"hsla")}(),ze=["
","
","
","
"].join(""),Le=function(){var e="";if(Ne)for(var t=1;t<=6;t++)e+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",e,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();function Ke(e,t,r,a){for(var n=[],i=0;i')}else{n.push(Fe("
").append(Fe('').attr("title",a.noColorSelectedText)).html())}}return"
"+n.join("")+"
"}function t(e,t){var r,a,n,i,s,o,l,u=(s=t,o=e,(l=Fe.extend({},Be,s)).callbacks={move:$e(l.move,o),change:$e(l.change,o),show:$e(l.show,o),hide:$e(l.hide,o),beforeShow:$e(l.beforeShow,o)},l),d=u.flat,c=u.showSelectionPalette,f=u.localStorageKey,h=u.theme,p=u.callbacks,m=(r=Ie,a=10,function(){var e=this,t=arguments;n&&clearTimeout(i),!n&&i||(i=setTimeout(function(){i=null,r.apply(e,t)},a))}),g=!1,y=!1,_=0,v=0,b=0,j=0,w=0,Q=0,k=0,x=0,C=0,S=0,P=1,T=[],A=[],O={},R=u.selectionPalette.slice(0),I=u.maxSelectionSize,M="sp-dragging",H=null,F=e.ownerDocument,E=(F.body,Fe(e)),B=!1,D=Fe(Le,F).addClass(h),N=D.find(".sp-picker-container"),q=D.find(".sp-color"),z=D.find(".sp-dragger"),L=D.find(".sp-hue"),K=D.find(".sp-slider"),W=D.find(".sp-alpha-inner"),$=D.find(".sp-alpha"),U=D.find(".sp-alpha-handle"),V=D.find(".sp-input"),Z=D.find(".sp-palette"),J=D.find(".sp-initial"),X=D.find(".sp-cancel"),Y=D.find(".sp-clear"),G=D.find(".sp-choose"),ee=D.find(".sp-palette-toggle"),te=E.is("input"),re=te&&"color"===E.attr("type")&&Ve(),ae=te&&!d,ne=ae?Fe(ze).addClass(h).addClass(u.className).addClass(u.replacerClassName):Fe([]),ie=ae?ne:E,se=ne.find(".sp-preview-inner"),oe=u.color||te&&E.val(),le=!1,ce=u.preferredFormat,ue=!u.showButtons||u.clickoutFiresChange,de=!oe,fe=u.allowEmpty&&!re;function he(){if(u.showPaletteOnly&&(u.showPalette=!0),ee.text(u.showPaletteOnly?u.togglePaletteMoreText:u.togglePaletteLessText),u.palette){T=u.palette.slice(0),A=Fe.isArray(T[0])?T:[T],O={};for(var e=0;eI;)R.shift();if(f&&window.localStorage)try{window.localStorage[f]=R.join(";")}catch(e){}}}function ge(){var r=Pe(),e=Fe.map(A,function(e,t){return Ke(e,r,"sp-palette-row sp-palette-row-"+t,u)});pe(),R&&e.push(Ke(function(){var e=[];if(u.showPalette)for(var t=0;to&&rl&&aMath.abs(t-n);H=i?"x":"y"}}else H=null;var s=!H||"y"===H;(!H||"x"===H)&&(C=parseFloat(e/_)),s&&(S=parseFloat((v-t)/v)),de=!1,u.showAlpha||(P=1),Te()},_e,ve),oe?(Se(oe),Ae(),ce=u.preferredFormat||tinycolor(oe).format,me(oe)):Ae(),d&&we();var r=Ne?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Z.delegate(".sp-thumb-el",r,t),J.delegate(".sp-thumb-el:nth-child(1)",r,{ignore:!0},t)}();var He={show:we,hide:xe,toggle:je,reflow:Ie,option:function(e,t){return e===Ee?Fe.extend({},u):t===Ee?u[e]:(u[e]=t,"preferredFormat"===e&&(ce=u.preferredFormat),void he())},enable:function(){B=!1,E.attr("disabled",!1),ie.removeClass("sp-disabled")},disable:Me,offset:function(e){u.offset=e,Ie()},set:function(e){Se(e),Re()},get:Pe,destroy:function(){E.show(),ie.unbind("click.spectrum touchstart.spectrum"),D.remove(),ne.remove(),De[He.id]=null},container:D};return He.id=De.push(He)-1,He}function e(){}function We(e){e.stopPropagation()}function $e(e,t){var r=Array.prototype.slice,a=r.call(arguments,2);return function(){return e.apply(t,a.concat(r.call(arguments)))}}function Ue(s,o,t,e){o=o||function(){},t=t||function(){},e=e||function(){};var l=document,c=!1,u={},d=0,f=0,h="ontouchstart"in window,r={};function p(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.returnValue=!1}function a(e){if(c){if(Ne&&l.documentMode<9&&!e.button)return m();var t=e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0],r=t&&t.pageX||e.pageX,a=t&&t.pageY||e.pageY,n=Math.max(0,Math.min(r-u.left,f)),i=Math.max(0,Math.min(a-u.top,d));h&&p(e),o.apply(s,[n,i,e])}}function m(){c&&(Fe(l).unbind(r),Fe(l.body).removeClass("sp-dragging"),setTimeout(function(){e.apply(s,arguments)},0)),c=!1}r.selectstart=p,r.dragstart=p,r["touchmove mousemove"]=a,r["touchend mouseup"]=m,Fe(s).bind("touchstart mousedown",function(e){(e.which?3==e.which:2==e.button)||c||!1!==t.apply(s,arguments)&&(c=!0,d=Fe(s).height(),f=Fe(s).width(),u=Fe(s).offset(),Fe(l).bind(r),Fe(l.body).addClass("sp-dragging"),a(e),p(e))})}function Ve(){return Fe.fn.spectrum.inputTypeColorSupport()}var i="spectrum.id";Fe.fn.spectrum=function(r,e){if("string"!=typeof r)return this.spectrum("destroy").each(function(){var e=t(this,Fe.extend({},r,Fe(this).data()));Fe(this).data(i,e.id)});var a=this,n=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=De[Fe(this).data(i)];if(e){var t=e[r];if(!t)throw new Error("Spectrum: no such method: '"+r+"'");"get"==r?a=e.get():"container"==r?a=e.container:"option"==r?a=e.option.apply(e,n):"destroy"==r?(e.destroy(),Fe(this).removeData(i)):t.apply(e,n)}}),a},Fe.fn.spectrum.load=!0,Fe.fn.spectrum.loadOpts={},Fe.fn.spectrum.draggable=Ue,Fe.fn.spectrum.defaults=Be,Fe.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var t=Fe("")[0];e._cachedResult="color"===t.type&&""!==t.value}return e._cachedResult},Fe.spectrum={},Fe.spectrum.localization={},Fe.spectrum.palettes={},Fe.fn.spectrum.processNativeColorInputs=function(){var e=Fe("input[type=color]");e.length&&!Ve()&&e.spectrum({preferredFormat:"hex6"})},function(){var l=/^[\s,#]+/,c=/\s+$/,a=0,u=Math,i=u.round,d=u.min,f=u.max,e=u.random,h=function(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var r=function(e){var t={r:0,g:0,b:0},r=1,a=!1,n=!1;"string"==typeof e&&(e=function(e){e=e.replace(l,"").replace(c,"").toLowerCase();var t,r=!1;if(C[e])e=C[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=E.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=E.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=E.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=E.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=E.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=E.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=E.hex8.exec(e))return{a:(a=t[1],O(a)/255),r:O(t[2]),g:O(t[3]),b:O(t[4]),format:r?"name":"hex8"};var a;if(t=E.hex6.exec(e))return{r:O(t[1]),g:O(t[2]),b:O(t[3]),format:r?"name":"hex"};if(t=E.hex3.exec(e))return{r:O(t[1]+""+t[1]),g:O(t[2]+""+t[2]),b:O(t[3]+""+t[3]),format:r?"name":"hex"};return!1}(e));"object"==typeof e&&(e.hasOwnProperty("r")&&e.hasOwnProperty("g")&&e.hasOwnProperty("b")?(i=e.r,s=e.g,o=e.b,t={r:255*T(i,255),g:255*T(s,255),b:255*T(o,255)},a=!0,n="%"===String(e.r).substr(-1)?"prgb":"rgb"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("v")?(e.s=I(e.s),e.v=I(e.v),t=function(e,t,r){e=6*T(e,360),t=T(t,100),r=T(r,100);var a=u.floor(e),n=e-a,i=r*(1-t),s=r*(1-n*t),o=r*(1-(1-n)*t),l=a%6;return{r:255*[r,s,i,i,o,r][l],g:255*[o,r,r,s,i,i][l],b:255*[i,i,o,r,r,s][l]}}(e.h,e.s,e.v),a=!0,n="hsv"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("l")&&(e.s=I(e.s),e.l=I(e.l),t=function(e,t,r){var a,n,i;function s(e,t,r){return r<0&&(r+=1),1>1)+720)%360;--t;)a.h=(a.h+n)%360,i.push(h(a));return i}function x(e,t){t=t||6;for(var r=h(e).toHsv(),a=r.h,n=r.s,i=r.v,s=[],o=1/t;t--;)s.push(h({h:a,s:n,v:i})),i=(i+o)%1;return s}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},setAlpha:function(e){return this._a=P(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=s(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),a=i(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+a+"%)":"hsva("+t+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=n(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=n(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),a=i(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+a+"%)":"hsla("+t+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(){return o(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*T(this._r,255))+"%",g:i(100*T(this._g,255))+"%",b:i(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*T(this._r,255))+"%, "+i(100*T(this._g,255))+"%, "+i(100*T(this._b,255))+"%)":"rgba("+i(100*T(this._r,255))+"%, "+i(100*T(this._g,255))+"%, "+i(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[t(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+o(this._r,this._g,this._b,this._a),r=t,a=this._gradientType?"GradientType = 1, ":"";e&&(r=h(e).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,a=this._a<1&&0<=this._a;return t||!a||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},_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(g,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(r,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(Q,arguments)},triad:function(){return this._applyCombination(j,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]="a"===a?e[a]:I(e[a]));e=r}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:e(),g:e(),b:e()})},h.mix=function(e,t,r){r=0===r?0:r||50;var a,n=h(e).toRgb(),i=h(t).toRgb(),s=r/100,o=2*s-1,l=i.a-n.a,c=1-(a=((a=o*l==-1?o:(o+l)/(1+o*l))+1)/2),u={r:i.r*a+n.r*c,g:i.g*a+n.g*c,b:i.b*a+n.b*c,a:i.a*s+n.a*(1-s)};return h(u)},h.readability=function(e,t){var r=h(e),a=h(t),n=r.toRgb(),i=a.toRgb(),s=r.getBrightness(),o=a.getBrightness(),l=Math.max(n.r,i.r)-Math.min(n.r,i.r)+Math.max(n.g,i.g)-Math.min(n.g,i.g)+Math.max(n.b,i.b)-Math.min(n.b,i.b);return{brightness:Math.abs(s-o),color:l}},h.isReadable=function(e,t){var r=h.readability(e,t);return 125