(()=>{"use strict";var e={d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{base:()=>s,settings:()=>f});var t=wp.i18n.__,n={enable:t("Save form progress","jet-form-builder-save-progress"),clear_storage:t("Clear saved form data after successful submission","jet-form-builder-save-progress")};function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){l(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function l(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var i=wp.components.ToggleControl,u=JetFBHooks.useMetaState,s={name:"jf-save-progress",title:(0,wp.i18n.__)("Form Progress")},f={render:function(){var e,r,t=(e=u("_jf_save_progress"),r=2,function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);l=!0);}catch(e){c=!0,o=e}finally{try{l||null==t.return||t.return()}finally{if(c)throw o}}return a}}(e,r)||function(e,r){if(e){if("string"==typeof e)return c(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=t[0],l=t[1];return wp.element.createElement(React.Fragment,null,wp.element.createElement(i,{label:n.enable,checked:o.enable,onChange:function(e){l((function(r){return a(a({},r),{},{enable:e})}))}}),wp.element.createElement(i,{label:n.clear_storage,checked:o.clear_storage,onChange:function(e){l((function(r){return a(a({},r),{},{clear_storage:e})}))}}))},icon:null};(0,wp.hooks.addFilter)("jet.fb.register.plugin.jf-actions-panel.after","jet-form-builder",(function(e){return e.push(r),e}))})();