(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>p});const r=window.React;var o=e.n(r);function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function u(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=a(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],a(e).constructor):t.apply(e,r))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),r=t,l=[{key:"css",value:function(e){return[]}}],(u=[{key:"render",value:function(){var e=parseInt(this.props.cff_form_id)||0,t=(this.props.cff_class_name||"").replace(/[^a-z0-9\-_\s]/gi," ").trim(),r=(this.props.cff_attributes||"").trim(),n=this.props.cff_iframe||"off",i="";return e>0&&(i='[CP_CALCULATED_FIELDS id="'.concat(e,'"'),t&&(i+=' class="'.concat(t,'"')),r&&(i+=" ".concat(r)),n&&"on"==n&&(i+=' iframe="1"'),i+="]"),o().createElement("div",{className:"et_pb_module_inner"},e>0?o().createElement("div",{className:"cff-preview-box",style:{padding:"20px",background:"#f0f2f5",border:"1px solid #ddd"}},o().createElement("div",{style:{marginBottom:"10px"}},o().createElement("strong",null,"Shortcode:")),o().createElement("div",{style:{background:"#fff",padding:"5px",fontFamily:"monospace",marginBottom:"10px"}},i),o().createElement("div",{style:{marginBottom:"5px"}},"","Form ID: ".concat(e)),o().createElement("div",{style:{fontStyle:"italic",fontSize:"0.9em",color:"#666"}},"The actual form will be displayed on the frontend")):o().createElement("div",{className:"cff-warning-box",style:{padding:"20px",background:"#fff3cd",border:"1px solid #ffeeba",color:"#856404"}},"⚠️ Please select a form from the module settings"))}}])&&i(r.prototype,u),l&&i(r,l),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,u,l}(r.Component);u(s,"slug","cff_divi"),u(s,"displayName","Calculated Fields Form"),window.CFF_DIVI_Module=s,"undefined"!=typeof jQuery&&jQuery(window).on("et_builder_api_ready",function(e,t){t.registerModules([s])});const p=s;window.CFF_DIVI_Module=t})();