(()=>{"use strict";var t={9044:()=>{window.jetpackForms=window.jetpackForms||{},window.jetpackForms.getBackgroundColor=function(t){let o=window.getComputedStyle(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===window.Node.ELEMENT_NODE;){if("wp-block-cover"===(t=t.parentNode).className){const e=t.querySelector(".wp-block-cover__background");o=window.getComputedStyle(e).backgroundColor;continue}o=window.getComputedStyle(t).backgroundColor}return o},window.jetpackForms.getInverseReadableColor=function(t){if(!t)return"#FFFFFF";let o,e,r;if(t.startsWith("#")){let n=t.slice(1);3===n.length&&(n=n.split("").map(t=>t+t).join("")),o=parseInt(n.slice(0,2),16),e=parseInt(n.slice(2,4),16),r=parseInt(n.slice(4,6),16)}else{const n=t.match(/(\d+),\s*(\d+),\s*(\d+)/);if(!n)return"#000000";o=+n[1],e=+n[2],r=+n[3]}return.299*o+.587*e+.114*r>186?"#000000":"#FFFFFF"},window.jetpackForms.generateStyleVariables=function(t){if(!t)return;const o=window["editor-canvas"]?window["editor-canvas"].document:document,e=o.querySelector("body"),r=o.createElement("div");r.className="contact-form__style-probe",r.style="position: absolute; z-index: -1; width: 1px; height: 1px; visibility: hidden",r.innerHTML='\n\t\t\t<div class="contact-form">\n\t\t\t\t<div class="wp-block-button">\n\t\t\t\t\t<div class="wp-block-button__link btn-primary">Test</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="wp-block-button is-style-outline">\n\t\t\t\t\t<div class="wp-block-button__link btn-outline">Test</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="jetpack-field">\n\t\t\t\t\t<input class="jetpack-field__input" type="text">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t',t.parentNode.appendChild(r);const n=r.querySelector(".contact-form"),c=r.querySelector(".btn-primary"),a=r.querySelector(".btn-outline"),i=r.querySelector('input[type="text"]'),d=window.jetpackForms.getBackgroundColor(e),l=window.jetpackForms.getBackgroundColor(i),p=window.getComputedStyle(n).color,u=window.jetpackForms.getInverseReadableColor(p),{border:s,borderColor:b,backgroundColor:k,color:m}=window.getComputedStyle(c),{backgroundColor:f,border:g,borderWidth:w,borderRadius:j,color:y,padding:v,lineHeight:F}=window.getComputedStyle(a),C=window.jetpackForms.getBackgroundColor(a),{color:h,padding:S,paddingTop:x,paddingLeft:_,border:N,borderColor:T,borderWidth:q,borderStyle:E,borderRadius:z,fontSize:I,fontFamily:B,lineHeight:L,height:R,backdropFilter:H,backgroundColor:W}=window.getComputedStyle(i),M="rgba(0, 0, 0, 0)"===W||"transparent"===W||"#00000000"===W;return r.remove(),{"--jetpack--contact-form--primary-color":k,"--jetpack--contact-form--background-color":d,"--jetpack--contact-form--body-text-color":p,"--jetpack--contact-form--inverted-body-text-color":u,"--jetpack--contact-form--text-color":h,"--jetpack--contact-form--border":N,"--jetpack--contact-form--border-color":T,"--jetpack--contact-form--border-size":q,"--jetpack--contact-form--border-style":E,"--jetpack--contact-form--border-radius":z,...M?{}:{"--jetpack--contact-form--input-background":W},"--jetpack--contact-form--input-background-fallback":l,"--jetpack--contact-form--input-padding":S,"--jetpack--contact-form--input-padding-top":x,"--jetpack--contact-form--input-padding-left":_,"--jetpack--contact-form--input-height":R,"--jetpack--contact-form--font-size":I,"--jetpack--contact-form--font-family":B,"--jetpack--contact-form--line-height":"normal"===L?"1.2em":L,"--jetpack--contact-form--button-primary--color":m,"--jetpack--contact-form--button-primary--background-color":k,"--jetpack--contact-form--button-primary--border":s,"--jetpack--contact-form--button-primary--border-color":b,"--jetpack--contact-form--button-outline--padding":v,"--jetpack--contact-form--button-outline--border":g,"--jetpack--contact-form--button-outline--background-color":f,"--jetpack--contact-form--button-outline--background-color-fallback":C,"--jetpack--contact-form--button-outline--border-size":w,"--jetpack--contact-form--button-outline--border-radius":j,"--jetpack--contact-form--button-outline--text-color":y,"--jetpack--contact-form--button-outline--line-height":F,"--jetpack--contact-form--input-backdrop-filter":H}}}},o={};(function e(r){var n=o[r];if(void 0!==n)return n.exports;var c=o[r]={exports:{}};return t[r](c,c.exports,e),c.exports})(9044);const{generateStyleVariables:e}=window.jetpackForms,r=setTimeout(()=>{n()},3e3);function n(){const t=document.querySelectorAll(".wp-block-jetpack-contact-form-container");for(const o of t){const t=e(o);if(!t)return;for(const e in t)o.style.setProperty(e,t[e])}}window.addEventListener("load",()=>{clearTimeout(r),n()})})();