!function(){"use strict";class e{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.initialized=!1,this.$form=e.$form,this.form=this.$form.form,this.isVisible=!1;const t=new IntersectionObserver((e=>{0==e[0].intersectionRatio?(this.isVisible=!1,this.initialized&&this.onHide()):(this.isVisible=!0,this.initialized&&this.onShow())}),{root:this.$form,rootMargin:"50px"});setTimeout((()=>{"function"==typeof this.getPlaceholders&&this.getPlaceholders().forEach((e=>{t.observe(e)}))}),500)}onShow(){}onHide(){}createInput(){const e=document.createElement("div");return this.$placeholder.innerHTML="",this.$placeholder.appendChild(e),e}}window.FormieCaptchaProvider=e;window.FormieDuplicateCaptcha=class extends e{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e),this.$form=e.$form,this.form=this.$form.form,this.sessionKey=e.sessionKey,this.value=e.value,this.$placeholder=this.$form.querySelector("[data-duplicate-captcha-placeholder]"),this.$placeholder?this.createInput():console.error("Unable to find Duplicate Captcha placeholder for [data-duplicate-captcha-placeholder]")}createInput(){this.$placeholder.innerHTML="";const e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name",this.sessionKey),e.value=this.value,this.$placeholder.appendChild(e)}}}();