Files
roi-theme/wp-content/plugins/wp-marketing-automations/admin/frontend/dist/UserSetup.7818321e83c3f5d61bf6.js
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

2 lines
22 KiB
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1390:function(t,e,n){},1486:function(t,e,n){"use strict";n.r(e);var r=n(0),a=n(2),o=n(5),i=n(1),c=n(9),u=n.n(c),l=n(8),s=n(12),f=n(3),m=n(11),b=n(44),p=function(t){var e=t.nextStep,n=t.enableTracking,a=t.onChangeEnableTracking;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("img",{height:"240",width:"360",src:Object(f.lb)()+"onboarding/start.png",alt:""}),Object(r.createElement)("div",{className:"bwf-user-setup-step__heading"},"👋",Object(i.__)(" Welcome! Thank you for choosing Funnelkit Automations","wp-marketing-automations")),Object(r.createElement)("div",{className:"bwf-user-setup-step__subheading"},Object(i.__)("Create and manage broadcasts and automations seamlessly within WordPress with FunnelKit.","wp-marketing-automations")),Object(r.createElement)(m.a,{isPrimary:!0,className:"bwf-user-setup-step__action",onClick:e},Object(i.__)("Get Started","wp-marketing-automations")),Object(r.createElement)(b.a,{checked:n,label:Object(r.createElement)(r.Fragment,null,Object(i.__)("I want updates! Opt in for security, features updates and non sensitive diagnostic tracking. ","wp-marketing-automations"),Object(r.createElement)("a",{href:"https://funnelkit.com/non-sensitive-usage-tracking?utm_source=WordPress&utm_campaign=Lite+Plugin&utm_medium=User+Setup",target:"_blank",rel:"noreferrer"},Object(i.__)("Learn More.","wp-marketing-automations"))),onChange:function(t){return a(t)},className:"bwf-user-setup-step__tracking-checkbox"}))},d=function(){return Object(r.createElement)("div",{className:"bwf-user-setup__msg is-pending-msg bwf-flex bwf--g4"},Object(r.createElement)(l.a,{icon:"waiting",size:"20"}),Object(r.createElement)("span",null,Object(i.__)("Please wait! We will autoredirect to next step…","wp-marketing-automations")))},h=n(109);function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,o,i,c=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){l=!0,a=t}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return g(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t,e)||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.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var w=[{key:"smtp",label:"WP Mail SMTP"},{key:"stripe",label:"Stripe"},{key:"funnelkit",label:"FunnelKit "}],O=[{key:"smtp",label:"WP Mail SMTP"}],v=function(t){var e=t.nextStep,n=y(Object(r.useState)(!1),2),a=n[0],c=n[1],s=y(Object(r.useState)(!1),2),m=s[0],b=s[1];return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"bwf-user-setup-step__heading"},Object(i.__)("Fantastic! Get essential plugins installed with one-click","wp-marketing-automations")),Object(r.createElement)("div",{className:"bwf-user-setup-step__subheading"},Object(i.__)("Enables automated customer journeys, from abandoned cart recovery to targeted email sequences. Boost engagement with post-purchase","wp-marketing-automations"),Object(r.createElement)("br",null),Object(i.__)(" upsells and seamless integrations with top marketing tools, all effortlessly managed within your WordPress dashboard.","wp-marketing-automations")),Object(r.createElement)("div",{className:"bwf-user-setup-modal__plugins"},Object(r.createElement)("span",null,Object(i.__)("Essential Plugins","wp-marketing-automations")),(Object(f.qc)()?w:O).map((function(t,e){return Object(r.createElement)(h.b,{content:t.label,key:"bwf-user-setup-modal__plugin-".concat(e)})}))),a&&Object(r.createElement)(d,null),m&&Object(r.createElement)("div",{className:"bwf-user-setup__msg is-error-msg bwf-flex bwf--g4"},Object(r.createElement)(l.a,{icon:"error-alt",size:"20",color:"#B00C0C"}),Object(r.createElement)("span",null,Object(i.__)("There is some technical error to install. Please retry","wp-marketing-automations"))),!a&&Object(r.createElement)(o.Button,{isPrimary:!0,className:"bwf-user-setup-step__action",onClick:function(){c(!0),b(!1),u()({path:Object(f.A)("/setup-wizard/install-plugins"),method:"POST"}).then((function(t){200===t.code&&e(),c(!1)})).catch((function(t){console.log(t),c(!1)}))},isBusy:a,disabled:a},m?Object(i.__)("Skip","wp-marketing-automations"):Object(i.__)("Install and Activate","wp-marketing-automations")),m&&Object(r.createElement)(o.Button,{className:"bwf-user-setup__retry-btn"},Object(i.__)("Retry","wp-marketing-automations")))},_=n(83);function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){S(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=j(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==j(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,o,i,c=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){l=!0,a=t}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return P(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(t,e):void 0}}(t,e)||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.")}()}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var L=function(t){var e=t.nextStep,n=t.removeWizard,c=x(Object(r.useState)({op_email:Object(a.get)(bwfcrm_contacts_data,"user_email","")}),2),l=c[0],s=c[1],b=x(Object(r.useState)(""),2),p=b[0],d=b[1],h=x(Object(r.useState)(!1),2),y=h[0],g=h[1],w=function(){d("");var t="";Object(a.isEmpty)(l.op_email)?t+=" "+Object(i.__)("Email is required","wp-marketing-automations")+".":Object(f.s)(l.op_email)||(t+=" "+Object(i.__)("Please enter a valid email address","wp-marketing-automations")+"."),Object(a.isEmpty)(t)?(g(!0),u()({path:Object(f.A)("/setup-wizard/optin-setup")+"?op_email=".concat(l.op_email),method:"POST"}).then((function(t){200===t.code&&t.hasOwnProperty("result")&&t.result?(g(!1),n(),e()):(g(!1),d(t.message))})).catch((function(t){console.log(t),g(!1)}))):d(t)};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"bwf-user-setup-step__heading"},Object(i.__)("You're Almost Done!","wp-marketing-automations"),Object(r.createElement)("br",null)),Object(r.createElement)("div",{className:"bwf-user-setup-step__subheading"},Object(i.__)("We will sent out helpful video tutorials and guides to create effective automations and broadcasts.","wp-marketing-automations"),Object(r.createElement)("br",null)),Object(r.createElement)("div",{className:"bwf-flex gap-24 bwf-user-setup__input-wrap",onKeyPress:function(t){"Enter"===t.key&&w()}},Object(r.createElement)(o.TextControl,{placeholder:Object(i.__)("Enter you email","wp-marketing-automations"),label:Object(i.__)("Email"),value:l.op_email,type:"email",onChange:function(t){return e="op_email",n=t,void s((function(t){return k(k({},t),{},S({},e,n))}));var e,n},className:"bwf-w-420"})),!Object(a.isEmpty)(p)&&Object(r.createElement)("div",{className:"bwf-user-setup__msg is-error-msg"},Object(r.createElement)("span",null,p)),Object(r.createElement)(m.a,{isPrimary:!0,className:"bwf-user-setup-step__action",onClick:w,isBusy:y,disabled:y},Object(r.createElement)("span",{style:k({},y&&{visibility:"hidden"})},Object(i.__)("Submit","wp-marketing-automations")),y&&Object(r.createElement)(_.a,{color:"#ffffff",style:{position:"absolute"}})))},N=function(t){var e=t.nextStep,n=t.isLoading;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("img",{height:"240",width:"360",src:Object(f.lb)()+"onboarding/complete.png",alt:""}),Object(r.createElement)("div",{className:"bwf-user-setup-step__heading"},"🎉",Object(i.__)(" Congratulations! Lets Explore","wp-marketing-automations")),Object(r.createElement)("div",{className:"bwf-user-setup-step__subheading"},Object(i.__)("Youre all set to maximize your growth with FunnelKit Automations","wp-marketing-automations")),Object(r.createElement)(m.a,{isPrimary:!0,isBusy:n,disabled:n,className:"bwf-user-setup-step__action",onClick:function(){e()}},Object(i.__)("Start with Dashboard","wp-marketing-automations")))};n(1390);function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function C(){return(C=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(null,arguments)}function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,o,i,c=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){l=!0,a=t}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return F(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(t,e):void 0}}(t,e)||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.")}()}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function z(){z=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),c=new L(r||[]);return a(i,"_invoke",{value:k(t,n,c)}),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",b="executing",p="completed",d={};function h(){}function y(){}function g(){}var w={};l(w,i,(function(){return this}));var O=Object.getPrototypeOf,v=O&&O(O(N([])));v&&v!==n&&r.call(v,i)&&(w=v);var _=g.prototype=h.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(a,o,i,c){var u=f(t[a],t,o);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==A(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,a){n(t,r,e,a)}))}return o=o?o.then(a,a):a()}})}function k(e,n,r){var a=m;return function(o,i){if(a===b)throw Error("Generator is already running");if(a===p){if("throw"===o)throw i;return{value:t,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var u=S(c,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===m)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=b;var l=f(e,n,r);if("normal"===l.type){if(a=r.done?p:"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=p,r.method="throw",r.arg=l.arg)}}}function S(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(a,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function n(){for(;++a<e.length;)if(r.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(A(e)+" is not iterable")}return y.prototype=g,a(_,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:y,configurable:!0}),y.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},j(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new E(s(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=N,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(r,a){return c.type="throw",c.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;P(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),d}},e}function I(t,e,n,r,a,o,i){try{var c=t[o](i),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,a)}var B={1:"welcome",2:"plugins",3:"optin"},G=bwfcrm_contacts_data&&bwfcrm_contacts_data.header_data?bwfcrm_contacts_data.header_data:{},W=function(){var t,e=(t=z().mark((function t(e){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u()({path:Object(f.A)("/user-preference/".concat(Object(f.N)(),"/")),method:"POST",data:{data:{bwfan_header_notification:e}}}).then((function(t){if(200===t.code){var e=Object(a.get)(bwfcrm_contacts_data,"bwfan_header_notification",[]);!Object(a.isEmpty)(e)&&Object(a.isArray)(e)&&(e=bwfcrm_contacts_data.bwfan_header_notification),bwfcrm_contacts_data.bwfan_header_notification=e}}));case 2:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(t){I(o,r,a,i,c,"next",t)}function c(t){I(o,r,a,i,c,"throw",t)}i(void 0)}))});return function(t){return e.apply(this,arguments)}}();e.default=function(){var t,e=T(Object(r.useState)(1),2),n=e[0],c=e[1],m=T(Object(r.useState)(!0),2),b=m[0],d=m[1],h=T(Object(r.useState)(0),2),y=h[0],g=h[1],w=T(Object(r.useState)(!1),2),O=w[0],_=w[1],j=Object(r.useContext)(f.h),E=T(Object(r.useState)(null===(t=bwfcrm_contacts_data)||void 0===t?void 0:t.wizard_status),2),k=E[0],S=E[1];if(Object(r.useEffect)((function(){Object(f.oc)()||W("wizard_open")}),[]),Object(a.get)(bwfcrm_contacts_data,"wizard_status",""))return window.location.href=bwfcrm_contacts_data.siteURL+"/wp-admin/admin.php?page=autonami",Object(r.createElement)(r.Fragment,null);var x=function(){u()({path:Object(f.A)("/update-option-data/"),method:"POST",data:{optionkey:"_bwfan_onboarding_completed",optionval:!0}}).then((function(t){200===t.code&&t.hasOwnProperty("result")&&t.result?(4===n&&(window.location.href=Object(f.nb)()),_(!1),S(!0),bwfcrm_contacts_data.wizard_status=!0):(_(!1),j(Object(f.u)(null==t?void 0:t.message)),Object(f.Lb)(j,3e3))})).catch((function(t){j(Object(f.u)(null==t?void 0:t.message)),Object(f.Lb)(j,3e3),_(!1)}))},P=function(){4!==n?(1===n?(b&&z(),c(2)):c((function(t){return t+1})),g((function(t){return t+1}))):k?(_(!0),window.location.href=Object(f.nb)()):x()},A={nextStep:P,steps:B},F=function(t){d(t)},z=function(){u()({path:Object(f.A)("/setup-wizard/optin-track"),method:"POST"}).then((function(t){200!==(null==t?void 0:t.code)&&console.log(t)})).catch((function(t){return console.log(t)}))};return Object(r.createElement)(o.Modal,{isDismissible:!1,title:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("img",{src:G.logo,alt:"FunnelKit Funnel Builder"}),Object(r.createElement)("div",{className:"bwf-user-setup-modal__header-right"},Object(r.createElement)("span",{className:"bwf-user-setup-modal__completed-count"},Object(i.sprintf)(/* translators: completed steps count */
Object(i.__)("%1$d/%2$d Completed","wp-marketing-automations"),y,3)),4!==n&&Object(r.createElement)(o.Button,{onClick:function(){Object(s.l)({},"")}},Object(r.createElement)(l.a,{icon:"exit-alt",size:24,color:"#353030"})))),onRequestClose:function(){},shouldCloseOnClickOutside:!1,className:"bwf-admin-modal bwf-admin-modal-fullscreen bwf-user-setup-modal"},Object(r.createElement)("div",{className:"bwf-user-setup-modal__content"},Object(r.createElement)("div",{className:"bwf-user-setup-modal__body"},function(){switch(n){case 1:return Object(r.createElement)(p,C({},A,{enableTracking:b,onChangeEnableTracking:F}));case 2:return Object(r.createElement)(v,A);case 3:return Object(r.createElement)(L,C({},A,{removeWizard:x}));case 4:return Object(r.createElement)(N,C({},A,{isLoading:O}))}}()),![1,4].includes(n)&&Object(r.createElement)("div",{className:"bwf-user-setup-modal__footer"},Object(r.createElement)(o.Button,{onClick:function(){c((function(t){return t-1})),g((function(t){return t-1}))}},Object(r.createElement)(l.a,{icon:"arrow-left",size:18}),Object(r.createElement)("span",null,Object(i.__)("Back","wp-marketing-automations"))),![4].includes(n)&&Object(r.createElement)(o.Button,{onClick:P},Object(r.createElement)("span",null,Object(i.__)("Skip","wp-marketing-automations"))))))}}}]);