(()=>{function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"monitor",t=arguments.length>1?arguments[1]:void 0,o=t(".ff_form_preview_wrapper"),n=["mobile","tablet","monitor"],i=n.join(" ");o.removeClass(i).addClass(e),t(".frm-fluent-form .ff-t-container").removeClass(i).addClass(e),t(".ff_device_control").removeClass("active"),t('*[data-type="'+e+'"]').addClass("active");var a="100%";"tablet"===e?a="768px":"mobile"===e&&(a="375px"),o.animate({width:a}),t("body").find("form").trigger("screen-change",[a,e,n])}jQuery(document).ready(function(){!function(t){var o=t(".ff_preview_body"),n=t(".ff_preview_text"),i=t(".ff_form_preview_style_toggle");"true"==window.localStorage.getItem("ff_preview_only")&&(o.addClass("ff_preview_only"),t("#ff_preview_only").attr("checked",!0)),e(window.localStorage.getItem("ff_window_type"),t),t("body").on("click",".ff_device_control",function(){var o=t(this).data("type");window.localStorage.setItem("ff_window_type",o),e(o,t)}),t("#ff_preview_only").on("change",function(){var e=t(this).is(":checked");o.toggleClass("ff_preview_only",e),n.html(e?"Preview Mode":"Design Mode"),i.toggle(!e),window.localStorage.setItem("ff_preview_only",e),t("body").find("form.frm-fluent-form").trigger("fluentform-preview-mode-change",e)});var a=t('\n    <div role="alert" class="el-notification right" style="bottom: 16px; z-index: 999999;">\n      <i class="el-notification__icon el-icon-success"></i>\n      <div class="el-notification__group is-with-icon">\n        <h2 class="el-notification__title">Success</h2>\n        <div class="el-notification__content">\n          <p>Copied to Clipboard.</p>\n        </div>\n      </div>\n    </div>\n  '),l=t("#copy-toggle"),f=t("#copy"),r=t("body");l.on("click",function(){var e=f.text(),o=t("<input>");r.append(o),o.val(e.trim()).select(),document.execCommand("copy"),o.remove(),r.append(a),setTimeout(function(){a.remove()},2e3)}),t(".ff_form_preview_wrapper .fluentform").on("click",function(e){var o=t(e.target),n=o.parent().hasClass("ff-el-input--label"),i=o.hasClass("ff-el-form-control"),a=o.parent().hasClass("ff-el-form-check-label"),l=(o.hasClass("ff-btn-submit"),o.parent().hasClass("ff-el-section-break")||o.parent().hasClass("ff-custom_html")),f="";n?f="label":i?f="input":a?f="checkable":l&&(f="sectionBrk"),""!=f&&window.dispatchEvent(new CustomEvent("selectionFired",{detail:{type:f}}))})}(jQuery.noConflict())})})();