PluginProbe
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.7.2
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.7.2
1.8.0 1.7.2 1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 All 59 releases
hostinger-reach / frontend / dist / blocks / subscription-view.js
subscription-view.js
2 lines 6.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(){"use strict";var t={145:function(t,r,e){function n(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}e.d(r,{A:function(){return n}})},369:function(t,r,e){function n(t){if(Array.isArray(t))return t}e.d(r,{A:function(){return n}})},848:function(t,r,e){function n(t,r,e,n,o,i,c){try{var a=t[i](c),u=a.value}catch(t){return void e(t)}a.done?r(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise(function(o,i){var c=t.apply(r,e);function a(t){n(c,o,i,a,u,"next",t)}function u(t){n(c,o,i,a,u,"throw",t)}a(void 0)})}}e.d(r,{A:function(){return o}})},986:function(t,r,e){function n(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,c,a=[],u=!0,s=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=i.call(e)).done)&&(a.push(n.value),a.length!==r);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=e.return&&(c=e.return(),Object(c)!==c))return}finally{if(s)throw o}}return a}}e.d(r,{A:function(){return n}})},562:function(t,r,e){function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.d(r,{A:function(){return n}})},453:function(t,r,e){e.d(r,{A:function(){return a}});var n=e(369),o=e(986),i=e(800),c=e(562);function a(t,r){return(0,n.A)(t)||(0,o.A)(t,r)||(0,i.A)(t,r)||(0,c.A)()}},800:function(t,r,e){e.d(r,{A:function(){return o}});var n=e(145);function o(t,r){if(t){if("string"==typeof t)return(0,n.A)(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?(0,n.A)(t,r):void 0}}}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n](i,i.exports,e),i.exports}e.d=function(t,r){if(Array.isArray(r))for(var n=0;n<r.length;){var o=r[n++],i=r[n++];e.o(t,o)?0===i&&n++:0===i?Object.defineProperty(t,o,{enumerable:!0,value:r[n++]}):Object.defineProperty(t,o,{enumerable:!0,get:i})}else for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)};var n=e(848),o=e(453);function i(){var t,r,e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",o=e.toStringTag||"@@toStringTag";function a(e,n,o,i){var a=n&&n.prototype instanceof s?n:s,l=Object.create(a.prototype);return c(l,"_invoke",function(e,n,o){var i,c,a,s=0,l=o||[],f=!1,y={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(r,e){return i=r,c=0,a=t,y.n=e,u}};function d(e,n){for(c=e,a=n,r=0;!f&&s&&!o&&r<l.length;r++){var o,i=l[r],d=y.p,p=i[2];e>3?(o=p===n)&&(a=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=e<2&&d<i[1])?(c=0,y.v=n,y.n=i[1]):d<p&&(o=e<3||i[0]>n||n>p)&&(i[4]=e,i[5]=n,y.n=p,c=0))}if(o||e>1)return u;throw f=!0,n}return function(o,l,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),c=l,a=p;(r=c<2?t:a)||!f;){i||(c?c<3?(c>1&&(y.n=-1),d(c,a)):y.n=a:y.v=a);try{if(s=2,i){if(c||(o="next"),r=i[o]){if(!(r=r.call(i,a)))throw TypeError("iterator result is not an object");if(!r.done)return r;a=r.value,c<2&&(c=0)}else 1===c&&(r=i.return)&&r.call(i),c<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((r=(f=y.n<0)?a:e.call(n,y))!==u)break}catch(r){i=t,c=1,a=r}finally{s=1}}return{value:r,done:f}}}(e,o,i),!0),l}var u={};function s(){}function l(){}function f(){}r=Object.getPrototypeOf;var y=[][n]?r(r([][n]())):(c(r={},n,function(){return this}),r),d=f.prototype=s.prototype=Object.create(y);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=f,c(d,"constructor",f),c(f,"constructor",l),l.displayName="GeneratorFunction",c(f,o,"GeneratorFunction"),c(d),c(d,o,"Generator"),c(d,n,function(){return this}),c(d,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:p}})()}function c(t,r,e,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}c=function(t,r,e,n){function i(r,e){c(t,r,function(t){return this._invoke(r,e,t)})}r?o?o(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n}):t[r]=e:(i("next",0),i("throw",1),i("return",2))},c(t,r,e,n)}document.addEventListener("DOMContentLoaded",function(){var t=hostinger_reach_subscription_block_data.translations;document.querySelectorAll(".hostinger-reach-block-subscription-form").forEach(function(r){var e=r.querySelector(".reach-subscription-message"),c=r.querySelector(".reach-subscription-message__icon-success"),a=r.querySelector(".reach-subscription-message__icon-error"),u=r.querySelector(".reach-subscription-message__text"),s=r.querySelector(".hostinger-reach-block-form-fields");r.addEventListener("submit",function(l){l.preventDefault();var f=r.querySelector('button[type="submit"]'),y=new FormData(r),d={};y.forEach(function(t,r){if(r.includes(".")){var e=r.split("."),n=(0,o.A)(e,2),i=n[0],c=n[1];d[i]||(d[i]={}),d[i][c]=t}else d[r]=t}),f.disabled=!0,fetch(hostinger_reach_subscription_block_data.endpoint,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":hostinger_reach_subscription_block_data.nonce},body:JSON.stringify(d)}).then(function(){var o=(0,n.A)(i().m(function n(o){var l;return i().w(function(n){for(;;)switch(n.n){case 0:if(e.style.display="flex",r.reset(),!o.ok){n.n=1;break}u.textContent=t.thanks,e.classList.add("is-success"),s.style.display="none",c.style.display="block",a.style.display="none",n.n=4;break;case 1:return n.n=2,o.json();case 2:if(!(l=n.v).errors){n.n=3;break}u.textContent=l.errors,e.style.display="block",e.classList.add("is-error"),f.disabled=!1,c.style.display="none",a.style.display="block",n.n=4;break;case 3:throw new Error;case 4:return n.a(2)}},n)}));return function(_x){return o.apply(this,arguments)}}()).catch(function(r){e.textContent=t.error,e.style.display="block",f.disabled=!1})})})})}();
2 //# sourceMappingURL=subscription-view.js.map