- 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
49 KiB
JavaScript
Executable File
1 line
49 KiB
JavaScript
Executable File
(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{1108:function(t,e,r){"use strict";var n=r(50),o=r(3);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)}var i=["fetch","setStateProp"];function c(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 u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){l(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}e.a=function(){var t=Object(n.a)("linkTriggerListData"),e=t.fetch,r=t.setStateProp,a=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,i),c=Object(n.a)("singleLinkTriggerData"),l=c.fetch,s=c.setStateProp;return u(u({},a),{},{fetchAll:function(t,n,a){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";r("isLoading",!0);var c=t.s,u={offset:n,limit:a,search:c,status:i};e("GET",Object(o.A)("/link-triggers"),u)},setLinkListValues:function(t,e){r(t,e)},fetchSingleLink:function(t){s("error",{}),l("GET",Object(o.A)("/link-trigger/".concat(t)))},setSingleLinkValue:function(t,e){s(t,e)}})}},1116:function(t,e,r){"use strict";var n=r(51);function o(t){return(o="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)}var a=["getStateProp"];function i(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 c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}e.a=function(){var t=Object(n.a)("linkTriggerListData"),e=t.getStateProp,r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,a),o=Object(n.a)("singleLinkTriggerData"),i=o.getStateProp,u=o.getLoading;return c(c({},r),{},{getAllLists:function(){return e("data")},getPageNumber:function(){return parseInt(e("offset"))/parseInt(e("limit"))+1},getCountData:function(){return e("countData")},getPerPageCount:function(){return parseInt(e("limit"))},getPageOffset:function(){return parseInt(e("offset"))},getTotalCount:function(){return parseInt(e("total_count"))},getActions:function(){return e("actions")},getSingleLinkLoad:function(){return u()},getSingleLinkData:function(){return i("data")},getLinkActionList:function(){return i("actionList")},getLinkActionSchemaList:function(){return i("actionSchema")},getLinkEditableStatus:function(){return i("isEditable")},getSingleLinkError:function(){return i("error")},getSingleLinkListData:function(){return i("listData")}})}},1160:function(t,e,r){"use strict";var n=r(76),o=r(0),a=r(2),i=r(1);e.a=function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=bwfcrm_contacts_data&&bwfcrm_contacts_data.header_data?bwfcrm_contacts_data.header_data:{},u=Object(n.a)(),l=u.setActiveMultiple,s=u.setL2NavType,f=u.setL2Nav,p=u.resetHeaderMenu,m=u.setPageHeader,h=u.setPageCountData,b=u.setL2Content;return Object(o.useEffect)((function(){p(),l({leftNav:"link-triggers",rightNav:e}),s("menu"),f(c.links_triggers_nav),m(Object(i.__)("Link Triggers","wp-marketing-automations")),!Object(a.isEmpty)(r)&&h({templates:r}),t&&b(t)}),[r]),!0}},1494:function(t,e,r){"use strict";r.r(e);var n=r(0),o=r(5),a=r(3),i=r(8),c=r(1),u=r(1160),l=r(334),s=r(12),f=r(146),p=r(55),m=r(61),h=r(62),b=r(19),g=r(9),y=r.n(g),d=r(76),v=r(1108),O=r(1116),w=r(148),j=r(108),k=r(2),E=r(149),_=r(96);function L(t){return(L="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 x(){x=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 g?e:g,i=Object.create(a.prototype),c=new N(n||[]);return o(i,"_invoke",{value:_(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",m="executing",h="completed",b={};function g(){}function y(){}function d(){}var v={};l(v,i,(function(){return this}));var O=Object.getPrototypeOf,w=O&&O(O(T([])));w&&w!==r&&n.call(w,i)&&(v=w);var j=d.prototype=g.prototype=Object.create(v);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(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"==L(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 _(e,r,n){var o=p;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===h){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=P(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===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?h:"suspendedYield",l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,n.method="throw",n.arg=l.arg)}}}function P(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,P(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=f(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 S(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(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(L(e)+" is not iterable")}return y.prototype=d,o(j,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:y,configurable:!0}),y.displayName=l(d,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,d):(t.__proto__=d,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},k(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(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=T,N.prototype={constructor:N,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(C),!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),C(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;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function P(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)}var S=function(t){var e=t.isOpen,r=t.links,o=t.onSuccess,i=t.onError,u=t.onRequestClose,l=Object(_.useMutation)(function(){var t,e=(t=x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y()({path:Object(a.A)("/link-triggers/delete"),method:"DELETE",data:{ids:e}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){P(a,n,o,i,c,"next",t)}function c(t){P(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(t){return e.apply(this,arguments)}}(),{onSuccess:function(){setTimeout((function(){return l.reset()}),2500),o&&o(),u&&u()},onError:function(){i&&i()}});return Object(n.createElement)(p.a,{modalTitle:Object(c.__)("Delete Trigger","wp-marketing-automations"),deleteEntityName:1===r.length?r[0].title:"".concat(r.length," Trigger"),confirmButtonText:Object(c.__)("Delete","wp-marketing-automations"),cancelButtonText:Object(c.__)("Cancel","wp-marketing-automations"),onConfirm:function(){return l.mutate(r.map((function(t){return t.ID})))},errorMessage:l.isError&&(l.error&&l.error.message?l.error.message:Object(c.__)("Unable to delete link triggers","wp-marketing-automations")),onRequestClose:function(){return!!u&&u()},isOpen:e,isDelete:!0})},C=r(44),N=r(195),T=r(26),A=r(336);function D(t){return(D="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 I(){return(I=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(null,arguments)}function G(){G=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 g?e:g,i=Object.create(a.prototype),c=new S(n||[]);return o(i,"_invoke",{value:_(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",m="executing",h="completed",b={};function g(){}function y(){}function d(){}var v={};l(v,i,(function(){return this}));var O=Object.getPrototypeOf,w=O&&O(O(C([])));w&&w!==r&&n.call(w,i)&&(v=w);var j=d.prototype=g.prototype=Object.create(v);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(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"==D(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 _(e,r,n){var o=p;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===h){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===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?h:"suspendedYield",l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,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=f(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 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 S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,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 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(D(e)+" is not iterable")}return y.prototype=d,o(j,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:y,configurable:!0}),y.displayName=l(d,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,d):(t.__proto__=d,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},k(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(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=C,S.prototype={constructor:S,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 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),P(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;P(r)}return o}}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),b}},e}function F(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){F(a,n,o,i,c,"next",t)}function c(t){F(a,n,o,i,c,"throw",t)}i(void 0)}))}}function R(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 U(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach((function(e){q(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function q(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=D(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==D(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B(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)||Y(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 Y(t,e){if(t){if("string"==typeof t)return z(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)?z(t,e):void 0}}function z(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(t){var e=t.selected,r=void 0===e?"all":e,o=t.menuButtons,i=void 0===o?Object(n.createElement)(n.Fragment,null):o,u=t.pitchData,g=void 0===u?{}:u,_=t.setOpenProModal,L=void 0===_?function(){}:_,x=Object(s.i)(),P=x.s,D=void 0===P?"":P,F=Object(d.a)().setActiveMultiple,R={all:"",inactive:1,active:2},q=B(Object(n.useState)(!1),2),z=q[0],V=q[1],H=B(Object(n.useState)([]),2),$=H[0],J=H[1],Q=B(Object(n.useState)(!1),2),K=Q[0],W=Q[1],X=function(){Nt&&Nt(),J([])},Z=Object(n.useCallback)((function(t,e){switch(t){case"delete":J(e),W(!0)}}),[]);Object(n.useEffect)((function(){return X(),Object(a.m)(Object(c.__)("Link Triggers","wp-marketing-automations")),function(){return ot("offset",0)}}),[]);var tt=Object(j.a)().getPageCountData,et=Object(d.a)().setPageCountData;Object(n.useEffect)((function(){F({leftNav:"link-triggers",rightNav:r})}),[r]);var rt=Object(v.a)(),nt=rt.fetchAll,ot=rt.setLinkListValues,at=rt.setSingleLinkValue,it=Object(O.a)(),ct=it.getLoading,ut=it.getAllLists,lt=it.getTotalCount,st=it.getPageOffset,ft=it.getPerPageCount,pt=it.getPageNumber,mt=it.getCountData,ht=it.getActions,bt=it.getError,gt=ut(),yt=st(),dt=ft(),vt=ct(),Ot=lt(),wt=pt(),jt=mt(),kt=ht(),Et=tt(),_t=bt();Object(n.useEffect)((function(){et(U(U({},Et),jt))}),[jt]);var Lt=Object(n.useMemo)((function(){var t={};if(Array.isArray(gt)){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Y(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(gt);try{for(r.s();!(e=r.n()).done;){var n=e.value;t[n.ID]=n}}catch(t){r.e(t)}finally{r.f()}}return t}),[gt]),xt=Object(w.b)(Lt),Pt=xt.singleSelectProps,St=xt.selectAllProps,Ct=xt.floatingBarProps,Nt=xt.resetSelection,Tt=xt.selected,At=void 0===Tt?{}:Tt,Dt=Object.keys(At).filter((function(t){return At[t]})).length;Object(n.useEffect)((function(){nt(x,yt,dt,R.hasOwnProperty(r)?R[r]:"")}),[yt,dt,x.s,r]),Object(n.useEffect)((function(){vt||V(!1)}),[vt]);var It=B(Object(n.useState)({loading:!1,status:!1}),2),Gt=It[0],Ft=It[1],Mt=Object(n.useContext)(a.h),Rt=function(){var t=M(G().mark((function t(e){var n,o,i=arguments;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},Ft(U(U({},n),{},{status:!0})),t.prev=2,t.next=5,y()({path:Object(a.A)("/link-triggers/delete"),method:"DELETE",data:{ids:[e]}});case 5:if(!(o=t.sent)||200!==o.code){t.next=12;break}Mt("Link trigger deleted"),Ft({status:!1}),nt(x,yt,dt,R.hasOwnProperty(r)?R[r]:""),t.next=13;break;case 12:throw Error(Object(a.u)(null==o?void 0:o.message));case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(2),Ft({status:!0,error:t.t0.message?t.t0.message:Object(c.__)("Error in deleting link","wp-marketing-automations")});case 18:Object(a.Lb)(Mt,3e3);case 19:case"end":return t.stop()}}),t,null,[[2,15]])})));return function(e){return t.apply(this,arguments)}}(),Ut=function(){var t=M(G().mark((function t(e){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Mt(Object(c.__)("Cloning…","wp-marketing-automations")),t.prev=1,t.next=4,y()({path:Object(a.A)("/link-trigger/".concat(e,"/clone")),method:"GET"}).then((function(t){200==t.code&&(Mt(Object(c.__)("Link Trigger cloned","wp-marketing-automations")),nt(x,0,dt,R.hasOwnProperty(r)?R[r]:""))}));case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Mt(t.t0.message);case 9:Object(a.Lb)(Mt,3e3);case 10:case"end":return t.stop()}}),t,null,[[1,6]])})));return function(e){return t.apply(this,arguments)}}(),qt=function(t){switch(t.hasOwnProperty("status")?parseInt(t.status):1){case 1:return Object(n.createElement)("span",{className:"bwf-tags bwf-tag-red"},Object(c.__)("Inactive","wp-marketing-automations")," ");case 2:return Object(n.createElement)("span",{className:"bwf-tags bwf-tag-green"},Object(c.__)("Active","wp-marketing-automations")," ");default:return Object(n.createElement)("span",{className:"bwf-tags bwf-tag-orange"},Object(c.__)("Draft","wp-marketing-automations")," ")}},Bt=function(t){return Object(n.createElement)(m.a,{label:Object(c.__)("Quick Actions","wp-marketing-automations"),menuPosition:"bottom right",renderContent:function(e){var r=e.onToggle;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(h.a,{isClickable:!0,onInvoke:function(){at("listData",t),Object(s.l)({page:"autonami",path:"/link-trigger/"+parseInt(t.ID)},"/",{}),r()}},Object(n.createElement)(b.a,{justify:"space-between"},Object(n.createElement)(b.c,null,Object(c.__)("Edit","wp-marketing-automations")))),Object(n.createElement)(h.a,{isClickable:!0,onInvoke:function(){var e,n,o=Object(a.wb)()+"/?bwfan-link-trigger="+t.hash;e=o,(n=document.createElement("textarea")).value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),Mt(Object(c.__)("Link copied","wp-marketing-automations")),Object(a.Lb)(Mt,3e3),r()}},Object(n.createElement)(b.a,{justify:"flex-start"},Object(n.createElement)(b.c,null,Object(c.__)("Copy Link","wp-marketing-automations")))),Object(n.createElement)(h.a,{isClickable:!0,onInvoke:function(){Object(a.ac)()?Ut(parseInt(t.ID)):L(!0),r()}},Object(n.createElement)(b.a,{justify:"space-between"},Object(n.createElement)(b.c,null,Object(c.__)("Duplicate","wp-marketing-automations")),!Object(a.ac)()&&Object(n.createElement)(b.c,null,a.e))),Object(n.createElement)(h.a,{isClickable:!0,onInvoke:function(){var e={modalTitle:Object(c.__)("Delete Trigger"),status:!0,deleteEntityName:t.title,buttonConfirm:Object(c.__)("Confirm","wp-marketing-automations"),buttonCancel:Object(c.__)("Cancel","wp-marketing-automations"),isDelete:!0};Ft(U(U({},e),{},{onConfirm:function(){return Rt(t.ID,e)}})),r()}},Object(n.createElement)(b.a,{justify:"flex-start"},Object(n.createElement)(b.c,null,Object(c.__)("Delete","wp-marketing-automations")))))}})},Yt=[{key:"select_link",label:Object(n.createElement)(C.a,I({type:"checkbox",checked:!1,onChange:function(){}},St)),isLeftAligned:!1,required:!0,cellClassName:"bwf-col-action bwf-w-30 bwf-table-col-sticky bwf-sticky-left"},{key:"actions",label:"",isLeftAligned:!1,cellClassName:"bwf-col-action bwf-w-30 bwf-table-col-sticky bwf-sticky-left"},{key:"name",label:Object(c.__)("Name","wp-marketing-automations"),isLeftAligned:!0,cellClassName:"bwf-w-210 bwf-table-col-sticky bwf-sticky-left"},{key:"created_on",label:Object(c.__)("Created On","wp-marketing-automations"),isLeftAligned:!0,required:!0},{key:"desc",label:Object(c.__)("Description","wp-marketing-automations"),isLeftAligned:!0,cellClassName:"bwf-w-210"},{key:"linkaction",label:Object(c.__)("Actions","wp-marketing-automations"),isLeftAligned:!0,cellClassName:"bwf-w-360 bwf-max-w-360"},{key:"autologin",label:Object(c.__)("Auto Login","wp-marketing-automations"),isLeftAligned:!0,cellClassName:"bwf-w-100"},{key:"clicks",label:Object(c.__)("Clicks","wp-marketing-automations"),isLeftAligned:!0,cellClassName:"bwf-w-100"},{key:"status",label:Object(c.__)("Status","wp-marketing-automations"),isLeftAligned:!0,cellClassName:"bwf-w-100"}],zt=function(t){return Object(n.createElement)("a",{href:"admin.php?page=autonami&path=/link-trigger/"+t.ID,type:"bwf-crm",className:"bwf-a-no-underline",onClick:function(e){e.preventDefault(),at("listData",t),Object(s.l)({page:"autonami",path:"/link-trigger/"+t.ID},"/",{})}},Object(n.createElement)("b",null,t.title.charAt(0).toUpperCase()+t.title.slice(1)+" "))},Vt=function(t){var e="-";return t.hasOwnProperty("data")&&t.data.hasOwnProperty("desc")&&!Object(k.isEmpty)(t.data.desc)&&(e=Object(n.createElement)("p",{className:"bwf-p-0 bwf-m-0"},t.data.desc)),e},Ht=function(t){if(t.hasOwnProperty("data")&&t.data.hasOwnProperty("actions")&&!Object(k.isEmpty)(t.data.actions)){var e=t.data.actions,r=[],o=[];return Object.keys(e).map((function(t){kt.hasOwnProperty(t)&&(r.length<5&&r.push(kt[t]),o.push(Object(n.createElement)("span",{key:t},kt[t])))})),Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"bwf-table-v-center"},Object(n.createElement)("span",null,Object(k.isEmpty)(r)?"-":r.join(", ")),!Object(k.isEmpty)(o)&&o.length>5&&Object(n.createElement)(E.a,{items:o,count:5})))}return"-"},$t=function(t){var e="No";return t.hasOwnProperty("data")&&t.data.hasOwnProperty("enable_auto_login")&&t.data.enable_auto_login&&(e="Yes"),e},Jt=gt.map((function(t){return[{display:Pt&&Pt[t.ID]&&Object(n.createElement)(C.a,I({type:"checkbox",checked:!1,onChange:function(){}},Pt[t.ID])),value:""},{display:Bt(t),value:"action"},{display:t.hasOwnProperty("title")?zt(t):"-",value:""},{display:t.created_at?Object(a.ib)(t.created_at):" - ",value:t.created_at},{display:Vt(t),value:""},{display:Ht(t),value:""},{display:$t(t),value:""},{display:t.hasOwnProperty("total_clicked")?t.total_clicked:"-",value:""},{display:qt(t),value:""}]})),Qt=function(t){t!==dt&&ot("limit",t)},Kt=vt||z||""!==D||0!==Ot||!["","all"].includes(r)||_t,Wt=[{slug:"link-triggers_all",name:Object(c.__)("All","wp-marketing-automations"),path:"/link-triggers/"},{slug:"link-triggers_active",name:Object(c.__)("Active","wp-marketing-automations"),path:"/link-triggers/active"},{slug:"link-triggers_inactive",name:Object(c.__)("Inactive","wp-marketing-automations"),path:"/link-triggers/inactive/"}];return Object(n.createElement)(n.Fragment,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-title"},Object(c.__)("Link Triggers","wp-marketing-automations")),parseInt(Ot)>0&&Object(n.createElement)("div",{className:"bwf-content-header-count"},Object(c.sprintf)(Object(c._n)("(%s Result)","(%s Results)",Ot,"wp-marketing-automations"),Ot))),Object(n.createElement)("div",{className:"bwf-content-header-right"},Kt&&i)),_t&&Object(n.createElement)(T.a,{status:"error"},_t.message),Kt?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(A.a,{tabs:Wt,selected:"link-triggers_".concat(r),count:Et,disableUrlUpdate:!0,onChange:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ot("offset",0),V(!0),Object(s.l)({page:"autonami",path:e},"/",{})}}),Object(n.createElement)("div",{className:"bwf_clear_16"}),Object(n.createElement)(f.a,{className:"bwf-link-table has-search",title:"",rows:Jt,headers:Yt,query:{paged:wt},rowsPerPage:dt,totalRows:Ot,isLoading:vt,onPageChange:function(t,e){ot("offset",(t-1)*dt)},onQueryChange:function(t){return"per_page"!==t?function(){}:Qt},showMenu:!1,rowHeader:!0,actions:Dt>0?[Object(n.createElement)(w.a,I({key:"link-bulk-action",actions:[{id:"delete",icon:"delete",hint:Object(c.__)("Delete","wp-marketing-automations")}],onAction:Z,inLine:!0,reset:X},Ct))]:[Object(n.createElement)(N.a,{key:"search",isLoading:vt,searchTerm:null==x?void 0:x.s,showResultCount:!1,setSearchData:function(t){if(Object(k.size)(t))Object(s.l)({s:t},"/",x);else{var e=Object(k.cloneDeep)(x);e.hasOwnProperty("s")&&(null==e||delete e.s),V(!0),Object(s.l)(e,"/",{})}}})],emptyMessage:Object(c.__)("No link trigger found.","wp-marketing-automations")})):Object(n.createElement)(l.a,{data:g}),Object(n.createElement)(p.a,{modalTitle:Object(c.__)("Delete Trigger","wp-marketing-automations"),content:Gt.content,deleteEntityName:Gt.deleteEntityName,confirmText:Gt.confirmText,confirmButtonText:Gt.buttonConfirm,cancelButtonText:Gt.buttonCancel,onConfirm:Gt.onConfirm,isLoading:Gt.loading,successMessage:Gt.success,errorMessage:Gt.error,onRequestClose:function(){return Ft({status:!1})},isOpen:Gt.status,isDelete:!Gt.hasOwnProperty("isDelete")||Gt.isDelete}),Object(n.createElement)(S,{links:$,isOpen:K,onSuccess:function(){nt(x,0,dt,R.hasOwnProperty(r)?R[r]:""),X()},onError:X,onRequestClose:function(){return W(!1)}}))},H=r(11);function $(t){return($="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 J(){J=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 g?e:g,i=Object.create(a.prototype),c=new S(n||[]);return o(i,"_invoke",{value:_(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",m="executing",h="completed",b={};function g(){}function y(){}function d(){}var v={};l(v,i,(function(){return this}));var O=Object.getPrototypeOf,w=O&&O(O(C([])));w&&w!==r&&n.call(w,i)&&(v=w);var j=d.prototype=g.prototype=Object.create(v);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(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"==$(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 _(e,r,n){var o=p;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===h){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===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?h:"suspendedYield",l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,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=f(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 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 S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,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 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($(e)+" is not iterable")}return y.prototype=d,o(j,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:y,configurable:!0}),y.displayName=l(d,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,d):(t.__proto__=d,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},k(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(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=C,S.prototype={constructor:S,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 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),P(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;P(r)}return o}}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),b}},e}function Q(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 K(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 W(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)?W(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 W(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 X=function(t){var e=t.onCloseModal,r=Object(n.useContext)(a.h),u=K(Object(n.useState)(!1),2),l=u[0],f=u[1],p=K(Object(n.useState)(""),2),m=p[0],h=p[1],b=K(Object(n.useState)(null),2),g=b[0],d=b[1],O=K(Object(n.useState)(null),2),w=O[0],j=O[1],E=Object(v.a)().setSingleLinkValue;Object(n.useEffect)((function(){f(!1),d(""),h("")}),[]);var _=function(){var t,e=(t=J().mark((function t(){var e;return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f(!0),h(""),t.prev=2,t.next=5,y()({path:Object(a.A)("/link-trigger/"),method:"POST",data:{title:g,desc:w,only_title:!0}});case 5:if(!(e=t.sent)||200!=e.code){t.next=13;break}Object(a.db)()||(bwfcrm_contacts_data.first_link_trigger_id=1),r(e.message),E("listData",{title:g,status:0}),Object(s.l)({page:"autonami",path:"/link-trigger/"+e.result.id},"/",{}),t.next=14;break;case 13:throw Error(Object(a.u)(null==e?void 0:e.message));case 14:t.next=20;break;case 16:t.prev=16,t.t0=t.catch(2),f(!1),h(t.t0.message);case 20:Object(a.Lb)(r,3e3);case 21:case"end":return t.stop()}}),t,null,[[2,16]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Q(a,n,o,i,c,"next",t)}function c(t){Q(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(){return e.apply(this,arguments)}}(),L=function(){Object(k.isEmpty)(g)?h(Object(c.__)("Name is required.","wp-marketing-automations")):(h(""),_())};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(o.Modal,{className:"bwf-admin-modal bwf-admin-modal-480 bwf-admin-modal-no-header",shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1},Object(n.createElement)("div",{className:"bwf-admin-m-header-new"},Object(n.createElement)("div",{className:"bwf-admin-m-title"},Object(c.__)("Add Link Trigger","wp-marketing-automations")),Object(n.createElement)("div",{className:"bwf-admin-m-close",onClick:e},Object(n.createElement)(i.a,{icon:"close",size:20}))),Object(n.createElement)("div",{className:"bwf_clear_16"}),Object(n.createElement)("div",{className:"bwf-form-fields",onKeyPress:function(t){"Enter"==t.key&&L()}},m&&Object(n.createElement)(T.a,{status:"error",onRemove:function(){return h("")}},m),Object(n.createElement)(o.TextControl,{placeholder:Object(c.__)("Enter link trigger name","wp-marketing-automations"),autoFocus:!0,label:Object(c.__)("Name","wp-marketing-automations"),value:g||"",onChange:function(t){return d(t)},disabled:l}),Object(n.createElement)(o.TextareaControl,{label:Object(c.__)("Description","wp-marketing-automations"),type:"text",value:w||"",placeholder:Object(c.__)("Enter Description","wp-marketing-automations"),onChange:function(t){j(t)}}),Object(n.createElement)("div",{className:"bwf_text_right bwf-form-buttons"},Object(n.createElement)(H.a,{onClick:function(){return e()},className:"bwf-cancel-btn"},Object(c.__)("Cancel","wp-marketing-automations")),Object(n.createElement)(H.a,{isPrimary:!0,disabled:l,isBusy:l,onClick:function(){L()}},Object(c.__)("Add","wp-marketing-automations"))))))},Z=r(70),tt=r(40);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,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 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.match.params.type,r=void 0===e?"all":e,s=et(Object(n.useState)(!1),2),f=s[0],p=s[1],m=et(Object(n.useState)(!1),2),h=m[0],b=m[1],g=Object(n.createElement)(o.Button,{isPrimary:!0,className:"bwf-display-flex",onClick:function(){Object(a.ac)()?b(!0):p(!0)}},!Object(a.ac)()&&Object(n.createElement)(i.a,{icon:"king",size:"16",color:"#fff"}),Object(n.createElement)("span",null,Object(c.__)("Create Link Trigger","wp-marketing-automations")));Object(u.a)(Object(c.__)("Link Triggers","wp-marketing-automations"),g,r);var y=[{type:"heading",data:{title:Object(c.__)("Explore the power of link interactions","wp-marketing-automations"),desc:Object(c.__)("Add responses, track behaviour, and automate workflows with link triggers maximize engagement.","wp-marketing-automations")}},{type:"image-desc",data:[{img:Object(a.t)()+"link-triggers/link-trigger1.png",title:Object(c.__)("Send dynamic links that trigger actions","wp-marketing-automations"),desc:Object(c.__)("Use link triggers to update tags, lists or trigger automations","wp-marketing-automations")},{img:Object(a.t)()+"link-triggers/link-trigger2.png",title:Object(c.__)("Track each click and get insights","wp-marketing-automations"),desc:Object(c.__)("Personalize contact journey based on their interactions","wp-marketing-automations")}]},{type:"buttons",data:{buttons:[{text:Object(c.__)("Create Link Trigger","wp-marketing-automations"),proCheck:!0,onClick:function(){Object(a.ac)()?b(!0):p(!0)}}]}},{type:"link-wth-text",data:{text:Object(c.__)("Curious about link triggers?","wp-marketing-automations"),link:"https://funnelkit.com/docs/autonami-2/link-triggers/",linkText:Object(c.__)("Learn More","wp-marketing-automations")}}];return Object(n.createElement)("div",{className:"bwf-p-24 bwf-link-trigger-wrap"},Object(n.createElement)(Z.a,null),Object(a.db)()&&0!==a.p?Object(n.createElement)(V,{selected:r,menuButtons:g,pitchData:y,setOpenProModal:p}):Object(n.createElement)(n.Fragment,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-title"},Object(c.__)("Link Triggers","wp-marketing-automations")),!Object(a.ac)()&&a.e)),Object(n.createElement)(l.a,{data:y})),!Object(a.ac)()&&Object(n.createElement)(tt.b,{isOpen:f,onRequestClose:function(){return p(!1)},modalContent:{isFeature:!0,featureTitle:Object(c.__)("Link Triggers","wp-marketing-automations"),proLink:Object(a.fb)("upgrade",{utm_medium:"Create+Link+Triggers+Upgrade+Modal"}),image:Object(a.sb)("link-triggers.png"),benefit:Object(c.__)("Unlock Link Triggers and other awesome features.","wp-marketing-automations")}}),h&&Object(n.createElement)(X,{onCloseModal:function(){return b(!1)}}))}}}]); |