(()=>{var e=function(e){var t=e&&Object.keys(e).reduce((function(t,c,n,o){return"".concat(t," --wcpa").concat(c.toLowerCase(),":").concat(e[c],";")}),"");return":root{".concat(t,"}")},t=localStorage.getItem("_wcpaDesign"),c=document.querySelector(".wcpa_form_outer");t&&c&&window.addEventListener("storage",(function(t){var n=localStorage.getItem("_wcpaDesign"),o=JSON.parse(n),a=document.getElementById("wcpaLivePreview");if(!a){var r=document.createElement("style");r.setAttribute("id","wcpaLivePreview"),document.head.appendChild(r),a=document.getElementById("wcpaLivePreview")}a.textContent="".concat(e(o.styles.css)," ").concat(e(o.colors.css)," ").concat(e(o.common.css)," ");var i=c.getAttribute("data-wcpa");i=JSON.parse(i),JSON.stringify(i.design.conf)!==JSON.stringify(o.common.conf)&&(i.design.conf=o.common.conf,c.setAttribute("data-wcpa",JSON.stringify(i)),window.wcpaInit(!1,!1,"key_"+Math.random()))}))})();