Files
roi-theme/wp-content/plugins/wp-marketing-automations/admin/frontend/dist/68.d0bce6e623a4726e6ad0.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

1 line
45 KiB
JavaScript
Executable File

(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{1066:function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(0);var a=function(t,e){var r=Object(n.useRef)();Object(n.useEffect)((function(){r.current=t}),[t]),Object(n.useEffect)((function(){if(null!==e){var t=setInterval((function(){r.current()}),e);return function(){return clearInterval(t)}}}),[e])}},1446:function(t,e,r){"use strict";r.r(e);var n=r(0),a=r(5),o=r(1),i=r(1063),c=r(1076),s=r(3),u=(r(1222),r(33)),l=r(62),f=r(19),m=r(61),p=r(55),b=r(344);function h(t){return(h="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 d(){d=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:x(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=l;var m="suspendedStart",p="executing",b="completed",y={};function v(){}function w(){}function g(){}var O={};u(O,i,(function(){return this}));var j=Object.getPrototypeOf,E=j&&j(j(C([])));E&&E!==r&&n.call(E,i)&&(O=E);var _=g.prototype=v.prototype=Object.create(O);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function r(a,o,i,c){var s=f(t[a],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==h(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return o=o?o.then(a,a):a()}})}function x(e,r,n){var a=m;return function(o,i){if(a===p)throw Error("Generator is already running");if(a===b){if("throw"===o)throw i;return{value:t,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var s=S(c,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=p;var u=f(e,r,n);if("normal"===u.type){if(a=n.done?b:"suspendedYield",u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=b,n.method="throw",n.arg=u.arg)}}}function S(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(a,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.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,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function L(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function C(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 a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(h(e)+" is not iterable")}return w.prototype=g,a(_,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:w,configurable:!0}),w.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(N.prototype),u(N.prototype,c,(function(){return this})),e.AsyncIterator=N,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new N(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),u(_,s,"Generator"),u(_,i,(function(){return this})),u(_,"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=C,P.prototype={constructor:P,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(I),!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 a(n,a){return c.type="throw",c.arg=e,r.next=n,a&&(r.method="next",r.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 s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,y):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),y},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),I(r),y}},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 a=n.arg;I(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function y(t,e,r,n,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,a)}function v(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 w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){g(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function g(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||E(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(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,a,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,a=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(t,e)||E(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 E(t,e){if(t){if("string"==typeof t)return _(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)?_(t,e):void 0}}function _(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}var k=function(t){var e=t.campaign,r=t.pauseUnpauseBroadcast,i=e&&e.type?parseInt(e.type):1,c=Object(s.G)(),h=j(Object(n.useState)({loading:!1,status:!1}),2),v=h[0],g=h[1],E=[{key:"contacts",title:Object(o.__)("Contacts","wp-marketing-automations"),value:Number.isInteger(parseInt(e.count))?parseInt(e.count):0},{key:"sent",title:Object(o.__)("Sent","wp-marketing-automations"),value:Number.isInteger(parseInt(e.sent))?parseInt(e.sent):0}].concat(O(1===i?[{key:"openRate",title:Object(o.__)("Open Rate","wp-marketing-automations"),value:(Number.isInteger(parseFloat(e.open_count))?parseFloat(e.open_rate):0)+" %"}]:[]),[{key:"clickRate",title:Object(o.__)("Click Rate","wp-marketing-automations"),value:(Number.isInteger(parseFloat(e.click_count))?parseFloat(e.click_rate):0)+" %"},{key:"unsubscribe",title:Object(o.__)("Unsubscribe","wp-marketing-automations"),value:Number.isInteger(parseInt(e.unsubs))?parseInt(e.unsubs):0}]);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.Card,{className:"bwf-crm-campaign-stats-overview"},Object(n.createElement)(a.CardHeader,{className:"bwf-crm-overview-report-header"},Object(n.createElement)("span",{className:"bwf-form-title"},Object(o.__)("Stats","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-display-flex"},Object(n.createElement)("span",{className:"bwf-broadcast-status"},Object(n.createElement)("span",{className:s.H[e.status]},e.status&&c.hasOwnProperty(e.status)?c[e.status].label:e.status)),Object(s.ac)()&&[2,3,6].includes(parseInt(e.status))&&Object(n.createElement)(m.a,{label:Object(o.__)("Quick Actions","wp-marketing-automations"),menuPosition:"bottom right",renderContent:function(t){var a=t.onToggle,i={3:Object(o.__)("Pause","wp-marketing-automations"),6:Object(o.__)("Resume","wp-marketing-automations"),2:Object(o.__)("Unschedule","wp-marketing-automations")},c={2:1,3:6,6:3};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(l.a,{isClickable:!0,onInvoke:function(){r(e.id,c[parseInt(e.status)]),a()}},Object(n.createElement)(f.a,{justify:"flex-start"},Object(n.createElement)(f.c,null,i[parseInt(e.status)]))),Object(n.createElement)(l.a,{isClickable:!0,onInvoke:function(){var t,i,c={title:Object(o.__)("Cancel Broadcast","wp-marketing-automations"),status:!0,content:Object(n.createElement)(n.Fragment,null,Object(o.__)("You are about to cancel broadcast ","wp-marketing-automations"),Object(n.createElement)("strong",null,e.title,"."),Object(o.__)(" Cancel to stop, Confirm to proceed.","wp-marketing-automations")),buttonConfirm:Object(o.__)("Confirm","wp-marketing-automations"),buttonCancel:Object(o.__)("Cancel","wp-marketing-automations"),isDelete:!0};g(w(w({},c),{},{onConfirm:(t=d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g(w(w({},c),{},{status:!0,id:e.id,loading:!0})),t.next=3,r(e.id,7).then((function(){g({status:!1})}));case 3:case"end":return t.stop()}}),t)})),i=function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(t){y(o,n,a,i,c,"next",t)}function c(t){y(o,n,a,i,c,"throw",t)}i(void 0)}))},function(){return i.apply(this,arguments)})})),a()}},Object(n.createElement)(f.a,{justify:"flex-start"},Object(n.createElement)(f.c,null,Object(o.__)("Cancel","wp-marketing-automations")))))}}))),Object(n.createElement)(a.CardBody,{className:"bwf-crm-campaign-stats-overview-card bwf-crm-hide-delta"},Object(n.createElement)(b.a,{items:E,isLoading:!1})),Object(n.createElement)(a.CardFooter,null,Object(n.createElement)(u.a,{href:"admin.php?page=autonami&path=/broadcast/"+e.id+"/analytics",type:"bwf-crm",className:"bwf-a-no-underline"},Object(o.__)("View Details","wp-marketing-automations")))),Object(n.createElement)(p.a,{modalTitle:v.title,content:v.content,deleteEntityName:v.deleteEntityName,confirmText:v.confirmText,confirmButtonText:v.buttonConfirm,cancelButtonText:v.buttonCancel,onConfirm:v.onConfirm,isLoading:v.loading,successMessage:v.success,errorMessage:v.error,onRequestClose:function(){return g({status:!1})},isOpen:v.status,isDelete:!1}))},N=r(1099),x=r(70),S=r(337),L=r(9),I=r.n(L),P=r(2),C=r(1106),T=r(1066),A=r(96),F=r(12),G=r(8),B=r(40),D=r(11);function U(t){return(U="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 R(){R=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),c=new L(n||[]);return a(i,"_invoke",{value:k(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=l;var m="suspendedStart",p="executing",b="completed",h={};function d(){}function y(){}function v(){}var w={};u(w,i,(function(){return this}));var g=Object.getPrototypeOf,O=g&&g(g(I([])));O&&O!==r&&n.call(O,i)&&(w=O);var j=v.prototype=d.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(a,o,i,c){var s=f(t[a],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==U(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return o=o?o.then(a,a):a()}})}function k(e,r,n){var a=m;return function(o,i){if(a===p)throw Error("Generator is already running");if(a===b){if("throw"===o)throw i;return{value:t,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var s=N(c,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=p;var u=f(e,r,n);if("normal"===u.type){if(a=n.done?b:"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=b,n.method="throw",n.arg=u.arg)}}}function N(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=f(a,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.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,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}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 S(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 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 a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(U(e)+" is not iterable")}return y.prototype=v,a(j,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,s,"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,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},E(_.prototype),u(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(j),u(j,s,"Generator"),u(j,i,(function(){return this})),u(j,"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,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(S),!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 a(n,a){return c.type="throw",c.arg=e,r.next=n,a&&(r.method="next",r.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 s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,h):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),h},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),S(r),h}},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 a=n.arg;S(r)}return a}}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),h}},e}function H(t,e,r,n,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,a)}function M(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(t){H(o,n,a,i,c,"next",t)}function c(t){H(o,n,a,i,c,"throw",t)}i(void 0)}))}}function Y(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,a,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,a=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return q(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)?q(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 q(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}var V=function(){var t=Y(Object(n.useState)(!1),2),e=t[0],r=t[1],a=Y(Object(n.useState)(!1),2),u=a[0],l=a[1],f=Y(Object(n.useState)(!1),2),m=f[0],b=f[1],h=i.a.getCampaignData(),d=Object(c.a)().resetCampaign,y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t&&(d(t),Object(F.l)({page:"autonami",path:"/broadcast/"+t.id},"/",{})),r(!1)},v=Object(A.useMutation)(function(){var t=M(R().mark((function t(e){return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I()({path:Object(s.A)("/broadcast/"),method:"POST",data:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),{onSuccess:function(t){return y(t.result)},onError:function(){return y()}}),w=Object(n.useCallback)(M(R().mark((function t(){var e;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r(!0),e={title:Object(o.__)("Send to Unopen","wp-marketing-automations"),description:"",type:h.type,created_by:Object(s.N)(),createUnopen:h.id},v.mutate(e);case 3:case"end":return t.stop()}}),t)}))),[h]);return Object(n.useEffect)((function(){v.isSuccess&&(r(!1),v.reset())}),[v.isSuccess]),Object(n.createElement)(n.Fragment,null,Object(n.createElement)(p.a,{modalTitle:Object(o.__)("Create Broadcast","wp-marketing-automations"),onRequestClose:function(){r(!1),b(!1),v.reset()},content:Object(o.__)("This will create a new broadcast for contacts who have not opened this broadcast. Are you sure you want to proceed?","wp-marketing-automations"),isLoading:e,errorMessage:v.isError&&(v.error&&v.error.message?v.error.message:Object(o.__)("Unable to create unopen broadcast","wp-marketing-automations")),onConfirm:w,isOpen:m}),Object(n.createElement)(D.a,{isSecondary:!0,className:"bwf-display-flex",onClick:function(){Object(s.ac)()?b(!0):l(!0)}},!Object(s.ac)()&&Object(n.createElement)(G.a,{icon:"king",size:16}),Object(o.__)("Send to Unopen","wp-marketing-automations")),!Object(s.ac)()&&Object(n.createElement)(B.b,{isOpen:u,onRequestClose:function(){return l(!1)},modalContent:{isFeature:!0,featureTitle:Object(o.__)("Create Unopen Broadcast","wp-marketing-automations")}}))},$=function(){var t=i.a.getCampaignData();return 4===parseInt(t.status)&&1===parseInt(t.type)&&!t.is_unopen_grandchild&&Object(n.createElement)(a.Card,{className:"bwf-crm-overview-detail-wrap bwf-card-display-block"},Object(n.createElement)(a.CardHeader,{className:"bwf-crm-overview-report-header"},Object(o.__)("Actions","wp-marketing-automations")),Object(n.createElement)(a.CardBody,null,Object(n.createElement)("div",{className:"bwf-report-row",key:1},Object(n.createElement)("div",{className:"bwf-report-row-label bwf-report-row-full"},Object(o.__)("Send to contacts who haven't opened the emails yet.","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf_clear_20"}),Object(n.createElement)("div",null,Object(n.createElement)(V,null)))))},z=r(26);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 Q(){Q=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),c=new L(n||[]);return a(i,"_invoke",{value:k(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=l;var m="suspendedStart",p="executing",b="completed",h={};function d(){}function y(){}function v(){}var w={};u(w,i,(function(){return this}));var g=Object.getPrototypeOf,O=g&&g(g(I([])));O&&O!==r&&n.call(O,i)&&(w=O);var j=v.prototype=d.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(a,o,i,c){var s=f(t[a],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==J(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return o=o?o.then(a,a):a()}})}function k(e,r,n){var a=m;return function(o,i){if(a===p)throw Error("Generator is already running");if(a===b){if("throw"===o)throw i;return{value:t,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var s=N(c,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=p;var u=f(e,r,n);if("normal"===u.type){if(a=n.done?b:"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=b,n.method="throw",n.arg=u.arg)}}}function N(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=f(a,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.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,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}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 S(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 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 a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(J(e)+" is not iterable")}return y.prototype=v,a(j,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,s,"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,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},E(_.prototype),u(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(j),u(j,s,"Generator"),u(j,i,(function(){return this})),u(j,"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,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(S),!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 a(n,a){return c.type="throw",c.arg=e,r.next=n,a&&(r.method="next",r.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 s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,h):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),h},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),S(r),h}},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 a=n.arg;S(r)}return a}}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),h}},e}function W(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 K(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?W(Object(r),!0).forEach((function(e){X(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function X(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=J(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=J(n))return n;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:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z(t,e,r,n,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,a)}function tt(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(t){Z(o,n,a,i,c,"next",t)}function c(t){Z(o,n,a,i,c,"throw",t)}i(void 0)}))}}function et(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,a,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,a=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return rt(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)?rt(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 rt(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=t.campaignType,r=Object(n.useContext)(s.h),u=i.a.getCampaignData(),l=Object(s.I)(),f=Object(c.a)(),m=f.setCampaignValues,b=f.setEditableMode,h=et(Object(n.useState)(!1),2),d=h[0],y=h[1],v=et(Object(n.useState)(!0),2),w=v[0],g=v[1],O=et(Object(n.useState)(!1),2),j=O[0],E=O[1],_=et(Object(n.useState)({}),2),L=_[0],A=_[1],F=et(Object(n.useState)({loading:!1,status:!1}),2),B=F[0],D=F[1];Object(N.a)("overview","",!0,!0,!1,e);var U=et(Object(n.useState)(!0),2),R=U[0],H=U[1],M=function(){var t=tt(Q().mark((function t(){return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,H(!1),t.next=4,I()({path:Object(s.A)("/broadcast/".concat(u.id,"/overview-stats")),method:"GET"}).then((function(t){if(200===t.code){if(t.hasOwnProperty("result"))m("data",K(K({},u),t.result));H(!0)}}));case 4:t.next=10;break;case 6:t.prev=6,t.t0=t.catch(0),H(!0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}();Object(T.a)((function(){3===parseInt(u.status)&&R&&Object(s.ac)()&&M()}),5e3);var Y=function(){var t=tt(Q().mark((function t(e){return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,g(!0),t.next=4,I()({path:Object(s.A)("/broadcast/email-preview"),method:"POST",data:e}).then((function(t){E(t.result.body.replace(/\\/g,"")),g(!1)}));case 4:t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",Object(n.createElement)(n.Fragment,null));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(e){return t.apply(this,arguments)}}(),q=function(){var t=tt(Q().mark((function t(r){var a,o;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="",o=!1,3===parseInt(e)?(r.hasOwnProperty("whatsAppImage")&&r.whatsAppImage&&r.hasOwnProperty("whatsAppImageSetting")&&r.whatsAppImageSetting.hasOwnProperty("position")&&!Object(P.isEmpty)(r.whatsAppImageSetting.position)&&r.whatsAppImageSetting.hasOwnProperty("imageURL")&&!Object(P.isEmpty)(r.whatsAppImageSetting.imageURL)&&(a="before"===r.whatsAppImageSetting.position?Object(n.createElement)(n.Fragment,null,Object(n.createElement)("img",{src:r.whatsAppImageSetting.imageURL,width:50,height:50}),Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:r.body}})):Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:r.body}}),Object(n.createElement)("img",{src:r.whatsAppImageSetting.imageURL,width:50,height:50}))),o=!0):2===parseInt(e)&&(o=!0),o?(a=Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:r.body}}),E(a),g(!1)):Y({content:"editor"===r.type?r.editor.body:r.body,type:r.type}),r.mode=u.type,t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),V=u.hasOwnProperty("notice_data")&&!Object(P.isEmpty)(u.notice_data)&&Object(P.isArray)(u.notice_data)?u.notice_data:[],J=function(){var t=tt(Q().mark((function t(e,n){return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return 7!==parseInt(n)&&r(Object(o.__)("Updating Status …","wp-marketing-automations")),t.prev=1,t.next=4,I()({path:Object(s.A)("/broadcast/".concat(e,"/pause-unpause")),method:"POST",data:{status:parseInt(n)}}).then((function(t){if(200!=t.code)throw Error(Object(s.u)(null==t?void 0:t.message));r(t.message);var e=u;return e.status=n,m("data",e),Object(s.Lb)(r,3e3),!0})).catch((function(t){throw Error(Object(s.u)(null==t?void 0:t.message))}));case 4:t.next=10;break;case 6:t.prev=6,t.t0=t.catch(1),D({status:!0,error:t.t0.message}),Object(s.Lb)(r,3e3);case 10:case"end":return t.stop()}}),t,null,[[1,6]])})));return function(e,r){return t.apply(this,arguments)}}();return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(x.a,null),Object(n.createElement)("div",{className:"bwf-content-header-new"},Object(n.createElement)("div",{className:"bwf-content-header-left"},Object(n.createElement)("div",{className:"bwf-content-header-title2"},Object(o.__)("Overview","wp-marketing-automations")))),u&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"bwfcrm-overview-wrap"},!Object(P.isEmpty)(V)&&V.map((function(t,e){var r=t.type,a=void 0===r?"error":r,o=t.msg,i=void 0===o?"":o,c=t.isHtml,s=void 0!==c&&c,u=t.icon,l=void 0===u?"info":u;return""===i?null:Object(n.createElement)(z.a,{key:e,isHtml:s,status:a,isDismissible:!1,icon:l},i)})),Object(n.createElement)(k,{campaign:u,pauseUnpauseBroadcast:J}),Object(n.createElement)("div",{className:"bwf_clear_20"}),Object(n.createElement)(a.Card,{className:"bwf-crm-overview-detail-wrap"},Object(n.createElement)(a.CardHeader,{className:"bwf-crm-overview-report-header"},Object(n.createElement)("span",{className:"bwf-form-title"},Object(o.__)("Details","wp-marketing-automations"))),Object(n.createElement)(a.CardBody,null,Object(n.createElement)("div",{className:"bwf-report-row"},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Title","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},u.title)),Object(n.createElement)("div",{className:"bwf-report-row"},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Type","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},l[u.type].label)),Object(n.createElement)("div",{className:"bwf-report-row"},Object(n.createElement)("div",{className:"bwf-report-row-label"},2===parseInt(u.status)?Object(o.__)("Scheduled On","wp-marketing-automations"):Object(o.__)("Sent On","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},u.execution_time?Object(s.ib)(u.execution_time,!1,!0):" - ")),u.description&&Object(n.createElement)("div",{className:"bwf-report-row"},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Description","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},u.description)),u.data.hasOwnProperty("filters")&&!Object(P.isEmpty)(u.data.filters)&&Object(n.createElement)("div",{className:"bwf-report-row"},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Segments","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},Object(C.b)(u.data.filters))),Object(s.ac)()&&parseInt(u.status)<3&&!(u.hasOwnProperty("engagement_creating")&&u.engagement_creating)&&Object(n.createElement)("div",{className:"bwf-report-row"},Object(n.createElement)("div",{className:"bwf-report-row-label"}),Object(n.createElement)("div",{className:"bwf-report-row-value bwf-report-value-modal"},Object(n.createElement)(a.Button,{isSecondary:!0,className:"bwf-a-no-underline",onClick:function(){return b(!0)}},Object(o.__)("Edit Broadcast","wp-marketing-automations")))))),Object(n.createElement)("div",{className:"bwf_clear_20"}),Object(n.createElement)(a.Card,{className:"bwf-crm-overview-detail-wrap"},Object(n.createElement)(a.CardHeader,{className:"bwf-crm-overview-report-header"},Object(n.createElement)("span",{className:"bwf-form-title"},Object(o.__)("Content","wp-marketing-automations"))),Object(n.createElement)(a.CardBody,null,!!u.type&&1===parseInt(u.type)&&u.data.hasOwnProperty("senders_name")&&!Object(P.isEmpty)(u.data.senders_name)&&Object(n.createElement)("div",{className:"bwf-report-row",key:1},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("From Name","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},u.data.senders_name)),!!u.type&&1===parseInt(u.type)&&u.data.hasOwnProperty("senders_email")&&!Object(P.isEmpty)(u.data.senders_email)&&Object(n.createElement)("div",{className:"bwf-report-row",key:2},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("From Email","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},u.data.senders_email)),!!u.type&&1===parseInt(u.type)&&u.data.hasOwnProperty("replyto")&&!Object(P.isEmpty)(u.data.replyto)&&Object(n.createElement)("div",{className:"bwf-report-row",key:3},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Reply-To Email","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},u.data.replyto)),u.data&&u.data.content&&u.data.content.map((function(t,e){return Object(n.createElement)("div",{className:"bwf-report-row",key:"bwf-report-row-".concat(e)},Object(n.createElement)("div",{className:"bwf-report-row-label"},u.data.content.length>1?Object(o.__)("Content #","wp-marketing-automations")+(parseInt(e)+1):Object(o.__)("Content","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value bwf-report-value-modal"},1===parseInt(u.type)&&t.subject&&Object(n.createElement)("span",null,t.subject),Object(n.createElement)(a.Button,{isTertiary:!0,className:"bwf-btn-small is-light",onClick:tt(Q().mark((function e(){var r;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.next=3,q(t,1);case 3:r=e.sent,A(r);case 5:case"end":return e.stop()}}),e)})))},Object(o.__)("View details","wp-marketing-automations"))))})),!!u.data&&u.data.hasOwnProperty("smart_send")&&u.data.smart_send.hasOwnProperty("enable")&&u.data.smart_send.enable&&function(){var t=u.data,e=t.smart_send,r=void 0===e?{}:e,a=t.smart_send_stat,i=void 0===a?{}:a,c=t.content,s=void 0===c?[]:c,l=t.winner,f=void 0===l?"":l;if(Object(P.isEmpty)(r))return Object(n.createElement)(n.Fragment,null);var m=[];return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"bwf-report-row",key:11},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Smart sending","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},Object(o.__)("Enabled","wp-marketing-automations"))),Object(n.createElement)("div",{className:"bwf-report-row",key:12},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Sample size","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},r.percent+" %")),Object(n.createElement)("div",{className:"bwf-report-row",key:13},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Wait Time","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},Object(o.sprintf)(Object(o._n)("%s Hour","%s Hours",parseInt(r.hours),"wp-marketing-automations"),parseInt(r.hours)))),s.length>0&&!Object(P.isEmpty)(i)&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"bwf-report-row",key:11},Object(n.createElement)("div",{className:"bwf-report-row-label"},Object(o.__)("Smart Sending Stats","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-report-row-value"},s.map((function(t,e){var r=t.template_id,a=void 0===r?"":r;return""===a||!i.hasOwnProperty(a)||m.includes(a)?Object(n.createElement)(n.Fragment,null):(m.push(a),Object(n.createElement)("div",{className:"bwf-smart-send-analytics-item",key:e},Object(n.createElement)("div",{className:"bwf-smart-send-analytics-header"},Object(n.createElement)("span",{className:"bwf-smart-send-title"},Object(o.__)("Content #","wp-marketing-automations")+(parseInt(e)+1)),a==f&&Object(n.createElement)(G.a,{icon:"winner"})),Object(n.createElement)("div",{className:"bwf-smart-send-analytics-content"},i[a].map((function(t,e){return Object(n.createElement)("div",{className:"bwf-smart-send-test-content-stat",key:e},Object(n.createElement)("span",{className:"bwf-smart-send-test-content-value"},t.v),Object(n.createElement)("span",{className:"bwf-smart-send-test-content-label"},t.l))})))))}))))))}(),Object(n.createElement)(S.a,{isOpen:d,isLoading:w,onRequestClose:function(){return y(!1)},subject:L.subject,preHeader:L.preheader,body:j,type:L.type,sourceType:2,mode:u.type,utm:L.utm}),Object(n.createElement)(p.a,{modalTitle:"Broadcast Action",confirmText:B.confirmText,confirmButtonText:B.buttonConfirm,cancelButtonText:B.buttonCancel,onConfirm:B.onConfirm,isLoading:B.loading,successMessage:B.success,errorMessage:B.error,onRequestClose:function(){return D({status:!1})},isOpen:B.status}))),Object(n.createElement)("div",{className:"bwf_clear_20"}),Object(n.createElement)($,null))))}}}]);