Current Path : /home/church/remixideas.calvarycrossag.com/wp-content/plugins/ninja-forms/build/ |
Current File : /home/church/remixideas.calvarycrossag.com/wp-content/plugins/ninja-forms/build/displayFrame.js |
(()=>{var e={2694:(e,r,t)=>{"use strict";var n=t(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,i,s){if(s!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},5556:(e,r,t)=>{e.exports=t(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n](i,i.exports,t),i.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{"use strict";const e=window.wp.domReady;var r=t.n(e);const n=window.wp.element,o=window.React,i=window.wp.components;var s=t(5556),a=t.n(s);function c(e){let{formID:r,homeUrl:t,previewToken:s,isBlock:a=!0}=e;const c=(0,n.useId)(),f=(0,n.useRef)(),[l,m]=(0,n.useState)(!0),[d,p]=(0,n.useState)(0),[u,_]=(0,n.useState)("auto");return(0,o.createElement)("div",{id:c,className:"nf-iframe-container"},(0,o.createElement)("div",{className:"nf-iframe-overlay",style:a?{}:{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"}},l&&(0,o.createElement)(i.Spinner,null),(0,o.createElement)("iframe",{src:`${t}?nf_preview_form=${r}&nf_iframe=${s}`,title:`nf-preview-form-${r}`,ref:e=>f.current=e,onLoad:()=>{m(!1);const e=f.current.contentWindow.document.getElementById(`nf-form-${r}-cont`),t=e.querySelectorAll(".ninja-forms-form-wrap");t&&t.length?(_(t[0].scrollWidth),p(t[0].scrollHeight)):(_(e.scrollWidth),p(e.scrollHeight))},scrolling:"no",height:a&&d?d:"",width:a&&u?u:"",style:{pointerEvents:"none",flexGrow:"1",border:"none",margin:"0",padding:"0"}})))}c.propTypes={formID:a().number.isRequired,homeUrl:a().string.isRequired,previewToken:a().string.isRequired};const f=e=>{const r="nf_form_iframe_"+e;return document.getElementById(r)},l=()=>{const e=ninja_forms_form_iframe_data||{},{formID:r,homeUrl:t,previewToken:o,isBlock:i}=e,s="nf_form_iframe_"+r;let a=f(r);const l=s+"_"+(Date.now().toString(36)+Math.random().toString(36));a.setAttribute("id",l);const m=(0,n.createElement)(c,{formID:r,homeUrl:t,previewToken:o,isBlock:i});(0,n.createRoot)(a).render(m)};r()((()=>{(()=>{const e=ninja_forms_form_iframe_data||{},{formID:r}=e;if(f(r))l();else{const e=new MutationObserver((t=>{for(const n of t){const t=n.target.querySelector("#nf-form-"+r+"-cont"),o=n.target.querySelector("#nf_form_iframe_"+r);t?(t.parentElement.innerHTML='<div id="nf_form_iframe_'+r+'"></div>',e.disconnect(),l()):o&&(e.disconnect(),l())}}));e.observe(document.body,{subtree:!0,childList:!0,attributes:!0})}})()}))})()})();