- 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>
1 line
25 KiB
JavaScript
Executable File
1 line
25 KiB
JavaScript
Executable File
(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{1086:function(t,e,r){"use strict";var n=r(9),o=r.n(n),a=r(3),i=r(1132),c=r(1106),u=(r(1133),r(96)),l=r(1);function s(t){return(s="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 f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(){y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",d="executing",m="completed",b={};function v(){}function g(){}function w(){}var O={};l(O,i,(function(){return this}));var j=Object.getPrototypeOf,E=j&&j(j(I([])));E&&E!==r&&n.call(E,i)&&(O=E);var _=w.prototype=v.prototype=Object.create(O);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,i,c){var u=p(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function S(e,r,n){var o=h;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?m:"suspendedYield",l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function k(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(s(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},x(P.prototype),l(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new P(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,T.prototype={constructor:T,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(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,b):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),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function d(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function m(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){d(a,n,o,i,c,"next",t)}function c(t){d(a,n,o,i,c,"throw",t)}i(void 0)}))}}e.a=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Object(u.useQuery)(["get-bwf-fields"],m(y().mark((function t(){var e;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o()({method:"GET",path:Object(a.A)("/v3/fields")});case 3:if(!(e=t.sent)||!e.result){t.next=6;break}return t.abrupt("return",e.result);case 6:t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:return t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])}))),{staleTime:18e5}),n=r.isLoading,s=r.data,f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r={};if(t)for(var n in t)if(!e||!t[n].hasOwnProperty("search")||2!==parseInt(t[n].search)){var o=t[n],a=Object(i.b)(o.type),c=o&&o.hasOwnProperty("meta")&&o.meta.hasOwnProperty("options")?o.meta.options:[],u=o.name;r["bwf_cf".concat(o.ID)]=Object(i.a)(u,Object(l.__)("Custom Field","wp-marketing-automations"),"contact_custom_fields",12,a,c)}return r},h=n?[]:p(p({},c.a),f(s));return t?{loading:n,filters:h}:!!n||h}},1133:function(t,e,r){},1427:function(t,e,r){"use strict";r.r(e);var n=r(0),o=r(2),a=r(1),i=r(9),c=r.n(i),u=r(5),l=r(11),s=r(12),f=r(3),p=r(1063),h=r(1076),y=r(200),d=r(70),m=r(8),b=r(76),v=r(44),g=r(1086);function w(t){return(w="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 O(){O=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="executing",y="completed",d={};function m(){}function b(){}function v(){}var g={};l(g,i,(function(){return this}));var j=Object.getPrototypeOf,E=j&&j(j(I([])));E&&E!==r&&n.call(E,i)&&(g=E);var _=v.prototype=m.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==w(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?y:"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function k(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(w(e)+" is not iterable")}return b.prototype=v,o(_,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:b,configurable:!0}),b.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},x(P.prototype),l(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new P(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,T.prototype={constructor:T,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(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.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 r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function E(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?j(Object(r),!0).forEach((function(e){_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function x(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function P(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return S(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(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 S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}e.default=function(t){var e=Object(s.i)(),r=Object(h.a)(),i=Object(g.a)(!0,!0),w=i.loading,j=i.filters,_=P(Object(n.useState)(!0),2),S=_[0],L=_[1],k=P(Object(n.useState)({}),2),N=k[0],T=k[1],I=P(Object(n.useState)(!0),2),C=I[0],G=I[1],F=P(Object(n.useState)({message:"",type:1}),2),A=F[0],B=F[1],U=Object(b.a)().setL2Title;Object(n.useEffect)((function(){U("title"in N?N.title:"")}),[N]);var D=P(Object(n.useState)(!1),2),J=D[0],M=D[1],Y=r.setCampaignValues,q=r.setExclude,H=function(){var t=!0;!Object(o.isEmpty)(N.title)&&[1,2,3].includes(parseInt(N.type))&&(t=!1),t||2!==parseInt(N.type)||Object(f.y)()||(t=!0),t||3!==parseInt(N.type)||Object(f.nc)()||(t=!0),G(t)},Q=p.a.getCampaignId(),R=p.a.getCampaignData(),V=p.a.getExcludes(),W=!!(!(!R||!R.parent)&&R.parent);Object(n.useEffect)((function(){R&&Q>0&&parseInt(t.campaignId)===parseInt(Q)&&(T({title:R.title,description:R.description,type:R.type,isPromotional:!R.data||!R.data.hasOwnProperty("is_promotional")||R.data.is_promotional,includeUnverified:!(!R.data||!R.data.hasOwnProperty("includeUnverified"))&&R.data.includeUnverified,includeSoftBounce:!(!R.data||!R.data.hasOwnProperty("includeSoftBounce"))&&R.data.includeSoftBounce,abType:R.data&&R.data.hasOwnProperty("ab_type")?R.data.ab_type:"standard"}),L(!1)),0===parseInt(t.campaignId)&&(T({title:"",description:"",type:0,isPromotional:!1,abType:!1}),L(!1))}),[Q]),Object(n.useEffect)((function(){H()}),[N]);var $=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.isEmpty)(t))return{};var r=Object(s.b)(t,j);return Object(s.j)(r,e,j)},z=function(){var r,n=(r=O().mark((function r(){var n,a;return O().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(C){r.next=19;break}if(t.setPending(!0),i=void 0,i={title:R.title,description:R.description,type:R.type,isPromotional:R.data&&R.data.hasOwnProperty("is_promotional")?R.data.is_promotional:null,abType:R.data&&R.data.hasOwnProperty("ab_type")?R.data.ab_type:null,includeUnverified:!(!R.data||!R.data.hasOwnProperty("includeUnverified"))&&R.data.includeUnverified,includeSoftBounce:!(!R.data||!R.data.hasOwnProperty("includeSoftBounce"))&&R.data.includeSoftBounce},JSON.stringify(i)==JSON.stringify(N)){r.next=14;break}if(!(Q>0)){r.next=12;break}return r.prev=4,r.next=7,c()({path:Object(f.A)("/broadcast/".concat(Q)),method:"POST",data:{data:{title:N.title,description:N.description,type:N.type,promotional:N.isPromotional,ab_type:N.abType,modified_by:Object(f.N)(),includeUnverified:N.includeUnverified,includeSoftBounce:N.includeSoftBounce,exclude:V},step:1},headers:{"Content-Type":"application/json"}}).then((function(t){if(200==t.code){Y("data",E(E({},R),{},{title:t.result.title,description:t.result.description,type:t.result.type,data:t.result.data})),B({message:t.message,type:1});var r=R.data&&!Object(o.isNull)(R.data)&&R.data.hasOwnProperty("filters")?R.data.filters:{},n=$(r);Object(o.isEmpty)(n)||Object(s.l)(n,"/",e),Y("step",2)}else B({message:t.message,type:0})}));case 7:r.next=12;break;case 9:r.prev=9,r.t0=r.catch(4),B({message:r.t0.message,type:0});case 12:r.next=18;break;case 14:n=R.data&&R.data.hasOwnProperty("filters")?R.data.filters:{},a=$(n),Object(o.isEmpty)(a)||Object(s.l)(a,"/",e),Y("step",2);case 18:t.setPending(!1);case 19:case"end":return r.stop()}var i}),r,null,[[4,9]])})),function(){var t=this,e=arguments;return new Promise((function(n,o){var a=r.apply(t,e);function i(t){x(a,n,o,i,c,"next",t)}function c(t){x(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(){return n.apply(this,arguments)}}();return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(d.a,null),!S&&!Object(o.isEmpty)(N)&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"bwf-campaign-step-div bwf-card-wrap bwf-campaign-step-1"},Object(n.createElement)("div",{className:"bwf-card-header"},Object(n.createElement)("span",{className:"bwf-form-title"},Object(a.__)("Information","wp-marketing-automations"))),Object(n.createElement)("div",{className:"bwf-card-bg-wrap"},Object(n.createElement)(u.TextControl,{value:N.title,label:Object(a.__)("Name","wp-marketing-automations"),className:"bwf-campaign-input-field",placeholder:Object(a.__)("Enter Name","wp-marketing-automations"),onChange:function(t){T(E(E({},N),{},{title:t}))}}),Object(n.createElement)("div",null,Object(n.createElement)(u.Flex,{gap:5,justify:"start",align:"start"},Object(n.createElement)(u.FlexItem,null,Object(n.createElement)("p",{className:"bwf-c-input-label"},Object(a.__)("Type","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-display-flex gap--8"},Object(n.createElement)(l.a,{isSecondary:"standard"===N.abType,isTertiary:"standard"!==N.abType,className:"bwf-btn-small "+("standard"===N.abType?"is-border is-blue-bg":""),onClick:function(){T(E(E({},N),{},{abType:"standard"}))}},Object(a.__)("Standard","wp-marketing-automations")),Object(n.createElement)(l.a,{isSecondary:"ab"===N.abType,isTertiary:"ab"!==N.abType,className:"bwf-btn-small "+("ab"===N.abType?"is-border is-blue-bg":""),onClick:function(){T(E(E({},N),{},{abType:"ab"}))}},Object(a.__)("A/B Test","wp-marketing-automations")))))),Object(n.createElement)("div",{className:"bwf_clear_8"}),!W&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(v.a,{className:"bwf-crm-campaign-toggle",label:Object(a.__)("Include Unverified Contacts","wp-marketing-automations"),checked:!!N.hasOwnProperty("includeUnverified")&&N.includeUnverified,onChange:function(t){q([]),T(E(E({},N),{},{includeUnverified:t}))}}),Object(n.createElement)(v.a,{className:"bwf-crm-campaign-toggle",label:Object(a.__)("Include Soft Bounce Contacts","wp-marketing-automations"),checked:!!N.hasOwnProperty("includeSoftBounce")&&N.includeSoftBounce,onChange:function(t){q([]),T(E(E({},N),{},{includeSoftBounce:t}))}}),Object(f.Ac)()&&Object(n.createElement)(v.a,{className:"bwf-crm-campaign-toggle",label:Object(a.__)("Include Unsubscribed contacts","wp-marketing-automations"),checked:!N.isPromotional,onChange:function(t){q([]),T(E(E({},N),{},{isPromotional:!t}))}})),J&&Object(n.createElement)(u.Modal,{title:Object(a.__)("Configure SMS Setting","wp-marketing-automations"),onRequestClose:function(){return M(!1)},style:{minWidth:"540px",height:"fit-content"},className:"bwf-crm-merge-tag-model"},Object(n.createElement)("p",null,Object(n.createElement)(m.a,{icon:"profile"})),Object(n.createElement)("a",{href:"admin.php?page=autonami&tab=connector",className:"bwf-a-no-underline"},Object(a.__)("Click Here to go configuration page","wp-marketing-automations")),Object(n.createElement)("p",null,Object(n.createElement)(l.a,{isPrimary:!0,onClick:function(){return M(!1)}},Object(a.__)("Cancel","wp-marketing-automations")))),Object(n.createElement)(y.a,{message:A.message,type:A.type,removeMessage:function(){return B({message:"",type:1})}})),Object(n.createElement)("div",{className:"bwf-crm-stepper-navigation bwf_text_right"},Object(n.createElement)(l.a,{isPrimary:!0,className:"bwf-crm-navigation-next",disabled:C||w,onClick:function(){H(),z()},isBusy:t.isPending},Object(a.__)("Next","wp-marketing-automations"))))))}}}]); |