jQuery(function($){$(document).on('change','input[name^="lws_wr_styling[--"]',function(e){let style=$('style#lws-woorewards-blocks-inline-css');if(style.length){let content='';let pattern=/lws_wr_styling\[([-\w]+)\]/;$('input[name^="lws_wr_styling[--"]').each(function(index,item){let key=item.name.match(pattern);if(key){let val=(item.value.trim().length?item.value:'inherit');content+=`\t${key[1]}: ${val};\n`}});style.text(":root{\n"+content+"}")}});$('.wr_style_preview').on('click',function(e){$('.wr_style_preview').each(function(index,item){let box=$(item);let c=new Color(box.css('background-color'));box.css('background-color',c.l()<70?'#fff':'#444')})})})