!function(){"use strict";window.FormieSummary=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$form=e.$form,this.form=this.$form.form,this.$field=e.$field,this.fieldId=e.fieldId,this.loadingClass=this.form.getClasses("loading"),"ajax"===this.form.settings.submitMethod&&this.form.addEventListener(this.$form,"onFormiePageToggle",this.onPageToggle.bind(this))}onPageToggle(e){setTimeout((()=>{this.submissionId=null;const e=this.$form.querySelector('[name="submissionId"]');if(e&&(this.submissionId=e.value),!this.submissionId)return void console.error("Summary field: Unable to find `submissionId`");let s=null;if(this.form.formTheme&&this.form.formTheme.$currentPage&&(s=this.form.formTheme.$currentPage.querySelector('[data-field-type="summary"]')),!s)return void console.log("Summary field: Unable to find `summaryField`");const t=s.querySelector("[data-summary-blocks]");if(!t)return void console.error("Summary field: Unable to find `container`");var i,o;i=t,o=this.loadingClass,i&&o&&("string"==typeof o&&(o=o.split(" ")),o.forEach((e=>{i.classList.add(e)})));const r=new XMLHttpRequest;r.open("POST",window.location.href,!0),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.setRequestHeader("Accept","application/json"),r.setRequestHeader("Cache-Control","no-cache"),r.onload=()=>{!function(e,s){e&&s&&("string"==typeof s&&(s=s.split(" ")),s.forEach((s=>{e.classList.remove(s)})))}(t,this.loadingClass),r.status>=200&&r.status<300&&(t.parentNode.innerHTML=r.responseText)};const n={action:"formie/fields/get-summary-html",submissionId:this.submissionId,fieldId:this.fieldId},a=new FormData;for(const e in n)a.append(e,n[e]);r.send(a)}),50)}}}();